Repository navigation
fix(cyclers): reject ambiguous wildcard unit columns - #418
Merged
Tom Holland (tomjholland) merged 1 commit intoNov 18, 2026
Conversation
Signed-off-by: VolMax-Studio <volmax.core@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #418 +/- ##
==========================================
+ Coverage 95.42% 95.44% +0.02%
==========================================
Files 58 58
Lines 5003 5027 +24
==========================================
+ Hits 4774 4798 +24
Misses 229 229 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Tom Holland (tomjholland)
approved these changes
Nov 18, 2026
Tom Holland (tomjholland)
left a comment
Collaborator
There was a problem hiding this comment.
VolMax-Studio (@VolMax-Studio) Thanks for this! I think the ideal end solution is for the normalisation to happen before the data frames are combined, but I see why you avoided that for now; this fix is helpful on its own.
Tom Holland (tomjholland)
merged commit Nov 18, 2026
755bb00
into
ImperialCollegeLondon:main
8 checks passed
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.
Fixes #417.
Problem
ColumnMap.match_columns()iterates asetof available column names and overwrites wildcard matches. When a BioLogic multi-file import contains bothQ charge/mA.handQ charge/A.h, the chosen capacity column depends onPYTHONHASHSEED, silently omitting data from whichever file used the other unit.Change
Fail closed when more than one distinct valid column matches the same wildcard pattern. Include the affected PyProBE quantity, pattern, and sorted matching column names in the error.
This deliberately does not attempt to coalesce or normalize the mixed columns: combining their counters correctly requires additional semantics beyond a simple column lookup. Exact matches and unambiguous wildcard matches remain supported; repeated identical column names are not treated as multiple candidates.
Regression coverage
Q charge/*unit columns fail explicitly instead of selecting a hash-dependent winner.mA.handA.hcharge counters now rejects the ambiguous mapping before producing an incorrectCapacity [Ah]series.On unmodified
mainatbea49c1b3d5049f520678de0cb4f4a7f4a5c4504, 3 new targeted cases failed. With the fix:pytestsuite: 263 passed, 6 skipped.ruff checkandruff format --checkon all changed files: passed.The skipped tests are existing optional plot tests; documentation notebook tests were not run.