forked from pyvista/pyvista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
440 lines (410 loc) · 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
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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
[build-system]
build-backend = 'setuptools.build_meta'
requires = ['setuptools']
[project]
authors = [{ name = 'PyVista Developers', email = 'info@pyvista.org' }]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: MacOS',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.9',
'Topic :: Scientific/Engineering :: Information Analysis',
]
dependencies = [
'matplotlib>=3.0.1',
'numpy>=1.21.0', # minimum typing support
'pillow',
'pooch',
'scooby>=0.5.1',
'typing-extensions',
'vtk<9.4.0',
]
description = 'Easier Pythonic interface to VTK'
dynamic = ['version']
keywords = ['mesh', 'numpy', 'plotting', 'vtk']
license = { text = 'MIT' }
name = 'pyvista'
readme = 'README.rst'
requires-python = '>=3.9'
[project.optional-dependencies]
all = ['pyvista[colormaps,io,jupyter]']
colormaps = ['cmocean', 'colorcet']
io = ['imageio', 'meshio>=5.2']
jupyter = [
'ipywidgets',
'jupyter-server-proxy',
'nest_asyncio',
'trame-client>=2.12.7',
'trame-server>=2.11.7',
'trame-vtk>=2.5.8',
'trame-vuetify>=2.3.1',
'trame>=2.5.2',
]
pinned = [ # Pinned versions of core dependencies
'matplotlib<3.10.1',
'numpy<2.2.0',
'pillow<11.1.0',
'pooch<1.9.0',
'scooby<0.11.0',
'typing-extensions<4.13.0',
]
typing = [
'mypy<1.14.0',
'npt-promote==0.2',
'numpy>=2.0.0',
'pyvista[pinned]',
'trimesh<4.6.0',
]
test = [
'cmocean<4.0.4',
'colorcet<3.2.0',
'embreex<2.17.8; sys_platform != "darwin" or platform_machine != "arm64"', # Does not work with arm-based macs
'hypothesis<6.122.6',
'imageio-ffmpeg<0.6.0',
'imageio<2.37.0',
'ipython<9.0.0',
'ipywidgets<9.0.0',
'meshio<5.4.0',
'nest_asyncio<1.6.1',
'numpydoc==1.8.0',
'pyanalyze<=0.13.1',
'pytest-cov<6.1.0',
'pytest-memprof<0.3.0',
'pytest-pyvista==0.1.8',
'pytest-xdist<3.7.0',
'pytest<8.4.0',
'pytest_mock<3.15.0',
'pyvista[pinned]',
'scipy<1.14.2',
'sphinx-book-theme<1.2.0',
'sphinx-gallery<0.19.0',
'sphinx<8.2.0',
'sphinx_design<0.7.0',
'sympy<1.14.0',
'tqdm<4.68.0',
'trame-vtk>=2.5.8,<2.8.12',
'trame-vuetify>=2.3.1,<2.7.2',
'trame>=2.5.2,<3.7.1',
'trimesh<4.6.0',
'typing-extensions<4.13.0',
]
docs = [
'cmocean==4.0.3',
'colorcet==3.1.0',
'enum-tools==0.12.0',
'imageio-ffmpeg==0.5.1',
'imageio==2.36.1',
'jupyter_sphinx==0.5.3',
'jupyterlab==4.3.4',
'lxml==5.3.0',
'meshio==5.3.5',
'mypy-extensions==1.0.0',
'mypy==1.14.0',
'numpydoc==1.8.0',
'osmnx==2.0.0',
'pypandoc==1.14',
'pytest-sphinx==0.6.3',
'pyvista[pinned]',
'scipy==1.14.1',
'sphinx-autobuild==2024.10.3',
'sphinx-book-theme==1.1.3',
'sphinx-copybutton==0.5.2',
'sphinx-design==0.6.1',
'sphinx-gallery==0.18.0',
'sphinx-notfound-page==1.0.4',
'sphinx-sitemap==2.6.0',
'sphinx-tags==0.4.0',
'sphinx-toolbox==3.8.1',
'sphinx==8.1.3',
'sphinxcontrib-asciinema==0.4.2',
'sphinxcontrib-websupport==2.0.0',
'sphinxext-opengraph==0.9.1',
'sympy==1.13.3',
'trame-vtk==2.8.12',
'trame-vuetify==2.7.2',
'trame==3.7.1',
'trimesh==4.5.3',
]
dev = ['pre-commit', 'pyvista[test,typing]']
[project.urls]
'Bug Tracker' = 'https://github.com/pyvista/pyvista/issues'
Documentation = 'https://docs.pyvista.org/'
'Source Code' = 'https://github.com/pyvista/pyvista'
[tool.setuptools.dynamic]
version = { attr = 'pyvista._version.__version__' }
[tool.setuptools.packages.find]
include = ['pyvista', 'pyvista.*']
[tool.setuptools.package-data]
pyvista = ['py.typed']
'pyvista.examples' = [
'2k_earth_daymap.jpg',
'airplane.ply',
'ant.ply',
'channels.vti',
'frog_tissues.vti',
'globe.vtk',
'hexbeam.vtk',
'nut.ply',
'pyvista_logo.png',
'rectilinear.vtk',
'sphere.ply',
'uniform.vtk',
]
[tool.blackdoc]
# From https://numpydoc.readthedocs.io/en/latest/format.html
# Extended discussion: https://github.com/pyvista/pyvista/pull/4129
# The length of docstring lines should be kept to 75 characters to facilitate
# reading the docstrings in text terminals.
line-length = 75
[tool.build_sphinx]
all_files = 1
build-dir = './doc/_build'
source-dir = 'doc'
[tool.upload_sphinx]
upload-dir = 'doc/_build/html'
[tool.codespell]
ignore-words = 'doc/styles/Vocab/pyvista/accept.txt'
quiet-level = 3
skip = '*.pyc,*.txt,*.gif,*.png,*.jpg,*.ply,*.vtk,*.vti,*.vtu,*.js,*.html,*.doctree,*.ttf,*.woff,*.woff2,*.eot,*.mp4,*.inv,*.pickle,*.ipynb,flycheck*,./.git/*,./.hypothesis/*,*.yml,doc/_build/*,./doc/images/*,./dist/*,*~,.hypothesis*,./doc/examples/*,*.mypy_cache/*,*cover,./tests/tinypages/_build/*,*/_autosummary/*'
[tool.coverage.run]
omit = [
'pyvista/conftest.py',
'pyvista/ext/coverage.py',
'pyvista/plotting/theme.py', # kept for backwards compatibility
]
[tool.pytest.ini_options]
doctest_optionflags = 'NUMBER ELLIPSIS'
filterwarnings = [
'error::pyvista.PyVistaDeprecationWarning',
'ignore:.*Given trait value dtype "float64":UserWarning', # bogus numpy ABI warning (see numpy/#432)
'ignore:.*The NumPy module was reloaded*:UserWarning', # bogus numpy ABI warning (see numpy/#432)
'ignore:.*numpy.dtype size changed.*:RuntimeWarning', # bogus numpy ABI warning (see numpy/#432)
'ignore:.*numpy.ufunc size changed.*:RuntimeWarning', # bogus numpy ABI warning (see numpy/#432)
'ignore::DeprecationWarning',
'ignore::FutureWarning',
'ignore::PendingDeprecationWarning',
]
image_cache_dir = 'tests/plotting/image_cache'
junit_family = 'legacy'
markers = [
'needs_download: this test downloads data during execution',
'needs_vtk_version(version): skip test unless VTK version is at least as specified.',
]
testpaths = 'tests'
[tool.mypy]
check_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
enable_error_code = ['ignore-without-code', 'truthy-bool']
exclude = ['pyvista/ext/']
extra_checks = true
ignore_missing_imports = true
no_implicit_reexport = true
packages = ['pyvista']
plugins = ['npt_promote', 'numpy.typing.mypy_plugin']
pretty = true
show_error_context = true
strict_equality = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.numpydoc_validation]
checks = [
'all', # all but the following:
#
'ES01', # Not all docstrings need an extend summary.
'EX01', # Examples: Will eventually enforce
'GL01', # Contradicts numpydoc examples
'GL02', # Permit a blank line after the end of our docstring
'GL03', # Considering enforcing
'GL06', # Found unknown section
'GL07', # 'Sections are in the wrong order. Correct order is: {correct_sections}',
'GL08', # The object does not have a docstring
'GL09', # Deprecation warning should precede extended summary (check broken)
'PR01', # 'Parameters {missing_params} not documented',
'PR02', # 'Unknown parameters {unknown_params}',
'PR03', # 'Wrong parameters order. Actual: {actual_params}. Documented: {documented_params}',
'PR04', # 'Parameter "{param_name}" has no type',
'PR05', # 'Parameter "{param_name}" type should not finish with "."',
'PR06', # 'Parameter "{param_name}" type should use "{right_type}" instead of "{wrong_type}"',
'PR07', # 'Parameter "{param_name}" has no description',
'PR08', # 'Parameter "{param_name}" description should start with a capital letter",
'PR09', # 'Parameter "{param_name}" description should finish with "."',
'PR10', # 'Parameter "{param_name}" requires a space before the colon separating the parameter name and type",
'SA01', # Not all docstrings need a see also
'SA04', # See also section does not need descriptions
'SS05', # Appears to be broken.
'YD01', # Yields: No plan to enforce
]
exclude = [ # don't report on objects that match any of these regex
'\.*Reader(\.|$)', # classes inherit from BaseReader
'\._.*$', # Ignore anything that's private (e.g., starts with _)
'^coverage\..*$',
'^plot_directive\..*$',
'^viewer_directive\..*$',
]
[tool.ruff]
exclude = ['.git', 'build', 'dist', 'doc/_build', 'doc/examples', 'pycache__']
indent-width = 4
line-length = 100
[tool.ruff.format]
docstring-code-format = true
# From https://numpydoc.readthedocs.io/en/latest/format.html
# Extended discussion: https://github.com/pyvista/pyvista/pull/4129
# The length of docstring lines should be kept to 75 characters to facilitate
# reading the docstrings in text terminals.
docstring-code-line-length = 75
quote-style = 'single'
[tool.ruff.lint]
extend-select = [
'A',
'AIR',
'ANN',
'ASYNC',
'ASYNC1',
'B',
'C4',
'COM',
'D',
'DJ',
'DTZ',
'E',
'F',
'FA',
'FLY',
'I',
'ICN',
'INT',
'ISC',
'LOG',
'NPY',
'PERF',
'PGH',
'PIE',
'PLC',
'PLR0402',
'PLR1711',
'PLR1714',
'PLW0127',
'PT',
'PTH',
'PYI',
'Q',
'RET',
'RSE',
'RUF',
'SIM',
'T10',
'TCH',
'TRY201',
'TRY203',
'TRY300',
'UP',
'W',
'YTT',
]
external = ['E131']
fixable = ['ALL']
ignore = [
'ANN002', # Missing annotations for `*args`
'ANN003', # Missing annotations for `*kwargs`
'ANN401', # Disallow `Any`
'B028', # https://github.com/pyvista/pyvista/pull/6030
'B904', # https://github.com/pyvista/pyvista/pull/6022
'COM812', # May cause conflicts when used with the formatter
'D105', # Missing docstring in magic method
'D107', # Missing docstring in `__init__`
'D203', # May conflict with the formatter
'D211', # Incompatible with D203
'D213', # Incompatible with D212
'D402', # First line should not be the function's signature
'D416', # Section name ends in colon
'E203', # whitespace before ':'
'E266', # too many leading '#' for block comment
'E402', # module level import not at top of file
'E501', # line length too long
'E722',
'E731', # do not assign a lambda expression, use a def
'E741', # ambiguous variable name
'F403', # 'from module import *' used; unable to detect undefined names
'ISC001', # May cause conflicts when used with the formatter
'PERF203', # https://github.com/pyvista/pyvista/pull/6037
'Q0', # Quotes (temporary)
'RET505', # https://github.com/pyvista/pyvista/pull/5911
'RET506', # https://github.com/pyvista/pyvista/pull/5911
'RET507', # https://github.com/pyvista/pyvista/pull/5911
'SIM102', # https://github.com/pyvista/pyvista/pull/5877
'SIM117', # https://github.com/pyvista/pyvista/pull/5888
'SIM118', # https://github.com/pyvista/pyvista/pull/5837
]
unfixable = ['F401']
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.per-file-ignores]
'__init__.py' = ['PLC0414']
'doc/source/make_tables.py' = ['D101', 'D102']
'examples/*' = ['D102', 'D103', 'D205', 'D212', 'D400', 'D415', 'SIM115']
'examples/**' = [
'B015', # https://github.com/pyvista/pyvista/pull/6014
'B018', # https://github.com/pyvista/pyvista/pull/6019
]
'examples_trame/*' = ['D100', 'D103']
'examples_trame/tests*' = ['D']
'pyvista/core/_vtk_core*' = ['PLC0414']
'pyvista/ext/*' = ['D100', 'D101', 'D102', 'D103']
'pyvista/plotting/_typing.py' = ['PLC0414']
'pyvista/plotting/_vtk.py' = ['PLC0414']
'pyvista/plotting/_vtk_gl.py' = ['PLC0414']
'pyvista/utilities/*' = ['F401'] # deprecated modules
'tests/*' = ['D']
# ANN ignores for `pyvista/core`
# TODO: Add annotations to any files listed below and remove it from this list
'pyvista/core/_validation/_cast_array.py' = ['ANN']
'pyvista/core/_validation/validate.py' = ['ANN202']
'pyvista/core/_vtk_core.py' = ['ANN']
'pyvista/core/errors.py' = ['ANN']
'pyvista/core/filters**' = ['ANN']
'pyvista/core/objects.py' = ['ANN']
'pyvista/core/partitioned.py' = ['ANN']
'pyvista/core/pointset.py' = ['ANN']
'pyvista/core/utilities/cell.py' = ['ANN']
'pyvista/core/utilities/cells.py' = ['ANN']
'pyvista/core/utilities/docs.py' = ['ANN']
'pyvista/core/utilities/features.py' = ['ANN']
'pyvista/core/utilities/helpers.py' = ['ANN']
'pyvista/core/utilities/image_sources.py' = ['ANN']
'pyvista/core/utilities/observers.py' = ['ANN']
'pyvista/core/utilities/reader.py' = ['ANN']
# ANN ignores for `pyvista/plotting`
'pyvista/plotting*' = ['ANN']
# All other ANN ignores
'doc*' = ['ANN']
'examples*' = ['ANN']
'pyvista/__init__.py' = ['ANN']
'pyvista/_plot.py' = ['ANN']
'pyvista/conftest.py' = ['ANN']
'pyvista/demos*' = ['ANN']
'pyvista/errors.py' = ['ANN']
'pyvista/examples*' = ['ANN']
'pyvista/ext*' = ['ANN']
'pyvista/jupyter*' = ['ANN']
'pyvista/report.py' = ['ANN']
'pyvista/trame*' = ['ANN']
'pyvista/utilities/__init__.py' = ['ANN']
'tests*' = ['ANN']
[tool.ruff.lint.isort]
combine-as-imports = true # Combines 'as' imports on the same line
force-single-line = true # https://github.com/pyvista/pyvista/pull/5712
force-sort-within-sections = true # Sort by name, don't cluster 'from' vs 'import'
required-imports = [
'from __future__ import annotations', # https://github.com/pyvista/pyvista/pull/5712
]
[tool.ruff.lint.pyupgrade]
keep-runtime-typing = true # Preserve types, even if a file imports `from __future__ import annotations`.