forked from aiidateam/aiida-core
-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
204 lines (184 loc) · 5.03 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
194
195
196
197
198
199
200
201
202
203
204
[build-system]
requires = ["setuptools>=40.8.0", "wheel", "fastentrypoints~=0.12"]
build-backend = "setuptools.build_meta"
[tool.pylint.master]
load-plugins = ["pylint_django", "utils.pylint_aiida"]
# this currently fails with aiida.common.exceptions.ProfileConfigurationError: no profile has been loaded
# we woud need a static settings module to use this
# django-settings-module = "aiida.backends.djsite.settings"
[tool.pylint.format]
max-line-length = 120
[tool.pylint.messages_control]
disable = [
"bad-continuation",
"bad-option-value",
"consider-using-f-string",
"cyclic-import",
"django-not-configured",
"duplicate-code",
"import-outside-toplevel",
"inconsistent-return-statements",
"locally-disabled",
"logging-fstring-interpolation",
"no-else-raise",
"raise-missing-from",
"too-few-public-methods",
"too-many-ancestors",
"too-many-arguments",
"too-many-instance-attributes",
# this can be removed when https://github.com/PyCQA/astroid/issues/1015 is fixed
"not-context-manager",
]
[tool.pylint.basic]
good-names = [
"_",
"x",
"y",
"z",
"i",
"j",
"k",
"pk",
"fg",
"nl",
"TemplatereplacerCalculation",
"ArithmeticAddCalculation",
"MultiplyAddWorkChain"
]
no-docstring-rgx = "^_,setUp,tearDown"
docstring-min-length = 5
[tool.pylint.design]
max-locals = 20
[tool.pytest.ini_options]
minversion = "6.0"
addopts = "--benchmark-skip"
testpaths = [
"tests",
]
filterwarnings = [
"ignore::DeprecationWarning:babel:",
"ignore::DeprecationWarning:django:",
"ignore::DeprecationWarning:frozendict:",
"ignore::DeprecationWarning:sqlalchemy:",
"ignore::DeprecationWarning:yaml:",
"ignore::DeprecationWarning:pymatgen:",
"ignore::DeprecationWarning:jsonbackend:",
"ignore::DeprecationWarning:pkg_resources:",
"ignore::pytest.PytestCollectionWarning",
"default::ResourceWarning",
]
markers = [
"requires_rmq: requires a connection (on port 5672) to RabbitMQ",
"sphinx: set parameters for the sphinx `app` fixture"
]
[tool.isort]
line_length = 120
force_sort_within_sections = true
# this configuration is compatible with yapf
multi_line_output = 3
include_trailing_comma = true
[tool.yapf]
based_on_style = "google"
column_limit = 120
dedent_closing_brackets = true
coalesce_brackets = true
align_closing_bracket_with_visual_indent = true
split_arguments_when_comma_terminated = true
indent_dictionary_value = false
[tool.mypy]
show_error_codes = true
check_untyped_defs = true
scripts_are_modules = true
warn_unused_ignores = true
warn_redundant_casts = true
no_warn_no_return = true
plugins = ["sqlalchemy.ext.mypy.plugin"]
[[tool.mypy.overrides]]
module = 'aiida.*'
# can only follow these imports when more of the code is typed
follow_imports = "skip"
[[tool.mypy.overrides]]
module = 'tests.*'
check_untyped_defs = false
[[tool.mypy.overrides]]
module = [
'circus.*',
'django.*',
'kiwipy.*',
'numpy.*',
'ruamel.*',
'scipy.*',
'tqdm.*',
'wrapt.*',
]
ignore_missing_imports = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py37-django
[testenv]
usedevelop=True
deps =
py37: -rrequirements/requirements-py-3.7.txt
py38: -rrequirements/requirements-py-3.8.txt
py39: -rrequirements/requirements-py-3.9.txt
[testenv:py{36,37,38,39}-{django,sqla}]
passenv =
PYTHONASYNCIODEBUG
setenv =
django: AIIDA_TEST_BACKEND = django
sqla: AIIDA_TEST_BACKEND = sqlalchemy
SQLALCHEMY_WARN_20 = 1
commands = pytest {posargs}
[testenv:py{36,37,38,39}-verdi]
setenv =
AIIDA_TEST_BACKEND = django
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands = verdi {posargs}
[testenv:py{36,37,38,39}-docs-{clean,update}]
description =
clean: Build the documentation (remove any existing build)
update: Build the documentation (modify any existing build)
passenv = RUN_APIDOC
setenv =
update: RUN_APIDOC = False
changedir = docs
whitelist_externals = make
commands =
clean: make clean
make debug
[testenv:py{36,37,38,39}-docs-live]
# tip: remove apidocs before using this feature (`cd docs; make clean`)
description = Build the documentation and launch browser (with live updates)
deps =
py37: -rrequirements/requirements-py-3.7.txt
py38: -rrequirements/requirements-py-3.8.txt
py39: -rrequirements/requirements-py-3.9.txt
sphinx-autobuild
setenv =
RUN_APIDOC = False
commands =
sphinx-autobuild \
--re-ignore build/.* \
--port 0 --open-browser \
-n -b {posargs:html} docs/source/ docs/build/{posargs:html}
[testenv:py{36,37,38,39}-pre-commit]
description = Run the pre-commit checks
extras = pre-commit
commands = pre-commit run {posargs}
[testenv:molecule-{django,sqla}]
description = Run the molecule containerised tests
skip_install = true
parallel_show_output = true
deps =
ansible~=2.10.0
docker~=4.2
molecule[docker]~=3.1.0
setenv =
MOLECULE_GLOB = .molecule/*/config_local.yml
django: AIIDA_TEST_BACKEND = django
sqla: AIIDA_TEST_BACKEND = sqlalchemy
passenv =
AIIDA_TEST_WORKERS
commands = molecule {posargs:test}
"""