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

Support Python 3.10 and 3.11 #2435

Merged
merged 7 commits into from
Apr 7, 2023
Merged

Conversation

Saransh-cpp
Copy link
Member

Description

Casadi has published a couple of pre-releases with Python 3.10 support - https://pypi.org/project/casadi/3.5.6.pre2/#files!!

Warning
This PR is meant to test PyBaMM's support on Python 3.10. This should not be merged until casadi releases a "non-pre" release.

Fixes # (issue)

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ flake8
  • All tests pass: $ python run-tests.py --unit
  • The documentation builds: $ cd docs and then $ make clean; make html

You can run all three at once, using $ python run-tests.py --quick.

Further checks:

  • Code is commented, particularly in hard-to-understand areas
  • Tests added that prove fix is effective or that feature works

tox.ini Outdated
@@ -2,6 +2,7 @@
envlist = {windows}-{tests,unit,dev},tests,unit,dev,julia

[testenv]
pip_pre = true
Copy link
Member Author

@Saransh-cpp Saransh-cpp Nov 7, 2022

Choose a reason for hiding this comment

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

More specifically, before merging this PR, we should remove this, and this can be removed once casadi publishes a "non-pre" release.

@codecov
Copy link

codecov bot commented Nov 7, 2022

Codecov Report

Patch and project coverage have no change.

Comparison is base (c81afee) 99.69% compared to head (c714f59) 99.69%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2435   +/-   ##
========================================
  Coverage    99.69%   99.69%           
========================================
  Files          273      273           
  Lines        19071    19071           
========================================
  Hits         19012    19012           
  Misses          59       59           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Saransh-cpp Saransh-cpp marked this pull request as draft December 22, 2022 08:30
@brosaplanella brosaplanella mentioned this pull request Jan 24, 2023
2 tasks
@bessman bessman mentioned this pull request Feb 13, 2023
4 tasks
jeromtom added a commit to jeromtom/PyBaMM that referenced this pull request Feb 17, 2023
Reverting Python version until pybamm-team#2435 is merged
jeromtom added a commit to jeromtom/PyBaMM that referenced this pull request Feb 17, 2023
Reverting python version until pybamm-team#2435 is merged
@@ -46,7 +46,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.8, 3.9]
python-version: ["3.8", "3.9", "3.10"]
Copy link
Member

Choose a reason for hiding this comment

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

Shall we also try Python 3.11?

@Saransh-cpp Saransh-cpp changed the title Support Python 3.10! Support Python 3.10 and 3.11 Apr 5, 2023
@Saransh-cpp Saransh-cpp marked this pull request as ready for review April 6, 2023 12:57
@Saransh-cpp
Copy link
Member Author

Looks like this is working! Will rebase once #2859 is merged and this should be ready for a review then.

@Saransh-cpp
Copy link
Member Author

Saransh-cpp commented Apr 7, 2023

Also, should there be a CHANGELOG entry for #2346? Saying something like - "PyBaMM is now natively supported on Apple silicon chips"?

Edit: I think we should also bump the minimum casadi version to 3.6.

Copy link
Member

@brosaplanella brosaplanella left a comment

Choose a reason for hiding this comment

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

Looks great, thanks! Yes, I think we should add a line in CHANGELOG about Mac.

Copy link
Member

@valentinsulzer valentinsulzer left a comment

Choose a reason for hiding this comment

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

Thanks! merging

@valentinsulzer valentinsulzer merged commit cd2d1c8 into pybamm-team:develop Apr 7, 2023
@Saransh-cpp Saransh-cpp deleted the 3.10 branch April 7, 2023 14:24
@qnovo-tissa
Copy link

Hi there, Considering that the support for Python 3.10 is listed here as "unreleased", would that mean that I cannot currently use PyBamm with Python 3.10? If I can, please help explain how to do so. If I cannot, could you please let me know approximately when the support for 3.10 would be released?
Thanks,

@brosaplanella
Copy link
Member

At the moment it is only available if you install from source, but we aim to make a release in the next few days.

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.

4 participants