-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
157 lines (133 loc) · 4.54 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
# See https://www.python.org/dev/peps/pep-0621/
name = "aiida-pythonjob"
dynamic = ["version"] # read from aiida_pythonjob/src/__init__.py
description = "Run Python functions on a remote computer."
authors = [{name = "Xing Wang", email = "[email protected]"}]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = [
"Programming Language :: Python",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Development Status :: 3 - Alpha",
"Framework :: AiiDA"
]
keywords = ["aiida", "plugin"]
requires-python = ">=3.9"
dependencies = [
"aiida-core>=2.3,<3",
"ase",
"cloudpickle",
"voluptuous"
]
[project.optional-dependencies]
pre-commit = [
'pre-commit~=3.5',
]
docs = [
"sphinx_rtd_theme",
"sphinx",
"sphinxcontrib-contentui",
"sphinxcontrib-details-directive",
"sphinx-gallery",
"furo",
"markupsafe<2.1",
"nbsphinx"
]
[project.urls]
Source = "https://github.com/aiidateam/aiida-pythonjob"
[project.entry-points."aiida.data"]
"pythonjob.pickled_data" = "aiida_pythonjob.data.pickled_data:PickledData"
"pythonjob.ase.atoms.Atoms" = "aiida_pythonjob.data.atoms:AtomsData"
"pythonjob.builtins.int" = "aiida.orm.nodes.data.int:Int"
"pythonjob.builtins.float" = "aiida.orm.nodes.data.float:Float"
"pythonjob.builtins.str" = "aiida.orm.nodes.data.str:Str"
"pythonjob.builtins.bool" = "aiida.orm.nodes.data.bool:Bool"
"pythonjob.builtins.list"="aiida_pythonjob.data.data_with_value:List"
"pythonjob.builtins.dict"="aiida_pythonjob.data.data_with_value:Dict"
[project.entry-points."aiida.calculations"]
"pythonjob.pythonjob" = "aiida_pythonjob.calculations.pythonjob:PythonJob"
[project.entry-points."aiida.parsers"]
"pythonjob.pythonjob" = "aiida_pythonjob.parsers.pythonjob:PythonJobParser"
[tool.pytest.ini_options]
# Configuration for [pytest](https://docs.pytest.org)
python_files = "test_*.py example_*.py"
addopts = "--pdbcls=IPython.terminal.debugger:TerminalPdb"
filterwarnings = [
"ignore::DeprecationWarning:aiida:",
"ignore:Creating AiiDA configuration folder:",
"ignore::DeprecationWarning:plumpy:",
"ignore::DeprecationWarning:yaml:",
]
[tool.coverage.run]
# Configuration of [coverage.py](https://coverage.readthedocs.io)
# reporting which lines of your plugin are covered by tests
source = ["src/aiida_pythonjob"]
[tool.ruff]
line-length = 120
[tool.ruff.lint]
ignore = [
'F403', # Star imports unable to detect undefined names
'F405', # Import may be undefined or defined from star imports
'PLR0911', # Too many return statements
'PLR0912', # Too many branches
'PLR0913', # Too many arguments in function definition
'PLR0915', # Too many statements
'PLR2004', # Magic value used in comparison
'RUF005', # Consider iterable unpacking instead of concatenation
'RUF012' # Mutable class attributes should be annotated with `typing.ClassVar`
]
select = [
'E', # pydocstyle
'W', # pydocstyle
'F', # pyflakes
'I', # isort
'N', # pep8-naming
'PLC', # pylint-convention
'PLE', # pylint-error
'PLR', # pylint-refactor
'PLW', # pylint-warning
'RUF' # ruff
]
## Hatch configurations
[tool.hatch.version]
path = "src/aiida_pythonjob/__init__.py"
[tool.hatch.envs.hatch-test]
dependencies = [
'pgtest~=1.3,>=1.3.1',
'coverage~=7.0',
'pytest~=7.0',
"pytest-cov~=4.1",
"ipdb"
]
[tool.hatch.envs.hatch-test.scripts]
# These are the efault scripts provided by hatch.
# The have been copied to make the execution more transparent
# This command is run with the command `hatch test`
run = "pytest{env:HATCH_TEST_ARGS:} {args}"
# The three commands below are run with the command `hatch test --coverage`
run-cov = "coverage run -m pytest{env:HATCH_TEST_ARGS:} {args}"
cov-combine = "coverage combine"
cov-report = "coverage report"
[[tool.hatch.envs.hatch-test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.hatch-static-analysis]
dependencies = ["ruff==0.4.3"]
[tool.hatch.envs.hatch-static-analysis.scripts]
# Fixes are executed with `hatch fmt`.
# Checks are executed with `hatch fmt --check`.
format-check = "ruff format --check --config pyproject.toml {args:.}"
format-fix = "ruff format --config pyproject.toml {args:.}"
lint-check = "ruff check --config pyproject.toml {args:.}"
lint-fix = "ruff check --config pyproject.toml --fix --exit-non-zero-on-fix --show-fixes {args:.}"
[tool.hatch.envs.docs]
features = ["docs"]
[tool.hatch.envs.docs.scripts]
build = [
"make -C docs"
]