SilverLabUCL / PySilverLabNWB

Python tools for working with Silver Lab data in the NWB2 format
MIT License
1 stars 0 forks source link

Dummy metadata copied into file #37

Closed ageorgou closed 4 years ago

ageorgou commented 4 years ago

Some fields of metadata.yaml are pre-populated with values describing what their actual content should be (e.g. "A general description of the experiment goes here."). This is useful for people filling them in but, if someone doesn't, these dummy values are copied into the NWB file.

Consider not including them unless they are filled in, except for any fields which are required for creating the NWBFile.

pgleeson commented 4 years ago

I would suggest just commenting out the lines in metadata.yaml which provide the hints for contents and ignoring these when reading it in. Then users can see clearly what they have and haven't filled in yet.

jonc125 commented 4 years ago

For the GUI editor, would be good to have a template file or similar with those notes available to be read, so they can be provided as hint tooltips for the user.

ageorgou commented 4 years ago

We may be able to get away with a single YAML file for both uses if we switch to ruamel.yaml instead of pyyaml for reading metadata.yaml. The former doesn't discard the comments, so they could be used in the GUI. See this answer for how to access the comments.

jonc125 commented 4 years ago

Good idea!

alessandrofelder commented 4 years ago

I think this is taken care of by #45. Please re-open if I am mistaken.