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

Add support for Python=3.12 #3501

Merged
merged 75 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 68 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
9d761a9
comment out prospector and esmvalcore
valeriupredoi Jan 18, 2024
d7e3334
comment out prospector and esmvalcore
valeriupredoi Jan 18, 2024
a9428c4
trigger GA test
valeriupredoi Jan 18, 2024
0b8dbc4
Merge branch 'main' into python312
valeriupredoi Feb 20, 2024
079a6ad
Merge branch 'main' into python312
valeriupredoi Mar 21, 2024
f7d9444
Merge branch 'main' into python312
valeriupredoi Mar 26, 2024
d86e72a
comment out only psy modules
valeriupredoi Mar 26, 2024
ba18c90
comment out ncl
valeriupredoi Mar 26, 2024
4d6765a
comment out culprits
valeriupredoi Mar 27, 2024
e666554
release and pin psy stuff
valeriupredoi Apr 4, 2024
fd0528e
Merge branch 'main' into python312
valeriupredoi Apr 4, 2024
9bc286f
temp remove psy-reg
valeriupredoi Apr 4, 2024
253e3d1
Merge branch 'python312' of https://github.com/ESMValGroup/ESMValTool…
valeriupredoi Apr 8, 2024
474472c
Merge branch 'main' into python312
valeriupredoi Apr 8, 2024
6bede96
comment out final non-py312 packages
valeriupredoi Apr 8, 2024
0393c9a
add 3.12 to all needed GA workflows
valeriupredoi Apr 8, 2024
293b370
add 3.12 to list of supported pythons
valeriupredoi Apr 9, 2024
ff2cbe0
release python pin
valeriupredoi Apr 9, 2024
6f9a1de
unify pins as in environment yml
valeriupredoi Apr 9, 2024
ba04cbf
unify OSX environment
valeriupredoi Apr 9, 2024
0585108
reinstate pin on python 39
valeriupredoi Apr 9, 2024
6c2d5b8
examine conda env in GA workflow
valeriupredoi Apr 9, 2024
22b081e
change of variable to appease flake8
valeriupredoi Apr 9, 2024
2452e1f
add whitespace appease flake8
valeriupredoi Apr 9, 2024
40023fd
Merge branch 'main' into python312
valeriupredoi Apr 22, 2024
813a7c9
Merge branch 'main' into python312
valeriupredoi May 29, 2024
5908854
correct wkflow
valeriupredoi May 29, 2024
e10165f
Merge branch 'main' into python312
valeriupredoi Jun 5, 2024
c1ddba3
comment out imagehash
valeriupredoi Jun 5, 2024
48a2609
remove ommit imagehash pin shapely and numpy
valeriupredoi Jun 5, 2024
ece28c4
relax pin on shapelywq
valeriupredoi Jun 5, 2024
1cbab37
restrict +1 pin on shapelywq
valeriupredoi Jun 5, 2024
c2dc4a3
Merge branch 'main' into python312
valeriupredoi Jun 13, 2024
976c4e1
pin to latest rasterio
valeriupredoi Jun 13, 2024
21728ce
pin to latest rasterio
valeriupredoi Jun 13, 2024
ace672a
pin gdal
valeriupredoi Jun 13, 2024
ba6944d
pin ncl
valeriupredoi Jun 13, 2024
d98d20f
force esmf to modern
valeriupredoi Jun 13, 2024
b5b74a8
Merge branch 'main' into python312
valeriupredoi Jun 25, 2024
2605da8
Merge branch 'main' into python312
valeriupredoi Jun 27, 2024
4f7cf02
test with R pin and comment out NCL for now
valeriupredoi Jun 27, 2024
c0d4d99
Merge branch 'main' into python312
valeriupredoi Jul 9, 2024
dd3c32a
whitespace for flake8
valeriupredoi Jul 9, 2024
2ce947b
pin esmpy not to run in Author issue
valeriupredoi Jul 9, 2024
d0d3c99
revert esmpy pin but introduce importlib_metadata and pin
valeriupredoi Jul 9, 2024
b24b7af
Merge branch 'main' into python312
valeriupredoi Jul 10, 2024
8a57dc1
Merge branch 'main' into python312
valeriupredoi Jul 11, 2024
b126d95
Merge branch 'main' into python312
valeriupredoi Jul 31, 2024
ff01d28
readd psy-reg with correct pin
valeriupredoi Jul 31, 2024
3265f75
readd psy-reg with correct pin
valeriupredoi Jul 31, 2024
81e1128
Merge branch 'main' into python312
valeriupredoi Aug 5, 2024
aa6295f
Merge branch 'main' into python312
valeriupredoi Sep 13, 2024
05ad6d7
try comment out RainFARM
valeriupredoi Sep 17, 2024
fc36ccb
put back RainFARM
valeriupredoi Sep 17, 2024
7f50296
Merge branch 'main' into python312
valeriupredoi Sep 26, 2024
0dbdb9f
Merge branch 'main' into python312
valeriupredoi Oct 7, 2024
7266596
finally add Prospector
valeriupredoi Oct 7, 2024
480bdcf
finally add Prospector
valeriupredoi Oct 7, 2024
3eaff93
temporary remove ncl from env pinpoint the deps issue
valeriupredoi Oct 8, 2024
0cf105e
restrict to python<3.13
valeriupredoi Oct 8, 2024
998bd7e
repin flake8 and reintroduce ncl
valeriupredoi Oct 8, 2024
33fd68c
cleaned up comments
valeriupredoi Oct 8, 2024
b0c4db1
remove upper limit on esmpy and add correct pointer to issue that say…
valeriupredoi Oct 9, 2024
458189c
add link to issue motivating pin on importlib_metadata
valeriupredoi Oct 9, 2024
a859921
uncomment psy-reg and add comment
valeriupredoi Oct 9, 2024
1df3137
uncomment esmvalcore
valeriupredoi Oct 9, 2024
a6c5593
temporarily comment out pin on importlib
valeriupredoi Oct 9, 2024
f5b3c99
readd pinned importlib metadata
valeriupredoi Oct 9, 2024
d1de687
repin silly pandas
valeriupredoi Oct 9, 2024
d567626
repin silly pandas 2.2.3
valeriupredoi Oct 9, 2024
473df9f
remove ye olde pin on esmpy
valeriupredoi Oct 9, 2024
acaca7c
fixpin pandas
valeriupredoi Oct 9, 2024
ecc1d6e
fixpin pandas
valeriupredoi Oct 9, 2024
cd3ab7e
note about importlib
valeriupredoi Oct 9, 2024
39863f0
Update .github/workflows/test.yml
valeriupredoi Oct 9, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/create-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
auto-update-conda: true
activate-environment: esmvaltool-fromlock
python-version: "3.11"
python-version: "3.12"
miniforge-version: "latest"
miniforge-variant: Mambaforge
use-mamba: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-from-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: conda-incubator/setup-miniconda@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-from-condalock-file.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
fail-fast: false
name: Linux Python ${{ matrix.python-version }}
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
- name: Set up Python 3.12
uses: actions/setup-python@v1
with:
python-version: "3.11"
python-version: "3.12"
- name: Install pep517
run: >-
python -m
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-tests-monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- main
- python312
valeriupredoi marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: '0 0 * * *'

Expand All @@ -20,7 +21,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
name: Linux Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
Expand All @@ -45,6 +46,8 @@ jobs:
run: conda list
- name: Install ESMValTool
run: pip install -e .[develop] 2>&1 | tee test_linux_artifacts_python_${{ matrix.python-version }}/install.txt
- name: Examine conda environment
run: conda list
- name: Install Julia dependencies
run: esmvaltool install Julia
- name: Export Python minor version
Expand Down Expand Up @@ -72,7 +75,7 @@ jobs:
runs-on: "macos-latest"
strategy:
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12"]
architecture: ["x64"] # need to force Intel, arm64 builds have issues
fail-fast: false
name: OSX Python ${{ matrix.python-version }}
Expand Down
29 changes: 15 additions & 14 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,13 @@ dependencies:
- distributed
- ecmwf-api-client
- eofs
- esmpy >=8.6.0 # github.com/SciTools-incubator/iris-esmf-regrid/pull/342
- esmpy !=8.1.0 # <8.6 safe https://github.com/SciTools/iris-esmf-regrid/issues/415
- esmvalcore 2.11.*
- fiona
- fire
- fsspec
- gdal
- gdal >=3.9.0
- importlib_metadata <8 # https://github.com/ESMValGroup/ESMValTool/issues/3699 only for Python 3.10/11
- iris >=3.6.1
- iris-esmf-regrid >=0.10.0 # github.com/SciTools-incubator/iris-esmf-regrid/pull/342
- jinja2
Expand All @@ -40,39 +41,39 @@ dependencies:
- nc-time-axis
- netCDF4
- numba
- numpy !=1.24.3 # severe masking bug
- numpy !=1.24.3,<2.0 # severe masking bug
- openpyxl
- packaging
- pandas !=2.2.0,!=2.2.1,!=2.2.2 # github.com/ESMValGroup/ESMValCore/pull/2305
bouweandela marked this conversation as resolved.
Show resolved Hide resolved
- pandas
- pip !=21.3
- progressbar2
- prov
- psyplot
- psy-maps
- psy-reg
- psy-simple
- psyplot >=1.5.0
- psy-maps >=1.5.0
- psy-reg >=1.5.0
- psy-simple >=1.5.0
- pyproj >=2.1
- pys2index # only from conda-forge
- python >=3.10
- python >=3.10,<3.13
- python-cdo
- python-dateutil
- pyyaml
- rasterio
- rasterio >=1.3.10
- requests
- ruamel.yaml
- scikit-image
- scikit-learn >= 1.4.0 # github.com/ESMValGroup/ESMValTool/issues/3504
- scipy
- seaborn
- seawater
- shapely >=2
- shapely >=2.0.2
- xarray >=0.12.0
- xesmf >=0.7.1
- xgboost >1.6.1 # github.com/ESMValGroup/ESMValTool/issues/2779
- xlsxwriter
- zarr
# Python packages needed for unit testing
- flake8 ==5.0.4
- flake8 >=6
- pytest >=3.9,!=6.0.0rc1,!=6.0.0
- pytest-cov
- pytest-env
Expand All @@ -91,14 +92,14 @@ dependencies:
- imagehash
- isort ==5.13.2
- pre-commit
- prospector
- prospector >=1.12 # earliest support for Python 3.12
- pyroma
# - vprof not on conda-forge
- yamllint ==1.35.1
- yapf ==0.32.0

# NCL and dependencies
- ncl
- ncl >=6.6.2
- cdo
- imagemagick
- nco
Expand Down
27 changes: 14 additions & 13 deletions environment_osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ dependencies:
- distributed
- ecmwf-api-client
- eofs
- esmpy >=8.6.0 # github.com/SciTools-incubator/iris-esmf-regrid/pull/342
- esmpy !=8.1.0 # <8.6 safe https://github.com/SciTools/iris-esmf-regrid/issues/415
- esmvalcore 2.11.*
- fiona
- fire
- fsspec
- gdal
- gdal >=3.9.0
- importlib_metadata <8 # https://github.com/ESMValGroup/ESMValTool/issues/3699 only for Python 3.10/11
- iris >=3.6.1
- iris-esmf-regrid >=0.10.0 # github.com/SciTools-incubator/iris-esmf-regrid/pull/342
- jinja2
Expand All @@ -39,39 +40,39 @@ dependencies:
- nc-time-axis
- netCDF4
- numba
- numpy !=1.24.3 # severe masking bug
- numpy !=1.24.3,<2.0 # severe masking bug
- openpyxl
- packaging
- pandas !=2.2.0,!=2.2.1,!=2.2.2 # github.com/ESMValGroup/ESMValCore/pull/2305
- pandas
- pip !=21.3
- progressbar2
- prov
- psyplot
- psy-maps
- psy-reg
- psy-simple
- psyplot >=1.5.0
- psy-maps >=1.5.0
- psy-reg >=1.5.0
- psy-simple >=1.5.0
- pyproj >=2.1
- pys2index # only from conda-forge
- python >=3.10
- python >=3.10,<3.13
- python-cdo
- python-dateutil
- pyyaml
- rasterio
- rasterio >=1.3.10
- requests
- ruamel.yaml
- scikit-image
- scikit-learn >= 1.4.0 # github.com/ESMValGroup/ESMValTool/issues/3504
- scipy
- seaborn
- seawater
- shapely >=2
- shapely >=2.0.2
- xarray >=0.12.0
- xesmf >=0.7.1
- xgboost >1.6.1 # github.com/ESMValGroup/ESMValTool/issues/2779
- xlsxwriter
- zarr
# Python packages needed for unit testing
- flake8 ==5.0.4
- flake8 >=6
- pytest >=3.9,!=6.0.0rc1,!=6.0.0
- pytest-cov
- pytest-env
Expand All @@ -90,7 +91,7 @@ dependencies:
- imagehash
- isort ==5.13.2
- pre-commit
- prospector
- prospector >=1.12 # earliest support for Python 3.12
- pyroma
# - vprof not on conda-forge
- yamllint ==1.35.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ def _create_regression_plot(tas_cube,
y_reg = reg.slope * x_reg + reg.intercept

# Plot data
title = (f'{FEEDBACK_PARAMETERS.get(var,var)} TOA radiance for '
title = (f'{FEEDBACK_PARAMETERS.get(var, var)} TOA radiance for '
f'{dataset_name}')
filename = f'{var}_regression_{dataset_name}'
if description is not None:
Expand Down
13 changes: 7 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@
'packaging',
'pandas!=2.2.0,!=2.2.1,!=2.2.2', # ESMValCore PR2305
'progressbar2',
'psyplot',
'psy-maps',
'psy-reg',
'psy-simple',
'psyplot>=1.5.0', # psy*<1.5.0 are not py312 compat
'psy-maps>=1.5.0',
'psy-reg>=1.5.0',
'psy-simple>=1.5.0',
'pyproj>=2.1',
'pys2index',
'python-dateutil',
'pyyaml',
'rasterio',
'rasterio>=1.3.10',
'requests',
'ruamel.yaml',
'scikit-image',
Expand Down Expand Up @@ -104,7 +104,7 @@
'imagehash',
'isort',
'pre-commit',
'prospector[with_pyroma]!=1.1.6.3,!=1.1.6.4',
'prospector[with_pyroma]>=1.12',
'vprof',
'yamllint',
'yapf',
Expand Down Expand Up @@ -224,6 +224,7 @@ def read_description(filename):
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Atmospheric Science',
'Topic :: Scientific/Engineering :: GIS',
Expand Down
Loading