Skip to content

[sampledDimension] offset got a default of 0.0 ... - #560

Merged
jgrewe merged 3 commits into
G-Node:masterfrom
jgrewe:offset
Nov 28, 2026
Merged

jgrewe merged 3 commits into
G-Node:masterfrom
jgrewe:offset

Conversation

@jgrewe

@jgrewe jgrewe commented Oct 25, 2026

Copy link
Copy Markdown
Member

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

fixes #554

@codecov-commenter

codecov-commenter commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.61%. Comparing base (a89d844) to head (32ce4e2).
⚠️ Report is 42 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls

coveralls commented Oct 25, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 78.612% (+0.01%) from 78.599% — jgrewe:offset into G-Node:master

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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_dimension offsets to 0.0 and assigns them unconditionally.
  • Converts offset assignments of None to 0.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

Comment thread nixio/dimensions.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated tests only cover stored zero offsets, leaving the missing-offset fallback and its requirement to keep the attribute absent untested.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread nixio/test/test_dimensions.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the changes that default sampled-dimension offsets to 0.0.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@jgrewe
jgrewe merged commit 43a5971 into G-Node:master Nov 28, 2026
20 checks passed
@jgrewe
jgrewe deleted the offset branch November 28, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting an offset of an sampled dimesions

4 participants