diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c28d9096..265e700c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,67 +4,30 @@ 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@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/CHANGELOG.md b/CHANGELOG.md index f32a4198..200834c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.8.4 (unreleased) + +- 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) - Fix reading HCS file on AWS S3 ([#322](https://github.com/ome/ome-zarr-py/pull/322)) 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/setup.py b/setup.py index 87285aac..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"],) diff --git a/tox.ini b/tox.ini index e6e81c92..7b50ac0f 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 + pytest --cov-report=xml --cov=./ome_zarr --cov-append {posargs}