Skip to content

Commit

Permalink
run CI on python=3.12 (#8605)
Browse files Browse the repository at this point in the history
* enable a special 3.12 ci job

* add the special environment files

* update the trove classifiers

* remove `pint` from the 3.12 environment

The reason is that `pint` currently does not explicitly define
`dtype`, causing our runtime checkable protocols not to match.
  • Loading branch information
keewis authored Jan 17, 2024
1 parent 072f44c commit e91ee89
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
# Bookend python versions
python-version: ["3.9", "3.11"]
python-version: ["3.9", "3.11", "3.12"]
env: [""]
include:
# Minimum python version:
Expand All @@ -71,7 +71,11 @@ jobs:
if [[ ${{ matrix.os }} == windows* ]] ;
then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment-windows.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/requirements/environment-windows-3.12.yml" >> $GITHUB_ENV
fi
elif [[ "${{ matrix.env }}" != "" ]] ;
then
if [[ "${{ matrix.env }}" == "flaky" ]] ;
Expand All @@ -82,7 +86,11 @@ jobs:
echo "CONDA_ENV_FILE=ci/requirements/${{ matrix.env }}.yml" >> $GITHUB_ENV
fi
else
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
if [[ ${{ matrix.python-version }} != "3.12" ]]; then
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
else
echo "CONDA_ENV_FILE=ci/requirements/environment-3.12.yml" >> $GITHUB_ENV
fi
fi
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
Expand Down
47 changes: 47 additions & 0 deletions ci/requirements/environment-3.12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: xarray-tests
channels:
- conda-forge
- nodefaults
dependencies:
- aiobotocore
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- distributed
- flox
- fsspec!=2021.7.0
- h5netcdf
- h5py
- hdf5
- hypothesis
- iris
- lxml # Optional dep of pydap
- matplotlib-base
- nc-time-axis
- netcdf4
# - numba
# - numbagg
- numexpr
- numpy
- opt_einsum
- packaging
- pandas
# - pint>=0.22
- pip
- pooch
- pre-commit
- pydap
- pytest
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
# - sparse
- toolz
- typing_extensions
- zarr
42 changes: 42 additions & 0 deletions ci/requirements/environment-windows-3.12.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: xarray-tests
channels:
- conda-forge
dependencies:
- boto3
- bottleneck
- cartopy
- cftime
- dask-core
- distributed
- flox
- fsspec!=2021.7.0
- h5netcdf
- h5py
- hdf5
- hypothesis
- iris
- lxml # Optional dep of pydap
- matplotlib-base
- nc-time-axis
- netcdf4
# - numba
# - numbagg
- numpy
- packaging
- pandas
# - pint>=0.22
- pip
- pre-commit
- pydap
- pytest
- pytest-cov
- pytest-env
- pytest-xdist
- pytest-timeout
- rasterio
- scipy
- seaborn
# - sparse
- toolz
- typing_extensions
- zarr
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
]
description = "N-D labeled arrays and datasets in Python"
Expand Down

0 comments on commit e91ee89

Please sign in to comment.