Skip to content

Populated JSON sidecars#301

Merged
CodyCBakerPhD merged 14 commits intomainfrom
add_json
Jan 28, 2026
Merged

Populated JSON sidecars#301
CodyCBakerPhD merged 14 commits intomainfrom
add_json

Conversation

@CodyCBakerPhD
Copy link
Copy Markdown
Collaborator

'About time', I'm sure

Now we can have something to 'bubble up'

@CodyCBakerPhD CodyCBakerPhD self-assigned this Jan 27, 2026
@CodyCBakerPhD CodyCBakerPhD added the enhancement New feature or request label Jan 27, 2026
@CodyCBakerPhD CodyCBakerPhD added the minor Increment the minor version when merged label Jan 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 27, 2026

Codecov Report

❌ Patch coverage is 98.90110% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.80%. Comparing base (f0fb725) to head (ce90b5f).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/nwb2bids/bids_models/_probes.py 96.66% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #301      +/-   ##
==========================================
+ Coverage   84.57%   84.80%   +0.23%     
==========================================
  Files          38       39       +1     
  Lines        1465     1494      +29     
==========================================
+ Hits         1239     1267      +28     
- Misses        226      227       +1     
Flag Coverage Δ
unittests 84.80% <98.90%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/nwb2bids/bids_models/_channels.py 91.37% <100.00%> (+0.22%) ⬆️
src/nwb2bids/bids_models/_electrodes.py 92.39% <100.00%> (+0.43%) ⬆️
src/nwb2bids/bids_models/_model_utils.py 100.00% <100.00%> (ø)
src/nwb2bids/bids_models/_probes.py 94.62% <96.66%> (-0.89%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CodyCBakerPhD CodyCBakerPhD requested a review from asmacdo January 27, 2026 16:17
@CodyCBakerPhD CodyCBakerPhD marked this pull request as ready for review January 27, 2026 16:17
@CodyCBakerPhD
Copy link
Copy Markdown
Collaborator Author

A follow-up to this will add HED tags everywhere reasonable

Comment thread src/nwb2bids/bids_models/_probes.py Outdated
@CodyCBakerPhD
Copy link
Copy Markdown
Collaborator Author

@asmacdo Thanks for the suggestion and test, it required a little more thought to get working as intended (split into util function now)

@CodyCBakerPhD CodyCBakerPhD requested a review from asmacdo January 28, 2026 03:13
Copy link
Copy Markdown
Member

@asmacdo asmacdo left a comment

Choose a reason for hiding this comment

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

Only strongly suggested fix is missing space nitpicks.

Optional

  • Electrode hemisphere handling probably should be added?
  • generalizing json and rethinking probe top level description are ideas, probably better suited for a followup if you agree.

Comment thread src/nwb2bids/bids_models/_channels.py
Comment thread src/nwb2bids/bids_models/_electrodes.py Outdated
Comment thread src/nwb2bids/bids_models/_electrodes.py
Comment thread src/nwb2bids/bids_models/_probes.py
Comment thread tests/unit/test_json.py
},
"type": {"Description": "The type of the probe.", "LongName": "Type"},
}
assert json_content == expected_content
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Asserting expected_content == actual_content isn't super clear about what its testing for. This does have the advantage of showing unexpected failures more than how I originally had it, but it loses the intent. And I imagine if the output changes a developer is likely to just look at the output and if it looks fine, adjust the expected content without remembering the edge cases. Fine as-is just my 2c.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It's a bigger pain to only have individual assertions as far as JSON dict's are concerned

True that it is more likely to break due to any minor change (such as sub content) but those are also easy to update

@github-project-automation github-project-automation Bot moved this to In Progress in nwb2bids Roadmap Jan 28, 2026
@CodyCBakerPhD
Copy link
Copy Markdown
Collaborator Author

Electrode hemisphere handling probably should be added?

Done

generalizing json and rethinking probe top level description are ideas, probably better suited for a followup if you agree.

Done

@CodyCBakerPhD CodyCBakerPhD merged commit 18c3d0e into main Jan 28, 2026
50 checks passed
@CodyCBakerPhD CodyCBakerPhD deleted the add_json branch January 28, 2026 18:44
@github-project-automation github-project-automation Bot moved this from In Progress to Done in nwb2bids Roadmap Jan 28, 2026
@con-releaser
Copy link
Copy Markdown
Contributor

con-releaser Bot commented Jan 28, 2026

🚀 PR was released in v0.11.0 🚀

@con-releaser con-releaser Bot added the released This issue/pull request has been released. label Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request minor Increment the minor version when merged released This issue/pull request has been released.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants