Skip to content

Add newest python version 3.13#157

Closed
ludwiglierhammer wants to merge 13 commits intoglamod:mainfrom
ludwiglierhammer:py13
Closed

Add newest python version 3.13#157
ludwiglierhammer wants to merge 13 commits intoglamod:mainfrom
ludwiglierhammer:py13

Conversation

@ludwiglierhammer
Copy link
Collaborator

No description provided.

@github-actions github-actions bot added the CI label Nov 8, 2024
@codecov
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.48%. Comparing base (2a185c8) to head (73a4491).
Report is 32 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   82.48%   82.48%           
=======================================
  Files          69       69           
  Lines        2655     2655           
=======================================
  Hits         2190     2190           
  Misses        465      465           
Flag Coverage Δ
unittests 82.48% <ø> (ø)

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.


🚨 Try these New Features:

@jtsiddons
Copy link
Collaborator

@ludwiglierhammer: Is it numba causing problems?

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@ludwiglierhammer
Copy link
Collaborator Author

@ludwiglierhammer: Is it numba causing problems?

I think some packages aren't compatible with the newest python version 3.13. This will be fixed in a couple of days/weeks. We just have to wait.

@jtsiddons
Copy link
Collaborator

Testing locally, the only dependency that fails to install with pip on python 3.13 is numba.

Building numba wheels from source allows all dependencies to be installed, and the unit tests to pass.

It looks like we're waiting for numba 0.61. It looks like they're close to a release candidate, so hopefully not too long.

CDM_python313

@jtsiddons
Copy link
Collaborator

Hi @ludwiglierhammer: numba is now at version v0.61 which supports python 3.13. Can now build cdm_reader_mapper for python 3.13. Merging main allows for the unit tests to run. I get two failing tests (I have trimmed most of the output):

==================================================================================================================================================== test session starts ====================================================================================================================================================
platform darwin -- Python 3.13.1, pytest-8.3.4, pluggy-1.5.0
rootdir: /private/var/folders/vf/pskk3w4j38l8kk7bc9xm07j00000gp/T/cdm
configfile: pyproject.toml
collected 68 items

tests/test_databundle.py .......                                                                                                                                                                                                                                                                                      [ 10%]
tests/test_duplicates.py ...........                                                                                                                                                                                                                                                                                  [ 26%]
tests/test_operations.py .........                                                                                                                                                                                                                                                                                    [ 39%]
tests/test_workflow.py ...................F........F.....                                                                                                                                                                                                                                                             [ 89%]
tests/test_writers.py .......                                                                                                                                                                                                                                                                                         [100%]

****** TRIMMED by jtsiddons ******
================================================================================================================================================== short test summary info ==================================================================================================================================================
FAILED tests/test_workflow.py::test_read_data[gcc-None-None-True-None-mdf_kwargs19] - KeyError: ('header', 'record_timestamp')
FAILED tests/test_workflow.py::test_read_data[gcc-None-None-True-drops28-mdf_kwargs28] - KeyError: ('header', 'record_timestamp')
=================================================================================================================================== 2 failed, 66 passed, 25 warnings in 193.74s (0:03:13) ===================================================================================================================================

I can send you the full pytest output if you want it.

Note: I also get a number of warnings indicating checksums do not match:

UserWarning: TRIMMED/cdm-testdata/icoads/r300/d781/output/mask_icoads_r300_d781_1987-09-01_subset.csv and md5 checksum do not match.

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@ludwiglierhammer
Copy link
Collaborator Author

@jtsiddons: thanks for the info. I'll merge this PR into the main branch. Do you think we need support for py9 anymore?
The warnings indicating checksums do not match originate from my last changes in the cdm-testdata (v2025.01.16 and v2025.01.17). No worries 😉

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.19%. Comparing base (67c9426) to head (fdd269a).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #157   +/-   ##
=======================================
  Coverage   83.19%   83.19%           
=======================================
  Files          79       79           
  Lines        2958     2958           
=======================================
  Hits         2461     2461           
  Misses        497      497           
Flag Coverage Δ
unittests 83.19% <ø> (ø)

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.

@jtsiddons
Copy link
Collaborator

jtsiddons commented Jan 23, 2025

Do you think we need support for py9 anymore?

Python 3.9 is end of support in October 2025 I believe. We don't use 3.9 for any of our work here.

Ok. Then I think I wait till the official end of support.

@ludwiglierhammer
Copy link
Collaborator Author

@jtsiddons: There are still some issues with py13 creating a conda environment: https://github.com/glamod/cdm_reader_mapper/actions/runs/12924665583/job/36044081420?pr=157

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@jtsiddons
Copy link
Collaborator

I wonder if numba 0.61 is not available through conda yet then. I have similar issues building with uv - it fails to install a numba version compatitble with datashader. Can you try pinning "numba>=0.61" in pyproject.toml?

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@jtsiddons
Copy link
Collaborator

   error    libmamba Could not solve for environment specs
      The following package could not be installed
      └─ numba >=0.61 * does not exist (perhaps a typo or a missing channel).

Updated version not available through microconda then.

@jtsiddons
Copy link
Collaborator

I've also noticed that numba 0.61 does not support python 3.9

@ludwiglierhammer
Copy link
Collaborator Author

I think we still have to wait until other packages allow numby>=0.61, don't we?

@jtsiddons
Copy link
Collaborator

I think we still have to wait until other packages allow numby>=0.61, don't we?

I think the other dependencies in the tree are all fine with 0.61. This is the version that is installed if you build cdm_reader_mapper with pip for python 3.13.

I can build with uv if I pin numba to 0.61 (and drop 3.9 support) and have no dependency clashes.

@jtsiddons
Copy link
Collaborator

We should wait until 0.61 is available through microconda

@jtsiddons
Copy link
Collaborator

numba 0.61 is not yet on conda-forge (https://anaconda.org/conda-forge/numba/), however it is available on their own channel (https://anaconda.org/numba/numba) and pypi (https://pypi.org/project/numba).

Can you try specifying numba>=0.61 in the pip dependency section of the two ci yaml files?

@jtsiddons
Copy link
Collaborator

@ludwiglierhammer: numba 0.61 is now on conda-forge: https://anaconda.org/conda-forge/numba/files, I would hope the tests should pass (except py3.9...) - hopefully you won't need to specifically pin the numba version (since 0.61 doesn't support python 3.9)

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@github-actions
Copy link

Warning

This Pull Request modifies GitHub Workflows and is coming from a fork.
It is very important for the reviewer to ensure that the workflow changes are appropriate.

@ludwiglierhammer
Copy link
Collaborator Author

Tests are not running for py13.

@ludwiglierhammer
Copy link
Collaborator Author

This issue is beeing dealt with in #228.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants