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

Bump to py3.12 support #519

Merged
merged 1 commit into from
Nov 29, 2023
Merged

Bump to py3.12 support #519

merged 1 commit into from
Nov 29, 2023

Conversation

brynpickering
Copy link
Member

@brynpickering brynpickering commented Nov 10, 2023

Move from py3.9-3.11 to py3.10-3.12.

This is made possible by the recent release of a new pandas patch (v2.1.2) that should have dealt with the regressions introduced in v2.1.1 (see #498), according to their changelog.

EDIT: I've run some tests (national scale model over one year) and it seems that the pandas patch hasn't solved the issues entirely. The run has gone from approx 3min50 to 6min. This is offset by a ~30% reduction in peak "resident" memory consumption (no change in "heap" consumption between the two).

Reviewer checklist:

  • Test(s) added to cover contribution
  • Documentation updated
  • Changelog updated
  • Coverage maintained or improved

@brynpickering
Copy link
Member Author

The primary benefit of killing py3.9 support is that cleaner type hints are possible without needing to retain backwards compatibility (Union[A, B] in <=py3.9 vs A | B in >=py3.10).

The only issue I see is that it keeps us quite constrained (currently) to one version of pandas. Once more v2.1 patches are released, we'll have a bit more breathing room.

@brynpickering brynpickering mentioned this pull request Nov 10, 2023
4 tasks
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Merging #519 (dd9a839) into main (3779e0d) will increase coverage by 0.21%.
Report is 2 commits behind head on main.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #519      +/-   ##
==========================================
+ Coverage   93.21%   93.42%   +0.21%     
==========================================
  Files          28       28              
  Lines        3817     3804      -13     
  Branches      877      800      -77     
==========================================
- Hits         3558     3554       -4     
+ Misses        168      162       -6     
+ Partials       91       88       -3     
Files Coverage Δ
src/calliope/backend/backend_model.py 97.47% <100.00%> (+0.01%) ⬆️
src/calliope/backend/where_parser.py 97.67% <100.00%> (ø)
src/calliope/core/model.py 93.75% <100.00%> (+0.03%) ⬆️
src/calliope/preprocess/checks.py 85.16% <100.00%> (ø)
src/calliope/preprocess/model_run.py 91.82% <ø> (ø)
src/calliope/preprocess/nodes.py 93.75% <100.00%> (+3.17%) ⬆️

... and 1 file with indirect coverage changes

@brynpickering brynpickering merged commit 3b84476 into main Nov 29, 2023
9 checks passed
@brynpickering brynpickering deleted the update-to-py312 branch November 29, 2023 16:09
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