-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
@@ -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: |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
No description provided.