-
Notifications
You must be signed in to change notification settings - Fork 8
/
pyproject.toml
153 lines (137 loc) · 3.62 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
[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"
[tool.flit.module]
name = "aiida_test_cache"
[project]
name = "aiida-test-cache"
version = "0.0.1"
description = "A pytest plugin to simplify testing of AiiDA workflows"
authors = [
{name = "Dominik Gresch"},
{name = "Leopold Talirz"},
{name = "Jens Bröder"},
{name = "Philipp Rüßmann"},
{name = "AiiDA team"},
]
license = {file = "LICENSE.txt"}
readme = "README.md"
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: Plugins",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Physics",
"Framework :: AiiDA",
"Framework :: Pytest",
]
keywords = [
"AiiDA",
"testing",
"pytest",
"mock",
"cache",
]
urls = {Homepage = "https://aiida-testing.readthedocs.io/"}
requires-python = ">=3.9"
dependencies = [
"aiida-core>=2.1,<2.6",
"pytest>=7.0",
"voluptuous~=0.12",
]
[project.optional-dependencies]
docs = ["sphinx", "sphinx-rtd-theme"]
tests = [
"pgtest~=1.3.1",
"aiida-diff~=2.0.0",
"pytest-datadir",
"pytest-mock",
"pytest-cov>=4.0",
]
pre_commit = [
"pre-commit",
"mypy==1.13",
"types-PyYAML",
]
dev = [
'aiida-test-cache[tests,pre_commit,docs]',
]
[project.scripts]
aiida-mock-code = "aiida_test_cache.mock_code._cli:run"
[project.entry-points."pytest11"]
aiida_mock_code = "aiida_test_cache.mock_code"
aiida_archive_cache = "aiida_test_cache.archive_cache"
[tool.pytest.ini_options]
addopts = '--durations=10 --durations-min=3 --strict-config --strict-markers -ra --cov-report xml --cov-append'
filterwarnings = [
'ignore:Creating AiiDA configuration:UserWarning:aiida',
# https://github.com/aiidateam/plumpy/issues/283
'ignore:There is no current event loop:DeprecationWarning:plumpy',
# https://github.com/aiidateam/aiida-core/issues/6657
'ignore:Python 3.14 will, by default, filter extracted tar archives:DeprecationWarning:aiida',
]
[tool.yapf]
based_on_style = "pep8"
coalesce_brackets = true
dedent_closing_brackets = true
column_limit = 100
[tool.ruff]
line-length = 130
show-fixes = true
[tool.ruff.lint]
ignore = ["E501", "TRY003"]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"PLE", # pylint error rules
"PLW", # pylint warning rules
"PLC", # pylint convention rules
"RUF", # ruff-specific rules
"TRY", # Tryceratops
"UP" # pyupgrade
]
[tool.ruff.lint.per-file-ignores]
"tests/archive_cache/test_archive_cache.py" = ["ARG001"]
[tool.mypy]
show_error_codes = true
# Strictness settings
disallow_any_unimported = true
disallow_subclassing_any = true
disallow_untyped_calls = false
disallow_untyped_decorators = true
no_implicit_optional = true
no_strict_optional = false
# Enable all warnings
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = true
warn_unreachable = true
allow_untyped_globals = false
strict_equality = true
[[tool.mypy.overrides]]
module = ["voluptuous.*"]
ignore_missing_imports = true
[tool.tox]
legacy_tox_ini = """
[tox]
envlist = py39
[testenv]
usedevelop = true
[testenv:py{39,310,311,312}]
extras = tests
commands = pytest {posargs}
[testenv:pre-commit-py{39,310,311,312}]
extras =
pre_commit
commands = pre-commit {posargs:run --all}
"""