Skip to content

Commit

Permalink
Support python 3.11 (#601)
Browse files Browse the repository at this point in the history
* Add support for python 3.11

* Try to add python to pinned file

* Remove numba for now

* Move pinning up to conda setup

* Try with build-config

* Second attempt

* Try to split up the the test file

* Clean up

* Check maxime hypothesis

* Single test file
  • Loading branch information
hoxbro authored Dec 7, 2022
1 parent d843a05 commit 2310cb3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
python-version: ['3.7', '3.8', '3.9', '3.10']
# Run on the full set on schedule, workflow_dispatch and push&tags events, otherwise on a subset.
python-version: ${{ ( github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && github.ref_type == 'tag' ) ) && fromJSON('["3.7", "3.8", "3.9", "3.10", "3.11"]') || fromJSON('["3.7", "3.9", "3.11"]') }}
timeout-minutes: 60
defaults:
run:
shell: bash -l {0}
shell: bash -l {0}
env:
DISPLAY: ":99.0"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ def run(self):
]

_recommended = [
'datashader',
# geopandas-base installed with conda, see setup.cfg
'geopandas',
'netcdf4',
Expand All @@ -118,6 +117,10 @@ def run(self):
'xarray',
]

# Packages not working on python 3.11 becauase of numba
if sys.version_info < (3, 11):
_recommended.append('datashader')

# can only currently run all examples with packages from conda-forge
_examples_extra = _recommended + [
'iris',
Expand Down Expand Up @@ -192,6 +195,8 @@ def run(self):
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[tox]
# python version test group extra envs extra commands
envlist = {py37,py38,py39,py310}-{flakes,unit,examples,all_recommended,examples_extra}-{default}-{dev,pkg}
envlist = {py37,py38,py39,py310,py311}-{flakes,unit,examples,all_recommended,examples_extra}-{default}-{dev,pkg}

[_flakes]
description = Flake check python and notebooks
Expand Down

0 comments on commit 2310cb3

Please sign in to comment.