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

Summary variables calculated only when called #4621

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

pipliggins
Copy link
Contributor

Description

Fixes #4058

Type of change

  • Optimization (back-end change that speeds up the code)

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

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 98.07692% with 2 lines in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
src/pybamm/solvers/summary_variable.py 97.70% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4621      +/-   ##
===========================================
- Coverage    99.21%   99.21%   -0.01%     
===========================================
  Files          302      303       +1     
  Lines        22858    22928      +70     
===========================================
+ Hits         22679    22747      +68     
- Misses         179      181       +2     

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

self._possible_variables = model.summary_variables # minus esoh variables
self._esoh_variables = [] # Store eSOH variable names

# Flag if eSOH calculations are needed
Copy link
Contributor

Choose a reason for hiding this comment

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

related: #4619

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.

Calculate summary variables only when they are called
2 participants