From cc838f9ce6d98820c249b7fd852dd93431f5d663 Mon Sep 17 00:00:00 2001 From: superstar54 Date: Fri, 1 Dec 2023 15:41:11 +0000 Subject: [PATCH] use pyproject toml --- aiida_worktree/__init__.py | 2 +- aiida_worktree/executors/__init__.py | 0 pyproject.toml | 102 +++++++++++++++++++++++++++ setup.py | 59 ---------------- 4 files changed, 103 insertions(+), 60 deletions(-) create mode 100644 aiida_worktree/executors/__init__.py create mode 100644 pyproject.toml delete mode 100644 setup.py diff --git a/aiida_worktree/__init__.py b/aiida_worktree/__init__.py index bf810204..5665dd81 100644 --- a/aiida_worktree/__init__.py +++ b/aiida_worktree/__init__.py @@ -2,4 +2,4 @@ from .node import Node from .decorator import node, build_node -__version__ = "0.0.1" +__version__ = "0.0.4" diff --git a/aiida_worktree/executors/__init__.py b/aiida_worktree/executors/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..1e1c336b --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,102 @@ +[build-system] +requires = ["flit_core >=3.4,<4"] +build-backend = "flit_core.buildapi" + +[project] +name = "aiida-worktree" +dynamic = ["version"] # read from aiida_worktree/__init__.py +description = "Design flexible node-based workflow for AiiDA calculation." +authors = [{name = "Xing Wang", email = "xingwang1991@gmail.com"}] +readme = "README.md" +license = {file = "LICENSE"} +classifiers = [ + "Development Status :: 1 - Planning", + "Framework :: AiiDA", + "License :: OSI Approved :: MIT License", + "Operating System :: POSIX :: Linux", + "Operating System :: MacOS :: MacOS X", + "Programming Language :: Python", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Scientific/Engineering" +] +keywords = ["aiida", "workflows"] +requires-python = ">=3.9" +dependencies = [ + "numpy~=1.21", + "node-graph @ git+https://github.com/scinode/node-graph.git#egg=node-graph", + "aiida-core~=2.3", + "cloudpickle", + "aiida-pseudo", + "aiida-quantumespresso", +] + +[project.urls] +Documentation = "https://aiida-worktree.readthedocs.io" +Source = "https://github.com/superstart54/aiida-worktree" + +[project.optional-dependencies] +docs = [ + "sphinx_rtd_theme==1.2.2", + "sphinx~=7.2", + "sphinx-copybutton~=0.5.0", + "sphinx-design~=0.5.0", + "sphinx-notfound-page~=1.0", + "sphinxext-rediraffe~=0.2.4", + "sphinx-sqlalchemy~=0.2.0", + "sphinx-intl~=2.1.0", + "myst-nb~=1.0.0", +] +pre-commit = [ + "pre-commit~=2.2", + "pylint~=2.17.4", +] +tests = [ + "pytest~=7.0", + "pytest-cov~=2.7,<2.11", +] + +[project.entry-points."aiida.node"] +"process.workflow.worktree" = "aiida_worktree.orm.worktree:WorkTreeNode" + +[project.entry-points."aiida_worktree.node"] +"aiida" = "aiida_worktree.nodes:node_list" + +[project.entry-points."aiida_worktree.property"] +"aiida" = "aiida_worktree.properties.built_in:property_list" + +[project.entry-points."aiida_worktree.socket"] +"aiida" = "aiida_worktree.sockets.built_in:socket_list" + + +[tool.flit.sdist] +exclude = [ + "docs/", + "tests/", +] + + +[tool.pylint.format] +max-line-length = 120 + +[tool.pytest.ini_options] +minversion = "7.0" +xfail_strict = true +addopts = "--benchmark-skip --durations=50 --strict-config --strict-markers -ra --cov-report xml --cov-append " +testpaths = [ + "tests", +] +filterwarnings = [ + "ignore::DeprecationWarning:babel:", + "ignore::DeprecationWarning:frozendict:", + "ignore::DeprecationWarning:sqlalchemy:", + "ignore::DeprecationWarning:yaml:", + "ignore::DeprecationWarning:pymatgen:", + "ignore::DeprecationWarning:jsonbackend:", + "ignore::DeprecationWarning:pkg_resources:", + "ignore:Object of type .* not in session, .* operation along .* will not proceed:sqlalchemy.exc.SAWarning", + "ignore::pytest.PytestCollectionWarning", + "default::ResourceWarning", +] diff --git a/setup.py b/setup.py deleted file mode 100644 index 70c5bf5a..00000000 --- a/setup.py +++ /dev/null @@ -1,59 +0,0 @@ -import pathlib -from setuptools import setup, find_packages - - -def test_suite(): - import unittest - - test_loader = unittest.TestLoader() - test_suite = test_loader.discover("tests", pattern="test_*.py") - return test_suite - - -# The directory containing this file -HERE = pathlib.Path(__file__).parent - -# The text of the README file -README = (HERE / "README.md").read_text() - -setup( - name="aiida-worktree", - version="0.0.3", - description="Design flexible node-based workflow for AiiDA calculation.", - long_description=README, - long_description_content_type="text/markdown", - url="https://github.com/superstart54/aiida-worktree", - author="Xing Wang", - author_email="xingwang1991@gmail.com", - license="MIT License", - classifiers=[], - packages=find_packages(), - install_requires=[ - "numpy", - "aiida-core", - "node-graph @ git+https://github.com/scinode/node-graph.git#egg=node-graph", - "cloudpickle", - "aiida-pseudo", - "aiida-quantumespresso", - "pytest", - "pytest-cov", - "pre-commit", - ], - entry_points={ - "aiida.node": [ - "process.workflow.worktree = aiida_worktree.orm.worktree:WorkTreeNode", - ], - "aiida_worktree.node": [ - "aiida = aiida_worktree.nodes:node_list", - ], - "aiida_worktree.property": [ - "aiida = aiida_worktree.properties.built_in:property_list", - ], - "aiida_worktree.socket": [ - "aiida = aiida_worktree.sockets.built_in:socket_list", - ], - }, - package_data={}, - python_requires=">=3.8", - test_suite="setup.test_suite", -)