-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
162 lines (141 loc) · 3.13 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
[build-system]
requires = [
"setuptools>=61.2",
"Cython>=3.0",
"numpy>=2.0.0",
]
build-backend = "setuptools.build_meta"
[project]
name = "gpgi"
version = "2.0.0"
description = "A Generic Particle+Grid Interface"
authors = [
{ name = "C.M.T. Robert" },
]
classifiers = [
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Cython",
"Programming Language :: Python :: 3",
]
requires-python = ">=3.11"
dependencies = [
# keep in sync with NPY_TARGET_VERSION (setup.py)
"numpy>=1.25, <3",
]
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.license]
text = "GPL-3.0"
[project.urls]
Homepage = "https://github.com/neutrinoceros/gpgi"
Changelog = "https://github.com/neutrinoceros/gpgi/blob/main/CHANGELOG.md"
[dependency-groups]
test = [
"matplotlib>=3.6.0",
"pytest-mpl>=0.16.1",
"pytest>=7.0.0",
]
covcheck = [
{include-group = "test"},
"coverage>=7.6.1",
]
concurrency = [
{include-group = "test"},
"pytest-repeat>=0.9.3",
]
typecheck = [
"mypy>=1.13.0",
"pyright>=1.1.391",
]
[tool.setuptools]
license-files = [
"LICENSE",
]
include-package-data = false
[tool.setuptools.packages.find]
where = ["src"]
namespaces = false
[tool.coverage.run]
source = [
"src/gpgi",
"tests",
]
omit = [
"src/gpgi/_backports.py",
"src/gpgi/_typing.py",
]
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
# a more strict default pragma
"\\# pragma: no cover\\b",
# allow defensive code
"^\\s*raise NotImplementedError\\b",
# typing-related code
"^if TYPE_CHECKING:",
": \\.\\.\\.(\\s*#.*)?$",
"^ +\\.\\.\\.$",
"-> ['\"]?NoReturn['\"]?:",
]
[tool.ruff.lint]
ignore = ["E501", "D101"]
select = [
"E",
"F",
"W",
"D", # pydocstyle
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"TCH", # flake8-type-checking
"YTT", # flake8-2020
"I", # isort
"UP", # pyupgrade
"NPY", # numpy specific rules
]
[tool.ruff.lint.isort]
combine-as-imports = true
known-first-party = ["gpgi"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
"setup.py" = ["D"]
"_backports.py" = ["D"]
[tool.mypy]
python_version = "3.11"
show_error_codes = true
pretty = true
warn_return_any = true
warn_unused_configs = true
warn_unreachable = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
exclude = [
"gpgi/lib",
"gpgi/_backports"
]
follow_imports = "silent"
[tool.pytest.ini_options]
filterwarnings = [
"error",
'ignore:Matplotlib is currently using agg, which is a non-GUI backend:UserWarning',
]
[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
build-frontend = "build[uv]"
build-verbosity = 1
test-groups = ["test", "concurrency"]
test-command = [
"pytest --color=yes -ra {project}/tests",
"pytest --color=yes --count 500 {project}/tests/test_concurrent.py",
]
test-skip = "*-musllinux*"
[tool.cibuildwheel.linux]
archs = "x86_64"
[tool.cibuildwheel.macos]
archs = "auto64"
[tool.cibuildwheel.windows]
archs = "AMD64"