diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d737599..216eed7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,7 +29,7 @@ jobs: python -m pip install --upgrade pip pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - pip install -e . + pip install -e ".[dev]" # - name: Lint with flake8 # run: | # # stop the build if there are Python syntax errors or undefined names diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2e2de96 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,72 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "asimtools" +description = "A lightweight python package for managing and running atomic simulation workflows" +version = "0.0.1" +readme = "README.md" +license = { text = "MIT" } +authors = [ + { name="Keith Phuthi", email="mkphuthi@gmail.com" }, +] +maintainers = [ + { name="Keith Phuthi", email="mkphuthi@gmail.com" }, +] +keywords = ["high-throughput", "workflow", "atomistic", "simulation"] +requires-python = ">=3.9" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Topic :: Scientific/Engineering", + "Intended Audience :: Science/Research", + "Development Status :: 4 - Beta", + "Operating System :: MacOS", + "Operating System :: Unix" +] +dependencies = [ + "pandas", + "pyyaml", + "pymatgen", + "ase>=3.22.1", + # Recommended to use the master branch of the ASE>=3.23 from gitlab but only + # required for lammps to handle masses correctly so far + "colorama", + "mp-api", +] + +[tool.setuptools.packages.find] +include = [ + "asimtools", + "asimtools.*", + "asimtools.scripts.*.*", +] + +[project.optional-dependencies] +dev = [ + "asimtools[tests, docs, phonons]", +] +mlip = ["matgl>=1.1.2", "chgnet>=0.3.3", "mace-torch>=0.3.3"] +phonons = ["phonopy>=2.20.0", "seekpath>=2.1.0"] +tests = ["pytest>=7.4.0", "pytest-cov>=3.0.0"] +docs = [ + "sphinx", + "sphinx-rtd-theme", + "myst-parser", +] + +[project.scripts] +asim-run = "asimtools.scripts.asim_run:main" +asim-execute = "asimtools.scripts.asim_execute:main" +asim-check = "asimtools.scripts.asim_check:main" + +[project.urls] +repository = "https://github.com/BattModels/asimtools" +issues = "https://github.com/BattModels/asimtools/issues" +documentation = "https://battmodels.github.io/asimtools/" + +[tool.pytest.ini_options] +log_cli_level = "warn" +pythonpath = "asimtools" +testpaths = ["tests"] diff --git a/setup.py b/setup.py deleted file mode 100644 index c391b02..0000000 --- a/setup.py +++ /dev/null @@ -1,44 +0,0 @@ -from setuptools import setup, find_packages -from pathlib import Path -version_dict = {} -with open(Path(__file__).parents[0] / 'asimtools/_version.py') as fp: - exec(fp.read(), version_dict) - -setup( - name="asimtools", - version=version_dict["__version__"], - description="Atomic Simulation Tools", - author="Keith Phuthi and Emil Annevelink", - python_requires=">=3.7", - packages=find_packages(include=[ - "asimtools", - "asimtools.*", - "asimtools.scripts.*.*", - ]), - entry_points={ - # make the scripts available as command line scripts - "console_scripts": [ - "asim-run = asimtools.scripts.asim_run:main", - "asim-execute = asimtools.scripts.asim_execute:main", - "asim-check = asimtools.scripts.asim_check:main", - ] - }, - install_requires=[ - "pandas", - "pyyaml", - "pymatgen", - "ase>=3.22.1", - # Recommended to use the master branch of the ASE gitlab but only - # required for lammps to handle masses correctly as far as we can tell - "colorama", - "myst-parser", - "sphinx", - "pytest", - "phonopy", - "seekpath", - "mp-api", - ], - zip_safe=True, - long_description=open('README.md').read(), - long_description_content_type='text/markdown', -) diff --git a/testpyproject.toml b/testpyproject.toml deleted file mode 100644 index 69ca9e6..0000000 --- a/testpyproject.toml +++ /dev/null @@ -1,46 +0,0 @@ -[build-system] -requires = ["hatchling"] -build-backend = "hatchling.build" - -[project] -name = "asimtools" -version = "0.0.1" -authors = [ - { name="Keith Phuthi", email="mkphuthi@gmail.com" }, -] -maintainers = [ - { name="Keith Phuthi", email="mkphuthi@gmail.com" }, -] -description = "A lightweight python package for managing and running atomic simulation workflows" -readme = "README.md" -requires-python = ">=3.9" -classifiers = [ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: MacOS", - "Operating System :: Unix" -] -dependecies = [ - "pandas", - "pyyaml", - "pymatgen", - "ase>=3.22.1", - # Recommended to use the master branch of the ASE gitlab but only - # required for lammps to handle masses correctly as far as we can tell - "colorama", - "myst-parser", - "sphinx", - "pytest", - "phonopy", - "seekpath", - "mp-api", -] - -[project.scripts] -asim-run = "asimtools.scripts.asim_run:main" -asim-execute = "asimtools.scripts.asim_execute:main" -asim-check = "asimtools.scripts.asim_check:main" - -[project.urls] -Homepage = "https://github.com/BattModels/asimtools" -Issues = "https://github.com/BattModels/asimtools/issues"