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.12 #3531

Merged
merged 21 commits into from
Dec 19, 2023

Conversation

agriyakhetarpal
Copy link
Member

@agriyakhetarpal agriyakhetarpal commented Nov 16, 2023

Description

Related to #3390. Adds support for Python 3.12 across the repository

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: $ pre-commit run (or $ nox -s pre-commit) (see CONTRIBUTING.md for how to set this up to run automatically when committing locally, in just two lines of code)
  • All tests pass: $ python run-tests.py --all (or $ nox -s tests)
  • The documentation builds: $ python run-tests.py --doctest (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ python run-tests.py --quick (or $ nox -s quick).

Further checks:

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

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4ad2853) 99.59% compared to head (61cc1c8) 99.59%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3531   +/-   ##
========================================
  Coverage    99.59%   99.59%           
========================================
  Files          258      258           
  Lines        20755    20755           
========================================
  Hits         20670    20670           
  Misses          85       85           

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

Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks @agriyakhetarpal! I think it would be better to remove the install_PyBaMM function because I think the function is redundant and is complicating simple things.

noxfile.py Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
noxfile.py Outdated Show resolved Hide resolved
@agriyakhetarpal
Copy link
Member Author

agriyakhetarpal commented Nov 23, 2023

I have now removed the install_PyBaMM() function and used some extra conditions instead. Doing this will bring many conflicts with some of my other PRs, but I can rebase any of them depending on whichever ones will get merged first. I have also added many # TODO: comments as a note to myself since I shall be working with these files again very soon.

@agriyakhetarpal agriyakhetarpal marked this pull request as ready for review November 23, 2023 11:17
@Saransh-cpp
Copy link
Member

@agriyakhetarpal could you rebase this?

@agriyakhetarpal
Copy link
Member Author

@agriyakhetarpal could you rebase this?

I just noticed this comment—I think there will be many merge conflicts here and there and they will be repeated a lot as the latest changes are added upstream—perhaps I can rebase this branch here on top of the changes in #3550, or just wait for #3550 to be reviewed and get merged first. I haven't worked on the installation guide yet to adjust for both of the PRs since they will require changes to it, but I shall do that as soon as possible next week.

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 good, thanks!

Copy link
Member

@arjxn-py arjxn-py left a comment

Choose a reason for hiding this comment

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

Thanks @agriyakhetarpal, looks good.

noxfile.py Outdated Show resolved Hide resolved
Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks, @agriyakhetarpal! This should also remove all the instances of distutils from the codebase. We are importing distutils in setup.py at the moment.

noxfile.py Show resolved Hide resolved
Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

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

Thanks, @agriyakhetarpal! Looks good!

@Saransh-cpp Saransh-cpp merged commit 463f477 into pybamm-team:develop Dec 19, 2023
40 of 41 checks passed
@agriyakhetarpal agriyakhetarpal deleted the support-python-3.12 branch December 19, 2023 09:43
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.

5 participants