From 1d1d142fba675de2666d7743a6437646bfc4802b Mon Sep 17 00:00:00 2001 From: Ryan Ly Date: Wed, 12 Apr 2023 13:13:26 -0700 Subject: [PATCH] Add testing for python 3.11, update reqs (#1687) --- .github/ISSUE_TEMPLATE/bug_report.yml | 1 + .github/workflows/check_external_links.yml | 2 +- .github/workflows/deploy_release.yml | 6 +-- .github/workflows/run_all_tests.yml | 52 ++++++++++---------- .github/workflows/run_coverage.yml | 4 +- .github/workflows/run_flake8.yml | 2 +- .github/workflows/run_inspector_tests.yml | 2 +- .github/workflows/run_tests.yml | 15 +++--- CHANGELOG.md | 5 ++ docs/source/conf.py | 2 +- docs/source/install_developers.rst | 2 +- docs/source/install_users.rst | 2 +- environment-ros3.yml | 10 ++-- requirements.txt | 6 +-- setup.py | 1 + tests/integration/hdf5/test_nwbfile.py | 4 +- tox.ini | 55 +++++++++++++--------- 17 files changed, 96 insertions(+), 75 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 95369ecc6..225516f20 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -64,6 +64,7 @@ body: - "3.8" - "3.9" - "3.10" + - "3.11" validations: required: true - type: textarea diff --git a/.github/workflows/check_external_links.yml b/.github/workflows/check_external_links.yml index 9c19ebaaa..1c709ba79 100644 --- a/.github/workflows/check_external_links.yml +++ b/.github/workflows/check_external_links.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.8' # allensdk requires 3.8 + python-version: '3.11' - name: Install Sphinx dependencies and package run: | diff --git a/.github/workflows/deploy_release.yml b/.github/workflows/deploy_release.yml index a06ab691d..f9abba102 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.10' + python-version: '3.11' - name: Install build dependencies run: | @@ -28,11 +28,11 @@ jobs: - name: Run tox tests run: | - tox -e py310-upgraded + tox -e py311-upgraded - name: Build wheel and source distribution run: | - tox -e build-py310-upgraded + tox -e build-py311-upgraded ls -1 dist - name: Test installation from a wheel diff --git a/.github/workflows/run_all_tests.yml b/.github/workflows/run_all_tests.yml index 4445a7548..6c428b83f 100644 --- a/.github/workflows/run_all_tests.yml +++ b/.github/workflows/run_all_tests.yml @@ -26,23 +26,26 @@ jobs: - { name: linux-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , 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.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-python3.10-prerelease , test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, 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.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: windows-latest } - { name: windows-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , 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.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: windows-latest } - - { name: windows-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: windows-latest } - - { name: windows-python3.10-prerelease, test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, 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.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: macos-latest } - { name: macos-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , 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.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: macos-latest } - - { name: macos-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: macos-latest } - - { name: macos-python3.10-prerelease , test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, 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 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -90,14 +93,14 @@ jobs: matrix: include: - { name: linux-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } - - { name: linux-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: ubuntu-latest } - - { name: linux-gallery-python3.10-prerelease , test-tox-env: gallery-py310-prerelease, python-ver: "3.10", 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: windows-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: windows-latest } - - { name: windows-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: windows-latest } - - { name: windows-gallery-python3.10-prerelease, test-tox-env: gallery-py310-prerelease, python-ver: "3.10", 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: macos-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: macos-latest } - - { name: macos-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded , python-ver: "3.10", os: macos-latest } - - { name: macos-gallery-python3.10-prerelease , test-tox-env: gallery-py310-prerelease, python-ver: "3.10", 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 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -138,9 +141,10 @@ jobs: - { name: conda-linux-python3.8 , test-tox-env: py38 , build-tox-env: build-py38 , 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.10-optional , test-tox-env: py310-optional , build-tox-env: build-py310-optional , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest } - - { name: conda-linux-python3.10-prerelease, test-tox-env: py310-prerelease, build-tox-env: build-py310-prerelease, 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 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -195,9 +199,9 @@ jobs: fail-fast: false matrix: include: - - { name: linux-python3.10-ros3 , python-ver: "3.10", os: ubuntu-latest } - - { name: windows-python3.10-ros3, python-ver: "3.10", os: windows-latest } - - { name: macos-python3.10-ros3 , python-ver: "3.10", os: macos-latest } + - { name: linux-python3.11-ros3 , python-ver: "3.11", os: ubuntu-latest } + - { name: windows-python3.11-ros3, python-ver: "3.11", os: windows-latest } + - { name: macos-python3.11-ros3 , python-ver: "3.11", os: macos-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -241,9 +245,9 @@ jobs: fail-fast: false matrix: include: - - { name: linux-gallery-python3.10-ros3 , python-ver: "3.10", os: ubuntu-latest } - - { name: windows-gallery-python3.10-ros3, python-ver: "3.10", os: windows-latest } - - { name: macos-gallery-python3.10-ros3 , python-ver: "3.10", os: macos-latest } + - { 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 } 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 a74f04371..a465676bc 100644 --- a/.github/workflows/run_coverage.yml +++ b/.github/workflows/run_coverage.yml @@ -24,7 +24,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] env: OS: ${{ matrix.os }} - PYTHON: '3.10' + PYTHON: '3.11' steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -40,7 +40,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: ${{ env.PYTHON }} - name: Install dependencies run: | diff --git a/.github/workflows/run_flake8.yml b/.github/workflows/run_flake8.yml index 2da107a6c..a57042c66 100644 --- a/.github/workflows/run_flake8.yml +++ b/.github/workflows/run_flake8.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Install flake8 run: | diff --git a/.github/workflows/run_inspector_tests.yml b/.github/workflows/run_inspector_tests.yml index bb6757377..da7efff5f 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@v4 with: - python-version: '3.10' + python-version: '3.11' - 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 9b56a3c24..34b01e481 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -21,8 +21,9 @@ jobs: include: - { name: linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } # NOTE config below with "upload-wheels: true" specifies that wheels should be uploaded as an artifact - - { name: linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", os: ubuntu-latest , upload-wheels: true } + - { 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.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , 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.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: macos-latest } steps: - name: Cancel non-latest runs @@ -78,9 +79,9 @@ jobs: matrix: include: - { name: linux-gallery-python3.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } - - { name: linux-gallery-python3.10-upgraded , test-tox-env: gallery-py310-upgraded, python-ver: "3.10", 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.7-minimum , test-tox-env: gallery-py37-minimum , python-ver: "3.7" , os: windows-latest } - - { name: windows-gallery-python3.10-upgraded, test-tox-env: gallery-py310-upgraded, python-ver: "3.10", 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 @@ -118,7 +119,7 @@ jobs: matrix: include: - { name: conda-linux-python3.7-minimum , test-tox-env: py37-minimum , build-tox-env: build-py37-minimum , python-ver: "3.7" , os: ubuntu-latest } - - { name: conda-linux-python3.10-upgraded , test-tox-env: py310-upgraded , build-tox-env: build-py310-upgraded , python-ver: "3.10", 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 } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -173,7 +174,7 @@ jobs: fail-fast: false matrix: include: - - { name: linux-python3.10-ros3 , python-ver: "3.10", os: ubuntu-latest } + - { name: linux-python3.11-ros3 , python-ver: "3.11", os: ubuntu-latest } steps: - name: Cancel non-latest runs uses: styfle/cancel-workflow-action@0.11.0 @@ -217,7 +218,7 @@ jobs: fail-fast: false matrix: include: - - { name: linux-gallery-python3.10-ros3 , python-ver: "3.10", os: ubuntu-latest } + - { 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 @@ -275,7 +276,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.11' - name: Download wheel and source distributions from artifact uses: actions/download-artifact@v3 diff --git a/CHANGELOG.md b/CHANGELOG.md index e2386c47d..ecef6df0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # PyNWB Changelog +## PyNWB 2.3.3 (Upcoming) + +### Enhancements and minor changes +- Add testing support for Python 3.11. @rly [#1687](https://github.com/NeurodataWithoutBorders/pynwb/pull/1687) + ## PyNWB 2.3.2 (April 10, 2023) ### Enhancements and minor changes diff --git a/docs/source/conf.py b/docs/source/conf.py index c27cf12ac..3b21fe457 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -137,7 +137,7 @@ def __call__(self, filename): } intersphinx_mapping = { - 'python': ('https://docs.python.org/3.10', None), + 'python': ('https://docs.python.org/3.11', None), 'numpy': ('https://numpy.org/doc/stable/', None), 'matplotlib': ('https://matplotlib.org/stable/', None), 'h5py': ('https://docs.h5py.org/en/latest/', None), diff --git a/docs/source/install_developers.rst b/docs/source/install_developers.rst index 42b774b04..a83866325 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.7, 3.8, 3.9, or 3.10 +#. Python 3.7, 3.8, 3.9, 3.10, or 3.11 #. pip diff --git a/docs/source/install_users.rst b/docs/source/install_users.rst index 1eb6b0c44..6da8f733a 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.7, 3.8, 3.9, or 3.10 +#. Python 3.7, 3.8, 3.9, 3.10, or 3.11 #. pip .. note:: If you are a developer then please see the :ref:`install_developers` installation instructions instead. diff --git a/environment-ros3.yml b/environment-ros3.yml index 8f1220740..83e9d37d2 100644 --- a/environment-ros3.yml +++ b/environment-ros3.yml @@ -4,12 +4,12 @@ channels: - conda-forge - defaults dependencies: - - python==3.10 + - python==3.11 - h5py==3.8.0 - - hdmf==3.5.1 + - hdmf==3.5.4 - matplotlib==3.7.1 - - numpy==1.23.3 - - pandas==1.5.0 + - numpy==1.24.2 + - pandas==2.0.0 - python-dateutil==2.8.2 - setuptools - - dandi==0.51.0 # NOTE: dandi does not support osx-arm64 + - dandi==0.52.0 # NOTE: dandi does not support osx-arm64 diff --git a/requirements.txt b/requirements.txt index def13b089..1b20665ca 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,9 +1,9 @@ # pinned dependencies to reproduce an entire development environment to use PyNWB -h5py==3.7.0 +h5py==3.8.0 hdmf==3.5.4 -numpy==1.23.3; python_version >= "3.8" +numpy==1.24.2; python_version >= "3.8" numpy==1.21.5; python_version < "3.8" # note that numpy 1.22 dropped python 3.7 support -pandas==1.5.0; python_version >= "3.8" +pandas==2.0.0; python_version >= "3.8" pandas==1.3.5; python_version < "3.8" # note that pandas 1.4 dropped python 3.7 support python-dateutil==2.8.2 setuptools==65.5.1 diff --git a/setup.py b/setup.py index d9ad4b8fa..2522618fc 100755 --- a/setup.py +++ b/setup.py @@ -51,6 +51,7 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", "License :: OSI Approved :: BSD License", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", diff --git a/tests/integration/hdf5/test_nwbfile.py b/tests/integration/hdf5/test_nwbfile.py index a47033de6..e164ec649 100644 --- a/tests/integration/hdf5/test_nwbfile.py +++ b/tests/integration/hdf5/test_nwbfile.py @@ -340,7 +340,7 @@ def test_df_comparison(self): [(4, 1, tsa)]], 'tags': [[''], [''], ['fizz', 'buzz'], ['qaz']] }, - index=pd.Index(np.arange(4), name='id') + index=pd.Index(np.arange(4, dtype=np.int64), name='id') ) # pop the timeseries column out because ts_obt has rows of lists of tuples and ts_exp has rows of lists of lists ts_obt = df_obt.pop('timeseries') @@ -367,7 +367,7 @@ def test_df_comparison_no_ts(self): 'stop_time': [0.25, 0.30, 0.40, 0.45], 'tags': [[''], [''], ['fizz', 'buzz'], ['qaz']] }, - index=pd.Index(np.arange(4), name='id') + index=pd.Index(np.arange(4, dtype=np.int64), name='id') ) df_obt = self.read_container.to_dataframe(exclude=set(['timeseries', 'timeseries_index'])) diff --git a/tox.ini b/tox.ini index c449b4a07..9caaccbb5 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py37, py38, py39, py310 +envlist = py37, py38, py39, py310, py311 requires = pip >= 22.0 [testenv] @@ -26,14 +26,14 @@ commands = # Env to create coverage report locally [testenv:localcoverage] -basepython = python3.10 +basepython = python3.11 commands = python -m coverage run test.py --pynwb coverage html -d tests/coverage/htmlcov -# Test with python 3.10; pinned dev and optional reqs -[testenv:py310-optional] -basepython = python3.10 +# Test with python 3.11; pinned dev and optional reqs +[testenv:py311-optional] +basepython = python3.11 install_command = python -m pip install {opts} {packages} deps = @@ -41,9 +41,9 @@ deps = ; -rrequirements-opt.txt commands = {[testenv]commands} -# Test with python 3.10; pinned dev and optional reqs; upgraded run reqs -[testenv:py310-upgraded] -basepython = python3.10 +# 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 = @@ -51,9 +51,9 @@ deps = ; -rrequirements-opt.txt commands = {[testenv]commands} -# Test with python 3.10; pinned dev and optional reqs; upgraded, pre-release run reqs -[testenv:py310-prerelease] -basepython = python3.10 +# 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 = @@ -91,15 +91,19 @@ commands = {[testenv:build]commands} basepython = python3.10 commands = {[testenv:build]commands} -[testenv:build-py310-optional] -basepython = python3.10 +[testenv:build-py311] +basepython = python3.11 +commands = {[testenv:build]commands} + +[testenv:build-py311-optional] +basepython = python3.11 deps = -rrequirements-dev.txt ; -rrequirements-opt.txt commands = {[testenv:build]commands} -[testenv:build-py310-upgraded] -basepython = python3.10 +[testenv:build-py311-upgraded] +basepython = python3.11 install_command = python -m pip install -U {opts} {packages} deps = @@ -107,8 +111,8 @@ deps = ; -rrequirements-opt.txt commands = {[testenv:build]commands} -[testenv:build-py310-prerelease] -basepython = python3.10 +[testenv:build-py311-prerelease] +basepython = python3.11 install_command = python -m pip install -U --pre {opts} {packages} deps = @@ -162,9 +166,14 @@ basepython = python3.10 deps = {[testenv:gallery]deps} commands = {[testenv:gallery]commands} -# Test with python 3.10; pinned dev, doc, and optional reqs; upgraded run reqs -[testenv:gallery-py310-upgraded] -basepython = python3.10 +[testenv:gallery-py311] +basepython = python3.11 +deps = {[testenv:gallery]deps} +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 deps = -rrequirements-dev.txt commands = @@ -174,9 +183,9 @@ commands = python -m pip list python test.py --example -# Test with python 3.10; pinned dev, doc, and optional reqs; pre-release run reqs -[testenv:gallery-py310-prerelease] -basepython = python3.10 +# Test with python 3.11; pinned dev, doc, and optional reqs; pre-release run reqs +[testenv:gallery-py311-prerelease] +basepython = python3.11 deps = -rrequirements-dev.txt commands =