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

CI: Add support for Python 3.12 #1008

Merged
merged 7 commits into from
Jan 3, 2024
Merged

CI: Add support for Python 3.12 #1008

merged 7 commits into from
Jan 3, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Sep 17, 2023

About

Trying to bring in support for Python 3.12, to be released on 2023-10-02 1.

Details

NumPy compatibility for Python 3.12 (numpy/numpy#23808) is probably only one step-stone towards Python 3.12. The build will probably fail due to various other reasons.

Footnotes

  1. https://devguide.python.org/versions/

@amotl
Copy link
Member Author

amotl commented Sep 17, 2023

Note

There is a warning at run #6213169937, but the installation process succeeded, and software testing proceeds.

Warning:
The specified Python version (3.12.0) is not supported by the project (^3.9,<3.12).
Please choose a compatible version or loosen the python constraint specified in the pyproject.toml file.

Solution

Relax the constraint over here.

wetterdienst/pyproject.toml

Lines 101 to 102 in de40c3b

[tool.poetry.dependencies]
python = "^3.9,<3.12"

.github/workflows/tests.yml Outdated Show resolved Hide resolved
@amotl

This comment was marked as outdated.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.82%. Comparing base (011a7e9) to head (756357b).
Report is 336 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1008      +/-   ##
==========================================
+ Coverage   90.41%   90.82%   +0.40%     
==========================================
  Files         103      103              
  Lines        9828     9828              
  Branches     1128     1128              
==========================================
+ Hits         8886     8926      +40     
+ Misses        747      706      -41     
- Partials      195      196       +1     
Flag Coverage Δ
unittests 90.82% <ø> (+0.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@amotl amotl force-pushed the collab/python312 branch 2 times, most recently from fbc2c48 to 0990f31 Compare October 3, 2023 18:40
@amotl
Copy link
Member Author

amotl commented Oct 3, 2023

Apparently, the installation of the geojson package fails on Python 3.12, so we reported it to the upstream maintainers, and submitted a fix.

@amotl
Copy link
Member Author

amotl commented Oct 6, 2023

The patch jazzband/geojson#222 has been merged, but geojson release is yet pending.
Edit: I've asked for a PyPI release at jazzband/geojson#221 (comment).

@amotl amotl force-pushed the collab/python312 branch 2 times, most recently from f2a287d to 37974b1 Compare October 9, 2023 20:57
@amotl
Copy link
Member Author

amotl commented Oct 16, 2023

Observations I

h5py is failing to be pulled in on Python 3.12.

Loading library to get build settings and version: libhdf5.so
error: Unable to load dependency HDF5, make sure HDF5 is installed properly
Library dirs checked: []
error: libhdf5.so: cannot open shared object file: No such file or directory

-- https://github.com/earthobservations/wetterdienst/actions/runs/6526603320/job/17720521769?pr=1008#step:6:227

Observations II

On the other hand, it looks like wheel packages for Python 3.12 are available since Oct 9, 2023.

-- https://pypi.org/project/h5py/#files

Action?

We will probably need to relax this version constraint.

h5py = { version = ">=3.1,<3.10", optional = true}

-- https://github.com/earthobservations/wetterdienst/blob/v0.64.0/pyproject.toml#L199

@gutzbenj gutzbenj force-pushed the main branch 8 times, most recently from ae87457 to 17b12ae Compare November 4, 2023 18:23
@gutzbenj gutzbenj force-pushed the main branch 3 times, most recently from 07934b8 to a9ce842 Compare November 9, 2023 18:45
@amotl
Copy link
Member Author

amotl commented Dec 23, 2023

Thanks for updating. Windows tests are failing because it tries to build DuckDB 1? Even the latest pre-release does not offer wheels for Python 3.12 2, so we may want to skip it in one way or another, in order to make Wetterdienst support Python 3.12 in general?

Footnotes

  1. https://github.com/earthobservations/wetterdienst/actions/runs/7303009067/job/19902700550?pr=1008#step:6:928

  2. https://pypi.org/project/duckdb/0.9.3.dev1990/#files

@gutzbenj
Copy link
Member

Yes, I suggest we skip duckdb installation in CI under 3.12 and make the duckdb test fully optional (I guess it is already?!).

@gutzbenj gutzbenj force-pushed the collab/python312 branch 9 times, most recently from 526d574 to 0a11b56 Compare January 2, 2024 23:38
@amotl amotl marked this pull request as ready for review January 3, 2024 01:09
Copy link
Member Author

@amotl amotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent. Thanks for taking care, Benjamin. I've just added a suggestion about the test skipping.

tests/core/timeseries/test_io.py Outdated Show resolved Hide resolved
tests/example/test_regular_examples.py Outdated Show resolved Hide resolved
@gutzbenj gutzbenj merged commit 794a510 into main Jan 3, 2024
19 checks passed
@gutzbenj gutzbenj deleted the collab/python312 branch January 3, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants