Repository navigation
[sampledDimension] offset got a default of 0.0 ... - #560
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #560 +/- ##
==========================================
- Coverage 81.38% 78.61% -2.78%
==========================================
Files 81 59 -22
Lines 10828 9762 -1066
==========================================
- Hits 8812 7674 -1138
- Misses 2016 2088 +72 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
unsetting the offset to None will reset it to 0.0 cannot recall why we decided against that before.
There was a problem hiding this comment.
🟡 Changes recommended
The offset getter still returns None when the attribute is absent, leaving numeric-offset conversion unresolved for existing and read-only files instead of providing a non-writing 0.0 default.
1 open issue
What changed in this PR
Updates sampled-dimension creation and reset behavior to use zero offsets, addressing the Neo/quantity conversion problem described in #554.
Changes:
- Defaults
append_sampled_dimensionoffsets to0.0and assigns them unconditionally. - Converts offset assignments of
Noneto0.0. - Updates tests to expect zero for default and reset offsets.
| File | Description |
|---|---|
nixio/test/test_dimensions.py |
Expects zero offsets after creation and reset. |
nixio/dimensions.py |
Resets offsets to 0.0 when assigned None. |
nixio/data_array.py |
Defaults appended sampled dimensions to zero offset and preserves explicit zero assignments. |
Review effort: Balanced
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.


unsetting the offset to None will reset it to 0.0
cannot recall why we decided against that before.
fixes #554