diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md index e49d144d..ad8663af 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release.md +++ b/.github/PULL_REQUEST_TEMPLATE/release.md @@ -2,10 +2,8 @@ Prepare for release of HDMF-Zarr [version] ### Before merging: - [ ] Make sure all PRs to be included in this release have been merged to `dev`. -- [ ] Major and minor releases: Update package versions in `requirements.txt`, `requirements-dev.txt`, - `requirements-doc.txt`, and `requirements-opt.txt` to the latest versions, - and update dependency ranges in `pyproject.toml` and minimums in `requirements-min.txt` as needed. - Run `pip install pur && pur -r requirements-dev.txt -r requirements.txt -r requirements-opt.txt`. +- [ ] Major and minor releases: Update dependency ranges in `pyproject.toml` and minimums in + `requirements-min.txt` as needed. - [ ] Check legal file dates and information in `Legal.txt`, `license.txt`, `README.rst`, `docs/source/conf.py`, and any other locations as needed - [ ] Update `pyproject.toml` as needed @@ -27,5 +25,5 @@ Prepare for release of HDMF-Zarr [version] 4. Either monitor [conda-forge/hdmf_zarr-feedstock](https://github.com/conda-forge/hdmf_zarr-feedstock) for the regro-cf-autotick-bot bot to create a PR updating the version of HDMF to the latest PyPI release, usually within 24 hours of release, or manually create a PR updating `recipe/meta.yaml` with the latest version number - and SHA256 retrieved from PyPI > HDMF-Zarr > Download Files > View hashes for the `.tar.gz` file. Re-render and update - dependencies as needed. + and SHA256 retrieved from PyPI > HDMF-Zarr > Download Files > View hashes for the `.tar.gz` file. Re-render and + update the dependencies as needed. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..24615639 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,18 @@ +version: 2 +updates: + # disable checking python requirements files because there are too + # many updates and dependabot will not ignore requirements-min.txt + # until https://github.com/dependabot/dependabot-core/issues/2883 is resolved + # workaround is to continue updating these files manually + + # - package-ecosystem: "pip" + # directory: "/" + # schedule: + # # Check for updates to requirements files and pyproject.toml every week + # interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every week + interval: "weekly" diff --git a/.github/workflows/HDMF_dev.yaml b/.github/workflows/HDMF_dev.yaml index b493b079..4500b792 100644 --- a/.github/workflows/HDMF_dev.yaml +++ b/.github/workflows/HDMF_dev.yaml @@ -5,28 +5,23 @@ on: [pull_request, workflow_dispatch] jobs: check_compatibility: runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - - name: Set up Python 3.13 + - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.13" - name: Install HDMF_Zarr Requirements run: | - python -m pip install -r requirements-dev.txt -r requirements.txt - pip install . + python -m pip install ".[test]" - - name: Clone HDMF Dev Branch + - name: Clone and Install HDMF Dev Branch run: | git clone https://github.com/hdmf-dev/hdmf.git --recurse-submodules cd hdmf @@ -36,7 +31,6 @@ jobs: - name: Run HDMF_Zarr Tests run: + # specify the tests directory so that we don't run the hdmf tests which are nested + # under the same base directory pytest -v tests - - - diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 2fadbb80..1d2e2b65 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -8,16 +8,12 @@ on: jobs: check-external-links: runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -27,7 +23,7 @@ jobs: - name: Install Sphinx dependencies and package run: | python -m pip install --upgrade pip - python -m pip install -r requirements-doc.txt -r requirements.txt -r requirements-opt.txt - python -m pip install . + python -m pip install ".[test,docs,full]" + - name: Check Sphinx external links - run: sphinx-build -b linkcheck ./docs/source ./test_build + run: sphinx-build -W -b linkcheck ./docs/source ./test_build diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index d8c4566c..bffde629 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -9,16 +9,13 @@ jobs: name: Deploy release from tag runs-on: ubuntu-latest steps: - - name: Checkout repo with submodules + - name: Checkout repo uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install build dependencies run: | @@ -28,11 +25,11 @@ jobs: - name: Run tox tests run: | - tox -e py312-upgraded + tox -e py313 - name: Build wheel and source distribution run: | - tox -e build-py312-upgraded + tox -e build ls -1 dist - name: Test installation from a wheel diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 9c59b97a..13a38d2b 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -18,45 +18,37 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: linux-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } - - { name: linux-python3.13-optional , test-tox-env: py313-optional , build-tox-env: build-py313-optional , python-ver: "3.13", os: ubuntu-latest } - - { name: linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } - - { name: linux-python3.13-prerelease , test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } - - { name: windows-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest } - - { name: windows-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: windows-latest } - - { name: windows-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: windows-latest } - - { name: windows-python3.13-optional , test-tox-env: py313-optional , build-tox-env: build-py313-optional , python-ver: "3.13", os: windows-latest } - - { name: windows-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest } - - { name: windows-python3.13-prerelease, test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: windows-latest } - - { name: macos-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-latest } - - { name: macos-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: macos-latest } - - { name: macos-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: macos-latest } - - { name: macos-python3.13-optional , test-tox-env: py313-optional , build-tox-env: build-py313-optional , python-ver: "3.13", os: macos-latest } - - { name: macos-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest } - - { name: macos-python3.13-prerelease , test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: macos-latest } + - { name: linux-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-python3.10 , test-tox-env: py310 , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.12 , test-tox-env: py312 , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-python3.13-optional , test-tox-env: py313-optional , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-python3.13-prerelease , test-tox-env: py313-prerelease, python-ver: "3.13", os: ubuntu-latest } + - { name: windows-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.10 , test-tox-env: py310 , python-ver: "3.10", os: windows-latest } + - { name: windows-python3.11 , test-tox-env: py311 , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12 , test-tox-env: py312 , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: windows-latest } + - { name: windows-python3.13-optional , test-tox-env: py313-optional , python-ver: "3.13", os: windows-latest } + - { name: windows-python3.13-prerelease, test-tox-env: py313-prerelease, python-ver: "3.13", os: windows-latest } + - { name: macos-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: macos-latest } + - { name: macos-python3.10 , test-tox-env: py310 , python-ver: "3.10", os: macos-latest } + - { name: macos-python3.11 , test-tox-env: py311 , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12 , test-tox-env: py312 , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: macos-latest } + - { name: macos-python3.13-optional , test-tox-env: py313-optional , python-ver: "3.13", os: macos-latest } + - { name: macos-python3.13-prerelease , test-tox-env: py313-prerelease, python-ver: "3.13", os: macos-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -68,46 +60,49 @@ jobs: python -m pip install --upgrade pip python -m pip install tox python -m pip list + - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} + - name: Build wheel and source distribution run: | - tox -e ${{ matrix.build-tox-env }} + tox -e build ls -1 dist + - name: Test installation from a wheel run: | tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Test installation from a source distribution + run: | + tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + run-all-gallery-tests: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-gallery-python3.13-optional , test-tox-env: gallery-py313-optional , python-ver: "3.13", os: ubuntu-latest } - { name: linux-gallery-python3.13-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest } - - { name: windows-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: windows-latest } + - { name: windows-gallery-python3.13-optional , test-tox-env: gallery-py313-optional , python-ver: "3.13", os: windows-latest } - { name: windows-gallery-python3.13-prerelease, test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: windows-latest } - { name: macos-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: macos-latest } - - { name: macos-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , python-ver: "3.13", os: macos-latest } + - { name: macos-gallery-python3.13-optional , test-tox-env: gallery-py313-optional , python-ver: "3.13", os: macos-latest } - { name: macos-gallery-python3.13-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: macos-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -119,44 +114,41 @@ jobs: python -m pip install --upgrade pip python -m pip install tox python -m pip list + - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} + run-all-tests-on-conda: name: ${{ matrix.name }} runs-on: ubuntu-latest defaults: run: shell: bash -l {0} # needed for conda environment to work + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: conda-linux-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: conda-linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } - - { name: conda-linux-python3.13-optional , test-tox-env: py313-optional , build-tox-env: build-py313-optional , python-ver: "3.13", os: ubuntu-latest } - - { name: conda-linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } - - { name: conda-linux-python3.13-prerelease, test-tox-env: py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.10 , test-tox-env: py310 , python-ver: "3.10", os: ubuntu-latest } + - { name: conda-linux-python3.11 , test-tox-env: py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12 , test-tox-env: py312 , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.13-optional , test-tox-env: py313-optional , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.13-prerelease, test-tox-env: py313-prerelease, python-ver: "3.13", os: ubuntu-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true python-version: ${{ matrix.python-ver }} + channels: conda-forge - name: Install build dependencies run: | @@ -170,15 +162,20 @@ jobs: conda config --show-sources conda list --show-channel-urls + # NOTE tox installs packages from PyPI not conda-forge... - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} - name: Build wheel and source distribution run: | - tox -e ${{ matrix.build-tox-env }} + tox -e build ls -1 dist - name: Test installation from a wheel run: | tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Test installation from a source distribution + run: | + tox -e wheelinstall --recreate --installpkg dist/*.tar.gz diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index 21150fc5..20011920 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -19,6 +19,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.os }}-${{ matrix.opt_req }} + cancel-in-progress: true strategy: matrix: include: @@ -26,48 +29,42 @@ jobs: - { os: ubuntu-latest , opt_req: false } - { os: windows-latest, opt_req: false } - { os: macos-latest , opt_req: false } - env: + env: # used by codecov-action OS: ${{ matrix.os }} PYTHON: '3.13' steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: ${{ env.PYTHON }} - - name: Install dependencies + - name: Upgrade pip run: | python -m pip install --upgrade pip - python -m pip install -r requirements-dev.txt -r requirements.txt - - - name: Install optional dependencies - if: ${{ matrix.opt_req }} - run: python -m pip install -r requirements-opt.txt - name: Install package + if: ! ${{ matrix.opt_req }} run: | - python -m pip install . - python -m pip list + python -m pip install ".[test]" + + - name: Install package with optional dependencies + if: ${{ matrix.opt_req }} + run: python -m pip install ".[test,full]" - name: Run tests and generate coverage report run: | # coverage is configured in pyproject.toml - pytest --cov --cov-report=xml --cov-report=term # codecov uploader requires xml format + # codecov uploader requires xml format + python -m pip list + pytest --cov --cov-report=xml --cov-report=term - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: fail_ci_if_error: true - file: ./coverage.xml + files: ./coverage.xml env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 827606c0..521995c1 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,29 +15,26 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: linux-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: ubuntu-latest } # NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact - - { name: linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest , upload-wheels: true } - - { name: windows-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest } - - { name: windows-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest } - - { name: macos-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-latest } - - { name: macos-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest } + - { name: linux-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: ubuntu-latest , upload-wheels: true } + - { name: linux-python3.13-optional, test-tox-env: py313-optional, python-ver: "3.13", os: ubuntu-latest } + - { name: windows-python3.9-minimum, test-tox-env: py39-minimum , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: windows-latest } + - { name: windows-python3.13-optional, test-tox-env: py313-optional, python-ver: "3.13", os: windows-latest } + - { name: macos-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: macos-latest } + - { name: macos-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: macos-latest } + - { name: macos-python3.13-optional, test-tox-env: py313-optional, python-ver: "3.13", os: macos-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -49,16 +46,24 @@ jobs: python -m pip install --upgrade pip python -m pip install tox python -m pip list + - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} + - name: Build wheel and source distribution run: | - tox -e ${{ matrix.build-tox-env }} + tox -e build ls -1 dist + - name: Test installation from a wheel run: | tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Test installation from a source distribution + run: | + tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + - name: Upload distribution as a workspace artifact if: ${{ matrix.upload-wheels }} uses: actions/upload-artifact@v4 @@ -72,24 +77,20 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - { name: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded, python-ver: "3.13", os: ubuntu-latest } + - { name: linux-gallery-python3.13-optional , test-tox-env: gallery-py313-optional, python-ver: "3.13", os: ubuntu-latest } - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: windows-latest } - - { name: windows-gallery-python3.13-upgraded, test-tox-env: gallery-py313-upgraded, python-ver: "3.13", os: windows-latest } + - { name: windows-gallery-python3.13-optional, test-tox-env: gallery-py313-optional, python-ver: "3.13", os: windows-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 @@ -101,73 +102,79 @@ jobs: python -m pip install --upgrade pip python -m pip install tox python -m pip list + - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} + run-tests-on-conda: name: ${{ matrix.name }} runs-on: ubuntu-latest defaults: run: shell: bash -l {0} + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: conda-linux-python3.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - - { name: conda-linux-python3.13-upgraded , test-tox-env: py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.9-minimum , test-tox-env: py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.13 , test-tox-env: py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.13-optional, test-tox-env: py313-optional, python-ver: "3.13", os: ubuntu-latest } steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - uses: actions/checkout@v4 - with: - submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Conda - uses: conda-incubator/setup-miniconda@v2 + uses: conda-incubator/setup-miniconda@v3 with: auto-update-conda: true - auto-activate-base: true - activate-environment: true python-version: ${{ matrix.python-ver }} + channels: conda-forge - name: Install build dependencies run: | conda config --set always_yes yes --set changeps1 no conda info conda install -c conda-forge tox - conda list + + - name: Conda reporting + run: | + conda info + conda config --show-sources + conda list --show-channel-urls + + # NOTE tox installs packages from PyPI not conda-forge... - name: Run tox tests run: | tox -e ${{ matrix.test-tox-env }} + - name: Build wheel and source distribution run: | - tox -e ${{ matrix.build-tox-env }} + tox -e build ls -1 dist + - name: Test installation from a wheel run: | tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + + - name: Test installation from a source distribution + run: | + tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + deploy-dev: name: Deploy pre-release from dev needs: [run-tests, run-gallery-tests, run-tests-on-conda] if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true steps: - - name: Cancel non-latest runs - uses: styfle/cancel-workflow-action@0.11.0 - with: - all_but_latest: true - access_token: ${{ github.token }} - - - name: Checkout repo with submodules + - name: Checkout repo uses: actions/checkout@v4 - with: - submodules: 'recursive' - name: Set up Python uses: actions/setup-python@v5 diff --git a/.gitignore b/.gitignore index 65aa7ee8..91d64df9 100644 --- a/.gitignore +++ b/.gitignore @@ -78,6 +78,7 @@ docs/build/ docs/source/hdmf_zarr*.rst docs/source/gen_modules docs/source/tutorials +docs/source/sg_execution_times.rst # example data generated by the tutorials docs/gallery/*.h5 docs/gallery/*.zarr diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8d6ffb00..a200e362 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -6,9 +6,9 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-24.04 tools: - python: '3.12' + python: '3.13' # Build documentation in the docs/ directory with Sphinx sphinx: @@ -24,10 +24,7 @@ formats: all # Optionally set the version of Python and requirements required to build your docs python: install: - - requirements: requirements-doc.txt - - requirements: requirements.txt - - requirements: requirements-opt.txt - - path: . # path to the package relative to the root + - path: .[docs,full] # path to the package relative to the root # Optionally include all submodules submodules: diff --git a/CHANGELOG.md b/CHANGELOG.md index ff767365..639958cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # HDMF-ZARR Changelog -## 1.0.0 (Upcoming) +## 0.10.0 (Upcoming) ### Enhancements * Added initial refactor of export, supporting references and internal/external links from Zarr to Zarr. This will introduce breaking changes that could lead to existing exported files to be invalid. This update removes '.' as the object default file source. @mavaylon1 [#194](https://github.com/hdmf-dev/hdmf-zarr/pull/194) @@ -8,27 +8,34 @@ * Updated packages used for testing and readthedocs configuration. @mavaylon1, @rly [#214](https://github.com/hdmf-dev/hdmf-zarr/pull/214) * Add `force_overwite` parameter for `ZarrIO.__init__` to allow overwriting an existing file or directory. @oruebel [#229](https://github.com/hdmf-dev/hdmf-zarr/pull/229) * Remove allowance of `hdmf.Array` in `__init__` of `AbstractZarrTableDataset` and `ZarrDataset` to be compatible with HDMF 4.0. @rly [#236](https://github.com/hdmf-dev/hdmf-zarr/pull/236) -* Remove support for python 3.8. @mavaylon1 [#240](https://github.com/hdmf-dev/hdmf-zarr/pull/240) +* Remove support for python 3.8 and added testing for Python 3.13. @mavaylon1 [#240](https://github.com/hdmf-dev/hdmf-zarr/pull/240) +* Added `NWBZarrIO.read_nwb` convenience method to simplify reading an NWB file. @oruebel [#226](https://github.com/hdmf-dev/hdmf-zarr/pull/226) +* Updated optional dependency groups in `pyproject.toml` and GitHub Actions workflows. @rly, @mavaylon1 [#239](https://github.com/hdmf-dev/hdmf-zarr/pull/239) ### Bug Fixes * Fix reading of cached specs and caching of specs during export. @rly [#232](https://github.com/hdmf-dev/hdmf-zarr/pull/232) * Fix hiding of pynwb compatibility errors. @rly [242](https://github.com/hdmf-dev/hdmf-zarr/pull/242) + ## 0.9.0 (September 16, 2024) + ### Enhancements * Added support for appending a dataset of references. @mavaylon1 [#203](https://github.com/hdmf-dev/hdmf-zarr/pull/203) * NWBZarrIO load_namespaces=True by default. @mavaylon1 [#204](https://github.com/hdmf-dev/hdmf-zarr/pull/204) * Added test for opening file with consolidated metadata from DANDI. @mavaylon1 [#206](https://github.com/hdmf-dev/hdmf-zarr/pull/206) * Add dimension labels compatible with xarray. @mavaylon1 [#207](https://github.com/hdmf-dev/hdmf-zarr/pull/207) * Added link_data --> clear_cache relationship to support repacking zarr nwbfiles: [#215](https://github.com/hdmf-dev/hdmf-zarr/pull/215) -* Added `NWBZarrIO.read_nwb` convenience method to simplify reading an NWB file. @oruebel [#226](https://github.com/hdmf-dev/hdmf-zarr/pull/226) + ## 0.8.0 (June 4, 2024) + ### Bug Fixes * Fixed bug when opening a file in with `mode=r+`. The file will open without using the consolidated metadata. @mavaylon1 [#182](https://github.com/hdmf-dev/hdmf-zarr/issues/182) * Fixed bug on how we access scalar arrays. Added warning filter for Zarr deprecation of NestedDirectoryStore. Fixed bug on how we write a dataset of references. @mavaylon1 [#195](https://github.com/hdmf-dev/hdmf-zarr/pull/195) + ## 0.7.0 (May 2, 2024) + ### Enhancements * Added support for python 3.12. @mavaylon1 [#172](https://github.com/hdmf-dev/hdmf-zarr/pull/172) * Added support for forcing read of files without consolidated metadata using `mode=r-` in `ZarrIO`. @oruebel [#183](https://github.com/hdmf-dev/hdmf-zarr/pull/183) @@ -41,6 +48,7 @@ * Fixed bug in `ZarrIO.__open_file_consolidated` that led to remote files being opened without consolidated metadata. @oruebel [#184](https://github.com/hdmf-dev/hdmf-zarr/pull/184) * Fixed minor bug where `ZarrIO.__open_file_consolidated` used properties of `ZarrIO` instead of the provided input parameters. @oruebel [#183](https://github.com/hdmf-dev/hdmf-zarr/pull/183) + ## 0.6.0 (February 21, 2024) ### Enhancements diff --git a/docs/source/conf.py b/docs/source/conf.py index d3bc2002..39669770 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -116,7 +116,6 @@ # a list of builtin themes. # html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] html_theme_options = { 'logo_only': False, # Only show the hdmf-zarr logo without the documentation title diff --git a/docs/source/index.rst b/docs/source/index.rst index 9656c3f7..f9910075 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -6,8 +6,8 @@ Welcome to hdmf-zarr's documentation! ===================================== -**hdmf_zarr** implements a Zarr backend for `HDMF `_ as well as -convenience classes for integration of Zarr with `PyNWB `_ to +**hdmf_zarr** implements a Zarr backend for `HDMF `_ as well as +convenience classes for integration of Zarr with `PyNWB `_ to support writing of NWB files to `Zarr `_. **Status:** The Zarr backend is **under development** and may still change. See the diff --git a/docs/source/installation.rst b/docs/source/installation.rst index fc55f947..e203f2d7 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -24,14 +24,15 @@ For Developers Install hdmf-zarr from GitHub ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The following illustrates how to install both ``hdmf`` and ``hdfm_zarr`` from GitHub -in a Conda environment. Normally we don't need to install ``hdmf`` directly, but until -``hdmf 3.4.0`` is released we need to use the ``dev`` version of ``hdmf``. +The following illustrates how to install both ``hdmf`` and ``hdmf_zarr`` from GitHub +in a Conda environment, with all of the optional, testing, and documentation dependencies +for hdmf-zarr. Normally, we don't need to install ``hdmf`` directly, but it is +often useful to use the ``dev`` branch of the ``hdmf`` GitHub repository. .. code-block:: - conda create --name hdmf-zarr-test python=3.9 - conda activate hdmf-zarr-test + conda create --name hdmf-zarr-dev python=3.13 + conda activate hdmf-zarr-dev git clone --recurse-submodules https://github.com/hdmf-dev/hdmf.git cd hdmf @@ -41,12 +42,11 @@ in a Conda environment. Normally we don't need to install ``hdmf`` directly, but git clone https://github.com/hdmf-dev/hdmf-zarr.git cd hdmf-zarr - pip install -r requirements.txt -r requirements-dev.txt -r requirements-doc.txt - pip install -e . + pip install -e ".[all]" .. note:: - Depending on versions, it is possible that when installing ``hdmf-zarr`` that pip will + Depending on versions, it is possible that when installing ``hdmf-zarr``, that ``pip`` will install HDMF directly from PyPI instead of using the development version of HDMF that is already installed. In that case call ``pip uninstall hdmf`` and go to the ``hdmf`` directory and run ``pip install -e .`` again diff --git a/pyproject.toml b/pyproject.toml index 9b36cba3..25adfcce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,19 +28,47 @@ classifiers = [ "Topic :: Scientific/Engineering :: Medical Science Apps." ] dependencies = [ - 'hdmf>=3.14.5', - 'zarr>=2.18.0, <3.0', # pin below 3.0 until HDMF-zarr supports zarr 3.0 - 'numpy>=1.24', - 'numcodecs>=0.10.0', - 'pynwb>=2.8.3', - 'threadpoolctl>=3.1.0', + "hdmf>=3.14.5", + "zarr>=2.18.0, <3.0", # pin below 3.0 until HDMF-zarr supports zarr 3.0 + "numpy>=1.24.0", + "numcodecs>=0.10.0", + "pynwb>=2.8.3", + "threadpoolctl>=3.1.0", ] dynamic = ["version"] [project.optional-dependencies] -tqdm = ["tqdm>=4.41.0"] -fsspec = ["fsspec"] -s3fs = ["s3fs"] +# all optional dependencies +full = [ + "tqdm>=4.41.0", + "fsspec", + "s3fs", +] + +# development dependencies +test = [ + "codespell", + "hdf5plugin", # hdf5plugin is used to test conversion of plugin filters + "pre-commit", + "pytest", + "pytest-cov", + "python-dateutil", + "ruff", + "tox", +] + +# documentation dependencies +docs = [ + "matplotlib", + "sphinx>=4", # improved support for docutils>=0.17 + "sphinx_rtd_theme>=1", # <1 does not work with docutils>=0.17 + "sphinx-gallery", + "sphinx-copybutton", +] + +# all possible dependencies +all = ["hdmf-zarr[full,test,docs]"] + [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf-zarr" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 75e9ba1c..00000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,15 +0,0 @@ -# pinned dependencies to reproduce an entire development environment to use HDMF-Zarr, -# run HDMF-Zarr tests, check code style, -# compute coverage, and create test environments. note that depending on the version of python installed, different -# versions of requirements may be installed due to package incompatibilities. -# -black==24.3.0 -codespell==2.2.6 -coverage==7.6.7 -hdf5plugin==4.3.0 # hdf5plugin is used to test conversion of plugin filters -pre-commit==3.5.0 -pytest==8.3.3 -pytest-cov==6.0.0 -python-dateutil==2.8.2 -ruff==0.1.3 -tox==4.11.3 diff --git a/requirements-doc.txt b/requirements-doc.txt deleted file mode 100644 index 4b921319..00000000 --- a/requirements-doc.txt +++ /dev/null @@ -1,6 +0,0 @@ -# dependencies to generate the documentation for HDMF-Zarr -matplotlib -sphinx>=4 # improved support for docutils>=0.17 -sphinx_rtd_theme>=1 # <1 does not work with docutils>=0.17 -sphinx-gallery -sphinx-copybutton diff --git a/requirements-min.txt b/requirements-min.txt index bc954b0a..72bbb64d 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,6 +1,8 @@ +# minimum versions of package dependencies for installing HDMF +# NOTE: these should match the minimum bound for dependencies in pyproject.toml hdmf==3.14.5 -zarr==2.13.0 +zarr==2.18.0 +numpy==1.24.0 numcodecs==0.10.0 pynwb==2.8.3 -setuptools threadpoolctl==3.1.0 diff --git a/requirements-opt.txt b/requirements-opt.txt deleted file mode 100644 index 6fc3bcb0..00000000 --- a/requirements-opt.txt +++ /dev/null @@ -1,3 +0,0 @@ -tqdm==4.67.0 -fsspec==2024.10.0 -s3fs==2024.10.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 57647cf2..00000000 --- a/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -# pinned dependencies to reproduce an entire development environment to use HDMF-ZARR -hdmf==3.14.5 -zarr==2.18.3; python_version >= "3.10" # zarr 2.18.3 dropped support for python 3.9 -zarr==2.18.2; python_version < "3.10" -pynwb==2.8.3 -numpy==2.1.3; python_version >= "3.10" # numpy 2.1.0 dropped support for python 3.9 -numpy==2.0.2; python_version < "3.10" -numcodecs==0.13.1 -threadpoolctl==3.5.0 diff --git a/tests/unit/test_zarrdataio.py b/tests/unit/test_zarrdataio.py index d6070784..f52f2f5c 100644 --- a/tests/unit/test_zarrdataio.py +++ b/tests/unit/test_zarrdataio.py @@ -47,7 +47,7 @@ def test_hdf5_to_zarr_filters_scaleoffset(self): msg = "/test_dset HDF5 scaleoffset filter ignored in Zarr" with self.assertWarnsWith(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset) - self.assertEqual(len(filters), 0) + self.assertEqual(len(filters), 0) # Close the HDF5 file h5file.close() @@ -60,7 +60,7 @@ def test_hdf5_to_zarr_filters_lzf(self): msg = "/test_dset HDF5 szip or lzf compression ignored in Zarr" with self.assertWarnsWith(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset) - self.assertEqual(len(filters), 0) + self.assertEqual(len(filters), 0) # Close the HDF5 file h5file.close() @@ -76,7 +76,7 @@ def test_hdf5_to_zarr_filters_lz4(self): msg = "/test_dset HDF5 lz4 compression ignored in Zarr" with self.assertWarnsWith(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset) - self.assertEqual(len(filters), 0) + self.assertEqual(len(filters), 0) # Close the HDF5 file h5file.close() @@ -92,7 +92,7 @@ def test_hdf5_to_zarr_filters_bitshuffle(self): msg = "/test_dset HDF5 bitshuffle compression ignored in Zarr" with self.assertWarnsWith(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset) - self.assertEqual(len(filters), 0) + self.assertEqual(len(filters), 0) # Close the HDF5 file h5file.close() @@ -109,10 +109,10 @@ def test_hdf5_to_zarr_filters_other_unsupported(self): data=[1, 2, 3, 4, 5], **hdf5plugin.FciDecomp()) # test that we warn due to the FciDecomp - msg = "/test_fcidecomp HDF5 filter id 32018 with properties None ignored in Zarr." - with self.assertWarnsWith(UserWarning, msg): + msg = r"/test_fcidecomp HDF5 filter id 32018 with properties .* ignored in Zarr." + with self.assertWarnsRegex(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset_FciDecomp) - self.assertEqual(len(filters), 0) + self.assertEqual(len(filters), 0) # Close the HDF5 file h5file.close() diff --git a/tox.ini b/tox.ini index 96c145e5..22e02a64 100644 --- a/tox.ini +++ b/tox.ini @@ -2,201 +2,105 @@ # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "python -m pip install tox" # and then run "tox" from this directory. +# Tox is used by the GitHub Actions workflow to run tests on multiple environments. [tox] +# NOTE: if the string "py39" is in the environment name, then the py39 interpreter is used, +# so we can omit specifying the basepython version below. envlist = py39, py310, py311, py312, py313 -requires = pip >= 22.0 +requires = pip >= 24.3.1 [testenv] download = True setenv = PYTHONDONTWRITEBYTECODE = 1 - VIRTUALENV_python -m pip = 22.3.1 install_command = - python -m pip install {opts} {packages} - -deps = - -rrequirements-dev.txt - -rrequirements.txt - + python -m pip install -U {opts} {packages} +extras = test commands = - python -m pip check # Check for conflicting packages + python -m pip list + python -m pip check pytest -v # Env to create coverage report locally [testenv:localcoverage] basepython = python3.13 commands = + python -m pip list + python -m pip check pytest --cov=hdmf_zarr coverage html -d tests/coverage/htmlcov -# Test with python 3.13; pinned dev and optional reqs -[testenv:py312-optional] -basepython = python3.13 -install_command = - python -m pip install {opts} {packages} -deps = - {[testenv]deps} - -rrequirements-opt.txt +# Envs that run tests +[testenv:py{39,310,311,312,313}] commands = {[testenv]commands} -# Test with python 3.13; pinned dev and optional reqs; upgraded run reqs -[testenv:py313-upgraded] -basepython = python3.13 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt +# Test with python 3.13 and all optional dependencies +[testenv:py313-optional] +extras = {[testenv]extras}, full commands = {[testenv]commands} -# Test with python 3.13; pinned dev and optional reqs; upgraded, pre-release run reqs +# Test with python 3.13 and all optional dependencies, using pre-release versions [testenv:py313-prerelease] -basepython = python3.13 install_command = python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt +extras = {[testenv]extras}, full commands = {[testenv]commands} -# Test with python 3.9; pinned dev reqs; minimum run reqs +# Test with python 3.9 and minimum dependencies [testenv:py39-minimum] -basepython = python3.9 +install_command = + python -m pip install {opts} {packages} deps = - -rrequirements-dev.txt - -rrequirements-min.txt + -r requirements-min.txt commands = {[testenv]commands} + # Envs that builds wheels and source distribution [testenv:build] commands = - python -m pip install --upgrade build + python -m pip install -U build + python -m pip list + python -m pip check python -m build - -[testenv:build-py39] -basepython = python3.9 -commands = {[testenv:build]commands} - -[testenv:build-py310] -basepython = python3.10 -commands = {[testenv:build]commands} - -[testenv:build-py311] -basepython = python3.11 -commands = {[testenv:build]commands} - -[testenv:build-py312] -basepython = python3.12 -commands = {[testenv:build]commands} - -[testenv:build-py313] -basepython = python3.13 -commands = {[testenv:build]commands} - -[testenv:build-py313-optional] -basepython = python3.13 -deps = - {[testenv]deps} - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py313-upgraded] -basepython = python3.13 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py313-prerelease] -basepython = python3.13 -install_command = - python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py39-minimum] -basepython = python3.9 -deps = - -rrequirements-dev.txt - -rrequirements-min.txt -commands = {[testenv:build]commands} + # Envs that will test installation from a wheel [testenv:wheelinstall] -deps = null -commands = python -c "import hdmf_zarr" +extras = null +commands = + python -m pip list + python -m pip check + python -c "import hdmf_zarr" + # Envs that will execute gallery tests [testenv:gallery] -install_command = - python -m pip install {opts} {packages} - -deps = - -rrequirements-dev.txt - -rrequirements.txt - -rrequirements-doc.txt - +# NOTE: the gallery tests do not require the "docs" extras commands = + python -m pip list + python -m pip check python test_gallery.py -[testenv:gallery-py39] -basepython = python3.9 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py310] -basepython = python3.10 -deps = {[testenv:gallery]deps} +[testenv:gallery-{py39,py310,py311,py312,py313}] commands = {[testenv:gallery]commands} -[testenv:gallery-py311] -basepython = python3.11 -deps = {[testenv:gallery]deps} +# Test with python 3.13 and all optional dependencies +[testenv:gallery-py313-optional] +extras = {[testenv:gallery]extras}, full commands = {[testenv:gallery]commands} -[testenv:gallery-py312] -basepython = python3.12 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py313] -basepython = python3.13 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -# Test with python 3.12; pinned dev, doc, and optional reqs; upgraded run reqs -[testenv:gallery-py313-upgraded] -basepython = python3.13 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-doc.txt - -rrequirements-opt.txt -commands = {[testenv:gallery]commands} - -# Test with python 3.13; pinned dev, doc, and optional reqs; pre-release run reqs +# Test with python 3.13 and all optional dependencies, using pre-release versions [testenv:gallery-py313-prerelease] -basepython = python3.13 install_command = python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-doc.txt - -rrequirements-opt.txt +extras = {[testenv:gallery]extras}, full commands = {[testenv:gallery]commands} -# Test with python 3.9; pinned dev and doc reqs; minimum run reqs +# Test with python 3.9 and minimum dependencies [testenv:gallery-py39-minimum] -basepython = python3.9 +install_command = + python -m pip install {opts} {packages} deps = - -rrequirements-dev.txt - -rrequirements-min.txt - -rrequirements-doc.txt - -rrequirements-opt.txt + -r requirements-min.txt commands = {[testenv:gallery]commands}