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

Add Python 3.12 #209

Merged
merged 9 commits into from
Feb 21, 2024
Merged

Add Python 3.12 #209

merged 9 commits into from
Feb 21, 2024

Conversation

BradyPlanden
Copy link
Member

Closes #206.

@BradyPlanden BradyPlanden linked an issue Feb 20, 2024 that may be closed by this pull request
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (547f512) 94.58% compared to head (d8071f2) 94.58%.
Report is 1 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #209   +/-   ##
========================================
  Coverage    94.58%   94.58%           
========================================
  Files           44       44           
  Lines         1829     1829           
========================================
  Hits          1730     1730           
  Misses          99       99           

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

@BradyPlanden
Copy link
Member Author

BradyPlanden commented Feb 20, 2024

As previously discussed, it looks like 3.12 breaks the current scheduled test matrix logic. Mind taking a look at updating it Does the below seem reasonable @agriyakhetarpal?

@BradyPlanden
Copy link
Member Author

BradyPlanden commented Feb 20, 2024

An initial thought would be adding something like this:

# Function to check if a PyBaMM version is compatible with a Python version
is_compatible() {
  local pybamm_ver="$1"
  local py_ver="$2"

  # Compatibility check
  if [[ "$pybamm_ver" == "23.5" && "$py_ver" == "3.12" ]]; then
    return 1 # Incompatible
  fi

  return 0 # Compatible
}

and calling it within the matrix construction loop. However, I'm open better methods if available!

Edit: Implemented the above, scheduled tests have ran here: https://github.com/pybop-team/PyBOP/actions/runs/7974984340

Copy link
Member

@agriyakhetarpal agriyakhetarpal left a comment

Choose a reason for hiding this comment

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

Thanks for this, @BradyPlanden – looks great! I have two small comments, feel free to merge when it's ready.

scripts/ci/build_matrix.sh Outdated Show resolved Hide resolved
.github/workflows/scheduled_tests.yaml Outdated Show resolved Hide resolved
@BradyPlanden BradyPlanden merged commit 8561c52 into develop Feb 21, 2024
77 checks passed
@BradyPlanden BradyPlanden deleted the 206-support-python-312 branch February 21, 2024 12:52
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.

Support Python 3.12
2 participants