Use cellpycore StepType vocabulary for step-type literals (#543)#545
Merged
Conversation
Native-headers Phase-0 prerequisite (split from #538, where the header scan flagged step-type values as false positives). - cellreader.py: list_of_step_types was a hand-maintained duplicate of the 13 step-type names; it is now list(config.STEP_TYPES) (single source). - utils/ocv_rlx.py: the step-table type comparisons step_table[hdr_steps.type].isin(["discharge"]) / (["charge"]) use StepType.DISCHARGE.value / StepType.CHARGE.value. - utils/helpers.py: the on=["charge"] step-type filter default uses StepType.CHARGE.value. Behavior-identical (StepType.<X>.value equals the former literal). Out of scope: direction/cap_type == "charge" comparisons (API arguments, not the step-table type column) and easyplot (deprecated, removal 2.0 - #544). Closes #543 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Native-headers Phase-0 prerequisite, split from #538 (where the header scan flagged step-type values as false positives — they're compared against the step-table
typecolumn, not header columns).cellreader.py—list_of_step_typeswas a hand-maintained duplicate of the 13 step-type names; nowlist(config.STEP_TYPES)(single source, exact match verified).utils/ocv_rlx.py—step_table[hdr_steps.type].isin(["discharge"])/(["charge"])(4 sites) →StepType.DISCHARGE.value/.CHARGE.value.utils/helpers.py— theon = ["charge"]step-type filter default →[StepType.CHARGE.value].Behavior-identical (
StepType.<X>.valueequals the former literal).Out of scope (deliberately):
direction == "charge"/cap_type == "charge"comparisons (those compare API arguments / local direction variables, not the step-tabletypecolumn), andeasyplot(deprecated, removal 2.0 — #544).Test plan
list_of_step_types == list(STEP_TYPES)verifiedtest_ocv_relax.py+test_helpers.py+test_cell_readers.py: 120 passedisinliterals remain in ocv_rlxfull (linux / uv)is the authoritative gateCloses #543
🤖 Generated with Claude Code