Repository navigation
Match experiment step solutions to steps by position - #54
Merged
Merged
Conversation
As in PyBaMM, a skipped step keeps its place in solution.cycles[i].steps as a pybamm.EmptySolution, and so does a cycle whose steps are all skipped, so solution.cycles[i].steps[j] always belongs to experiment.cycles[i][j]. The step solutions no longer need labels, so the compat/solution.py workaround for the __slots__ of pybamm.Solution is removed, and with it pytes.experiments.step_description (F-057). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #54 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 47 46 -1
Lines 1767 1755 -12
Branches 157 158 +1
=========================================
- Hits 1767 1755 -12
🚀 New features to boost your workflow:
|
Ruff's B905 asks for an explicit strict; the steps and their solutions match one to one, so strict=True. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Documentation build overview
10 files changed ·
|
This was referenced Nov 1, 2026
Merged
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
The experiment runner now matches step solutions to steps by position, as PyBaMM does, so step solutions no longer need labels (F-057).
solution.cycles[i].stepsas apybamm.EmptySolution. So does a cycle whose steps are all skipped. PyBaMM leaves that case out, so here PyTES goes one step further. As a result,solution.cycles[i].steps[j]always belongs toexperiment.cycles[i][j].pytes.experiments.step_descriptionis removed, without an alias (maintainer's decision). Readexperiment.cycles[i][j].descriptioninstead.src/pytes/compat/solution.pyis removed. It stored the labels outsidepybamm.Solution, which has__slots__since PyBaMM 26.10 (F-026). The planned upstream request for a metadata field onSolutionis withdrawn.zip.Results are unchanged.
Tests
🤖 Generated with Claude Code