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 operator to experiment terminations #4770

Merged
merged 19 commits into from
Jan 20, 2025

Conversation

aabills
Copy link
Contributor

@aabills aabills commented Jan 16, 2025

Description

Adds operator for experiment terminations. While this won't functionally change many experiments, it enables experiments to more closely mirror cell testing protocols.

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

@aabills aabills enabled auto-merge (squash) January 16, 2025 18:57
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.69%. Comparing base (ef8571c) to head (5f40794).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #4770   +/-   ##
========================================
  Coverage    98.69%   98.69%           
========================================
  Files          303      303           
  Lines        23226    23256   +30     
========================================
+ Hits         22923    22953   +30     
  Misses         303      303           

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

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.

Good idea including this, do most cyclers ask for a direction or do they figure it out automatically?

@aabills
Copy link
Contributor Author

aabills commented Jan 16, 2025

Good idea including this, do most cyclers ask for a direction or do they figure it out automatically?

Neware and Maccor, the only ones I've dealt with, have "charge" or "discharge" built into the steps and they also have these limits specified with operators.

The reason for this is so that they can go to a "safer" state in case of a short or something. This of course is not relevant for pybamm, but there's not a great way to filter the safety limits without catching the other limits.

aabills and others added 4 commits January 17, 2025 11:24
Co-authored-by: Eric G. Kratz <kratman@users.noreply.github.com>
Co-authored-by: Eric G. Kratz <kratman@users.noreply.github.com>
@kratman kratman disabled auto-merge January 17, 2025 20:28
@aabills
Copy link
Contributor Author

aabills commented Jan 17, 2025

this idaklu error doesn't look related to this pr

@kratman
Copy link
Contributor

kratman commented Jan 17, 2025

this idaklu error doesn't look related to this pr

Yeah it is a flaky test, not sure why that happens, but I have not really been able to reproduce it locally. Re-triggering it should make it pass. It is on my to-do list

@aabills aabills requested a review from kratman January 17, 2025 22:11
@aabills aabills enabled auto-merge (squash) January 17, 2025 23:55
valentinsulzer
valentinsulzer previously approved these changes Jan 18, 2025
@aabills aabills merged commit 4675763 into pybamm-team:develop Jan 20, 2025
24 of 25 checks passed
@kratman kratman deleted the small-experiment-changes branch January 20, 2025 22:49
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