From cf093b2291b2c2b36a53bfc2760621d713b47f93 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 28 Oct 2023 17:23:51 -0700 Subject: [PATCH 01/18] Test using a simpler more maintainable tox.ini --- .github/workflows/run_tests.yml | 95 ++++++-------- test_gallery.py | 4 +- tox.ini | 226 +++++++------------------------- 3 files changed, 91 insertions(+), 234 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index d29b41129..cb92cf9ff 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -15,29 +15,27 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: linux-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } # NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact - - { name: linux-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: ubuntu-latest , upload-wheels: true } - - { name: windows-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: windows-latest } - - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: macos-latest } + - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: pytest-py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: ubuntu-latest , upload-wheels: true } + - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: windows-latest } + - { name: macos-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: macos-latest } + - { name: macos-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 @@ -56,16 +54,16 @@ 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 run: | - tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + tox -e wheelinstall --installpkg dist/*-none-any.whl - name: Test installation from a source distribution run: | - tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + tox -e wheelinstall --installpkg dist/*.tar.gz - name: Upload distribution as a workspace artifact if: ${{ matrix.upload-wheels }} @@ -80,6 +78,9 @@ jobs: defaults: run: shell: bash + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: @@ -89,15 +90,11 @@ jobs: - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } - { name: windows-gallery-python3.11-upgraded, test-tox-env: gallery-py311-upgraded, python-ver: "3.11", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 @@ -120,23 +117,21 @@ jobs: defaults: run: shell: bash -l {0} + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: conda-linux-python3.11-upgraded , test-tox-env: py311-upgraded , python-ver: "3.11", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Conda uses: conda-incubator/setup-miniconda@v2 @@ -162,33 +157,31 @@ 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 run: | - tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + tox -e wheelinstall --installpkg dist/*-none-any.whl - name: Test installation from a source distribution run: | - tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + tox -e wheelinstall --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 uses: actions/checkout@v4 with: submodules: 'recursive' + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 @@ -219,21 +212,20 @@ jobs: defaults: run: shell: bash -l {0} # necessary for conda + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - { name: linux-gallery-python3.11-ros3 , python-ver: "3.11", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' + fetch-depth: 0 # tags are required to determine the version - name: Set up Conda uses: conda-incubator/setup-miniconda@v2 @@ -247,7 +239,6 @@ jobs: - name: Install run dependencies run: | - pip install matplotlib pip install -e . pip list diff --git a/test_gallery.py b/test_gallery.py index 970ef93f1..f279fcef5 100644 --- a/test_gallery.py +++ b/test_gallery.py @@ -81,8 +81,8 @@ def run_gallery_tests(): ) _import_from_file(script) except (ImportError, ValueError) as e: - if "linkml" in str(e) and sys.version_info < (3, 9): - pass # this is OK because plot_term_set.py and plot_external_resources.py cannot be run on Python 3.8 + if "linkml" in str(e): + pass # this is OK because linkml is not always installed else: raise e except Exception: diff --git a/tox.ini b/tox.ini index 596262002..aeb743c45 100644 --- a/tox.ini +++ b/tox.ini @@ -1,193 +1,59 @@ # Tox (https://tox.readthedocs.io/) is a tool for running tests # in multiple virtualenvs. This configuration file will run the # test suite on all supported python versions. To use it, "pip install tox" -# and then run "tox" from this directory. +# and then run "tox -e [envname]" from this directory. [tox] -envlist = py38, py39, py310, py311 requires = pip >= 22.0 [testenv] download = True usedevelop = True setenv = - PYTHONDONTWRITEBYTECODE = 1 - VIRTUALENV_PIP = 22.3.1 -install_command = - python -m pip install {opts} {packages} - -deps = - -rrequirements-dev.txt - -rrequirements.txt -commands = - python -m pip check # Check for conflicting packages - python -m pip list - pytest -v - -# Test with python 3.11; pinned dev and optional reqs -[testenv:py311-optional] -basepython = python3.11 -deps = - {[testenv]deps} - -rrequirements-opt.txt -commands = {[testenv]commands} - -# Test with python 3.11; pinned dev and optional reqs; upgraded run reqs -[testenv:py311-upgraded] -basepython = python3.11 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv]commands} - -# Test with python 3.11; pinned dev and optional reqs; upgraded, pre-release run reqs -[testenv:py311-prerelease] -basepython = python3.11 -install_command = - python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv]commands} - -# Test with python 3.8; pinned dev reqs; minimum run reqs -[testenv:py38-minimum] -basepython = python3.8 -deps = - -rrequirements-dev.txt - -rrequirements-min.txt -commands = {[testenv]commands} - -# Envs that builds wheels and source distribution -[testenv:build] + PYTHONDONTWRITEBYTECODE = 1 + VIRTUALENV_PIP = 23.3.1 +recreate = + pinned, minimum, upgraded, prerelease: False + build, wheelinstall: True # good practice to recreate the environment +skip_install = + pinned, minimum, upgraded, prerelease, wheelinstall: False + build: True # no need to install anything when building +install_command = + # when using [testenv:wheelinstall] and --installpkg, the wheel and its dependencies + # are installed, instead of the package in the current directory + pinned, minimum, wheelinstall: python -I -m pip install {opts} {packages} + upgraded: python -I -m pip install -U {opts} {packages} + prerelease: python -I -m pip install -U --pre {opts} {packages} +deps = + # use pinned, minimum, or neither (use dependencies in pyproject.toml) + pytest, gallery: -rrequirements-dev.txt + gallery: -rrequirements-doc.txt + optional: -rrequirements-opt.txt + pinned: -rrequirements.txt + minimum: -rrequirements-min.txt commands = - python -m pip install --upgrade build - python -m build - -[testenv:build-py38] -basepython = python3.8 -commands = {[testenv:build]commands} - -[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-py311-optional] -basepython = python3.11 -deps = - {[testenv]deps} - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py311-upgraded] -basepython = python3.11 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py311-prerelease] -basepython = python3.11 -install_command = - python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv:build]commands} - -[testenv:build-py38-minimum] -basepython = python3.8 -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; import hdmf.common" - -# 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 - -commands = - python test_gallery.py - -[testenv:gallery-py38] -basepython = python3.8 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py39] -basepython = python3.9 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py310] -basepython = python3.10 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py311] -basepython = python3.11 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -[testenv:gallery-py311-optional] -basepython = python3.11 -deps = - -rrequirements-dev.txt - -rrequirements.txt - -rrequirements-doc.txt - -rrequirements-opt.txt -commands = {[testenv:gallery]commands} - -# Test with python 3.11; pinned dev, doc, and optional reqs; upgraded run reqs -[testenv:gallery-py311-upgraded] -basepython = python3.11 -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.11; pinned dev, doc, and optional reqs; pre-release run reqs -[testenv:gallery-py311-prerelease] -basepython = python3.11 -install_command = - python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt - -rrequirements-doc.txt - -rrequirements-opt.txt -commands = {[testenv:gallery]commands} - -# Test with python 3.8; pinned dev and doc reqs; minimum run reqs + python --version # print python version for debugging + python -m pip check # check for conflicting packages + python -m pip list # list installed packages for debugging + pytest: pytest -v + gallery: python test_gallery.py + build: python -m pip install -U build + build: python -m build + wheelinstall: python -c "import hdmf; import hdmf.common" + +# list of pre-defined environments. (Technically environments not listed here +# like build-py312 can also be used.) +[testenv:pytest-py312-upgraded] +[testenv:pytest-py312-prerelease] +[testenv:pytest-py311-optional-pinned] # some optional reqs not compatible with py312 yet +[testenv:pytest-py{38,39,310,311,312}-pinned] +[testenv:pytest-py38-minimum] + +[testenv:gallery-py312-upgraded] +[testenv:gallery-py312-prerelease] +[testenv:gallery-py311-optional-pinned] +[testenv:gallery-py{38,39,310,311,312}-pinned] [testenv:gallery-py38-minimum] -basepython = python3.8 -deps = - -rrequirements-dev.txt - -rrequirements-min.txt - -rrequirements-doc.txt -commands = {[testenv:gallery]commands} + +[testenv:build] # using tox for this so that we can have a clean build environment +[testenv:wheelinstall] # use with `--installpkg dist/*-none-any.whl` From 42f3ccc8b1085089db7ef5ad727f6597808956c4 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 28 Oct 2023 17:32:02 -0700 Subject: [PATCH 02/18] Fix action --- .github/workflows/run_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index cb92cf9ff..f5f0a40a8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -16,7 +16,7 @@ jobs: run: shell: bash concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} cancel-in-progress: true strategy: fail-fast: false @@ -79,7 +79,7 @@ jobs: run: shell: bash concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} cancel-in-progress: true strategy: fail-fast: false @@ -118,7 +118,7 @@ jobs: run: shell: bash -l {0} concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} cancel-in-progress: true strategy: fail-fast: false @@ -174,7 +174,7 @@ jobs: if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} cancel-in-progress: true steps: - name: Checkout repo with submodules @@ -213,7 +213,7 @@ jobs: run: shell: bash -l {0} # necessary for conda concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} cancel-in-progress: true strategy: fail-fast: false From 542337c2ff432bc9c9a3ff44ac07d28d5c04e0d5 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 28 Oct 2023 17:33:12 -0700 Subject: [PATCH 03/18] Fix action --- .github/workflows/run_tests.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index f5f0a40a8..de08bf245 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -24,7 +24,7 @@ jobs: include: # NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: pytest-py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } - { name: linux-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: ubuntu-latest , upload-wheels: true } - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } - { name: windows-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: windows-latest } @@ -85,10 +85,10 @@ jobs: fail-fast: false matrix: include: - - { name: linux-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded, python-ver: "3.11", os: ubuntu-latest } - - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-gallery-python3.11-upgraded, test-tox-env: gallery-py311-upgraded, python-ver: "3.11", os: windows-latest } + - { name: linux-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } + - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: windows-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 From a56f8e21c649ee8635851d465e8986780759dd8d Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 28 Oct 2023 17:35:18 -0700 Subject: [PATCH 04/18] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2aa3835f9..5d6a5bcb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ### Minor improvements - Set up GitHub dependabot to check for updates to Python requirements and GitHub Actions. @rly [#977](https://github.com/hdmf-dev/hdmf/pull/977) +- Simplify tox configuration. @rly [#988](https://github.com/hdmf-dev/hdmf/pull/988) ### Bug fixes - Updated custom class generation to handle specs with fixed values and required names. @rly [#800](https://github.com/hdmf-dev/hdmf/pull/800) From 62406bdc63251907ffcce9b18770b1854c1a1ca4 Mon Sep 17 00:00:00 2001 From: rly Date: Sat, 28 Oct 2023 17:44:06 -0700 Subject: [PATCH 05/18] Update actions --- .github/workflows/run_all_tests.yml | 141 ++++++++++++++-------------- .github/workflows/run_tests.yml | 18 ++-- 2 files changed, 78 insertions(+), 81 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 91364d36d..34f287c51 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -18,42 +18,43 @@ 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.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , 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.11-optional , test-tox-env: py311-optional , build-tox-env: build-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.11-prerelease , test-tox-env: py311-prerelease, build-tox-env: build-py311-prerelease, python-ver: "3.11", os: ubuntu-latest } - - { name: windows-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , 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.11-optional , test-tox-env: py311-optional , build-tox-env: build-py311-optional , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.11-prerelease, test-tox-env: py311-prerelease, build-tox-env: build-py311-prerelease, python-ver: "3.11", os: windows-latest } - - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , 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.11-optional , test-tox-env: py311-optional , build-tox-env: build-py311-optional , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.11-prerelease , test-tox-env: py311-prerelease, build-tox-env: build-py311-prerelease, python-ver: "3.11", os: macos-latest } + - { name: linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: windows-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: windows-latest } + - { name: windows-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: windows-latest } + - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: macos-latest } + - { name: macos-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: macos-latest } + - { name: macos-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: macos-latest } + - { name: macos-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 @@ -77,11 +78,11 @@ jobs: - name: Test installation from a wheel run: | - tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + tox -e wheelinstall --installpkg dist/*-none-any.whl - name: Test installation from a source distribution run: | - tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + tox -e wheelinstall --installpkg dist/*.tar.gz run-all-gallery-tests: name: ${{ matrix.name }} @@ -89,33 +90,31 @@ 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.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - { name: linux-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-gallery-python3.11-prerelease , test-tox-env: gallery-py311-prerelease, python-ver: "3.11", os: ubuntu-latest } + - { name: linux-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: ubuntu-latest } - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } - { name: windows-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: windows-latest } - - { name: windows-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: windows-latest } - - { name: windows-gallery-python3.11-prerelease, test-tox-env: gallery-py311-prerelease, python-ver: "3.11", os: windows-latest } + - { name: windows-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: windows-latest } + - { name: windows-gallery-python3.12-prerelease, test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: windows-latest } - { name: macos-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: macos-latest } - { name: macos-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: macos-latest } - - { name: macos-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: macos-latest } - - { name: macos-gallery-python3.11-prerelease , test-tox-env: gallery-py311-prerelease, python-ver: "3.11", os: macos-latest } + - { name: macos-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: macos-latest } + - { name: macos-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease, python-ver: "3.12", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 @@ -138,28 +137,27 @@ jobs: 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.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , 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.11-optional , test-tox-env: py311-optional , build-tox-env: build-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.11-upgraded , test-tox-env: py311-upgraded , build-tox-env: build-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.11-prerelease, test-tox-env: py311-prerelease, build-tox-env: build-py311-prerelease, python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: conda-linux-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: conda-linux-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Conda uses: conda-incubator/setup-miniconda@v2 @@ -190,11 +188,11 @@ jobs: - name: Test installation from a wheel run: | - tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + tox -e wheelinstall --installpkg dist/*-none-any.whl - name: Test installation from a source distribution run: | - tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + tox -e wheelinstall --installpkg dist/*.tar.gz run-gallery-ros3-tests: name: ${{ matrix.name }} @@ -202,23 +200,22 @@ jobs: defaults: run: shell: bash -l {0} # necessary for conda + concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + cancel-in-progress: true strategy: fail-fast: false matrix: include: - - { name: linux-gallery-python3.11-ros3 , python-ver: "3.11", os: ubuntu-latest } - - { name: windows-gallery-python3.11-ros3, python-ver: "3.11", os: windows-latest } - - { name: macos-gallery-python3.11-ros3 , python-ver: "3.11", os: macos-latest } + - { name: linux-gallery-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } + - { name: windows-gallery-python3.12-ros3 , python-ver: "3.12", os: windows-latest } + - { name: macos-gallery-python3.12-ros3 , python-ver: "3.12", 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' + fetch-depth: 0 # tags are required to determine the version - name: Set up Conda uses: conda-incubator/setup-miniconda@v2 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index de08bf245..c3f644b25 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -24,12 +24,12 @@ jobs: include: # NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: ubuntu-latest , upload-wheels: true } + - { name: linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest , upload-wheels: true } - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: windows-latest } - { name: macos-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-python3.11-upgraded , test-tox-env: pytest-py311-upgraded , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: macos-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -86,9 +86,9 @@ jobs: matrix: include: - { name: linux-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-gallery-python3.11-upgraded , test-tox-env: gallery-py311-upgraded , python-ver: "3.11", os: windows-latest } + - { name: windows-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: windows-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: matrix: include: - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.11-upgraded , test-tox-env: py311-upgraded , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -186,7 +186,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Download wheel and source distributions from artifact uses: actions/download-artifact@v3 @@ -219,7 +219,7 @@ jobs: fail-fast: false matrix: include: - - { name: linux-gallery-python3.11-ros3 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-gallery-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 From 5472c283878dd3027e7d7ed7878e858fc5d5402c Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:23:08 -0700 Subject: [PATCH 06/18] Catch new python 3.12 warning --- test_gallery.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test_gallery.py b/test_gallery.py index f279fcef5..6eef39438 100644 --- a/test_gallery.py +++ b/test_gallery.py @@ -35,6 +35,12 @@ def _import_from_file(script): pydantic_warning_re = ("Support for class-based `config` is deprecated, use ConfigDict instead.") +datetime_warning_re = ( + "datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal " + "in a future version. Use timezone-aware objects to represent datetimes in UTC: " + "datetime.datetime.fromtimestamp(timestamp, datetime.UTC)." +) + def run_gallery_tests(): global TOTAL, FAILURES, ERRORS @@ -79,6 +85,12 @@ def run_gallery_tests(): message=pydantic_warning_re, category=DeprecationWarning, ) + warnings.filterwarnings( + # this warning is triggered from pandas 2.1.2 and python 3.12 + "ignore", + message=datetime_warning_re, + category=DeprecationWarning, + ) _import_from_file(script) except (ImportError, ValueError) as e: if "linkml" in str(e): From de2ab83ec1db132964247159e2dd8508935cc242 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:24:26 -0700 Subject: [PATCH 07/18] Update workflows, test python 3.12 --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/workflows/check_external_links.yml | 18 ++++++++---------- .github/workflows/codespell.yml | 9 ++------- .github/workflows/deploy_release.yml | 10 +++++----- .github/workflows/project_action.yml | 2 +- .github/workflows/ruff.yml | 6 ++++-- .github/workflows/run_all_tests.yml | 4 ++-- .github/workflows/run_coverage.yml | 16 +++++++--------- .github/workflows/run_hdmf_zarr_tests.yml | 16 +++++++--------- .github/workflows/run_pynwb_tests.yml | 16 +++++++--------- CHANGELOG.md | 3 ++- docs/source/conf.py | 2 +- docs/source/install_developers.rst | 4 ++-- docs/source/install_users.rst | 2 +- environment-ros3.yml | 10 +++++----- 15 files changed, 55 insertions(+), 64 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index b1f1d49e2..5710953b8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -64,6 +64,7 @@ body: - "3.9" - "3.10" - "3.11" + - "3.12" validations: required: true - type: textarea diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index e341f2964..8fc4f63c9 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -1,6 +1,6 @@ name: Check Sphinx external links on: - pull_request: + push: schedule: - cron: '0 5 * * *' # once per day at midnight ET workflow_dispatch: @@ -8,22 +8,20 @@ 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install Sphinx dependencies and package run: | diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 156afa035..facaee0c7 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -1,19 +1,14 @@ ---- name: Codespell - on: push: - branches: [dev] - pull_request: - branches: [dev] + workflow_dispatch: jobs: codespell: name: Check for spelling errors runs-on: ubuntu-latest - steps: - - name: Checkout + - name: Checkout repo uses: actions/checkout@v4 - name: Codespell uses: codespell-project/actions-codespell@v2 diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index a4b79e896..1b49de35b 100644 --- a/.github/workflows/deploy_release.yml +++ b/.github/workflows/deploy_release.yml @@ -18,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Install build dependencies run: | @@ -28,20 +28,20 @@ jobs: - name: Run tox tests run: | - tox -e py311-upgraded + tox -e py312-upgraded - name: Build wheel and source distribution run: | - tox -e build-py311-upgraded + tox -e build ls -1 dist - name: Test installation from a wheel run: | - tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl + tox -e wheelinstall --installpkg dist/*-none-any.whl - name: Test installation from a source distribution run: | - tox -e wheelinstall --recreate --installpkg dist/*.tar.gz + tox -e wheelinstall --installpkg dist/*.tar.gz - name: Upload wheel and source distributions to PyPI run: | diff --git a/.github/workflows/project_action.yml b/.github/workflows/project_action.yml index d52ed3af9..bfca0b3f5 100644 --- a/.github/workflows/project_action.yml +++ b/.github/workflows/project_action.yml @@ -12,7 +12,7 @@ jobs: steps: - name: GitHub App token id: generate_token - uses: tibdex/github-app-token@v2.1.0 + uses: tibdex/github-app-token@v2 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.APP_PEM }} diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 10491ccc2..1933fa75e 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -5,5 +5,7 @@ jobs: ruff: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: chartboost/ruff-action@v1 + - name: Checkout repo + uses: actions/checkout@v4 + - name: Run ruff + uses: chartboost/ruff-action@v1 diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 34f287c51..c9edf2b5c 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -73,7 +73,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 @@ -183,7 +183,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_coverage.yml b/.github/workflows/run_coverage.yml index fa856963c..95661e1c0 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: @@ -28,18 +31,13 @@ jobs: - { os: macos-latest , opt_req: false } env: # used by codecov-action OS: ${{ matrix.os }} - PYTHON: '3.11' + PYTHON: '3.12' 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 diff --git a/.github/workflows/run_hdmf_zarr_tests.yml b/.github/workflows/run_hdmf_zarr_tests.yml index d0f3e0fbc..5a9a93b68 100644 --- a/.github/workflows/run_hdmf_zarr_tests.yml +++ b/.github/workflows/run_hdmf_zarr_tests.yml @@ -8,22 +8,20 @@ on: jobs: run-hdmf-zarr-tests: 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - name: Update pip run: python -m pip install --upgrade pip diff --git a/.github/workflows/run_pynwb_tests.yml b/.github/workflows/run_pynwb_tests.yml index 14ad84e57..f92b917e1 100644 --- a/.github/workflows/run_pynwb_tests.yml +++ b/.github/workflows/run_pynwb_tests.yml @@ -8,22 +8,20 @@ on: jobs: run-pynwb-tests: 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 + - name: Checkout repo with submodules + uses: actions/checkout@v4 with: submodules: 'recursive' - fetch-depth: 0 # tags are required for versioneer to determine the version + fetch-depth: 0 # tags are required to determine the version - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.11' + python-version: '3.12' - name: Update pip run: python -m pip install --upgrade pip diff --git a/CHANGELOG.md b/CHANGELOG.md index ebfe604a1..c6d4b8591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # HDMF Changelog -## HDMF 3.11.0 (Upcoming) +## HDMF 3.11.0 (October 30, 2023) ### Enhancements - Added `target_tables` attribute to `DynamicTable` to allow users to specify the target table of any predefined @@ -10,6 +10,7 @@ ### Minor improvements - Set up GitHub dependabot to check for updates to GitHub Actions. @rly [#977](https://github.com/hdmf-dev/hdmf/pull/977) - Simplify tox configuration. @rly [#988](https://github.com/hdmf-dev/hdmf/pull/988) +- Add testing for Python 3.12. @rly [#988](https://github.com/hdmf-dev/hdmf/pull/988) ### Bug fixes - Updated custom class generation to handle specs with fixed values and required names. @rly [#800](https://github.com/hdmf-dev/hdmf/pull/800) diff --git a/docs/source/conf.py b/docs/source/conf.py index 0d43931e1..58fa3f2ba 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -70,7 +70,7 @@ } intersphinx_mapping = { - "python": ("https://docs.python.org/3.11", None), + "python": ("https://docs.python.org/3.12", None), "numpy": ("https://numpy.org/doc/stable/", None), "scipy": ("https://docs.scipy.org/doc/scipy/", None), "matplotlib": ("https://matplotlib.org/stable/", None), diff --git a/docs/source/install_developers.rst b/docs/source/install_developers.rst index 453ccf876..d043a351a 100644 --- a/docs/source/install_developers.rst +++ b/docs/source/install_developers.rst @@ -52,11 +52,11 @@ Option 2: Using conda The `conda package and environment management system`_ is an alternate way of managing virtual environments. First, install Anaconda_ to install the ``conda`` tool. Then create and -activate a new virtual environment called ``"hdmf-env"`` with Python 3.11 installed. +activate a new virtual environment called ``"hdmf-env"`` with Python 3.12 installed. .. code:: bash - conda create --name hdmf-env python=3.11 + conda create --name hdmf-env python=3.12 conda activate hdmf-env Similar to a virtual environment created with ``venv``, a conda environment diff --git a/docs/source/install_users.rst b/docs/source/install_users.rst index 6c0d235f2..8102651ff 100644 --- a/docs/source/install_users.rst +++ b/docs/source/install_users.rst @@ -4,7 +4,7 @@ Installing HDMF --------------- -HDMF requires having Python 3.8, 3.9, 3.10, or 3.11 installed. If you don't have Python installed and want the simplest way to +HDMF requires having Python 3.8, 3.9, 3.10, 3.11, or 3.12 installed. If you don't have Python installed and want the simplest way to get started, we recommend you install and use the `Anaconda Distribution`_. It includes Python, NumPy, and many other commonly used packages for scientific computing and data science. diff --git a/environment-ros3.yml b/environment-ros3.yml index a8f2f0587..8511da9a3 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -4,12 +4,12 @@ channels: - conda-forge - defaults dependencies: - - python==3.11 - - h5py==3.9.0 + - python==3.12 + - h5py==3.10.0 - matplotlib==3.8.0 - - numpy==1.26.0 - - pandas==2.1.1 + - numpy==1.26.1 + - pandas==2.1.2 - python-dateutil==2.8.2 - - pytest==7.4.2 + - pytest==7.4.3 - pytest-cov==4.1.0 - setuptools From 1923f828e3e43009c2ff921d003ebaa89336561d Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:26:33 -0700 Subject: [PATCH 08/18] Fix 3.12 limitation --- .github/workflows/check_external_links.yml | 2 +- .github/workflows/run_coverage.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 8fc4f63c9..2f418035e 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.12' + python-version: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12 - name: Install Sphinx dependencies and package run: | diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index 95661e1c0..072abe556 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -31,7 +31,7 @@ jobs: - { os: macos-latest , opt_req: false } env: # used by codecov-action OS: ${{ matrix.os }} - PYTHON: '3.12' + PYTHON: '3.11' # TODO update to 3.12 when optional reqs (e.g., oaklib) support 3.12 steps: - name: Checkout repo with submodules uses: actions/checkout@v4 From e26ca9be4bb920b92051b749e275bb52fb2155e9 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:49:29 -0700 Subject: [PATCH 09/18] Fix --- .github/workflows/run_all_tests.yml | 64 ++++++++++++++--------------- .github/workflows/run_tests.yml | 6 +-- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index c9edf2b5c..20fc13a66 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -25,30 +25,30 @@ jobs: fail-fast: false matrix: include: - - { name: linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: ubuntu-latest } - - { name: windows-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: windows-latest } - - { name: windows-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: windows-latest } - - { name: windows-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: windows-latest } - - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: macos-latest } - - { name: macos-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: macos-latest } - - { name: macos-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: macos-latest } + - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: windows-latest } + - { name: windows-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: windows-latest } + - { name: macos-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: macos-latest } + - { name: macos-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: macos-latest } + - { name: macos-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: macos-latest } + - { name: macos-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: macos-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -144,14 +144,14 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.9 , test-tox-env: py39-pinned , python-ver: "3.9" , os: ubuntu-latest } - - { name: conda-linux-python3.10 , test-tox-env: py310-pinned , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.11 , test-tox-env: py311-pinned , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.11-optional , test-tox-env: py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.12 , test-tox-env: py312-pinned , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-prerelease , test-tox-env: py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: conda-linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: conda-linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c3f644b25..6e2ebd97f 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -124,8 +124,8 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-python3.8-minimum , test-tox-env: py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.12-upgraded , test-tox-env: py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: conda-linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -174,7 +174,7 @@ jobs: if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest concurrency: - group: ${{ github.workflow }}-${{ github.ref }}-${{ matrix.name }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true steps: - name: Checkout repo with submodules From abcd60d7c2067dfdfd2866f9a2637de05b64e8f1 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:49:56 -0700 Subject: [PATCH 10/18] Fix conda env --- environment-ros3.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment-ros3.yml b/environment-ros3.yml index 8511da9a3..458b899ba 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -7,7 +7,7 @@ dependencies: - python==3.12 - h5py==3.10.0 - matplotlib==3.8.0 - - numpy==1.26.1 + - numpy==1.26.0 - pandas==2.1.2 - python-dateutil==2.8.2 - pytest==7.4.3 From 1bd495dd40ead5928110a49a7b43b5b4ee27a81d Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 00:56:24 -0700 Subject: [PATCH 11/18] Fixes --- .github/workflows/run_all_tests.yml | 2 +- .github/workflows/run_tests.yml | 2 +- test_gallery.py | 34 ++++------------------------- 3 files changed, 6 insertions(+), 32 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 20fc13a66..bbc745f75 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -169,7 +169,7 @@ jobs: run: | conda config --set always_yes yes --set changeps1 no conda info - conda install -c conda-forge tox + conda install -c conda-forge "tox>=4" - name: Conda reporting run: | diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 6e2ebd97f..9bd4326f8 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -143,7 +143,7 @@ jobs: run: | conda config --set always_yes yes --set changeps1 no conda info - conda install -c conda-forge tox + conda install -c conda-forge "tox>=4" - name: Conda reporting run: | diff --git a/test_gallery.py b/test_gallery.py index 6eef39438..c3128b8fd 100644 --- a/test_gallery.py +++ b/test_gallery.py @@ -26,22 +26,11 @@ def _import_from_file(script): _numpy_warning_re = "numpy.ufunc size changed, may indicate binary incompatibility. Expected 216, got 192" -_distutils_warning_re = "distutils Version classes are deprecated. Use packaging.version instead." - _experimental_warning_re = ( "[a-zA-Z0-9]+ is experimental -- it may be removed in the future " "and is not guaranteed to maintain backward compatibility" ) -pydantic_warning_re = ("Support for class-based `config` is deprecated, use ConfigDict instead.") - -datetime_warning_re = ( - "datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal " - "in a future version. Use timezone-aware objects to represent datetimes in UTC: " - "datetime.datetime.fromtimestamp(timestamp, datetime.UTC)." -) - - def run_gallery_tests(): global TOTAL, FAILURES, ERRORS logging.info("Testing execution of Sphinx Gallery files") @@ -54,6 +43,10 @@ def run_gallery_tests(): gallery_file_names.append(os.path.join(root, f)) warnings.simplefilter("error") + warnings.filterwarnings( + "ignore", + category=DeprecationWarning, # these can be triggered by downstream packages. ignore for these tests + ) TOTAL += len(gallery_file_names) for script in gallery_file_names: @@ -65,12 +58,6 @@ def run_gallery_tests(): message=_experimental_warning_re, category=UserWarning, ) - warnings.filterwarnings( - # this warning is triggered from pandas when HDMF is installed with the minimum requirements - "ignore", - message=_distutils_warning_re, - category=DeprecationWarning, - ) warnings.filterwarnings( # this warning is triggered when some numpy extension code in an upstream package was compiled # against a different version of numpy than the one installed @@ -78,19 +65,6 @@ def run_gallery_tests(): message=_numpy_warning_re, category=RuntimeWarning, ) - warnings.filterwarnings( - # this warning is triggered when some linkml dependency like curies uses pydantic in a way that - # will be deprecated in the future - "ignore", - message=pydantic_warning_re, - category=DeprecationWarning, - ) - warnings.filterwarnings( - # this warning is triggered from pandas 2.1.2 and python 3.12 - "ignore", - message=datetime_warning_re, - category=DeprecationWarning, - ) _import_from_file(script) except (ImportError, ValueError) as e: if "linkml" in str(e): From 226f6aaa782c65cdb5c2fad2f8a838bc6686dc85 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 01:04:21 -0700 Subject: [PATCH 12/18] Fix pynwb/zarr tests --- .github/workflows/run_hdmf_zarr_tests.yml | 6 +++--- .github/workflows/run_pynwb_tests.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run_hdmf_zarr_tests.yml b/.github/workflows/run_hdmf_zarr_tests.yml index 5a9a93b68..bae1968bd 100644 --- a/.github/workflows/run_hdmf_zarr_tests.yml +++ b/.github/workflows/run_hdmf_zarr_tests.yml @@ -31,11 +31,11 @@ jobs: python -m pip list git clone https://github.com/hdmf-dev/hdmf-zarr.git --recurse-submodules cd hdmf-zarr - python -m pip install -r requirements-dev.txt -r requirements.txt + python -m pip install -r requirements-dev.txt # do not install the pinned install requirements # must install in editable mode for coverage to find sources - python -m pip install -e . # this will install a pinned version of hdmf instead of the current one + python -m pip install -e . # this will install a different version of hdmf from the current one cd .. - python -m pip uninstall -y hdmf # uninstall the pinned version of hdmf + python -m pip uninstall -y hdmf # uninstall the other version of hdmf python -m pip install . # reinstall current branch of hdmf python -m pip list diff --git a/.github/workflows/run_pynwb_tests.yml b/.github/workflows/run_pynwb_tests.yml index f92b917e1..3bdc5fb28 100644 --- a/.github/workflows/run_pynwb_tests.yml +++ b/.github/workflows/run_pynwb_tests.yml @@ -31,11 +31,11 @@ jobs: python -m pip list git clone https://github.com/NeurodataWithoutBorders/pynwb.git --recurse-submodules cd pynwb - python -m pip install -r requirements-dev.txt -r requirements.txt + python -m pip install -r requirements-dev.txt # do not install the pinned install requirements # must install in editable mode for coverage to find sources - python -m pip install -e . # this will install a pinned version of hdmf instead of the current one + python -m pip install -e . # this will install a different version of hdmf from the current one cd .. - python -m pip uninstall -y hdmf # uninstall the pinned version of hdmf + python -m pip uninstall -y hdmf # uninstall the other version of hdmf python -m pip install . # reinstall current branch of hdmf python -m pip list From 838046e24b457d809e4f0edfddbc0aec4a12dea4 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 01:04:30 -0700 Subject: [PATCH 13/18] Temp enable all tests --- .github/workflows/run_all_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index bbc745f75..a4ecefb97 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -3,8 +3,8 @@ on: schedule: - cron: '0 5 * * *' # once per day at midnight ET push: - tags: # run only on new tags that follow semver - - '/^[0-9]+(\.[0-9]+)?(\.[0-9]+)?$/' + # tags: # run only on new tags that follow semver + # - '/^[0-9]+(\.[0-9]+)?(\.[0-9]+)?$/' workflow_dispatch: jobs: From 35b433f5478a39d6c9519bf441e8748439c41b00 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 01:07:49 -0700 Subject: [PATCH 14/18] Use abs links on readme so they work on pypi page --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 7c4a24633..c95cae568 100644 --- a/README.rst +++ b/README.rst @@ -60,12 +60,12 @@ See the `HDMF documentation `_. By participating, you are expected to uphold this code. +This project and everyone participating in it is governed by our `code of conduct guidelines `_. By participating, you are expected to uphold this code. Contributing ============ -For details on how to contribute to HDMF see our `contribution guidelines `_. +For details on how to contribute to HDMF see our `contribution guidelines `_. Citing HDMF =========== From dc37492b0a2f7aef7b13dc52ea534a3e0cd0df98 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 01:11:01 -0700 Subject: [PATCH 15/18] Cleanup triggers --- .github/workflows/check_external_links.yml | 2 +- .github/workflows/codespell.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 2f418035e..213e02f05 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -1,6 +1,6 @@ name: Check Sphinx external links on: - push: + pull_request: schedule: - cron: '0 5 * * *' # once per day at midnight ET workflow_dispatch: diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index facaee0c7..32c4cc07f 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -1,6 +1,6 @@ name: Codespell on: - push: + pull_request: workflow_dispatch: jobs: From f5967bc8fa95b667257457bbc437cebbc486caa6 Mon Sep 17 00:00:00 2001 From: rly Date: Sun, 29 Oct 2023 12:25:41 -0700 Subject: [PATCH 16/18] Fix --- .github/workflows/run_all_tests.yml | 88 ++++++++++++++--------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index a4ecefb97..160fd136c 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -25,30 +25,30 @@ jobs: fail-fast: false matrix: include: - - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } - - { name: linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } - - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: windows-latest } - - { name: windows-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: windows-latest } - - { name: windows-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: windows-latest } - - { name: windows-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: windows-latest } - - { name: macos-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: macos-latest } - - { name: macos-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: macos-latest } - - { name: macos-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: macos-latest } - - { name: macos-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: macos-latest } + - { name: linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: windows-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: windows-latest } + - { name: windows-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: windows-latest } + - { name: macos-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: macos-latest } + - { name: macos-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: macos-latest } + - { name: macos-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: macos-latest } + - { name: macos-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: macos-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -97,18 +97,18 @@ jobs: fail-fast: false matrix: include: - - { name: linux-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: linux-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: linux-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: ubuntu-latest } - - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } - - { name: windows-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: windows-latest } - - { name: windows-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: windows-latest } - - { name: windows-gallery-python3.12-prerelease, test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: windows-latest } - - { name: macos-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: macos-latest } - - { name: macos-gallery-python3.11-optional , test-tox-env: gallery-py311-optional , python-ver: "3.11", os: macos-latest } - - { name: macos-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: macos-latest } - - { name: macos-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease, python-ver: "3.12", os: macos-latest } + - { name: linux-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: linux-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: windows-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: windows-latest } + - { name: windows-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: windows-latest } + - { name: windows-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: windows-latest } + - { name: windows-gallery-python3.12-prerelease, test-tox-env: gallery-py312-prerelease , python-ver: "3.12", os: windows-latest } + - { name: macos-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: macos-latest } + - { name: macos-gallery-python3.11-optional , test-tox-env: gallery-py311-optional-pinned , python-ver: "3.11", os: macos-latest } + - { name: macos-gallery-python3.12-upgraded , test-tox-env: gallery-py312-upgraded , python-ver: "3.12", os: macos-latest } + - { name: macos-gallery-python3.12-prerelease , test-tox-env: gallery-py312-prerelease , python-ver: "3.12", os: macos-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 @@ -144,14 +144,14 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } - - { name: conda-linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } - - { name: conda-linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.11-optional , test-tox-env: pytest-py311-optional , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.8-minimum , test-tox-env: pytest-py38-minimum , python-ver: "3.8" , os: ubuntu-latest } + - { name: conda-linux-python3.9 , test-tox-env: pytest-py39-pinned , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.10 , test-tox-env: pytest-py310-pinned , python-ver: "3.10", os: ubuntu-latest } + - { name: conda-linux-python3.11 , test-tox-env: pytest-py311-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.11-optional , test-tox-env: pytest-py311-optional-pinned , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12 , test-tox-env: pytest-py312-pinned , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-upgraded , test-tox-env: pytest-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.12-prerelease , test-tox-env: pytest-py312-prerelease , python-ver: "3.12", os: ubuntu-latest } steps: - name: Checkout repo with submodules uses: actions/checkout@v4 From c5afdb2f70c6bf129d34c79b9a88cd3c416fbb8d Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Sun, 29 Oct 2023 20:19:32 -0700 Subject: [PATCH 17/18] Update run_all_tests.yml --- .github/workflows/run_all_tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 160fd136c..b4312f640 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -3,8 +3,8 @@ on: schedule: - cron: '0 5 * * *' # once per day at midnight ET push: - # tags: # run only on new tags that follow semver - # - '/^[0-9]+(\.[0-9]+)?(\.[0-9]+)?$/' + tags: # run only on new tags that follow semver + - '/^[0-9]+(\.[0-9]+)?(\.[0-9]+)?$/' workflow_dispatch: jobs: From 71704fc67b094da382867328bfc1f132eb771587 Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Sun, 29 Oct 2023 20:20:48 -0700 Subject: [PATCH 18/18] Update run_hdmf_zarr_tests.yml --- .github/workflows/run_hdmf_zarr_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run_hdmf_zarr_tests.yml b/.github/workflows/run_hdmf_zarr_tests.yml index bae1968bd..1ed84aebc 100644 --- a/.github/workflows/run_hdmf_zarr_tests.yml +++ b/.github/workflows/run_hdmf_zarr_tests.yml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.12' + python-version: '3.10' # use 3.10 until hdmf-zarr updates versioneer.py which breaks on newer python - name: Update pip run: python -m pip install --upgrade pip