-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing TimeSeriesMap.data_attr function to link data between timeries #1766
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1766 +/- ##
==========================================
+ Coverage 91.99% 92.18% +0.19%
==========================================
Files 27 27
Lines 2623 2637 +14
Branches 685 689 +4
==========================================
+ Hits 2413 2431 +18
+ Misses 138 136 -2
+ Partials 72 70 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Creating external links with the logic of setting pynwb/tests/integration/hdf5/test_modular_storage.py Lines 82 to 84 in 68c4f56
But using the approach with
results in a broken external link:
This issues appears to be a separate issue that I think we simply didn't see previously because of the bug from #1765 hiding the failure in the test. I'm not sure yet what the fix for this issue is, but I think it is likely either part of @rly do you have an idea what might be wrong here? The test that triggers this issue is |
Looking at the generated file, it appears that the path to the external file being set correctly but the path to the object is not being set correctly when using the
I.e. it should be |
To be clear, our only desire w.r.t. this feature are internal linkages. We have two TimeSeries internal to the same file that share the same Sounds like the external link thing might be a separate issue for a separate PR |
Yes, I believe that is correct. We could update the test to not use the problematic logic and file a separate issue. |
I've create #1767 as a separate issue. To get the test-suite to pass I have further:
|
Note to self: add test to make sure dataset is coming from the expected file |
…taWithoutBorders/pynwb into fix/link_timeseries_data
@rly I updated the test in pynwb/tests/integration/hdf5/test_modular_storage.py Lines 138 to 147 in 3600079
I also updated the test to make it more readable. The test was getting confusing because it uses 2 different files and it wasn't always clear from the names of the variables which file the variables belonged to and what was actually being tested by the asserts. |
@rly just to summarize the status of this:
|
Looks good to me. Thanks for the thorough comments in the tests too. |
Motivation
Fix #1765
TimeSeries.data
did not create SoftLink when set to anotherTimeSeries
. It looks like the cause is that theTimeSeriesMap
ObjectMapper does not define the correspondingTimeSeriesMap.data_attr
(as is the case fortimestamps
) so that the link was not created. This PR adds this method.TimeSeriesMap
TimeSeries.data
Creating a SoftLink for
TimeSeries.data
triggered a secondary error inTimeSeriesMap.unit_carg
where we may not get aTimeSeries
instead of aDatasetBuilder
to look up the unit.How to test the behavior?
See example script in #1765
Checklist
flake8
from the source directory.