From bf43e8ae108931e7ba2c6f38d68c70bb3d448d92 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 4 Dec 2023 18:34:58 +0000 Subject: [PATCH 1/8] Simplify testing setup --- .github/workflows/build.yml | 66 +++++++----------------------- .gitignore | 5 +++ requirements/requirements-test.txt | 1 - tox.ini | 30 +++++--------- 4 files changed, 30 insertions(+), 72 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0ae865f..96c093da 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,67 +4,29 @@ on: [push, pull_request] jobs: test: - name: Test ${{ matrix.os }} / ${{ matrix.toxenv }} + name: Test ${{ matrix.os }}-python${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: - fail-fast: false matrix: - include: - - {os: windows-latest, python_Version: '3.11', toxenv: 'py311'} - - {os: windows-latest, python_Version: '3.10', toxenv: 'py310'} - - {os: windows-latest, python_Version: '3.8', toxenv: 'py38'} - - {os: windows-latest, python_Version: '3.9', toxenv: 'py39'} - - {os: ubuntu-latest, python_Version: '3.11', toxenv: 'py311'} - - {os: ubuntu-latest, python_Version: '3.10', toxenv: 'py310'} - - {os: ubuntu-latest, python_Version: '3.8', toxenv: 'py38'} - - {os: ubuntu-latest, python_Version: '3.9', toxenv: 'py39'} - - {os: macos-latest, python_Version: '3.11', toxenv: 'py311'} - - {os: macos-latest, python_Version: '3.10', toxenv: 'py310'} - - {os: macos-latest, python_Version: '3.8', toxenv: 'py38'} - # missing numcodecs wheels on 3.9. conda not yet an option. see gh-51 - # {os: macos-latest, python_Version: '3.9', toxenv: 'py39'} - + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + os: ['windows-latest', 'macos-latest', 'ubuntu-latest'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - name: Install Python ${{ matrix.python_version }} + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: - python-version: ${{ matrix.python_version }} - - - name: Install ubuntu libraries - if: startsWith(matrix.os, 'ubuntu') - run: "\ - sudo apt-get install -y \ - libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \ - libxcb-image0 libxcb-keysyms1 libxcb-randr0 \ - libxcb-render-util0 libxcb-xinerama0 \ - libxcb-xinput0 libxcb-xfixes0" - - - name: Install & test - run: | - python -m pip install tox - tox -e ${{ matrix.toxenv }} - - test_coverage: - name: Test coverage - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-python@v4 - name: Install Python '3.10' - with: - python-version: '3.10' + python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install -r requirements/requirements-dev.txt - - - name: Test - run: tox -e 'py310-coverage' + python -m pip install --upgrade pip + python -m pip install tox tox-gh-actions + - name: Test with tox + run: tox --conf tox.ini - - uses: codecov/codecov-action@v2 + - name: Upload code coverage + uses: codecov/codecov-action@v2 with: file: ./coverage.xml - fail_ci_if_error: false + fail_ci_if_error: true diff --git a/.gitignore b/.gitignore index 8ddc68ae..2381e93c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,8 @@ build dist/ target/ docs/build/ + +# Testing files +.tox* +.coverage* +coverage.xml diff --git a/requirements/requirements-test.txt b/requirements/requirements-test.txt index 9cf84846..9955decc 100644 --- a/requirements/requirements-test.txt +++ b/requirements/requirements-test.txt @@ -1,3 +1,2 @@ pytest pytest-cov -codecov diff --git a/tox.ini b/tox.ini index e6e81c92..bf4af085 100644 --- a/tox.ini +++ b/tox.ini @@ -1,26 +1,18 @@ -# tox (https://tox.readthedocs.io/) is a tool for running tests -# in multiple virtualenvs. This configuration file will run the -# test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. - [tox] -envlist = py{38,39,310,311} +envlist = py{38,39,310,311,312} + + +[gh-actions] +python = + 3.8: py38 + 3.9: py39 + 3.10: py310 + 3.11: py311 + 3.12: py312 [testenv] -# passenv = DISPLAY XAUTHORITY -passenv = GITHUB_ACTIONS deps = - -rrequirements/requirements-dev.txt - pytest-xvfb ; sys_platform == 'linux' - -commands = - pytest {posargs:tests -s} + -r requirements/requirements-test.txt -[testenv:py310-coverage] -passenv = - CI - GITHUB_ACTIONS -usedevelop = true commands = pytest --cov-report=xml --cov=./ome_zarr --cov-append {posargs:-v} - codecov -f codecov.xml From 8affc3788898d742b50234e20487d3e4056af210 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 4 Dec 2023 18:38:18 +0000 Subject: [PATCH 2/8] Don't fail fast --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 96c093da..265e700c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,7 @@ jobs: name: Test ${{ matrix.os }}-python${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] os: ['windows-latest', 'macos-latest', 'ubuntu-latest'] From 2b9efb8bcf3f22dec8c843d0ca23b539452d4ac1 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 4 Dec 2023 18:41:56 +0000 Subject: [PATCH 3/8] Don't pass -v to pytest --- pytest.ini | 2 -- tox.ini | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) delete mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index df3eb518..00000000 --- a/pytest.ini +++ /dev/null @@ -1,2 +0,0 @@ -[pytest] -addopts = --doctest-modules diff --git a/tox.ini b/tox.ini index bf4af085..7b50ac0f 100644 --- a/tox.ini +++ b/tox.ini @@ -15,4 +15,4 @@ deps = -r requirements/requirements-test.txt commands = - pytest --cov-report=xml --cov=./ome_zarr --cov-append {posargs:-v} + pytest --cov-report=xml --cov=./ome_zarr --cov-append {posargs} From c6493cd4a62403dbe75ae12f9bbb523ded778a1f Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 4 Dec 2023 18:45:02 +0000 Subject: [PATCH 4/8] Fix fsspec pin --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 87285aac..a0b7be13 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def read(fname): install_requires += (["dask"],) install_requires += (["distributed"],) install_requires += (["zarr>=2.8.1"],) -install_requires += (["fsspec[s3]>=0.8,!=2021.07.0,!=2023.09.0"],) +install_requires += (["fsspec[s3]>=0.8,!=2021.07.0,<2023.09.0"],) # See https://github.com/fsspec/filesystem_spec/issues/819 install_requires += (["aiohttp<4"],) install_requires += (["requests"],) From 223c27d23ff9d07df96547b0ad6dea5231b16ce9 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Mon, 4 Dec 2023 18:49:17 +0000 Subject: [PATCH 5/8] Add changelog entry --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f32a4198..a2fd0e77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.8.4 (unreleased) + +- Correctly maximum compatible fsspec version. ([#338](https://github.com/ome/ome-zarr-py/pull/338)) +- Add tests on Python 3.12. ([#338](https://github.com/ome/ome-zarr-py/pull/338)) + # 0.8.3 (November 2023) - Fix reading HCS file on AWS S3 ([#322](https://github.com/ome/ome-zarr-py/pull/322)) From 705bb30ce876eb0126e10f58dc47947ff64dba2d Mon Sep 17 00:00:00 2001 From: David Stansby Date: Fri, 8 Dec 2023 15:30:52 +0000 Subject: [PATCH 6/8] Put back pytest.ini --- pytest.ini | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 pytest.ini diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 00000000..df3eb518 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,2 @@ +[pytest] +addopts = --doctest-modules From 012df709f7b0a7b0513be8bb459ce1b08ac8aeb8 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Sat, 9 Dec 2023 14:43:14 +0000 Subject: [PATCH 7/8] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2fd0e77..200834c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # 0.8.4 (unreleased) -- Correctly maximum compatible fsspec version. ([#338](https://github.com/ome/ome-zarr-py/pull/338)) +- Correctly specify maximum compatible fsspec version. ([#338](https://github.com/ome/ome-zarr-py/pull/338)) - Add tests on Python 3.12. ([#338](https://github.com/ome/ome-zarr-py/pull/338)) # 0.8.3 (November 2023) From 9008a556d0b80b7494d60c31fc621b0fdd088fdb Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Wed, 31 Jan 2024 18:33:16 +0100 Subject: [PATCH 8/8] Unpin fsspec --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index a0b7be13..56c0145f 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ def read(fname): install_requires += (["dask"],) install_requires += (["distributed"],) install_requires += (["zarr>=2.8.1"],) -install_requires += (["fsspec[s3]>=0.8,!=2021.07.0,<2023.09.0"],) +install_requires += (["fsspec[s3]>=0.8,!=2021.07.0"],) # See https://github.com/fsspec/filesystem_spec/issues/819 install_requires += (["aiohttp<4"],) install_requires += (["requests"],)