Skip to content

Commit 7eb6b75

Browse files
BLD: Add lower boundary for required dependencies; strip dependencies for conda YAML file
1 parent 7698b2c commit 7eb6b75

2 files changed

Lines changed: 167 additions & 7 deletions

File tree

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ dependencies:
55
- python=3.13
66

77
# -------- Python Runtime --------
8-
- numpy=2.3.*
8+
- numpy
99
- pyvista
1010
- scipy
1111
- astropy

pyproject.toml

Lines changed: 166 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ classifiers = [
5353
]
5454
requires-python = ">=3.10"
5555
dependencies = [
56-
"numpy",
57-
"pyvista",
56+
"numpy>=2.1.0",
57+
"pyvista>=0.47.0",
5858
"psi-io>=2.0.6",
59-
"sunpy",
60-
"astropy",
59+
"sunpy>=6.0.3",
60+
"astropy>=6.1.3",
6161
]
6262

6363
# Project Dependencies
@@ -110,7 +110,7 @@ dev = [
110110
"nox>=2025.11.12",
111111
]
112112
all = [
113-
"psi-io[hdf4,interp,tracing,data,build,test,types,lint,docs,dev]",
113+
"psi-pyvisual[hdf4,interp,tracing,data,build,test,types,lint,docs,dev]",
114114
]
115115

116116
# Tools & Extensions
@@ -134,5 +134,165 @@ exclude = [
134134

135135
[tool.setuptools.package-data]
136136
"pyvisual" = [
137-
"assets/*.json",
137+
"_assets/*.json",
138+
]
139+
140+
# Testing (pytest) configuration
141+
# ------------------------------
142+
[tool.pytest.ini_options]
143+
minversion = "8.0"
144+
testpaths = ["tests"]
145+
#markers = [
146+
# "h4: tests that exercise the HDF4 backend",
147+
# "h5: tests that exercise the HDF5 backend",
148+
# "benchmark: performance benchmark tests",
149+
# "read_hdf_by_index: tests for read_hdf_by_index function",
150+
# "read_hdf_by_value: tests for read_hdf_by_value function",
151+
# "read_hdf_by_ivalue: tests for read_hdf_by_ivalue function",
152+
#]
153+
addopts = [
154+
"-ra",
155+
"--cov=pyvisual",
156+
"--cov-report=term-missing",
157+
"--maxfail=1",
158+
"--import-mode=importlib",
159+
]
160+
161+
# Coverage (pytest-cov) configuration
162+
# -----------------------------------
163+
[tool.coverage.run]
164+
branch = true
165+
source = ["pyvisual"]
166+
parallel = true
167+
relative_files = true
168+
omit = [
169+
"tests/*",
170+
"docs/_build/*",
171+
]
172+
173+
[tool.coverage.report]
174+
show_missing = true
175+
skip_covered = true
176+
exclude_lines = [
177+
"pragma: no cover",
178+
"if TYPE_CHECKING:",
179+
"raise NotImplementedError",
180+
"def __repr__",
181+
]
182+
183+
# Typing (mypy) configuration
184+
# ---------------------------
185+
[tool.mypy]
186+
strict = true
187+
ignore_missing_imports = true
188+
files = ["pyvisual"]
189+
190+
[[tool.mypy.overrides]]
191+
module = "pyvisual.*"
192+
ignore_missing_imports = false
193+
194+
# Linting (ruff) configuration
195+
# ----------------------------
196+
[tool.ruff]
197+
fix = false
198+
unsafe-fixes = false
199+
line-length = 100
200+
src = ["pyvisual"]
201+
extend-exclude = [
202+
"docs",
203+
".nox",
204+
".mypy_cache",
205+
".ruff_cache",
206+
".pytest_cache",
207+
"src",
208+
"tests"
209+
]
210+
211+
[tool.ruff.lint]
212+
explicit-preview-rules = true
213+
preview = true
214+
extend-select = [
215+
"A", # flake8-builtins
216+
"AIR", # Airflow
217+
"ANN", # flake8-annotations
218+
"ARG", # flake8-unused-arguments
219+
"ASYNC", # flake8-async
220+
"B", # flake8-bugbear
221+
"BLE", # flake8-blind-except
222+
"C4", # flake8-comprehensions
223+
"C90", # mccabe
224+
"COM", # flake8-commas
225+
# "CPY", # flake8-copyright # TODO: enable when out of preview
226+
"D", # pydocstyle
227+
"DJ", # flake8-django
228+
# "DOC", # pydocstyle # TODO: enable when out of preview
229+
"DTZ", # flake8-datetimez
230+
"E", # pycodestyle
231+
"EM", # flake8-errmsg
232+
"ERA", # Eradicate
233+
"EXE", # flake8-executable
234+
"F", # Pyflakes
235+
"FA", # flake8-future-annotations
236+
"FBT", # flake8-boolean-trap
237+
"FIX", # flake8-fixme
238+
"FLY", # flynt
239+
"FURB", # refurb
240+
"G", # flake8-logging-format
241+
"I", # isort
242+
"ICN", # flake8-import-conventions
243+
"INP", # flake8-no-pep420
244+
"INT", # flake8-gettext
245+
"ISC", # flake8-implicit-str-concat
246+
"LOG", # flake8-logging
247+
"N", # pep8-naming
248+
"NPY", # NumPy-specific rules
249+
"PERF", # Perflint
250+
"PGH", # pygrep-hooks
251+
"PIE", # flake8-pie
252+
"PL", # Pylint
253+
"PT", # flake8-pytest-style
254+
"PTH", # flake8-use-pathlib
255+
"PYI", # flake8-pyi
256+
"Q", # flake8-quotes
257+
"RET", # flake8-return
258+
"RSE", # flake8-raise
259+
"RUF", # Ruff-specific rules
260+
"S", # flake8-bandit
261+
"SIM", # flake8-simplify
262+
"SLOT", # flake8-slots
263+
"T10", # flake8-debugger
264+
"T20", # flake8-print
265+
"TD", # flake8-todos
266+
"TID", # flake8-tidy-imports
267+
"TRY", # tryceratops
268+
"UP", # pyupgrade
269+
"W", # pycodestyle
270+
"YTT", # flake8-2020
271+
]
272+
ignore = [
273+
"B905", #`zip()` without an explicit `strict=` parameter
274+
"C408", # Unnecessary `dict()` call (rewrite as a literal)
275+
"NPY002", # Replace legacy `np.random.rand` call with `np.random.Generator`
276+
]
277+
278+
279+
[tool.ruff.lint.pydocstyle]
280+
convention = "numpy"
281+
282+
[tool.ruff.lint.isort]
283+
known-first-party = ["psi_io"]
284+
combine-as-imports = true
285+
force-single-line = true
286+
force-sort-within-sections = true
287+
required-imports = [
288+
"from __future__ import annotations",
289+
]
290+
291+
# Documentation (sphinx) configuration
292+
# ------------------------------------
293+
[tool.sphinx_build]
294+
addopts = [
295+
"-b", "html",
296+
"-a",
297+
"-E"
138298
]

0 commit comments

Comments
 (0)