From ad2b0d66389903d2e0401b06f72c89fbb96b6f6a Mon Sep 17 00:00:00 2001 From: Matthew Avaylon Date: Thu, 21 Nov 2024 16:12:28 -0800 Subject: [PATCH 01/18] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a0845ed..fbff99b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # HDMF-ZARR Changelog -## 1.0.0 (Upcoming) +## 1.0.0 (November 21, 2024) ### 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) From ed2f1a6701a90b4bbb4e4d2ce388ac3e8bbd5cf4 Mon Sep 17 00:00:00 2001 From: rly Date: Wed, 27 Nov 2024 06:47:37 -0800 Subject: [PATCH 02/18] Update requirements files --- requirements-dev.txt | 14 +++++++------- requirements-opt.txt | 2 +- requirements.txt | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 75e9ba1c..07bfd50f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,13 +3,13 @@ # 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 +black==24.10.0 +codespell==2.3.0 +coverage==7.6.8 +hdf5plugin==5.0.0 # hdf5plugin is used to test conversion of plugin filters +pre-commit==4.0.1 pytest==8.3.3 pytest-cov==6.0.0 python-dateutil==2.8.2 -ruff==0.1.3 -tox==4.11.3 +ruff==0.8.0 +tox==4.23.2 diff --git a/requirements-opt.txt b/requirements-opt.txt index 6fc3bcb0..823b532a 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,3 +1,3 @@ -tqdm==4.67.0 +tqdm==4.67.1 fsspec==2024.10.0 s3fs==2024.10.0 diff --git a/requirements.txt b/requirements.txt index 57647cf2..fbbca0b6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,5 +5,5 @@ 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 +numcodecs==0.14.1 threadpoolctl==3.5.0 From 82930a18b34336436e8a726d33735e3aeeef8429 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 06:54:08 -0800 Subject: [PATCH 03/18] Update test for updated hdf5plugin --- tests/unit/test_zarrdataio.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/unit/test_zarrdataio.py b/tests/unit/test_zarrdataio.py index d6070784..2f820fdf 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." + msg = r"/test_fcidecomp HDF5 filter id 32018 with properties .* ignored in Zarr." with self.assertWarnsWith(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() From 744cdb5a3c01a69e1287c4ca3513522d6387622c Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 07:06:54 -0800 Subject: [PATCH 04/18] Fix test --- tests/unit/test_zarrdataio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/unit/test_zarrdataio.py b/tests/unit/test_zarrdataio.py index 2f820fdf..f52f2f5c 100644 --- a/tests/unit/test_zarrdataio.py +++ b/tests/unit/test_zarrdataio.py @@ -110,7 +110,7 @@ def test_hdf5_to_zarr_filters_other_unsupported(self): **hdf5plugin.FciDecomp()) # test that we warn due to the FciDecomp msg = r"/test_fcidecomp HDF5 filter id 32018 with properties .* ignored in Zarr." - with self.assertWarnsWith(UserWarning, msg): + with self.assertWarnsRegex(UserWarning, msg): filters = ZarrDataIO.hdf5_to_zarr_filters(h5dset_FciDecomp) self.assertEqual(len(filters), 0) # Close the HDF5 file From 1e5985e46f7849a1d38b97428dcd17b7122e0e71 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 07:27:20 -0800 Subject: [PATCH 05/18] Update release instructions --- .github/PULL_REQUEST_TEMPLATE/release.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md index e49d144d..0073225e 100644 --- a/.github/PULL_REQUEST_TEMPLATE/release.md +++ b/.github/PULL_REQUEST_TEMPLATE/release.md @@ -5,7 +5,7 @@ Prepare for release of HDMF-Zarr [version] - [ ] 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`. + Run `pip install pur && pur -r -d [requirements file]` to see which packages can be updated. - [ ] 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 From 9fe07c2d00c742d2e741ab60a7c977a9e1d15644 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 07:27:26 -0800 Subject: [PATCH 06/18] Update Sphinx workflow --- .github/workflows/check_external_links.yml | 12 +++++------- .gitignore | 1 + docs/source/conf.py | 1 - docs/source/index.rst | 4 ++-- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 2fadbb80..59773b8b 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -8,13 +8,10 @@ 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' @@ -29,5 +26,6 @@ jobs: 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 . + - 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/.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/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 From 026d5b4df724ec01db6018736b58da58c96bd71b Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 07:43:09 -0800 Subject: [PATCH 07/18] Update workflows to remove cancel action and align with hdmf --- .github/workflows/HDMF_dev.yaml | 20 ++--- .github/workflows/check_external_links.yml | 5 +- .github/workflows/deploy_release.yml | 11 +-- .github/workflows/run_all_tests.yml | 63 +++++++------- .github/workflows/run_coverage.yml | 16 ++-- .github/workflows/run_tests.yml | 96 +++++++++++----------- 6 files changed, 102 insertions(+), 109 deletions(-) diff --git a/.github/workflows/HDMF_dev.yaml b/.github/workflows/HDMF_dev.yaml index b493b079..147c1d7c 100644 --- a/.github/workflows/HDMF_dev.yaml +++ b/.github/workflows/HDMF_dev.yaml @@ -5,18 +5,14 @@ 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" @@ -26,7 +22,7 @@ jobs: python -m pip install -r requirements-dev.txt -r requirements.txt pip install . - - 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 +32,7 @@ jobs: - name: Run HDMF_Zarr Tests run: - pytest -v tests + pytest -v diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 59773b8b..18c85d73 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -12,9 +12,8 @@ jobs: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - - uses: actions/checkout@v4 - with: - submodules: 'recursive' + - name: Checkout repo + uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index d8c4566c..0af20a40 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-upgraded - name: Build wheel and source distribution run: | - tox -e build-py312-upgraded + tox -e build-py313-upgraded 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 92bf2fcc..c3272466 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -18,6 +18,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -47,16 +50,8 @@ jobs: - { 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 } 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,22 +63,33 @@ 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 }} 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: @@ -98,16 +104,8 @@ jobs: - { name: macos-gallery-python3.13-upgraded , test-tox-env: gallery-py313-upgraded , 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,15 +117,20 @@ 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: @@ -141,22 +144,15 @@ jobs: - { 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 } 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,6 +166,7 @@ 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 }} @@ -182,3 +179,7 @@ jobs: - 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..21a87cbf 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,19 +29,12 @@ 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 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 827606c0..707fb97d 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,6 +15,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -28,16 +31,8 @@ jobs: - { 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 } 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 +44,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 }} 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 +75,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: 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: 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: 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 } 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,15 +100,20 @@ 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: @@ -117,57 +121,57 @@ jobs: - { 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 } 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 }} 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 From e0fac2b91d510ec1b900e200047926b75a98b1e7 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 10:21:07 -0800 Subject: [PATCH 08/18] Update HDMF_dev.yaml --- .github/workflows/HDMF_dev.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/HDMF_dev.yaml b/.github/workflows/HDMF_dev.yaml index 147c1d7c..bbc39c5c 100644 --- a/.github/workflows/HDMF_dev.yaml +++ b/.github/workflows/HDMF_dev.yaml @@ -32,7 +32,6 @@ jobs: - name: Run HDMF_Zarr Tests run: - pytest -v - - - + # specify the tests directory so that we don't run the hdmf tests which are nested + # under the same base directory + pytest -v tests From b23e617b6bef4faf4e806cc6ee231dd65a4d157a Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 11:32:38 -0800 Subject: [PATCH 09/18] Fix dateutil requirement --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 07bfd50f..0d2d536f 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -10,6 +10,6 @@ hdf5plugin==5.0.0 # hdf5plugin is used to test conversion of plugin filters pre-commit==4.0.1 pytest==8.3.3 pytest-cov==6.0.0 -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 ruff==0.8.0 tox==4.23.2 From 81db7eff665a08c8b2a14797b931a0fabc648909 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 27 Nov 2024 12:57:50 -0800 Subject: [PATCH 10/18] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ca21f3..6cf71d17 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ * 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) +* Added `NWBZarrIO.read_nwb` convenience method to simplify reading an NWB file. @oruebel [#226](https://github.com/hdmf-dev/hdmf-zarr/pull/226) ### Bug Fixes * Fix reading of cached specs and caching of specs during export. @rly [#232](https://github.com/hdmf-dev/hdmf-zarr/pull/232) @@ -21,7 +22,6 @@ * 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 From 9117094a9b5bcafb636e2b39af7148dd0f51328e Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 17:56:11 -0800 Subject: [PATCH 11/18] Remove requirements files, update tox and workflows --- .github/workflows/deploy_release.yml | 4 +- .github/workflows/run_all_tests.yml | 70 +++++----- .github/workflows/run_tests.yml | 29 ++--- pyproject.toml | 32 ++++- requirements-dev.txt | 15 --- requirements-doc.txt | 6 - requirements-min.txt | 6 +- requirements-opt.txt | 3 - requirements.txt | 9 -- tox.ini | 186 +++++++-------------------- 10 files changed, 124 insertions(+), 236 deletions(-) delete mode 100644 requirements-dev.txt delete mode 100644 requirements-doc.txt delete mode 100644 requirements-opt.txt delete mode 100644 requirements.txt diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index 0af20a40..bffde629 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -25,11 +25,11 @@ jobs: - name: Run tox tests run: | - tox -e py313-upgraded + tox -e py313 - name: Build wheel and source distribution run: | - tox -e build-py313-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 c3272466..13a38d2b 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -25,30 +25,27 @@ jobs: 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: Checkout repo uses: actions/checkout@v4 @@ -70,7 +67,7 @@ jobs: - 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 @@ -95,13 +92,13 @@ jobs: 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: Checkout repo @@ -135,14 +132,13 @@ jobs: 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.8" , 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: Checkout repo uses: actions/checkout@v4 @@ -173,7 +169,7 @@ jobs: - 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 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 707fb97d..82b07f02 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -22,14 +22,13 @@ jobs: 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: 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: 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 } steps: - name: Checkout repo uses: actions/checkout@v4 @@ -51,7 +50,7 @@ jobs: - 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 @@ -82,10 +81,10 @@ jobs: 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: 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: linux-gallery-python3.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , 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-optional, test-tox-env: gallery-py313-optional, python-ver: "3.13", os: windows-latest } steps: - name: Checkout repo uses: actions/checkout@v4 @@ -118,8 +117,8 @@ jobs: 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 } steps: - name: Checkout repo uses: actions/checkout@v4 @@ -150,7 +149,7 @@ jobs: - 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 diff --git a/pyproject.toml b/pyproject.toml index 9b36cba3..3a4cc742 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,12 +28,12 @@ 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"] @@ -42,6 +42,26 @@ tqdm = ["tqdm>=4.41.0"] fsspec = ["fsspec"] s3fs = ["s3fs"] +# development dependencies +test = [ + "codespell", + "hdf5plugin", # hdf5plugin is used to test conversion of plugin filters + "pre-commit", + "pytest", + "pytest-cov", + "python-dateutil", + "ruff", + "tox", +] + +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", +] + [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf-zarr" "Bug Tracker" = "https://github.com/hdmf-dev/hdmf-zarr/issues" diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 0d2d536f..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.10.0 -codespell==2.3.0 -coverage==7.6.8 -hdf5plugin==5.0.0 # hdf5plugin is used to test conversion of plugin filters -pre-commit==4.0.1 -pytest==8.3.3 -pytest-cov==6.0.0 -python-dateutil==2.9.0.post0 -ruff==0.8.0 -tox==4.23.2 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 823b532a..00000000 --- a/requirements-opt.txt +++ /dev/null @@ -1,3 +0,0 @@ -tqdm==4.67.1 -fsspec==2024.10.0 -s3fs==2024.10.0 diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index fbbca0b6..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.14.1 -threadpoolctl==3.5.0 diff --git a/tox.ini b/tox.ini index 96c145e5..55cd63ce 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}, tqdm, fsspec, s3fs 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}, tqdm, fsspec, s3fs 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}, tqdm, fsspec, s3fs 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}, tqdm, fsspec, s3fs 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} From 0fb6a386b5b57127562a07f9e1fa7be22050d6b1 Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 17:59:16 -0800 Subject: [PATCH 12/18] Fix rtd --- .readthedocs.yaml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 8d6ffb00..b69025a1 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,tqdm,fsspec,s3fs] # path to the package relative to the root # Optionally include all submodules submodules: From bacaa315c8a90cba81608f67d1efd301b5ae9602 Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:05:07 -0800 Subject: [PATCH 13/18] Update per-PR workflows --- .github/workflows/run_tests.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 82b07f02..fe65f0ac 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -22,13 +22,16 @@ jobs: fail-fast: false matrix: include: - - { name: linux-python3.9-minimum , test-tox-env: py39-minimum, python-ver: "3.9" , 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 , test-tox-env: py313 , python-ver: "3.13", os: ubuntu-latest , upload-wheels: true } - - { 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: 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: 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 , upload-wheels: true } + - { 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: Checkout repo uses: actions/checkout@v4 @@ -117,8 +120,9 @@ jobs: fail-fast: false matrix: include: - - { 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.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: Checkout repo uses: actions/checkout@v4 From 3e6d6a62cba16d6d0c6396d4992a1d42df50bc9c Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:24:34 -0800 Subject: [PATCH 14/18] Update docs, change optional deps group --- .github/PULL_REQUEST_TEMPLATE/release.md | 10 ++++------ .github/workflows/HDMF_dev.yaml | 3 +-- .github/workflows/check_external_links.yml | 3 +-- .github/workflows/run_coverage.yml | 23 +++++++++++----------- .readthedocs.yaml | 2 +- docs/source/installation.rst | 16 +++++++-------- pyproject.toml | 14 ++++++++++--- tox.ini | 8 ++++---- 8 files changed, 42 insertions(+), 37 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE/release.md b/.github/PULL_REQUEST_TEMPLATE/release.md index 0073225e..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 -d [requirements file]` to see which packages can be updated. +- [ ] 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/workflows/HDMF_dev.yaml b/.github/workflows/HDMF_dev.yaml index bbc39c5c..4500b792 100644 --- a/.github/workflows/HDMF_dev.yaml +++ b/.github/workflows/HDMF_dev.yaml @@ -19,8 +19,7 @@ jobs: - 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 and Install HDMF Dev Branch run: | diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 18c85d73..1d2e2b65 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -23,8 +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 -W -b linkcheck ./docs/source ./test_build diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index 21a87cbf..20011920 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -41,29 +41,30 @@ jobs: 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/.readthedocs.yaml b/.readthedocs.yaml index b69025a1..a200e362 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -24,7 +24,7 @@ formats: all # Optionally set the version of Python and requirements required to build your docs python: install: - - path: .[docs,tqdm,fsspec,s3fs] # 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/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 3a4cc742..25adfcce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,9 +38,12 @@ dependencies = [ 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 = [ @@ -54,6 +57,7 @@ test = [ "tox", ] +# documentation dependencies docs = [ "matplotlib", "sphinx>=4", # improved support for docutils>=0.17 @@ -62,6 +66,10 @@ docs = [ "sphinx-copybutton", ] +# all possible dependencies +all = ["hdmf-zarr[full,test,docs]"] + + [project.urls] "Homepage" = "https://github.com/hdmf-dev/hdmf-zarr" "Bug Tracker" = "https://github.com/hdmf-dev/hdmf-zarr/issues" diff --git a/tox.ini b/tox.ini index 55cd63ce..22e02a64 100644 --- a/tox.ini +++ b/tox.ini @@ -37,14 +37,14 @@ commands = {[testenv]commands} # Test with python 3.13 and all optional dependencies [testenv:py313-optional] -extras = {[testenv]extras}, tqdm, fsspec, s3fs +extras = {[testenv]extras}, full commands = {[testenv]commands} # Test with python 3.13 and all optional dependencies, using pre-release versions [testenv:py313-prerelease] install_command = python -m pip install -U --pre {opts} {packages} -extras = {[testenv]extras}, tqdm, fsspec, s3fs +extras = {[testenv]extras}, full commands = {[testenv]commands} # Test with python 3.9 and minimum dependencies @@ -87,14 +87,14 @@ commands = {[testenv:gallery]commands} # Test with python 3.13 and all optional dependencies [testenv:gallery-py313-optional] -extras = {[testenv:gallery]extras}, tqdm, fsspec, s3fs +extras = {[testenv:gallery]extras}, full commands = {[testenv:gallery]commands} # Test with python 3.13 and all optional dependencies, using pre-release versions [testenv:gallery-py313-prerelease] install_command = python -m pip install -U --pre {opts} {packages} -extras = {[testenv:gallery]extras}, tqdm, fsspec, s3fs +extras = {[testenv:gallery]extras}, full commands = {[testenv:gallery]commands} # Test with python 3.9 and minimum dependencies From 5e7f4599a52ec96617e54b7d5d9d2cd0bd216720 Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:36:53 -0800 Subject: [PATCH 15/18] Configure dependabot --- .github/dependabot.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/dependabot.yml 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" From 0cac2d734c7ab932c0e6da1ebb9ec36c6d8ae64a Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:37:42 -0800 Subject: [PATCH 16/18] Fix workflow --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index fe65f0ac..521995c1 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -25,7 +25,7 @@ jobs: - { 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 , 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 , 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 } From 6bbbce2442d5d858a5c53ef02dfa8bd3bf258038 Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:40:24 -0800 Subject: [PATCH 17/18] Update changelog --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cf71d17..1a76895f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # HDMF-ZARR Changelog -## 1.0.0 (November 21, 2024) +## 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) @@ -10,12 +10,16 @@ * 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) * 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) +* Added testing for Python 3.13. @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) @@ -23,12 +27,16 @@ * 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) + ## 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 +49,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 From 802ad392a674fcf52a8c403f85267e70cd3ef524 Mon Sep 17 00:00:00 2001 From: rly Date: Tue, 17 Dec 2024 18:42:19 -0800 Subject: [PATCH 18/18] Update changelog --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a76895f..639958cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,10 +8,9 @@ * 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) -* Added testing for Python 3.13. @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)