-
Notifications
You must be signed in to change notification settings - Fork 7
/
pyproject.toml
193 lines (175 loc) · 4.73 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
[build-system]
build-backend = 'flit_core.buildapi'
requires = ['flit_core>=3.4,<4']
[project]
authors = [{name = 'The AiiDA Team', email = '[email protected]'}]
classifiers = [
'Development Status :: 3 - Alpha',
'Framework :: AiiDA',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Topic :: Scientific/Engineering'
]
dependencies = [
'aiida-core~=2.5',
'fastapi~=0.115.5',
'uvicorn[standard]~=0.32.1',
'pydantic~=2.0',
'starlette-graphene3~=0.6.0',
'graphene~=3.0',
'python-dateutil~=2.0',
'lark~=0.11.0'
]
dynamic = ['description', 'version']
keywords = ['aiida', 'workflows']
license = {file = 'LICENSE.txt'}
name = 'aiida-restapi'
readme = 'README.md'
requires-python = '>=3.9'
[project.optional-dependencies]
auth = ['python-jose', 'python-multipart', 'passlib']
docs = [
'sphinx',
'myst-parser[linkify]>=0.13.7',
'sphinx-external-toc',
'sphinx-book-theme',
'sphinx-panels',
'pygments-graphql'
]
pre-commit = ['pre-commit~=2.12']
testing = [
'aiida-restapi[auth]',
'pgtest~=1.3.1',
'wheel~=0.31',
'coverage',
'pytest~=6.2',
'pytest-regressions',
'pytest-cov',
'requests',
'httpx~=0.27.2',
'numpy~=1.21',
'anyio~=4.6.0'
]
[project.urls]
Source = 'https://github.com/aiidateam/aiida-restapi'
[tool.flit.module]
name = 'aiida_restapi'
[tool.flit.sdist]
exclude = [
'.github/',
'docs/',
'examples/',
'tests/',
'.coveragerc',
'.gitignore',
'.pre-commit-config.yaml',
'.readthedocs.yml',
'codecov.yml'
]
[tool.mypy]
disallow_incomplete_defs = true
disallow_untyped_defs = true
no_implicit_optional = true
plugins = ['pydantic.mypy']
show_error_codes = true
strict_equality = true
warn_redundant_casts = true
warn_unused_ignores = true
[[tool.pydantic.mypy.overrides]]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
warn_untyped_fields = false
[tool.pytest.ini_options]
filterwarnings = [
'ignore:Creating AiiDA configuration folder.*:UserWarning',
'ignore::DeprecationWarning:aiida:',
'ignore::DeprecationWarning:plumpy:',
'ignore::DeprecationWarning:django:',
'ignore::DeprecationWarning:yaml:'
]
python_files = 'test_*.py example_*.py'
[tool.ruff]
line-length = 120
[tool.ruff.format]
quote-style = 'single'
[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
'PLC', # pylint-convention
'PLE', # pylint-error
'PLR', # pylint-refactor
'PLW', # pylint-warning
'RUF' # ruff
]
[tool.tox]
legacy_tox_ini = """
[tox]
envlist =
py38
py311
[testenv]
usedevelop = true
[testenv:py{38,39,310,311}]
description =
py38: Installs test dependencies and runs tests using python 3.8
py39: Installs test dependencies and runs tests using python 3.9
py310: Installs test dependencies and runs tests using python 3.10
py311: Installs test dependencies and runs tests using python 3.11
extras =
auth
testing
docs
deps = black
commands = pytest {posargs}
# to get started with doing live testing
# first create a database folder {toxinidir}/.tox/.aiida/database
# and run `initdb` in it, then start the postgres server: pg_ctl -D database -l logfile start
# now you can run `tox -e verdi quicksetup`, then `tox -e serve`
[testenv:verdi]
description =
Runs a verdi command within a tox environment that sets the AIIDA_PATH
setenv =
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands = verdi {posargs}
[testenv:serve]
description =
Start the web API server within a tox environment that sets the AIIDA_PATH
extras =
auth
setenv =
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands = uvicorn aiida_restapi:app {posargs:--reload}
[testenv:docs-{update,clean}]
description =
docs-clean: Build the documentation (remove any existing build)
docs-update: Build the documentation (modify any existing build)
extras =
auth
docs
whitelist_externals =
rm
echo
commands =
clean: rm -rf docs/_build
sphinx-build -nW --keep-going -b {posargs:html} docs/source/ docs/_build/{posargs:html}
commands_post = echo "open file://{toxinidir}/docs/_build/{posargs:html}/index.html"
"""