From ae0e9d854afab8075c5076d9b52a830f71bb8cca Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 14:41:58 -0400 Subject: [PATCH 1/6] build: test py3.13 --- .github/workflows/ci.yml | 2 +- pyproject.toml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8688809..d5b5ad9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - platform: "ubuntu-latest" python-version: "3.8" - platform: "ubuntu-latest" - python-version: "3.8" + python-version: "3.13" - platform: "macos-13" python-version: "3.8" diff --git a/pyproject.toml b/pyproject.toml index 60b5563..2dbac0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dynamic = ["version"] dependencies = [ From edfe0280a11ce145c3f00824f19c1c8fb9f0ce3d Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 14:46:46 -0400 Subject: [PATCH 2/6] ci: allow pre-release --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5b5ad9..521d534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + allow-prereleases: true - uses: actions/cache@v4 id: cache From b72331abf6c19fd85115d51ad5f6a6771da4d1a1 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 15:20:53 -0400 Subject: [PATCH 3/6] pin lxml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 2dbac0a..4a2c694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ test = [ "nd2[tiff]", "aicsimageio", "dask[array]", - "lxml; python_version >= '3.9'", + "lxml; python_version >= '3.9', python_version < '3.13'", "numpy", "psutil", "pytest-codspeed", From f4f329ba2085e8b616f1e672b258be94eeaa67c8 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 15:28:29 -0400 Subject: [PATCH 4/6] fix expression --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4a2c694..b8a379a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ test = [ "nd2[tiff]", "aicsimageio", "dask[array]", - "lxml; python_version >= '3.9', python_version < '3.13'", + "lxml; python_version >= '3.9' and python_version < '3.13'", "numpy", "psutil", "pytest-codspeed", From f884588ab2bf54b4b65a7d44263748bfd036511e Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 15:32:12 -0400 Subject: [PATCH 5/6] change expression --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b8a379a..9ad5b3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ test = [ "nd2[tiff]", "aicsimageio", "dask[array]", - "lxml; python_version >= '3.9' and python_version < '3.13'", + "lxml; python_version >= '3.9' and python_version <= '3.12'", "numpy", "psutil", "pytest-codspeed", From 18664c40e9134e2e74d0e9413cea5d39346dfed4 Mon Sep 17 00:00:00 2001 From: Talley Lambert Date: Wed, 11 Sep 2024 17:17:36 -0400 Subject: [PATCH 6/6] change pins --- pyproject.toml | 4 ++-- src/nd2/tiff.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 9ad5b3b..239cc1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,10 +33,10 @@ dependencies = [ legacy = ["imagecodecs"] tiff = ["tifffile"] test = [ - "nd2[legacy]", "nd2[tiff]", - "aicsimageio", + "aicsimageio; python_version <= '3.12'", "dask[array]", + "imagecodecs; python_version <= '3.12'", "lxml; python_version >= '3.9' and python_version <= '3.12'", "numpy", "psutil", diff --git a/src/nd2/tiff.py b/src/nd2/tiff.py index 8ddf394..313b4f7 100644 --- a/src/nd2/tiff.py +++ b/src/nd2/tiff.py @@ -184,7 +184,7 @@ def position_iter(p: int) -> Iterator[np.ndarray]: shape=shape, dtype=nd2f.dtype, resolution=(1 / pixelsize, 1 / pixelsize), - resolutionunit=tf.TIFF.RESUNIT.MICROMETER, + resolutionunit=tf.RESUNIT.MICROMETER, photometric=photometric, metadata=metadata, description=ome_xml,