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

BPX example #4635

Merged
merged 21 commits into from
Dec 3, 2024
Merged

BPX example #4635

merged 21 commits into from
Dec 3, 2024

Conversation

rtimms
Copy link
Contributor

@rtimms rtimms commented Dec 2, 2024

Description

Add a BPX example in the example notebooks to replace this repo which isn't tested or maintained. Includes changes from #4634 but made a separate PR since that one is a bug fix.

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: $ 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 -m pytest (or $ nox -s tests)
  • The documentation builds: $ python -m pytest --doctest-plus src (or $ nox -s doctests)

You can run integration tests, unit tests, and doctests together at once, using $ 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

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@@ -0,0 +1,86 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

should this be moved to pybamm-data? how do you actually add things there?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a pretty small file, so there is not a major issue with putting it in the repo. Having the data on pybamm-data will probably make it more compatible with the google-colab functionality in the documentation

Copy link
Member

@agriyakhetarpal agriyakhetarpal Dec 3, 2024

Choose a reason for hiding this comment

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

should this be moved to pybamm-data?

This is a pretty small file, so there is not a major issue with putting it in the repo. Having the data on pybamm-data will probably make it more compatible with the google-colab functionality in the documentation

Yes, I think we should centralise everything under pybamm-data, so it would be nice to add this file there regardless of its small size (we do have a user-facing DataLoader class, after all, so it makes sense to showcase it more through more example notebooks). And usage with Google Colab is also improved indeed.

how do you actually add things there?

The procedure for adding things there is to first create a new v1.0.1 release and add all of the files from the previous release, add this file, and then bump the version in pybamm_data.py. We do this for reproducibility, such that the next PyBaMM release will retrieve the files from a different release URL (and this gives us the added benefit of better-segregated download analytics/usage stats from the GitHub API). If the changes to this file are final, I can do this later today if you'd like, @rtimms, or step back in case you may wish to do this yourself; please let me know!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done, thanks!

Copy link
Contributor

Choose a reason for hiding this comment

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

@agriyakhetarpal Can you add documentation to the pybamm-data repo for how that is done?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, @kratman, on it already but haven't pushed the changes yet. I'll ask you to review when done

Copy link

codecov bot commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.21%. Comparing base (72c23ea) to head (5193078).
Report is 10 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4635   +/-   ##
========================================
  Coverage    99.21%   99.21%           
========================================
  Files          302      302           
  Lines        22858    22878   +20     
========================================
+ Hits         22679    22699   +20     
  Misses         179      179           

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

@kratman kratman marked this pull request as draft December 2, 2024 16:35
@kratman
Copy link
Contributor

kratman commented Dec 2, 2024

I made this a draft until #4634 is merged

@kratman kratman marked this pull request as ready for review December 2, 2024 17:02
@rtimms rtimms requested a review from a team as a code owner December 3, 2024 10:41
@kratman kratman merged commit 16b15b9 into develop Dec 3, 2024
26 checks passed
@kratman kratman deleted the bpx-example branch December 3, 2024 15:32
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.

3 participants