Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Python3.12 #1613

Merged
merged 8 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ jobs:
- tox-env: py311-coverage-sbck
python-version: "3.11"
markers: -m 'not slow'
- tox-env: py312-coverage-numba
python-version: "3.12"
markers: -m 'not slow'
- tox-env: notebooks_doctests
python-version: "3.10"
- tox-env: offline-prefetch
Expand Down Expand Up @@ -172,7 +175,7 @@ jobs:

test-conda:
needs: lint
name: test-conda-${{ matrix.tox-env }} (Python${{ matrix.python-version }})
name: test-conda-Python${{ matrix.python-version }}
if: |
contains(github.event.pull_request.labels.*.name, 'approved') ||
(github.event.review.state == 'approved') ||
Expand All @@ -181,8 +184,8 @@ jobs:
strategy:
matrix:
include:
- tox-env: py310
python-version: "3.10"
- python-version: "3.9"
- python-version: "3.12"
defaults:
run:
shell: bash -l {0}
Expand Down
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contributors to this version: Juliette Lavoie (:user:`juliettelavoie`), Pascal B

Announcements
^^^^^^^^^^^^^
* `xclim` now officially supports Python3.12 (requires `numba>=0.59.0`). (:pull:`1613`).
* `xclim` now adheres to the `Semantic Versioning 2.0.0 <https://semver.org/>`_ specification. (:issue:`1556`, :pull:`1569`).
* The `xclim` repository now uses `GitHub Discussions <https://github.com/Ouranosinc/xclim/discussions>`_ to offer help for users, coordinate translation efforts, and support general Q&A for the `xclim` community. The `xclim` `Gitter` room has been deprecated in favour of GitHub Discussions. (:issue:`1571`, :pull:`1572`).

Expand Down
149 changes: 75 additions & 74 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,78 +1,79 @@
name: xclim
channels:
- conda-forge
- defaults
- numba # Added to gain access to Python3.12-compatible numba release candidates.
- conda-forge
- defaults
dependencies:
- python >=3.8
- astroid
- boltons >=20.1
- bottleneck >=1.3.1
- cf_xarray >=0.6.1
- cftime >=1.4.1
- Click >=8.1
- dask >=2.6.0
- importlib-resources # For Python3.8
- jsonpickle
- lmoments3
- numba
- numpy >=1.16
- pandas >=0.23,<2.2
- pint >=0.9
- poppler >=0.67
- pyyaml
- scikit-learn >=0.21.3
- scipy >=1.2
- statsmodels
- xarray >=2022.06.0,<2023.11.0
- yamale
# Extras
- eofs
- flox
- python >=3.8
- astroid
- boltons >=20.1
- bottleneck >=1.3.1
- cf_xarray >=0.6.1
- cftime >=1.4.1
- Click >=8.1
- dask >=2.6.0
- importlib-resources # For Python3.8
- jsonpickle
- lmoments3
- numba
- numpy >=1.16
- pandas >=0.23,<2.2
- pint >=0.9
- poppler >=0.67
- pyyaml
- scikit-learn >=0.21.3
- scipy >=1.2
- statsmodels
- xarray >=2022.06.0,<2023.11.0
- yamale
# Extras
- eofs
- flox
# Testing and development dependencies
- black >=22.12
- blackdoc
- bump-my-version
- cairosvg
- codespell
- coverage
- distributed >=2.0
- filelock
- flake8
- flake8-rst-docstrings
- flit
- h5netcdf
- ipykernel
- ipython
- matplotlib
- mypy
- nbqa
- nbsphinx
- nbval
- nc-time-axis
- netCDF4 >=1.4
- notebook
- platformdirs
- pooch
- pre-commit
- pybtex
- pylint
- pytest
- pytest-cov
- pytest-socket
- pytest-xdist >=3.2
- ruff >=0.1.0
- sphinx
- sphinx-autodoc-typehints
- sphinx-codeautolink
- sphinx-copybutton
- sphinx_rtd_theme >=1.0
- sphinxcontrib-bibtex
- tokenize-rt
- tox
# - tox-conda # Will be added when a [email protected]+ compatible plugin is released.
- xdoctest
- yamllint
- pip
- pip:
- flake8-alphabetize
- sphinxcontrib-svg2pdfconverter
- black >=22.12
- blackdoc
- bump-my-version
- cairosvg
- codespell
- coverage
- distributed >=2.0
- filelock
- flake8
- flake8-rst-docstrings
- flit
- h5netcdf
- ipykernel
- ipython
- matplotlib
- mypy
- nbqa
- nbsphinx
- nbval
- nc-time-axis
- netCDF4 >=1.4
- notebook
- platformdirs
- pooch
- pre-commit
- pybtex
- pylint
- pytest
- pytest-cov
- pytest-socket
- pytest-xdist >=3.2
- ruff >=0.1.0
- sphinx
- sphinx-autodoc-typehints
- sphinx-codeautolink
- sphinx-copybutton
- sphinx-rtd-theme >=1.0
- sphinxcontrib-bibtex
- tokenize-rt
- tox
# - tox-conda # Will be added when a [email protected]+ compatible plugin is released.
- xdoctest
- yamllint
- pip
- pip:
- flake8-alphabetize
- sphinxcontrib-svg2pdfconverter
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,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 :: Atmospheric Science"
]
dynamic = ["description", "version"]
Expand Down
7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env_list =
py39-upstream-doctest
py310
py311
py312-numba
labels =
test = py38, py39-upstream-doctest, py310, py311, notebooks_doctests, offline-prefetch
requires =
Expand Down Expand Up @@ -103,6 +104,12 @@ passenv =
extras = dev
deps =
py38: scipy<1.9
# FIXME: Remove when Python3.8 is dropped
py38: numba<0.59.0
py38: llvmlite<0.42.0
# FIXME: Remove when numba 0.59.0 is released
numba: numba==0.59.0rc1
numba: llvmlite==0.42.0rc1
coverage: coveralls
upstream: -rrequirements_upstream.txt
eofs: eofs
Expand Down