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

Crossover and degradation checks #21

Merged
merged 4 commits into from
Jan 20, 2024
Merged

Conversation

jeremyfell
Copy link
Collaborator

No description provided.

@ericfell ericfell mentioned this pull request Jan 19, 2024
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e625502) 91.09% compared to head (63a0110) 91.17%.
Report is 11 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #21      +/-   ##
==========================================
+ Coverage   91.09%   91.17%   +0.08%     
==========================================
  Files           4        4              
  Lines         550      555       +5     
==========================================
+ Hits          501      506       +5     
  Misses         49       49              

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

@@ -524,13 +524,19 @@ def _validate_protocol(
if cell_model.init_ocv > 0.0 > self.voltage_limit_discharge:
raise ValueError("Ensure that 'voltage_limit_discharge' >= 0.0 when 'init_ocv' > 0.0")

if crossover and cell_model.init_ocv > 0.0:
Copy link
Owner

Choose a reason for hiding this comment

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

looks good, and passes new tests

if degradation is not None and (cls_degradation is not None or ncls_degradation is not None):
raise ValueError("Cannot specify both 'degradation' and '(n)cls_degradation'")

if degradation is not None:
cls_degradation = degradation
ncls_degradation = degradation

cls_degradation = copy.deepcopy(cls_degradation)
Copy link
Owner

Choose a reason for hiding this comment

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

looks good, but do we want a small comment here explaining why we use a deepcopy?

@jeremyfell jeremyfell merged commit 3acab55 into main Jan 20, 2024
2 checks passed
@jeremyfell jeremyfell deleted the crossover-degradation-checks branch January 31, 2024 01:44
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.

2 participants