-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
201 lines (194 loc) · 6.56 KB
/
pyproject.toml
File metadata and controls
201 lines (194 loc) · 6.56 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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "pyvista-js"
version = "0.11.0"
description = "PyVista-like API for vtk.js"
readme = "README.md"
license = "BSD-3-Clause"
authors = [
{ name = "Tetsuo Koyama", email = "contact@tetsuo-koyama.dev" },
]
# SPEC 0 — Minimum Supported Dependencies
# https://scientific-python.org/specs/spec-0000/
#
# This project follows SPEC 0 for determining the minimum supported versions:
# - Python: Drop support 36 months after initial release
# - Core dependencies: Drop support 24 months after initial release
#
# As of 2026-03-20:
# - Minimum Python: 3.12 (released 2023-10-02)
# - Minimum NumPy: 2.0 (released 2024-06-16)
#
# SPEC 1 — Lazy Loading of Submodules and Functions
# https://scientific-python.org/specs/spec-0001/
#
# This project follows SPEC 1 for lazy loading of submodules and functions
#
# SPEC 6 — Upper Bound Constraints on Dependencies
# https://scientific-python.org/specs/spec-0006/
#
# This project follows SPEC 6 by avoiding upper bound version constraints on
# dependencies unless there is a specific technical reason. All core dependencies
# use lower bounds only (e.g., package>=1.0) to prevent dependency conflicts.
#
# SPEC 7 — Seeding Pseudo-Random Number Generation
# https://scientific-python.org/specs/spec-0007/
#
# This project follows SPEC 7 for random number generation:
# - Use numpy.random.default_rng() for all random number generation
# - Use 'rng' parameter for seeding instead of 'random_state' or 'seed'
# - Avoid global state and legacy bitstream generators
#
# Note: Currently this project does not use random number generation,
# but any future implementation will follow SPEC 7 guidelines.
#
# SPEC 8 — Securing the Release Process
# https://scientific-python.org/specs/spec-0008/
#
# This project follows SPEC 8 for securing the release process:
# - Trusted publishing via OpenID Connect (OIDC) to PyPI
# - Build provenance attestations using Sigstore
# - All GitHub Actions pinned to commit SHAs
# - See .github/workflows/release-please.yml for implementation details
requires-python = ">=3.12"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Topic :: Scientific/Engineering :: Visualization",
]
dependencies = [
"jinja2>=3",
"lazy-loader>=0.4",
"numpy>=2",
"typer>=0.9",
]
optional-dependencies.dev = [
"mypy>=1",
"pre-commit>=3",
"pytest>=7",
"ruff>=0.1",
"tox>=4",
]
optional-dependencies.docs = [
"atsphinx-stlite==0.2.1; python_version>='3.12' and python_version<'3.14'",
"jupyterlite-pyodide-kernel==0.7.1; python_version>='3.12' and python_version<'3.14'",
"jupyterlite-sphinx==0.22.1; python_version>='3.12' and python_version<'3.14'",
"jupytext>=1.19",
"myst-parser==5; python_version>='3.12' and python_version<'3.14'",
"sphinx==9.1; python_version>='3.12' and python_version<'3.14'",
"sphinx-book-theme==1.1.4; python_version>='3.12' and python_version<'3.14'",
"sphinx-design==0.7; python_version>='3.12' and python_version<'3.14'",
"sphinx-intl>=2.2; python_version>='3.12' and python_version<'3.14'",
"sphinxcontrib-typer>=0.5; python_version>='3.12'",
]
optional-dependencies.io = [
"meshio",
]
optional-dependencies.streamlit = [
"streamlit>=1.30",
]
urls.Documentation = "https://github.com/tkoyama010/pyvista-js"
urls.Homepage = "https://github.com/tkoyama010/pyvista-js"
urls.Issues = "https://github.com/tkoyama010/pyvista-js/issues"
urls.Repository = "https://github.com/tkoyama010/pyvista-js"
scripts.pyvista-js = "pyvista_js._cli:cli_main"
[dependency-groups]
dev = [
"meshio>=5.3.5",
"mypy>=1",
"pre-commit>=3",
"ruff>=0.1",
"tox>=4",
{ include-group = "test" },
]
test = [
"playwright>=1.40",
"pytest>=7",
"pytest-playwright>=0.4",
]
[tool.hatch]
build.targets.wheel.packages = [ "src/pyvista_js" ]
[tool.ruff]
line-length = 100
lint.select = [ "ALL" ]
lint.per-file-ignores."examples/*" = [
"INP001", # implicit namespace package
"T201", # print statements OK in examples
]
lint.per-file-ignores."jupyterlite/content/*" = [
"D100", # missing docstring - jupytext files
"E402", # module import not at top - cell-based structure
"ERA001", # commented-out code - jupytext metadata
"F704", # await outside async - top-level await valid in Pyodide
"INP001", # implicit namespace package
"PLE1142", # await outside async - top-level await valid in Pyodide
]
lint.per-file-ignores."stlite/*" = [
"INP001", # implicit namespace package
]
lint.per-file-ignores."tests/*" = [
"ANN", # missing type annotations - not critical for tests
"INP001", # implicit namespace package
"PLR2004", # magic values - normal for test data
"S101", # assert - normal for pytest
"SLF001", # private member access - testing private APIs
]
lint.flake8-pytest-style.parametrize-names-type = "tuple"
lint.flake8-pytest-style.parametrize-values-row-type = "tuple"
lint.flake8-pytest-style.parametrize-values-type = "list"
[tool.pytest]
ini_options.minversion = "6.0"
ini_options.testpaths = [ "tests" ]
ini_options.log_level = "INFO"
ini_options.log_cli_level = "INFO"
ini_options.xfail_strict = true
ini_options.addopts = [
"-ra",
"--strict-config",
"--strict-markers",
"--doctest-modules",
"--import-mode=importlib",
]
ini_options.filterwarnings = [
"error",
]
ini_options.markers = [
"playwright: marks tests that use Playwright for browser automation (deselect with '-m \"not playwright\"')",
]
[tool.mypy]
# SPEC 0: Target minimum supported Python version
# SPEC 1: Use lazy loading for submodules and functions
python_version = "3.12"
strict = false
warn_unused_configs = true
warn_redundant_casts = true
warn_unreachable = true
strict_equality = true
no_implicit_optional = true
enable_error_code = [
"ignore-without-code",
"redundant-expr",
"truthy-bool",
]
# Lenient settings for gradual typing
disallow_untyped_defs = false
disallow_any_generics = false
disallow_incomplete_defs = false
warn_return_any = false
warn_unused_ignores = false
check_untyped_defs = false
# Ignore missing imports for optional dependencies
ignore_missing_imports = true
# Exclude stub files from direct checking; they are used by type checkers as stubs
exclude = [ "src/pyvista_js/__init__\\.pyi" ]
overrides = [ { module = "tests.*", disallow_untyped_defs = false, check_untyped_defs = false } ]
[tool.jupytext]
formats = "ipynb,py:percent"