From fdf8a47d53215e7985db57d1e338306323edd123 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:05:57 -0800 Subject: [PATCH 01/18] update min requirements --- pyproject.toml | 6 +++--- requirements-doc.txt | 6 +++--- requirements-min.txt | 2 +- requirements-opt.txt | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 14a11f5d5..3bb8e2d80 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,15 +14,15 @@ authors = [ ] description= "Package for working with Neurodata stored in the NWB format." readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.9" license = {text = "BSD-3-Clause"} classifiers = [ "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", @@ -33,7 +33,7 @@ classifiers = [ "Topic :: Scientific/Engineering :: Medical Science Apps." ] dependencies = [ - "h5py>=2.10", + "h5py>=3.1.0", "hdmf>=3.14.5", "numpy>=1.18", "pandas>=1.1.5", diff --git a/requirements-doc.txt b/requirements-doc.txt index 30c41106d..acc439002 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -14,6 +14,6 @@ hdf5plugin dandi>=0.46.6 hdmf-zarr zarr<3 # limited to zarr<3 until hdmf-zarr resolves issues with zarr 3.0 -linkml-runtime==1.7.4; python_version >= "3.9" -schemasheets==0.2.1; python_version >= "3.9" -oaklib==0.5.32; python_version >= "3.9" \ No newline at end of file +linkml-runtime==1.7.4 +schemasheets==0.2.1 +oaklib==0.5.32 \ No newline at end of file diff --git a/requirements-min.txt b/requirements-min.txt index feed604bc..4731a0e7e 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,5 +1,5 @@ # minimum versions of package dependencies for installing PyNWB -h5py==2.10 # support for selection of datasets with list of indices added in 2.10 +h5py==3.1.0 hdmf==3.14.5 numpy==1.18 pandas==1.1.5 diff --git a/requirements-opt.txt b/requirements-opt.txt index a60e0c029..fa6a18806 100644 --- a/requirements-opt.txt +++ b/requirements-opt.txt @@ -1,6 +1,6 @@ -linkml-runtime==1.7.4; python_version >= "3.9" -schemasheets==0.2.1; python_version >= "3.9" -oaklib==0.5.32; python_version >= "3.9" +linkml-runtime==1.7.4 +schemasheets==0.2.1 +oaklib==0.5.32 # for streaming tests fsspec==2024.10.0 From 52a10b2bf467a8fddc6190feab0c2c9676e80312 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:06:39 -0800 Subject: [PATCH 02/18] update environment files --- environment-ros3.yml | 2 +- tox.ini | 66 ++++++++++++++++++++++---------------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/environment-ros3.yml b/environment-ros3.yml index 081408f19..165f17341 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -4,7 +4,7 @@ channels: - conda-forge - defaults dependencies: - - python==3.12 + - python==3.13 - h5py==3.11.0 - hdmf==3.14.3 - matplotlib==3.8.4 diff --git a/tox.ini b/tox.ini index 7920b6cd7..6a87f0054 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py38, py39, py310, py311, py312 +envlist = py39, py310, py311, py312, p313 requires = pip >= 22.0 [testenv] @@ -23,9 +23,9 @@ commands = python -m pip list python test.py -v -# Test with python 3.12; pinned dev reqs; upgraded run reqs -[testenv:py312-upgraded] -basepython = python3.12 +# Test with python 3.13; pinned dev reqs; upgraded run reqs +[testenv:py313-upgraded] +basepython = python3.13 install_command = python -m pip install -U {opts} {packages} deps = @@ -40,18 +40,18 @@ deps = -rrequirements-opt.txt commands = {[testenv]commands} -# Test with python 3.12; pinned dev reqs; upgraded, pre-release run reqs -[testenv:py312-prerelease] -basepython = python3.12 +# Test with python 3.13; pinned dev reqs; upgraded, pre-release run reqs +[testenv:py313-prerelease] +basepython = python3.13 install_command = python -m pip install -U --pre {opts} {packages} deps = -rrequirements-dev.txt commands = {[testenv]commands} -# Test with python 3.8; pinned dev reqs; minimum run reqs -[testenv:py38-minimum] -basepython = python3.8 +# Test with python 3.9; pinned dev reqs; minimum run reqs +[testenv:py39-minimum] +basepython = python3.9 deps = -rrequirements-dev.txt -rrequirements-min.txt @@ -63,10 +63,6 @@ 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} @@ -83,24 +79,28 @@ commands = {[testenv:build]commands} basepython = python3.12 commands = {[testenv:build]commands} -[testenv:build-py312-upgraded] -basepython = python3.12 +[testenv:build-py313] +basepython = python3.13 +commands = {[testenv:build]commands} + +[testenv:build-py313-upgraded] +basepython = python3.13 install_command = python -m pip install -U {opts} {packages} deps = -rrequirements-dev.txt commands = {[testenv:build]commands} -[testenv:build-py312-prerelease] -basepython = python3.12 +[testenv:build-py313-prerelease] +basepython = python3.13 install_command = python -m pip install -U --pre {opts} {packages} deps = -rrequirements-dev.txt commands = {[testenv:build]commands} -[testenv:build-py38-minimum] -basepython = python3.8 +[testenv:build-py39-minimum] +basepython = python3.9 deps = -rrequirements-dev.txt -rrequirements-min.txt @@ -125,11 +125,6 @@ commands = python -m pip list python test.py --example -[testenv:gallery-py38] -basepython = python3.8 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - [testenv:gallery-py39] basepython = python3.9 deps = {[testenv:gallery]deps} @@ -145,9 +140,14 @@ basepython = python3.11 deps = {[testenv:gallery]deps} commands = {[testenv:gallery]commands} -# Test with python 3.12; pinned dev, and doc reqs; upgraded run reqs -[testenv:gallery-py312-upgraded] +[testenv:gallery-py312] basepython = python3.12 +deps = {[testenv:gallery]deps} +commands = {[testenv:gallery]commands} + +# Test with python 3.13; pinned dev, and doc reqs; upgraded run reqs +[testenv:gallery-py313-upgraded] +basepython = python3.13 deps = -rrequirements-dev.txt commands = @@ -157,9 +157,9 @@ commands = python -m pip list python test.py --example -# Test with python 3.12; pinned dev, doc, and optional reqs; pre-release run reqs -[testenv:gallery-py312-prerelease] -basepython = python3.12 +# Test with python 3.13; pinned dev, doc, and optional reqs; pre-release run reqs +[testenv:gallery-py313-prerelease] +basepython = python3.13 deps = -rrequirements-dev.txt commands = @@ -169,9 +169,9 @@ commands = python -m pip list python test.py --example -# Test with python 3.8; pinned dev and doc reqs; minimum run reqs -[testenv:gallery-py38-minimum] -basepython = python3.8 +# Test with python 3.9; pinned dev and doc reqs; minimum run reqs +[testenv:gallery-py39-minimum] +basepython = python3.9 deps = -rrequirements-min.txt commands = {[testenv:gallery]commands} From bcfb5f1292c30f05b7d7acfa70569e20446a344b Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:07:35 -0800 Subject: [PATCH 03/18] update installation documentation --- docs/source/install_developers.rst | 6 +++--- docs/source/install_users.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/source/install_developers.rst b/docs/source/install_developers.rst index 428a7e592..ba964ff26 100644 --- a/docs/source/install_developers.rst +++ b/docs/source/install_developers.rst @@ -6,7 +6,7 @@ Installing PyNWB for Developers PyNWB has the following minimum requirements, which must be installed before you can get started using PyNWB. -#. Python 3.8, 3.9, 3.10, or 3.11 +#. Python 3.9, 3.10, 3.11, 3.12, or 3.13 #. pip @@ -54,11 +54,11 @@ Option 2: Using conda ^^^^^^^^^^^^^^^^^^^^^ First, install Anaconda_ to install the ``conda`` tool. Then create and -activate a new virtual environment called "venv" with Python 3.8 installed. +activate a new virtual environment called "venv" with Python 3.9 installed. .. code:: bash - conda create --name venv python=3.8 + conda create --name venv python=3.9 conda activate venv Similar to a virtual environment created with ``virtualenv``, a conda environment diff --git a/docs/source/install_users.rst b/docs/source/install_users.rst index 368ab7bd0..1bae5c754 100644 --- a/docs/source/install_users.rst +++ b/docs/source/install_users.rst @@ -6,7 +6,7 @@ Installing PyNWB PyNWB has the following minimum requirements, which must be installed before you can get started using PyNWB. -#. Python 3.8, 3.9, 3.10, or 3.11 +#. Python 3.9, 3.10, 3.11, 3.12, or 3.13 #. pip .. note:: If you are a developer then please see the :ref:`install_developers` installation instructions instead. From 74271be9875ad11b92495b2228ac862b88658b71 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:09:11 -0800 Subject: [PATCH 04/18] update workflows --- .github/ISSUE_TEMPLATE/bug_report.yml | 3 +- .github/workflows/check_sphinx_links.yml | 2 +- .github/workflows/deploy_release.yml | 2 +- .github/workflows/generate_test_files.yml | 1 - .github/workflows/run_all_tests.yml | 64 +++++++++++----------- .github/workflows/run_coverage.yml | 2 +- .github/workflows/run_dandi_read_tests.yml | 2 +- .github/workflows/run_inspector_tests.yml | 2 +- .github/workflows/run_tests.yml | 29 +++++----- 9 files changed, 52 insertions(+), 55 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 020e86206..62f311f4c 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -61,10 +61,11 @@ body: label: Python Version options: - "lower version (unsupported)" - - "3.8" - "3.9" - "3.10" - "3.11" + - "3.12" + - "3.13" validations: required: true - type: textarea diff --git a/.github/workflows/check_sphinx_links.yml b/.github/workflows/check_sphinx_links.yml index 11003a19a..428c26482 100644 --- a/.github/workflows/check_sphinx_links.yml +++ b/.github/workflows/check_sphinx_links.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install Sphinx dependencies and package run: | diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index 2f6cb8619..fff052fbf 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@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install build dependencies run: | diff --git a/.github/workflows/generate_test_files.yml b/.github/workflows/generate_test_files.yml index 27848909b..5f36b0c0d 100644 --- a/.github/workflows/generate_test_files.yml +++ b/.github/workflows/generate_test_files.yml @@ -14,7 +14,6 @@ jobs: fail-fast: false matrix: include: - - { name: pynwb-1.5.1, pynwb-version: "1.5.1", python-version: "3.8"} - { name: pynwb-2.1.0, pynwb-version: "2.1.0", python-version: "3.9"} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index a1b1f75dd..e50fa44a7 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -22,31 +22,30 @@ jobs: 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.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.11-opt , test-tox-env: py311-optional , 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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: linux-python3.12-prerelease , test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, python-ver: "3.12", 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: linux-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , 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.11-opt , test-tox-env: py311-optional , 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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: windows-latest } - - { name: windows-python3.12-prerelease, test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, python-ver: "3.11", os: windows-latest } - # minimum versions of dependencies do not have wheels or cannot be built on macos-arm64 - - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-13 } - - { name: macos-python3.9 , test-tox-env: py39 , build-tox-env: build-py39 , python-ver: "3.9" , os: macos-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-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.11-opt , test-tox-env: py311-optional , 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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: macos-latest } - - { name: macos-python3.12-prerelease , test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, 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-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 @@ -93,16 +92,15 @@ 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.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.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 } - # minimum versions of dependencies do not have wheels or cannot be built on macos-arm64 - - { name: macos-gallery-python3.8-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.8" , os: macos-13 } - - { 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.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-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } + - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py38-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-prerelease, test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: windows-latest } + - { name: macos-gallery-python3.9-minimum , test-tox-env: gallery-py38-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-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 @@ -140,13 +138,13 @@ jobs: 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.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } - { name: conda-linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } - { name: conda-linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } - { name: conda-linux-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.12-prerelease, test-tox-env: py312-prerelease, build-tox-env: build-py312-prerelease, 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-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 @@ -201,9 +199,9 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-windows-python3.12-ros3, python-ver: "3.12", os: windows-latest } - - { name: conda-macos-python3.12-ros3 , python-ver: "3.12", os: macos-latest } + - { name: conda-linux-python3.13-ros3 , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-windows-python3.13-ros3, python-ver: "3.13", os: windows-latest } + - { name: conda-macos-python3.13-ros3 , python-ver: "3.13", os: macos-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -248,9 +246,9 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-gallery-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-windows-gallery-python3.12-ros3, python-ver: "3.12", os: windows-latest } - - { name: conda-macos-gallery-python3.12-ros3 , python-ver: "3.12", os: macos-latest } + - { name: conda-linux-gallery-python3.13-ros3 , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-windows-gallery-python3.13-ros3, python-ver: "3.13", os: windows-latest } + - { name: conda-macos-gallery-python3.13-ros3 , python-ver: "3.13", os: macos-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 diff --git a/.github/workflows/run_coverage.yml b/.github/workflows/run_coverage.yml index ec42694d8..da74ef08c 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -28,7 +28,7 @@ jobs: - { os: macos-latest , opt_req: false } env: OS: ${{ matrix.os }} - PYTHON: '3.12' + PYTHON: '3.13' steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 diff --git a/.github/workflows/run_dandi_read_tests.yml b/.github/workflows/run_dandi_read_tests.yml index cdde371c6..f4b27cbd8 100644 --- a/.github/workflows/run_dandi_read_tests.yml +++ b/.github/workflows/run_dandi_read_tests.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install run dependencies run: | diff --git a/.github/workflows/run_inspector_tests.yml b/.github/workflows/run_inspector_tests.yml index ece4e000c..b1c2d0f78 100644 --- a/.github/workflows/run_inspector_tests.yml +++ b/.github/workflows/run_inspector_tests.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Update pip run: python -m pip install --upgrade pip diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index e365d78cf..5623c4360 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,13 +19,12 @@ jobs: 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-minimum , test-tox-env: py39-minimum , build-tox-env: build-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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", 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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: windows-latest } - # minimum versions of dependencies do not have wheels or cannot be built on macos-arm64 - - { name: macos-python3.8-minimum , test-tox-env: py38-minimum , build-tox-env: build-py38-minimum , python-ver: "3.8" , os: macos-13 } + - { 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 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -79,10 +78,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.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.12-upgraded, test-tox-env: gallery-py312-upgraded, python-ver: "3.12", 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 @@ -120,8 +119,8 @@ jobs: 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.12-upgraded , test-tox-env: py312-upgraded , build-tox-env: build-py312-upgraded , python-ver: "3.12", os: ubuntu-latest } + - { 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 @@ -175,7 +174,7 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.13-ros3 , python-ver: "3.13", os: ubuntu-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -220,7 +219,7 @@ jobs: fail-fast: false matrix: include: - - { name: conda-linux-gallery-python3.12-ros3 , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-gallery-python3.13-ros3 , python-ver: "3.13", os: ubuntu-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -280,7 +279,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Download wheel and source distributions from artifact uses: actions/download-artifact@v4 From 8a84dc529c811eed6261fc06e8a3a48893b7fcd1 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:09:57 -0800 Subject: [PATCH 05/18] update importlib in init --- src/pynwb/__init__.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pynwb/__init__.py b/src/pynwb/__init__.py index 3a4d95e98..32f9ed4d9 100644 --- a/src/pynwb/__init__.py +++ b/src/pynwb/__init__.py @@ -64,11 +64,7 @@ def unload_type_config(**kwargs): hdmf_unload_type_config(type_map=type_map) def __get_resources() -> dict: - try: - from importlib.resources import files - except ImportError: - # TODO: Remove when python 3.9 becomes the new minimum - from importlib_resources import files + from importlib.resources import files __location_of_this_file = files(__name__) __core_ns_file_name = 'nwb.namespace.yaml' From a458c24dca4c51a2f1074e1f456f608a3d1a0bf8 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:25:59 -0800 Subject: [PATCH 06/18] update min requirements file --- requirements-min.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-min.txt b/requirements-min.txt index 4731a0e7e..8a6379b6c 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,6 +1,6 @@ # minimum versions of package dependencies for installing PyNWB h5py==3.1.0 hdmf==3.14.5 -numpy==1.18 -pandas==1.1.5 +numpy==1.19.3 +pandas==1.2.0 python-dateutil==2.7.3 From a31b3d2440e478795382a0042f58382ec0a16c49 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:27:15 -0800 Subject: [PATCH 07/18] update workflows --- .github/workflows/check_sphinx_links.yml | 2 +- .github/workflows/run_inspector_tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_sphinx_links.yml b/.github/workflows/check_sphinx_links.yml index 428c26482..11003a19a 100644 --- a/.github/workflows/check_sphinx_links.yml +++ b/.github/workflows/check_sphinx_links.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - name: Install Sphinx dependencies and package run: | diff --git a/.github/workflows/run_inspector_tests.yml b/.github/workflows/run_inspector_tests.yml index b1c2d0f78..ece4e000c 100644 --- a/.github/workflows/run_inspector_tests.yml +++ b/.github/workflows/run_inspector_tests.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - name: Update pip run: python -m pip install --upgrade pip From fb535112587bf81217c37b1c46f50ba3244794e0 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:30:00 -0800 Subject: [PATCH 08/18] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 773895dc5..fc360b840 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Added support for `model_number`, `model_name`, and `serial_number` fields to `Device`. @stephprince [#1997](https://github.com/NeurodataWithoutBorders/pynwb/pull/1997) - Deprecated `EventWaveform` neurodata type. @rly [#1940](https://github.com/NeurodataWithoutBorders/pynwb/pull/1940) - Deprecated `ImageMaskSeries` neurodata type. @rly [#1941](https://github.com/NeurodataWithoutBorders/pynwb/pull/1941) +- Removed python 3.8 support, added python 3.13 support. @stephprince [#2007](https://github.com/NeurodataWithoutBorders/pynwb/pull/2007) ## PyNWB 2.8.3 (November 19, 2024) From 20f9693654251f55cd893ed416082008c71ecc9c Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:34:58 -0800 Subject: [PATCH 09/18] readd test file generation versions --- .github/workflows/generate_test_files.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/generate_test_files.yml b/.github/workflows/generate_test_files.yml index 5f36b0c0d..27848909b 100644 --- a/.github/workflows/generate_test_files.yml +++ b/.github/workflows/generate_test_files.yml @@ -14,6 +14,7 @@ jobs: fail-fast: false matrix: include: + - { name: pynwb-1.5.1, pynwb-version: "1.5.1", python-version: "3.8"} - { name: pynwb-2.1.0, pynwb-version: "2.1.0", python-version: "3.9"} steps: - uses: actions/checkout@v4 From f944c33c6e53f256d8fa5ac4318f6cda76da6ae5 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:01:52 -0800 Subject: [PATCH 10/18] replace missed 3.8 versions --- .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 e50fa44a7..d41ed510f 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -95,10 +95,10 @@ jobs: - { 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-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } - - { name: windows-gallery-python3.9-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.9" , os: windows-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-prerelease, test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: windows-latest } - - { name: macos-gallery-python3.9-minimum , test-tox-env: gallery-py38-minimum , python-ver: "3.9" , os: macos-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-prerelease , test-tox-env: gallery-py313-prerelease, python-ver: "3.13", os: macos-latest } steps: From a09abe0e7e47da4f2929c5d9d2d1ab83571c82de Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:16:47 -0800 Subject: [PATCH 11/18] update ros3 environment for py313 --- environment-ros3.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/environment-ros3.yml b/environment-ros3.yml index 165f17341..bc7483f1e 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -5,19 +5,18 @@ channels: - defaults dependencies: - python==3.13 - - h5py==3.11.0 - - hdmf==3.14.3 - - matplotlib==3.8.4 - - numpy==2.1.1 - - pandas==2.2.2 + - h5py==3.12.1 + - hdmf==3.14.5 + - matplotlib==3.9.2 + - numpy==2.1.3 + - pandas==2.2.3 - python-dateutil==2.9.0 - setuptools - pytest==7.4.3 # pin to pytest < 8 because of incompatibilities to be addressed - fsspec==2024.6.0 - requests==2.32.3 - - aiohttp==3.9.5 + - aiohttp==3.11.7 - pip - pip: - remfile==0.1.13 - dandi==0.62.1 # NOTE: dandi is not available on conda for osx-arm64 - From 34eb9fabc591317bce537b3ac0ef8dc948390a17 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 13:31:26 -0800 Subject: [PATCH 12/18] update minimum requirements --- requirements-min.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-min.txt b/requirements-min.txt index 8a6379b6c..b5aa93468 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -3,4 +3,4 @@ h5py==3.1.0 hdmf==3.14.5 numpy==1.19.3 pandas==1.2.0 -python-dateutil==2.7.3 +python-dateutil==2.8.2 From 5ea7fa6bb9fe6b326aeb5e55c66243bfbcb17664 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Mon, 25 Nov 2024 14:26:40 -0800 Subject: [PATCH 13/18] update runners for minimum python --- .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 d41ed510f..d7367f91b 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -38,7 +38,7 @@ jobs: - { name: windows-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , 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.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 } - { 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-opt , test-tox-env: py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest } @@ -98,7 +98,7 @@ jobs: - { 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-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.9-minimum , test-tox-env: gallery-py39-minimum , python-ver: "3.9" , os: macos-13 } - { 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: From 6e01c29bb532a586d909a110bd1d6ebc68c59d55 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:48:08 -0800 Subject: [PATCH 14/18] switch to macos-13 runner for min requirements --- .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 5623c4360..d5ef69857 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -24,7 +24,7 @@ jobs: - { 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.9-minimum , test-tox-env: py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 From 7ab892ead04970d07061c6bc702585f163b9db3b Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 26 Nov 2024 11:53:22 -0800 Subject: [PATCH 15/18] simplify tox configuration --- .github/workflows/run_tests.yml | 4 +- tox.ini | 196 +++++++------------------------- 2 files changed, 40 insertions(+), 160 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index d5ef69857..dfb5cae02 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -59,7 +59,7 @@ 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: Upload distribution as a workspace artifact if: ${{ matrix.upload-wheels }} @@ -162,7 +162,7 @@ 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 run-ros3-tests: # tox and conda do not play nicely so do not use tox here name: ${{ matrix.name }} diff --git a/tox.ini b/tox.ini index 6a87f0054..1a908acbb 100644 --- a/tox.ini +++ b/tox.ini @@ -4,174 +4,54 @@ # and then run "tox" from this directory. [tox] -envlist = py39, py310, py311, py312, p313 requires = pip >= 22.0 [testenv] download = True setenv = - PYTHONDONTWRITEBYTECODE = 1 - VIRTUALENV_PIP = 23.3.1 + PYTHONDONTWRITEBYTECODE = 1 + VIRTUALENV_PIP = 23.3.1 +recreate = + pinned, minimum, upgraded, prerelease: False + build, wheelinstall: True # good practice to recreate the environment install_command = - python -m pip install -U {opts} {packages} - -deps = - -rrequirements-dev.txt - -rrequirements.txt -commands = - python -m pip check # Check for conflicting packages - python -m pip list - python test.py -v - -# Test with python 3.13; pinned dev reqs; upgraded run reqs -[testenv:py313-upgraded] -basepython = python3.13 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.txt -commands = {[testenv]commands} - -# Test with python 3.11; optional and dev reqs (some features are not compatible with 3.12 yet) -[testenv:py311-optional] -basepython = python3.11 -deps = - -rrequirements-dev.txt - -rrequirements-opt.txt -commands = {[testenv]commands} - -# Test with python 3.13; pinned dev reqs; upgraded, pre-release run reqs -[testenv:py313-prerelease] -basepython = python3.13 -install_command = - python -m pip install -U --pre {opts} {packages} -deps = - -rrequirements-dev.txt -commands = {[testenv]commands} - -# Test with python 3.9; pinned dev reqs; minimum run reqs -[testenv:py39-minimum] -basepython = python3.9 -deps = - -rrequirements-dev.txt - -rrequirements-min.txt -commands = {[testenv]commands} - -# Envs that builds wheels and source distribution -[testenv:build] + pinned, minimum, wheelinstall: python -m pip install {opts} {packages} + upgraded: python -m pip install -U {opts} {packages} + prerelease: python -m pip install -U --pre {opts} {packages} +deps = + # use pinned, minimum, or neither (use dependencies in pyproject.toml) + test, gallery, build: -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-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} + python --version # print python version for debugging + python -m pip check # check for conflicting packages + python -m pip list # list installed packages for debugging + test: python test.py -v + gallery: python test.py --example + build: python -m pip install -U build + build: python -m build + wheelinstall: python -c "import pynwb" + +# list of pre-defined environments. (Technically environments not listed here +# like build-py312 can also be used.) +[testenv:test-py313-upgraded] +[testenv:test-py313-prerelease] +[testenv:test-py311-optional-pinned] # some optional reqs not compatible with py312 yet +[testenv:test-py{39,310,311,312,313}-pinned] +[testenv:test-py39-minimum] -[testenv:build-py313] -basepython = python3.13 -commands = {[testenv:build]commands} +[testenv:gallery-py313-upgraded] +[testenv:gallery-py313-prerelease] +[testenv:gallery-py311-optional-pinned] +[testenv:gallery-py{39,310,311,312,313}-pinned] +[testenv:gallery-py39-minimum] [testenv:build-py313-upgraded] -basepython = python3.13 -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements-dev.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 -commands = {[testenv:build]commands} - +[testenv:build-py{39,310,311,312,313}-pinned] # using tox for this so that we can have a clean build environment [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 pynwb" - -# Envs that will execute gallery tests that do not require ROS3 -# Test with pinned dev, doc, and run reqs -[testenv:gallery] -install_command = - python -m pip install -U {opts} {packages} -deps = - -rrequirements.txt -commands = - python -m pip install . - python -m pip install -r requirements-doc.txt # NOTE: allensdk (requirements-doc.txt) requires pynwb - python -m pip check - python -m pip list - python test.py --example - -[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-py312] -basepython = python3.12 -deps = {[testenv:gallery]deps} -commands = {[testenv:gallery]commands} - -# Test with python 3.13; pinned dev, and doc reqs; upgraded run reqs -[testenv:gallery-py313-upgraded] -basepython = python3.13 -deps = - -rrequirements-dev.txt -commands = - python -m pip install -U . - python -m pip install -r requirements-doc.txt # NOTE: allensdk (requirements-doc.txt) requires pynwb - python -m pip check - python -m pip list - python test.py --example - -# Test with python 3.13; pinned dev, doc, and optional reqs; pre-release run reqs -[testenv:gallery-py313-prerelease] -basepython = python3.13 -deps = - -rrequirements-dev.txt -commands = - python -m pip install -U --pre . - python -m pip install -r requirements-doc.txt # NOTE: allensdk (requirements-doc.txt) requires pynwb - python -m pip check - python -m pip list - python test.py --example - -# Test with python 3.9; pinned dev and doc reqs; minimum run reqs -[testenv:gallery-py39-minimum] -basepython = python3.9 -deps = - -rrequirements-min.txt -commands = {[testenv:gallery]commands} +[testenv:wheelinstall] # use with `--installpkg dist/*-none-any.whl` From 50d0db851f16273be01336c85ed9d7218cce4557 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:20:07 -0800 Subject: [PATCH 16/18] readd version condition --- requirements-doc.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements-doc.txt b/requirements-doc.txt index acc439002..294c56918 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -14,6 +14,6 @@ hdf5plugin dandi>=0.46.6 hdmf-zarr zarr<3 # limited to zarr<3 until hdmf-zarr resolves issues with zarr 3.0 -linkml-runtime==1.7.4 -schemasheets==0.2.1 -oaklib==0.5.32 \ No newline at end of file +linkml-runtime==1.7.4; python_version >= "3.10" +schemasheets==0.2.1; python_version >= "3.10" +oaklib==0.5.32; python_version >= "3.10" \ No newline at end of file From cba7c8c41745ae8d5364e6e3eaca88cbd50fb9c1 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:30:03 -0800 Subject: [PATCH 17/18] update tox workflow command --- .github/workflows/run_tests.yml | 4 ++-- tox.ini | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index dfb5cae02..d5ef69857 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -59,7 +59,7 @@ jobs: - name: Test installation from a wheel run: | - tox -e wheelinstall --installpkg dist/*-none-any.whl + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl - name: Upload distribution as a workspace artifact if: ${{ matrix.upload-wheels }} @@ -162,7 +162,7 @@ jobs: - name: Test installation from a wheel run: | - tox -e wheelinstall --installpkg dist/*-none-any.whl + tox -e wheelinstall --recreate --installpkg dist/*-none-any.whl run-ros3-tests: # tox and conda do not play nicely so do not use tox here name: ${{ matrix.name }} diff --git a/tox.ini b/tox.ini index 1a908acbb..7deff7a70 100644 --- a/tox.ini +++ b/tox.ini @@ -11,9 +11,6 @@ download = True setenv = PYTHONDONTWRITEBYTECODE = 1 VIRTUALENV_PIP = 23.3.1 -recreate = - pinned, minimum, upgraded, prerelease: False - build, wheelinstall: True # good practice to recreate the environment install_command = pinned, minimum, wheelinstall: python -m pip install {opts} {packages} upgraded: python -m pip install -U {opts} {packages} From 347ed8854ef7a771d0d5a14f2da9305919ec198d Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:38:58 -0800 Subject: [PATCH 18/18] add new tox env names to workflows --- .github/workflows/run_all_tests.yml | 62 ++++++++++++++--------------- .github/workflows/run_tests.yml | 14 +++---- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index d7367f91b..7ce28b686 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -22,30 +22,30 @@ 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.11-opt , test-tox-env: py311-optional , 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-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.11-opt , test-tox-env: py311-optional , 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-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-13 } - - { 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-opt , test-tox-env: py311-optional , 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-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: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: linux-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: linux-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } + - { name: linux-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } + - { name: linux-python3.13-prerelease , test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: ubuntu-latest } + - { name: windows-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: windows-latest } + - { name: windows-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: windows-latest } + - { name: windows-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: windows-latest } + - { name: windows-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: windows-latest } + - { name: windows-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest } + - { name: windows-python3.13-prerelease, test-tox-env: test-py313-prerelease, build-tox-env: build-py313-prerelease, python-ver: "3.13", os: windows-latest } + - { name: macos-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 } + - { name: macos-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: macos-latest } + - { name: macos-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.11-opt , test-tox-env: test-py311-optional , build-tox-env: build-py311 , python-ver: "3.11", os: macos-latest } + - { name: macos-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: macos-latest } + - { name: macos-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: macos-latest } + - { name: macos-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: macos-latest } + - { name: macos-python3.13-prerelease , test-tox-env: test-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 @@ -138,13 +138,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.9" , os: ubuntu-latest } - - { name: conda-linux-python3.10 , test-tox-env: py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.11 , test-tox-env: py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } - - { name: conda-linux-python3.12 , test-tox-env: py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } - - { name: conda-linux-python3.13 , test-tox-env: py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } - - { name: conda-linux-python3.13-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: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.10 , test-tox-env: test-py310 , build-tox-env: build-py310 , python-ver: "3.10", os: ubuntu-latest } + - { name: conda-linux-python3.11 , test-tox-env: test-py311 , build-tox-env: build-py311 , python-ver: "3.11", os: ubuntu-latest } + - { name: conda-linux-python3.12 , test-tox-env: test-py312 , build-tox-env: build-py312 , python-ver: "3.12", os: ubuntu-latest } + - { name: conda-linux-python3.13 , test-tox-env: test-py313 , build-tox-env: build-py313 , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: ubuntu-latest } + - { name: conda-linux-python3.13-prerelease, test-tox-env: test-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 diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index d5ef69857..690919b81 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -19,12 +19,12 @@ 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.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-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-13 } + - { name: linux-python3.13-upgraded , test-tox-env: test-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: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: windows-latest } + - { name: windows-python3.13-upgraded , test-tox-env: test-py313-upgraded , build-tox-env: build-py313-upgraded , python-ver: "3.13", os: windows-latest } + - { name: macos-python3.9-minimum , test-tox-env: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: macos-13 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -119,8 +119,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: test-py39-minimum , build-tox-env: build-py39-minimum , python-ver: "3.9" , os: ubuntu-latest } + - { name: conda-linux-python3.13-upgraded , test-tox-env: test-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