-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathpyproject.toml
More file actions
215 lines (177 loc) · 6.44 KB
/
pyproject.toml
File metadata and controls
215 lines (177 loc) · 6.44 KB
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
205
206
207
208
209
210
211
212
213
214
215
[build-system]
# defined by PEP-518
requires = [
"Cython>=3",
"oldest-supported-numpy",
"setuptools>=79",
"setuptools_scm[toml]>=8",
]
# defined by PEP-517
build-backend = "setuptools.build_meta"
[project]
authors = [
{name = "SciTools Contributors", email = "scitools.pub@gmail.com"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
description = "Python wrapper to libmo_unpack"
dynamic = [
"readme",
"version",
]
license = "BSD-3-Clause"
license-files = ["LICENSE"]
name = "mo_pack"
requires-python = ">=3.11"
[project.urls]
Code = "https://github.com/SciTools/mo_pack"
Issues = "https://github.com/SciTools/mo_pack/issues"
[tool.check-manifest]
ignore = [
"src/mo_pack/_packing.c",
"src/mo_pack/_version.py",
]
[tool.pytest.ini_options]
addopts = ["-ra", "--strict-config", "--strict-markers"]
filterwarnings = ["error"]
log_cli_level = "INFO"
minversion = "6.0"
testpaths = "src/mo_pack"
xfail_strict = true
log_level = "INFO"
[tool.setuptools]
zip-safe = false
[tool.setuptools.dynamic]
readme = {file = "README.md", content-type = "text/markdown"}
[tool.setuptools.packages.find]
include = ["mo_pack*"]
where = ["src"]
[tool.setuptools.package-data]
mo_pack = ["tests/test_data/*.pp"]
[tool.setuptools_scm]
write_to = "src/mo_pack/_version.py"
local_scheme = "dirty-tag"
version_scheme = "release-branch-semver"
[tool.numpydoc_validation]
checks = [
"all", # Enable all numpydoc validation rules, apart from the following:
# -> Docstring text (summary) should start in the line immediately
# after the opening quotes (not in the same line, or leaving a
# blank line in between)
"GL01", # Permit summary line on same line as docstring opening quotes.
# -> Closing quotes should be placed in the line after the last text
# in the docstring (do not close the quotes in the same line as
# the text, or leave a blank line between the last text and the
# quotes)
"GL02", # Permit a blank line before docstring closing quotes.
# -> Double line break found; please use only one blank line to
# separate sections or paragraphs, and do not leave blank lines
# at the end of docstrings
"GL03", # Ignoring.
# -> See Also section not found
"SA01", # Not all docstrings require a "See Also" section.
# -> No extended summary found
"ES01", # Not all docstrings require an "Extended Summary" section.
# -> No examples section found
"EX01", # Not all docstrings require an "Examples" section.
# -> No Yields section found
"YD01", # Not all docstrings require a "Yields" section.
]
exclude = [
'\.__eq__$',
'\.__ne__$',
'\.__repr__$',
]
[tool.repo-review]
ignore = [
# https://learn.scientific-python.org/development/guides/style/#PC180
# Not possible to run on the hardware used by the majority of our developers. Might change in future!
"PC180", # Uses prettier
# https://learn.scientific-python.org/development/guides/packaging-simple#PP006
"PP006", # Uses dev dependency group
# https://learn.scientific-python.org/development/guides/packaging-simple/#PY004
"PY004", # Has docs folder
# https://learn.scientific-python.org/development/guides/docs/#readthedocsyaml
"RTD", # ReadTheDocs
"PY007", # TODO: Tox adoption blocked by SciTools/iris#5184.
]
[tool.mypy]
# See https://mypy.readthedocs.io/en/stable/config_file.html
ignore_missing_imports = true
warn_unused_configs = true
warn_unreachable = true
enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
strict = true
[tool.ruff]
line-length = 88
[tool.ruff.format]
preview = false
[tool.ruff.lint]
preview = false
select = [
"ALL",
# list specific rules to include that is skipped using numpy convention.
"D212", # Multi-line docstring summary should start at the first line
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["linux-64"]
[tool.pixi.environments]
default = { features = [], solve-group = "default" }
dev = { features = ["dev"], solve-group = "default" }
test = { features = ["test", "dev"], solve-group = "default" }
mo-pack = { features = ["test", "dev"], solve-group = "default" }
py311 = { features = ["py311"], solve-group = "py311" }
dev-py311 = { features = ["dev", "py311"], solve-group = "py311" }
test-py311 = { features = ["test", "dev", "py311"], solve-group = "py311" }
mo-pack-py311 = { features = ["test", "dev", "py311"], solve-group = "py311" }
py312 = { features = ["py312"], solve-group = "py312" }
dev-py312 = { features = ["dev", "py312"], solve-group = "py312" }
test-py312 = { features = ["test", "dev", "py312"], solve-group = "py312" }
mo-pack-py312 = { features = ["test", "dev", "py312"], solve-group = "py312" }
py313 = { features = ["py313"], solve-group = "py313" }
dev-py313 = { features = ["dev", "py313"], solve-group = "py313" }
test-py313 = { features = ["test", "dev", "py313"], solve-group = "py313" }
mo-pack-py313 = { features = ["test", "dev", "py313"], solve-group = "py313" }
[tool.pixi.dependencies]
cython = ">=3.0.12,<4"
libmo_unpack = ">=3.1.2,<4"
numpy = ">=1.25.0,<3"
setuptools = ">=79.0.1,<80"
setuptools-scm = ">=8.3.1,<9"
[tool.pixi.feature.dev.dependencies]
pre-commit = ">=4.2.0,<5"
ruff = ">=0.11.6,<0.12"
[tool.pixi.feature.dev.pypi-dependencies]
mo-pack = { path = ".", editable = true }
[tool.pixi.feature.dev.tasks]
build = { cmd = ["python", "setup.py", "build_ext", "--inplace"], depends-on = ["clean"] }
clean = { cmd = ["python", "setup.py", "clean_cython"] }
fmt = "ruff format"
lint = "ruff check"
pytest = { cmd = ["pytest"], depends-on = ["build"] }
[tool.pixi.feature.test.dependencies]
pytest = ">=8.3.5,<9"
[tool.pixi.feature.py311.dependencies]
python = "3.11.*"
pip = ">=25.0.1,<26"
[tool.pixi.feature.py312.dependencies]
python = "3.12.*"
pip = ">=25.0.1,<26"
[tool.pixi.feature.py313.dependencies]
python = {version="3.13.*", build="*_cp313"}
pip = ">=25.0.1,<26"