Preserve NWB subject age-reference metadata - #1931
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1931 +/- ##
==========================================
+ Coverage 78.34% 78.40% +0.06%
==========================================
Files 92 92
Lines 14109 14142 +33
==========================================
+ Hits 11053 11088 +35
+ Misses 3056 3054 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Could a maintainer please add the |
Thanks for sharing these, Yaroslav! It’s helpful to see how this connects to the work on age references in BIDS, and I’m glad the PR sparked the nwb2bids discussion too. I’ll read through the proposals to get a better understanding. |
Hi @yarikoptic, could we move forward with this? Is there anything else you’d like me to add? All checks are passing. I’m also working on another issue, but I can’t open the PR, it’s stuck in drafts because GitHub says I have too many open issues. 😅 Any advice on how to proceed? |
yarikoptic
left a comment
There was a problem hiding this comment.
I think it is good (enough), and would be great to see effects in the wild ;-)
how do I get such a feature to keep my "event horizon" observable? ;-) |
Lmao, if you find a way to keep the GitHub event horizon observable, please share it, I could use that feature too. 😄 Thank you for the thoughtful review and for merging this. I’m excited to see how the age reference change works with real datasets. I’m hoping to become a Dartmouth student someday; perhaps we’ll get to compare our GitHub queues as colleagues in person😅 |
well, since you asked... @CodyCBakerPhD of our https://github.com/con created https://historia.readthedocs.io/ which we are adopting wider within our group (there it says it is a "command-line tool") but the idea is not to see CLI but rather work with github projects. We keep them private ATM, but I guess I could give you a sneak preview of mine although I frankly yet to start using it consciously (need to just automate more) but already expecting from the others ;-)
|
Ooooh, that's so cool would love to see it in action. |

Fixes #1242.
NWB subjects can store a gestational age as an ordinary duration such as
P3W, with its meaning supplied byage__reference. That reference was not included in the extracted metadata, so the duration became birth-referenced.This includes
age__referencein subject metadata and uses a gestational reference when converting the age. Existing gestational-prefix strings remain supported. When age is calculated from date of birth and session start, it remains birth-referenced; that calculation is unchanged.Tests cover birth and gestational references through an NWB write/read round trip, legacy strings and missing references, and date-of-birth precedence.
Local validation on Windows/Python 3.13:
mypy dandi: no issues in 96 source files.The full integration suite has not been run locally.