forked from pyvista/pyvista
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
421 lines (398 loc) · 10.7 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
[build-system]
requires = ['setuptools']
build-backend = 'setuptools.build_meta'
[project]
name = 'pyvista'
description = 'Easier Pythonic interface to VTK'
authors = [
{name = 'PyVista Developers', email = '[email protected]'},
]
readme = 'README.rst'
requires-python = '>=3.8'
keywords = ['vtk', 'numpy', 'plotting', 'mesh']
license = {text = 'MIT'}
classifiers = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Information Analysis',
'License :: OSI Approved :: MIT License',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
]
dependencies = [
'matplotlib>=3.0.1',
'numpy>=1.21.0', # minimum typing support
'pillow',
'pooch',
'scooby>=0.5.1',
'vtk', # keep without version constraints
'typing-extensions',
]
dynamic = ['version']
[project.optional-dependencies]
all = ['pyvista[colormaps,io,jupyter]']
colormaps = [
'cmocean',
'colorcet',
]
io = [
'imageio',
'meshio>=5.2'
]
jupyter = [
'ipywidgets',
'jupyter-server-proxy',
'nest_asyncio',
'trame>=2.5.2',
'trame-client>=2.12.7',
'trame-server>=2.11.7',
'trame-vtk>=2.5.8',
'trame-vuetify>=2.3.1',
]
[project.urls]
Documentation = 'https://docs.pyvista.org/'
"Bug Tracker" = 'https://github.com/pyvista/pyvista/issues'
"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',
'globe.vtk',
'hexbeam.vtk',
'nut.ply',
'pyvista_logo.png',
'rectilinear.vtk',
'sphere.ply',
'uniform.vtk',
'frog_tissues.vti',
]
[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]
source-dir = 'doc'
build-dir = './doc/_build'
all_files = 1
[tool.upload_sphinx]
upload-dir = 'doc/_build/html'
[tool.codespell]
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/*'
ignore-words = "doc/styles/Vocab/pyvista/accept.txt"
quiet-level = 3
[tool.coverage.run]
omit = [
'pyvista/ext/coverage.py',
'pyvista/conftest.py',
# kept for backwards compatibility:
'pyvista/plotting/theme.py',
]
[tool.pytest.ini_options]
junit_family='legacy'
filterwarnings = [
'ignore::FutureWarning',
'ignore::PendingDeprecationWarning',
'ignore::DeprecationWarning',
# bogus numpy ABI warning (see numpy/#432)
'ignore:.*numpy.dtype size changed.*:RuntimeWarning',
'ignore:.*numpy.ufunc size changed.*:RuntimeWarning',
'ignore:.*Given trait value dtype "float64":UserWarning',
'ignore:.*The NumPy module was reloaded*:UserWarning',
'error::pyvista.PyVistaDeprecationWarning'
]
doctest_optionflags = 'NUMBER ELLIPSIS'
testpaths = 'tests'
markers = [
'needs_vtk_version(version): skip test unless VTK version is at least as specified.',
'needs_download: this test downloads data during execution',
]
image_cache_dir = "tests/plotting/image_cache"
[tool.mypy]
ignore_missing_imports = true
disallow_any_generics = true
pretty = true
show_error_context = true
warn_unused_ignores = true
warn_redundant_casts = true
plugins = ['numpy.typing.mypy_plugin','npt_promote']
enable_error_code = [
"ignore-without-code",
]
[tool.numpydoc_validation]
checks = [
"all", # all but the following:
"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}",
"GL09", # Deprecation warning should precede extended summary (check broken)
"SA01", # Not all docstrings need a see also
"SA04", # See also section does not need descriptions
"SS05", # Appears to be broken.
"ES01", # Not all docstrings need an extend summary.
"EX01", # Examples: Will eventually enforce
"YD01", # Yields: No plan to enforce
]
exclude = [ # don't report on objects that match any of these regex
'\.BasePlotter$', # Issue with class parameter documentation
'\.Plotter$', # Issue with class parameter documentation
'\.WidgetHelper$',
'\.PickingHelper$',
'\.from_dict$',
'\.to_dict$',
'\.__init__$',
'\.__new__$',
'\.__getattr__$',
'\.keys$',
'\.values$',
'\.items$',
'\._.*$', # Ignore anything that's private (e.g., starts with _)
# parm of abstract classes
'\._BaseMapper$',
'\.CompositeFilters$',
'\.DataObject$',
'\.DataSet$',
'\.DataSetFilters$',
'\.ExplicitStructuredGrid$',
'\.Grid$',
'\.MultiBlock$',
'\.PartitionedDataSet$',
'\.PointGrid$',
'\.PointSet$',
'\.PolyDataFilters$',
'\.RectilinearGrid$',
'\.StructuredGrid$',
'\.Table$',
'\.Table\.save$',
'\.ImageData$',
'\.ImageDataFilters$',
'\.UnstructuredGrid$',
'\.UnstructuredGridFilters$',
# classes inherit from BaseReader
'\.*Reader(\.|$)',
# internal
'\.Renderer$',
# deprecated
'\.boolean_add$',
'\.boolean_cut$',
'\.add_field_array$',
'\.DataSetAttributes\.append$',
# will be removed or refactored
'^notebook\..*$',
# Documentation extensions or utilities
'^viewer_directive\..*$',
'^plot_directive\..*$',
'^coverage\..*$',
'\.pv_html_page_context$',
# Internal
'^observers\..*$',
# methods we probably should make private
'\.store_click_position$',
'\.store_mouse_position$',
'\.fly_to_mouse_position$',
'\.key_press_event$',
'\.left_button_down$',
# MISC
'\.ActiveArrayInfo$',
'\.CellType$',
'\.DataObject\.copy_meta_from$',
'\.FieldAssociation$',
'\.InterpolationType$',
'\.RepresentationType$',
'\.ElementType$',
'\.MultiBlock\.copy_meta_from$',
# wraps
'\.Plotter\.enable_depth_peeling$',
'\.add_scalar_bar$',
# called from inherited
'\.Table\.copy_meta_from$',
# Type alias
'\.ColorLike$',
'\.Chart$',
'\.ArrayLike$',
'\.MatrixLike$',
'\.VectorLike$',
'\.TransformLike$',
'\.BoundsLike$',
'\.CellsLike$',
'\.CellsArrayLike$',
'\.RotationLike$',
# PointSet *args and **kwargs for wrapped parameters
'\.PointSet(\.|$)',
# Mixin methods from collections.abc
'\.MultiBlock\.clear$',
'\.MultiBlock\.count$',
'\.MultiBlock\.index$',
'\.MultiBlock\.remove$',
# Enumerations
'\.Plot3DFunctionEnum$',
# VTK methods
'\.override$',
# trame
'\.Viewer(\.|$)',
'\.PyVistaRemoteView(\.|$)',
'\.PyVistaLocalView(\.|$)',
'\.PyVistaRemoteLocalView(\.|$)',
'\.Texture(\.|$)', # awaiting Texture refactor
]
[tool.ruff]
exclude = [
'.git',
'pycache__',
'build',
'dist',
'doc/examples',
'doc/_build',
]
line-length = 100
indent-width = 4
[tool.ruff.format]
docstring-code-format = false
quote-style = "single"
[tool.ruff.lint]
external = ["E131"]
ignore = [
# https://github.com/pyvista/pyvista/pull/6030
"B028",
# https://github.com/pyvista/pyvista/pull/6022
"B904",
"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
# whitespace before ':'
"E203",
# line break before binary operator
# "W503",
# line length too long
"E501",
# do not assign a lambda expression, use a def
"E731",
# too many leading '#' for block comment
"E266",
# ambiguous variable name
"E741",
# module level import not at top of file
"E402",
# Quotes (temporary)
"Q0",
# bare excepts (temporary)
# "B001", "E722",
"E722",
# 'from module import *' used; unable to detect undefined names
"F403",
# https://github.com/pyvista/pyvista/pull/6037
"PERF203",
# https://github.com/pyvista/pyvista/pull/5877
"SIM102",
# https://github.com/pyvista/pyvista/pull/5888
"SIM117",
# https://github.com/pyvista/pyvista/pull/5837
"SIM118",
# https://github.com/pyvista/pyvista/pull/5911
"RET505",
"RET506",
"RET507",
# The following rules may cause conflicts when used with the formatter
"COM812",
"ISC001",
]
fixable = ["ALL"]
unfixable = []
extend-select = [
"A",
"AIR",
"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",
"TRY300",
"TRY302",
"UP",
"W",
"YTT",
]
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.per-file-ignores]
"examples/**" = [
# https://github.com/pyvista/pyvista/pull/6014
"B015",
# https://github.com/pyvista/pyvista/pull/6019
"B018",
]
"doc/source/make_tables.py" = ["D101","D102"]
"examples/*" = ["D212","D102","D103","D205","D400","D415"]
"examples_trame/*" = ["D100","D103"]
"examples_trame/tests*" = ["D"]
"pyvista/ext/*" = ["D100", "D101", "D102","D103"]
"tests/*" = ["D"]
[tool.ruff.lint.isort]
# Sort by name, don't cluster "from" vs "import"
force-sort-within-sections = true
# Combines "as" imports on the same line
combine-as-imports = true
# https://github.com/pyvista/pyvista/pull/5712
required-imports = ["from __future__ import annotations"]
# https://github.com/pyvista/pyvista/pull/5712
force-single-line = true
[tool.ruff.lint.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true