ESMValGroup / ESMValTool

ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP
https://www.esmvaltool.org
Apache License 2.0
218 stars 127 forks source link

Add support for Python=3.12 #3501

Open valeriupredoi opened 8 months ago

valeriupredoi commented 8 months ago

Once https://github.com/ESMValGroup/ESMValCore/pull/2228 *allowing support for Python=3.12 in ESMValCore), we should see what roadblocks we have here, so am starting early. That Core PR is currently roadblocked only by prospector not being Python=3.12-compatible, but we're working on that.

Current issues

Previous issues

Also closes https://github.com/ESMValGroup/ESMValTool/issues/3642

valeriupredoi commented 6 months ago

@ESMValGroup/technical-lead-development-team we are inching closer to suppoert Python=3.12 - have a look here https://github.com/ESMValGroup/ESMValTool/actions/runs/8453069262/job/23154935341?pr=3501 - only 4 dependencies need to be rebuilt fro 3.12 - I am a bit at a deadend with prospector though, been waiting on my PR to be merged there since last November; the psy- pkgs I believe that will be updated soon, will go pinch Philipp there; the :elephant: in the room is NCL - am gonna go see what's the atmosphere there; and the pesky one is r-akima - we need to unpin it! :beer:

valeriupredoi commented 6 months ago

OK the issue with NCL is not as bad as I thought - it's compatibility with later proj's see https://github.com/NCAR/ncl/issues/210

valeriupredoi commented 6 months ago

~note to self: rerun tests sooner than later, psy-maps only made it to conda-forge just about an hour ago~

done :partying_face:

valeriupredoi commented 4 months ago

NCL works now :partying_face:

valeriupredoi commented 4 months ago

the only way we got the env to solve with 3.12 and NCL is here

esmf                      8.4.2           nompi_h9e768e6_3    conda-forge
esmpy                     8.4.2              pyhc1e730c_4    conda-forge
gdal                      3.8.5           py312h86af8fa_7    conda-forge
libgdal                   3.8.5                h77540a9_7    conda-forge
geos                      3.12.1               h59595ed_0    conda-forge
ncl                       6.6.2               h41fde0b_52    conda-forge
proj                      9.4.0                h1d62c97_1    conda-forge
pyproj                    3.6.1           py312hb591178_6    conda-forge
shapely                   2.0.4           py312ha5b4d35_1    conda-forge
valeriupredoi commented 3 months ago

Finally! After massaging Mamba all ways, we found the core of the deps issue:

  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package ncl-6.6.2-h3c68598_53 requires esmf <8.6.0, but none of the providers can be installed

that NCL build is the second to latest, and the first that supports python 3.12 via supporting proj>=9.4 -> will have a look at why NCL is restricting esmf, hopefully it's just a case of they've not updated their pins just yet

valeriupredoi commented 3 months ago

Finally! After massaging Mamba all ways, we found the core of the deps issue:

  LibMambaUnsatisfiableError: Encountered problems while solving:
    - package ncl-6.6.2-h3c68598_53 requires esmf <8.6.0, but none of the providers can be installed

that NCL build is the second to latest, and the first that supports python 3.12 via supporting proj>=9.4 -> will have a look at why NCL is restricting esmf, hopefully it's just a case of they've not updated their pins just yet

Fix in https://github.com/conda-forge/ncl-feedstock/pull/155

valeriupredoi commented 2 months ago

@bouweandela since you are the number one fan of my sort of work these days, here's some good news - we managed to have this show running fine with Py312 - two issues still remain: psy-reg needs to get to 1.5.0 (and py312-sompatible) and prospector, as always :beer:

Chilipp commented 2 months ago

psy-reg needs to get to 1.5.0 (and py312-sompatible)

one urgent issue remains on my todo-list @valeriupredoi, but chances are good that I can work on this within this week :see_no_evil:

valeriupredoi commented 2 months ago

@Chilipp that's wonderful news, many thanks, mate :beer: Do let me know if I can help :+1:

bouweandela commented 2 months ago

I checked with the Codacy folks about ruff support, but it's not a very high priority for them, unfortunately.

valeriupredoi commented 2 months ago

@bouweandela I got a rather positive reply from @mrfyda at Codacy, check it out https://github.com/codacy/codacy-engine-scala-seed/issues/59#issuecomment-2210843996

valeriupredoi commented 2 months ago

in the meantime, I'd argue we remove prospector from our build deps - my view is that Python 3.12 support is probably more important than having prospector in the deps list :grin:

valeriupredoi commented 2 months ago

@Chilipp is an absolute legend, and now we have the full Psy suite Python 3.12-able, psy-reg too https://anaconda.org/conda-forge/psy-reg - this, my dear Pythoneers, concludes the work on this PR! (nothing we can do about prospector BTW) :beer:

valeriupredoi commented 1 week ago

@esmvalbot please run examples/recipe_python.yml

bouweandela commented 3 days ago

@esmvalbot Please run examples/recipe_python.yml

bouweandela commented 3 days ago

@esmvalbot please run examples/recipe_python.yml

bouweandela commented 3 days ago

@esmvalbot please run examples/recipe_python.yml