Changes Project to Poetry
This commit is contained in:
6
.github/workflows/python-tests.yml
vendored
6
.github/workflows/python-tests.yml
vendored
@@ -23,8 +23,8 @@ jobs:
|
|||||||
python-version: "3.8"
|
python-version: "3.8"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip pipenv
|
python -m pip install --upgrade pip poetry;
|
||||||
if [ -f Pipfile ]; then pipenv install; fi
|
[ -f pyproject.toml ] && poetry install;
|
||||||
- name: Test with unittest
|
- name: Test with unittest
|
||||||
run: |
|
run: |
|
||||||
pipenv run python -m unittest -v
|
poetry run python -m unittest -v
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,3 +16,5 @@ simfiles/*
|
|||||||
*.pkl
|
*.pkl
|
||||||
|
|
||||||
*.xyz
|
*.xyz
|
||||||
|
|
||||||
|
dist/
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class Player:
|
|||||||
"==========================================================================================\n"
|
"==========================================================================================\n"
|
||||||
)
|
)
|
||||||
|
|
||||||
for cycle in range(self.initial_cycle, self.initial_cycle + self.config.maxcyc + 1):
|
for cycle in range(self.initial_cycle, self.initial_cycle + self.config.maxcyc):
|
||||||
|
|
||||||
logger.info(
|
logger.info(
|
||||||
f"------------------------------------------------------------------------------------------\n"
|
f"------------------------------------------------------------------------------------------\n"
|
||||||
|
|||||||
51
poetry.lock
generated
51
poetry.lock
generated
@@ -85,6 +85,43 @@ files = [
|
|||||||
[package.extras]
|
[package.extras]
|
||||||
toml = ["tomli"]
|
toml = ["tomli"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "dacite"
|
||||||
|
version = "1.8.1"
|
||||||
|
description = "Simple creation of data classes from dictionaries."
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.6"
|
||||||
|
files = [
|
||||||
|
{file = "dacite-1.8.1-py3-none-any.whl", hash = "sha256:cc31ad6fdea1f49962ea42db9421772afe01ac5442380d9a99fcf3d188c61afe"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
dev = ["black", "coveralls", "mypy", "pre-commit", "pylint", "pytest (>=5)", "pytest-benchmark", "pytest-cov"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nptyping"
|
||||||
|
version = "2.5.0"
|
||||||
|
description = "Type hints for NumPy."
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "nptyping-2.5.0-py3-none-any.whl", hash = "sha256:764e51836faae33a7ae2e928af574cfb701355647accadcc89f2ad793630b7c8"},
|
||||||
|
{file = "nptyping-2.5.0.tar.gz", hash = "sha256:e3d35b53af967e6fb407c3016ff9abae954d3a0568f7cc13a461084224e8e20a"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
numpy = {version = ">=1.20.0,<2.0.0", markers = "python_version >= \"3.8\""}
|
||||||
|
typing-extensions = {version = ">=4.0.0,<5.0.0", markers = "python_version < \"3.10\""}
|
||||||
|
|
||||||
|
[package.extras]
|
||||||
|
build = ["invoke (>=1.6.0)", "pip-tools (>=6.5.0)"]
|
||||||
|
complete = ["pandas", "pandas-stubs-fork"]
|
||||||
|
dev = ["autoflake", "beartype (<0.10.0)", "beartype (>=0.10.0)", "black", "codecov (>=2.1.0)", "coverage", "feedparser", "invoke (>=1.6.0)", "isort", "mypy", "pandas", "pandas-stubs-fork", "pip-tools (>=6.5.0)", "pylint", "pyright", "setuptools", "typeguard", "wheel"]
|
||||||
|
pandas = ["pandas", "pandas-stubs-fork"]
|
||||||
|
qa = ["autoflake", "beartype (<0.10.0)", "beartype (>=0.10.0)", "black", "codecov (>=2.1.0)", "coverage", "feedparser", "isort", "mypy", "pylint", "pyright", "setuptools", "typeguard", "wheel"]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "numpy"
|
name = "numpy"
|
||||||
version = "1.24.3"
|
version = "1.24.3"
|
||||||
@@ -258,7 +295,19 @@ files = [
|
|||||||
[package.extras]
|
[package.extras]
|
||||||
test = ["pytest"]
|
test = ["pytest"]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "typing-extensions"
|
||||||
|
version = "4.6.3"
|
||||||
|
description = "Backported and Experimental Type Hints for Python 3.7+"
|
||||||
|
category = "main"
|
||||||
|
optional = false
|
||||||
|
python-versions = ">=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "typing_extensions-4.6.3-py3-none-any.whl", hash = "sha256:88a4153d8505aabbb4e13aacb7c486c2b4a33ca3b3f807914a9b4c844c471c26"},
|
||||||
|
{file = "typing_extensions-4.6.3.tar.gz", hash = "sha256:d91d5919357fe7f681a9f2b5b4cb2a5f1ef0a1e9f59c4d8ff0d3491e05c0ffd5"},
|
||||||
|
]
|
||||||
|
|
||||||
[metadata]
|
[metadata]
|
||||||
lock-version = "2.0"
|
lock-version = "2.0"
|
||||||
python-versions = "^3.8"
|
python-versions = "^3.8"
|
||||||
content-hash = "9d6162d0b954236bf441f7fdd3b4b56e47865eb3c11fbd37fda44c30042a68cb"
|
content-hash = "5767445dc10a28eeb01ba23bfbf781b68d8c158df80be696d53cb0c962d409ab"
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ numpy = "^1.24.3"
|
|||||||
argparse = "^1.4.0"
|
argparse = "^1.4.0"
|
||||||
setproctitle = "^1.3.2"
|
setproctitle = "^1.3.2"
|
||||||
pyyaml = "^6.0"
|
pyyaml = "^6.0"
|
||||||
|
dacite = "^1.8.1"
|
||||||
|
nptyping = "^2.5.0"
|
||||||
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
|
|||||||
@@ -335,16 +335,6 @@ class TestPlayer(unittest.TestCase):
|
|||||||
|
|
||||||
player.dice_interface.start.assert_called_once()
|
player.dice_interface.start.assert_called_once()
|
||||||
|
|
||||||
# @mock.patch("builtins.open", mock_open)
|
|
||||||
# def test_gaussian_start(self):
|
|
||||||
# player = Player("control.test.yml")
|
|
||||||
# player.gaussian_interface = mock.MagicMock()
|
|
||||||
# player.gaussian_interface.start = mock.MagicMock()
|
|
||||||
#
|
|
||||||
# player.gaussian_start(1)
|
|
||||||
#
|
|
||||||
# player.gaussian_interface.start.assert_called_once()
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|||||||
Reference in New Issue
Block a user