-
Notifications
You must be signed in to change notification settings - Fork 27
/
pyproject.toml
374 lines (304 loc) · 9.83 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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
[build-system]
# Defined by PEP 518
requires = [
"setuptools>=64",
"setuptools_scm>=8",
]
# Defined by PEP 517
build-backend = "setuptools.build_meta"
[project]
authors = [
{name = "GeoVista Contributors", email = "[email protected]"}
]
classifiers = [
"Development Status :: 1 - Planning",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Atmospheric Science",
]
description = "Cartographic rendering and mesh analytics powered by PyVista"
dynamic = [
"dependencies",
"optional-dependencies",
"readme",
"version",
]
keywords = [
"cartography",
"curvilinear",
"earth-science",
"grid",
"mesh",
"python",
"pyvista",
"rectilinear",
"ugrid",
"unstructured",
"vtk",
]
license.file = "LICENSE"
name = "geovista"
requires-python = ">=3.11"
[project.urls]
Code = "https://github.com/bjlittle/geovista"
Discussions = "https://github.com/bjlittle/geovista/discussions"
Documentation = "https://geovista.readthedocs.io"
Issues = "https://github.com/bjlittle/geovista/issues"
[project.scripts]
geovista = "geovista.cli:main"
[tool.check-manifest]
ignore = [
"src/geovista/_version.py",
]
[tool.codespell]
ignore-words-list = "whet,projets"
skip = ".git,*.css,*.ipynb,*.js,*.html,*.map,*.po,CODE_OF_CONDUCT.md"
[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.pytest.ini_options]
addopts = [
"--doctest-continue-on-failure",
"--doctest-modules",
"--import-mode=importlib",
"-ra",
"--strict-config",
"--strict-markers",
"-v",
]
doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS NUMBER"
filterwarnings = [
"error",
"ignore:numpy.ndarray size changed:RuntimeWarning",
"ignore:geovista unable to remesh 1 cell:UserWarning",
"ignore:pyvista test cache image dir:UserWarning",
"ignore:pyvista test generated image dir:UserWarning",
]
image_cache_dir = "tests/plotting/image_cache"
log_cli = "True"
log_cli_level = "INFO"
markers = [
"example: gallery image tests",
"image: plotting image tests",
]
minversion = "6.0"
required_plugins = "pytest-mock pytest_pyvista"
testpaths = "tests"
xfail_strict = "True"
[tool.repo-review]
ignore = [
# https://learn.scientific-python.org/development/guides/style/#MY100
"MY100", # Uses MyPy (pyproject config).
# https://learn.scientific-python.org/development/guides/style/#PC140
"PC140", # Uses mypy.
# https://learn.scientific-python.org/development/guides/style/#PC180
"PC180", # Uses prettier.
]
[tool.ruff]
# Exclude the following, in addition to the standard set of exclusions.
# See https://docs.astral.sh/ruff/settings/#exclude for defaults.
extend-exclude = [
"docs/src/generated",
]
line-length = 88
src = [
".github/scripts",
"src",
"tests",
"docs/src",
]
[tool.ruff.format]
docstring-code-format = true
preview = false
[tool.ruff.lint]
# Allow information-source (U+2139) which could be confused for "i".
allowed-confusables = ["ℹ"]
ignore = [
# NOTE: Non-permanent exclusions should be added to ".ruff.toml".
# flake8-annotations (ANN)
# https://docs.astral.sh/ruff/rules/#flake8-annotations-ann
"ANN101", # Missing type annotation for 'self' in method.
"ANN102", # Missing type annotation for 'cls' in classmethod.
# flake8-commas (COM)
# https://docs.astral.sh/ruff/rules/#flake8-commas-com
"COM812", # Trailing comma missing.
"COM819", # Trailing comma prohibited.
# pydocstyle (D)
# https://docs.astral.sh/ruff/rules/undocumented-magic-method/
"D105", # Missing docstring in magic method.
# flake8-fixme (FIX)
# https://docs.astral.sh/ruff/rules/line-contains-todo/
"FIX002", # Line contains TODO, consider resolving the issue.
# flake8-implicit-str-concat (ISC)
# https://docs.astral.sh/ruff/rules/single-line-implicit-string-concatenation/
# NOTE: This rule may cause conflicts when used with "ruff format".
"ISC001", # Implicitly concatenate string literals on one line.
# pep8-naming
# https://docs.astral.sh/ruff/rules/#pep8-naming-n
"N806", # Variable name in function should be lowercase.
"N999", # Invalid module name.
# pandas-vet (PD)
# https://docs.astral.sh/ruff/rules/#pandas-vet-pd
"PD",
# flake8-bandit (S)
# https://docs.astral.sh/ruff/rules/assert/
"S101", # Use of assert detected.
]
preview = false
select = [
"ALL",
# pydocstyle (D)
# https://docs.astral.sh/ruff/rules/multi-line-summary-first-line/
"D212", # Multi-line docstring summary should start at the first line
]
[tool.ruff.lint.isort]
force-sort-within-sections = true
known-first-party = ["geovista"]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.mccabe]
max-complexity = 26
[tool.ruff.lint.per-file-ignores]
".github/scripts/*.py" = [
# https://docs.astral.sh/ruff/rules/implicit-namespace-package/
"INP001", # flake8-no-pep420: File is part of an implicit namespace package.
# https://docs.astral.sh/ruff/rules/print/
"T201", # flake8-print: print found.
]
"src/geovista/cli.py" = [
# https://docs.astral.sh/ruff/rules/print/
"T201", # flake8-print: print found.
]
"src/geovista/examples/*.py" = [
# https://docs.astral.sh/ruff/rules/typing-only-third-party-import/
"TCH002", # flake8-type-checking: Move 3rd-party import into a type checking block.
]
"src/geovista/examples/earthquakes.py" = [
# https://docs.astral.sh/ruff/rules/line-too-long/
"E501", # pycodestyle: Line too long.
]
"src/geovista/examples/earthquakes_wink1.py" = [
# https://docs.astral.sh/ruff/rules/line-too-long/
"E501", # pycodestyle: Line too long.
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.setuptools]
license-files = ["LICENSE"]
zip-safe = false
[tool.setuptools.dynamic]
dependencies = {file = ["requirements/pypi-core.txt"]}
readme = {file = "README.md", content-type = "text/markdown"}
[tool.setuptools.dynamic.optional-dependencies]
cmap = {file = ["requirements/pypi-optional-cmap.txt"]}
docs = {file = ["requirements/pypi-optional-docs.txt"]}
exam = {file = ["requirements/pypi-optional-exam.txt"]}
test = {file = ["requirements/pypi-optional-test.txt"]}
[tool.setuptools.packages.find]
include = ["geovista*"]
where = ["src"]
[tool.setuptools_scm]
write_to = "src/geovista/_version.py"
local_scheme = "dirty-tag"
version_scheme = "release-branch-semver"
[tool.towncrier]
package = "geovista"
package_dir = "src"
filename = "CHANGELOG.rst"
directory = "changelog"
template = "changelog/template.rst"
#
# the order here defines the rendered changelog order
#
[[tool.towncrier.type]]
# Removals and backward incompatible breaking changes.
directory = "breaking"
name = "💣 Breaking Changes"
showcontent = true
[[tool.towncrier.type]]
# Declaration of removals and backward incompatible changes.
directory = "deprecation"
name = "🔥 Deprecations"
showcontent = true
[[tool.towncrier.type]]
# New behaviours, capability, public API etc
directory = "feature"
name = "✨ New Features"
showcontent = true
[[tool.towncrier.type]]
# Updates to existing behaviours, including performance etc
directory = "enhancement"
name = "🚀 Enhancements"
showcontent = true
[[tool.towncrier.type]]
# Correction to undesired behaviours.
directory = "bugfix"
name = "🐛 Bug Fixes"
showcontent = true
[[tool.towncrier.type]]
# Package dependency removals, additions, pins etc
directory = "dependency"
name = "🔗 Dependencies"
showcontent = true
[[tool.towncrier.type]]
# Data, media and asset updates etc
directory = "asset"
name = "💽 Assets"
showcontent = true
[[tool.towncrier.type]]
# Notable changes to the documentation structure, content, render or build
directory = "documentation"
name = "📚 Documentation"
showcontent = true
[[tool.towncrier.type]]
# Miscellaneous internal and maintenance changes.
directory = "internal"
name = "💼 Internal"
showcontent = true
[[tool.towncrier.type]]
# Celebrate our awesome community members.
directory = "community"
name = "🌱 Community"
showcontent = true
[[tool.towncrier.type]]
# Changes that affect contributors e.g., standards, conventions,
# running tests, building docs, environments etc
directory = "contributor"
name = "🛠️ Contributor Infrastructure"
showcontent = true
[[tool.towncrier.type]]
# Catch all for items that don't fit elsewhere.
directory = "misc"
name = "🧰 Miscellaneous"
showcontent = true