Commit 158f421
committed
Do not strip suffixes from suggested internal names
Suffixes like '_r0', '_t0' etc. represent transformation chains in NeXus,
not arbitrary naming conventions. These should be preserved in the suggested
internal names.
Changes:
- Remove regex-based suffix stripping from suggest_internal_name()
- Update docstring to remove misleading example about suffix removal
- Rename tests test_removes_r0_suffix → test_preserves_r0_suffix
- Rename tests test_removes_t0_suffix → test_preserves_t0_suffix
- Update test expectations to preserve suffixes
Note: The bifrost f144_log_streams configuration was generated with the old
code that stripped suffixes. However, examining the current stream names
(attenuator_1, temperature_0, etc.), none appear to match the pattern
'_[rt]\d+$' that was being stripped, so no regeneration is needed at this
time. If the original NeXus file contained streams with '_r0' or '_t0'
suffixes, they would need to be regenerated to ensure accuracy.
Original prompt: Please use a worktree and address the suffix-removal problem
discussed in #589 (do not strip _r0 and the like, since it refers to "rotation 0",
in fact do not strip any suffixes). Do we need to rerun the scripts that were used
to generate the dict of names for bifrost?1 parent d007bd4 commit 158f421
File tree
2 files changed
+6
-10
lines changed- src/ess/livedata
- tests
2 files changed
+6
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | 132 | | |
134 | 133 | | |
135 | 134 | | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
| 135 | + | |
140 | 136 | | |
141 | 137 | | |
142 | 138 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
427 | | - | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
433 | 433 | | |
434 | 434 | | |
435 | 435 | | |
436 | | - | |
| 436 | + | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
| |||
0 commit comments