Skip to content

Commit fe4af2b

Browse files
authored
[v1] Update dependencies to latest (#567)
* Update dependencies to latest versions * Update linter type-checking code to 'TC' in pyproject.toml https://astral.sh/blog/ruff-v0.8.0#new-error-codes-for-flake8-type-checking-rules * Refactor: Move Zarr codec imports to top-level * disable safety in CI (temporary) * Refactor: Replace Zarr codec imports with numcodecs equivalents * Refactor: Remove unused numcodecs imports and related methods * pin zarr due to zarr 3.0.9 bug
1 parent f391e23 commit fe4af2b

File tree

4 files changed

+928
-1133
lines changed

4 files changed

+928
-1133
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
matrix:
1414
include:
1515
- { python: "3.13", os: "ubuntu-latest", session: "pre-commit" }
16-
- { python: "3.13", os: "ubuntu-latest", session: "safety" }
16+
# - { python: "3.13", os: "ubuntu-latest", session: "safety" }
1717
# - { python: "3.13", os: "ubuntu-latest", session: "mypy" }
1818
# - { python: "3.12", os: "ubuntu-latest", session: "mypy" }
1919
# - { python: "3.11", os: "ubuntu-latest", session: "mypy" }

pyproject.toml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ classifiers = [
2323
]
2424

2525
dependencies = [
26-
"click (>=8.1.7,<9.0.0)",
26+
"click (>=8.2.1,<9.0.0)",
2727
"click-params (>=0.5.0,<0.6.0)",
28-
"dask (>=2024.12.0)",
29-
"fsspec (>=2024.10.0)",
30-
"pint>=0.24.3,<0.25",
31-
"psutil (>=6.1.0,<7.0.0)",
32-
"pydantic (>=2.8.2,<3.0.0)",
33-
"pydantic-settings (>=2.4.0,<3.0.0)",
34-
"rich (>=13.9.4,<14.0.0)",
35-
"segy (>=0.4.0,<0.5.0)",
36-
"tqdm (>=4.67.0,<5.0.0)",
37-
"xarray>=2025.3.1",
38-
"zarr (>=3.0.8,<4.0.0)",
28+
"dask (>=2025.5.1)",
29+
"fsspec (>=2025.5.1)",
30+
"pint>=0.24.4,<0.25",
31+
"psutil (>=7.0.0,<8.0.0)",
32+
"pydantic (>=2.11.7,<3.0.0)",
33+
"pydantic-settings (>=2.10.1,<3.0.0)",
34+
"rich (>=14.0.0,<15.0.0)",
35+
"segy (>=0.4.1.post2,<0.5.0)",
36+
"tqdm (>=4.67.1,<5.0.0)",
37+
"xarray>=2025.6.1",
38+
"zarr (>=3.0.8,<3.0.9)",
3939
]
4040

4141
[project.optional-dependencies]
4242
cloud = [
43-
"s3fs == 2024.12.0",
44-
"gcsfs (>=2024.10.0)",
45-
"adlfs (>=2024.7.0)",
43+
"s3fs == 2025.5.1",
44+
"gcsfs (>=2025.5.1)",
45+
"adlfs (>=2024.12.0)",
4646
]
4747
distributed = [
48-
"distributed (>=2024.12.0)",
49-
"bokeh (>=3.4.2,<4.0.0)",
48+
"distributed (>=2025.5.1)",
49+
"bokeh (>=3.7.3,<4.0.0)",
5050
]
5151
lossy = ["zfpy (>=1.0.1,<2.0.0)"]
5252

@@ -60,17 +60,17 @@ mdio = "mdio.__main__:main"
6060

6161
[dependency-groups]
6262
dev = [
63-
"ruff (>=0.11.8)",
64-
"coverage[toml] (>=7.6.7,<8)",
65-
"mypy (>=1.13.0,<2)",
66-
"pre-commit (>=4.0.1,<5)",
63+
"ruff (>=0.12.1)",
64+
"coverage[toml] (>=7.9.1,<8)",
65+
"mypy (>=1.16.1,<2)",
66+
"pre-commit (>=4.2.0,<5)",
6767
"pre-commit-hooks (>=5.0.0,<6)",
68-
"pytest (>=8.3.3,<9)",
68+
"pytest (>=8.4.1,<9)",
6969
"pytest-dependency (>=0.6.0,<0.7)",
70-
"safety (>=3.2.3,<4)",
71-
"typeguard (>=4.4.1,<5)",
70+
# "safety (>=3.5.2,<4)", # too tight pydantic and psutil dependency
71+
"typeguard (>=4.4.4,<5)",
7272
"xdoctest[colors] (>=1.2.0,<2)",
73-
"Pygments (>=2.18.0,<3)",
73+
"Pygments (>=2.19.2,<3)",
7474
]
7575

7676
docs = [
@@ -116,7 +116,7 @@ select = [
116116
"RET", # return
117117
"SIM", # simplify
118118
"TID", # tidy-imports
119-
"TCH", # type-checking
119+
"TC", # type-checking
120120
"ARG", # unused-arguments
121121
"PTH", # use-pathlib
122122
"TD", # todos

src/mdio/schemas/compressors.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,6 @@ class Blosc(CamelCaseStrictModel):
5353
description="The size of the block to be used for compression.",
5454
)
5555

56-
def make_instance(self): # noqa: ANN201
57-
"""Translate parameters to compressor kwargs.."""
58-
from zarr.codecs import Blosc as _Blosc
59-
60-
return _Blosc(
61-
cname=self.algorithm,
62-
clevel=self.level,
63-
shuffle=self.shuffle,
64-
blocksize=self.blocksize,
65-
)
66-
6756

6857
zfp_mode_map = {
6958
"fixed_rate": 2,
@@ -139,17 +128,6 @@ def check_requirements(self) -> ZFP:
139128

140129
return self
141130

142-
def make_instance(self): # noqa: ANN201
143-
"""Translate parameters to compressor kwargs.."""
144-
from zarr.codecs import ZFPY as _ZFPY
145-
146-
return _ZFPY(
147-
mode=self.mode.int_code,
148-
tolerance=self.tolerance,
149-
rate=self.rate,
150-
precision=self.precision,
151-
)
152-
153131

154132
class CompressorModel(CamelCaseStrictModel):
155133
"""Model representing compressor configuration."""

0 commit comments

Comments
 (0)