Closed rly closed 5 years ago
I prefer 2. I don't really understand why links were "automagic" in the first place and that has been creating a lot of issues. In matnwb you need to define all links explicitly. We would need types for internal and external links and ideally you would be able to specify absolute or relative path for external links
I also prefer 2. While we decide on this, I'm issuing a hotfix for 1.0.4 -> 1.0.5.
With the most recent 1.0.4 version of hdmf, parent-child relationships are enforced such that a child can have only one parent, which cannot be reassigned. This breaks linking of external files.
ts
already has a parentnwbfile1
. Therefore,nwbfile2
cannot addts
as a child.Options:
Container.parent
to be reset. This could lead to strange behavior and bugs down the road (or bugs that return).NWBHDF5IO.write
. Instead of determining on write whether a link exists, ask the user to make all links explicit, e.g.nwbfile3.add_acquisition(NWBLink(ts))
. This is more akin to a filesystem -- you can't have the same file in two different folders, but you can make a link/shortcut to the file and move that link around.