Skip to content

Commit

Permalink
Add testing for python 3.11, update reqs (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
rly authored Apr 12, 2023
1 parent de7f474 commit 1d1d142
Show file tree
Hide file tree
Showing 17 changed files with 96 additions and 75 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ body:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
validations:
required: true
- type: textarea
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/deploy_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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
Expand Down
52 changes: 28 additions & 24 deletions .github/workflows/run_all_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
Expand All @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/run_inspector_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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/[email protected]
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install_developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion docs/source/install_users.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions environment-ros3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/hdf5/test_nwbfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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']))
Expand Down
Loading

0 comments on commit 1d1d142

Please sign in to comment.