From e02bbc1247f799fac7f210a9739db68cb5fbeb24 Mon Sep 17 00:00:00 2001 From: norlandrhagen Date: Wed, 17 Dec 2025 10:21:19 -0700 Subject: [PATCH 1/2] replace my with ty --- .github/workflows/typing.yml | 6 +++--- README.md | 1 - pyproject.toml | 28 ++++++++-------------------- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.github/workflows/typing.yml b/.github/workflows/typing.yml index 6a2b3ee28..fa501c68c 100644 --- a/.github/workflows/typing.yml +++ b/.github/workflows/typing.yml @@ -20,8 +20,8 @@ env: PIP_ROOT_USER_ACTION: ignore jobs: - mypy: - name: mypy + ty: + name: ty runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -34,4 +34,4 @@ jobs: pixi list --environment test - name: Type check run: | - pixi run -e test run-mypy + pixi run -e test ty check diff --git a/README.md b/README.md index 7a7bebadc..7af602211 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![Code coverage](https://codecov.io/gh/zarr-developers/VirtualiZarr/branch/main/graph/badge.svg?flag=unittests)](https://codecov.io/gh/zarr-developers/VirtualiZarr) [![Docs](https://readthedocs.org/projects/virtualizarr/badge/?version=latest)](https://virtualizarr.readthedocs.io/en/latest/) [![Linted and Formatted with Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) -[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![pre-commit Enabled](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://pre-commit.com/) [![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202-cb2533.svg)](https://www.apache.org/licenses/LICENSE-2.0) [![Python Versions](https://img.shields.io/python/required-version-toml?tomlFilePath=https://raw.githubusercontent.com/zarr-developers/VirtualiZarr/main/pyproject.toml&logo=Python&logoColor=gold&label=Python)](https://docs.python.org) diff --git a/pyproject.toml b/pyproject.toml index 9108b15a1..7c856ec0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ dependencies = [ "packaging", "zarr>=3.1.0", "obstore>=0.5.1", + "virtual-tiff>=0.2.0", ] # Dependency sets under optional-dependencies are available via PyPI @@ -112,19 +113,18 @@ docs = [ ] dev = [ "codecov", - "mypy", "pandas-stubs", "pooch", "pre-commit", "pytest", "pytest-asyncio", "pytest-cov", - "pytest-mypy", "pytest-xdist", "ruff", "s3fs", "lithops", "dask", + "ty>=0.0.2", ] [project.urls] @@ -183,7 +183,7 @@ icechunk = "==1.1.2" # Define commands to run within the test environments [tool.pixi.feature.test.tasks] -run-mypy = { cmd = "mypy virtualizarr" } +run-ty = { cmd = "ty check" } # Using '--dist loadscope' (rather than default of '--dist load' when '-n auto' # is used), reduces test hangs that appear to be macOS-related. run-tests = { cmd = "pytest -n auto --dist loadscope --run-network-tests --verbose --durations=10" } @@ -226,24 +226,12 @@ exclude = ["docs", "tests", "tests.*", "docs.*"] [tool.setuptools.package-data] datatree = ["py.typed"] -[tool.mypy] -files = "virtualizarr/**/*.py" -show_error_codes = true +[tool.ty.src] +include = ["virtualizarr"] +exclude = ["docs", ".eggs"] -[[tool.mypy.overrides]] -module = [ - "docker", - "fsspec.*", - "s3fs.*", - "h5py", - "kerchunk.*", - "minio", - "numcodecs.*", - "ujson", - "zarr", - "requests", -] -ignore_missing_imports = true +[tool.ty.rules] +unresolved-import = "ignore" [tool.ruff] # Same as Black. From 2860b933ab368e49b110587c0f91eebe64bfd455 Mon Sep 17 00:00:00 2001 From: norlandrhagen Date: Wed, 17 Dec 2025 10:26:57 -0700 Subject: [PATCH 2/2] removed extra lib --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7c856ec0f..93312b7c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ dependencies = [ "packaging", "zarr>=3.1.0", "obstore>=0.5.1", - "virtual-tiff>=0.2.0", ] # Dependency sets under optional-dependencies are available via PyPI