openworm / org.geppetto.recording

Python project allowing to create a recording for Geppetto
http://www.geppetto.org/
Other
5 stars 0 forks source link

Add support for metadata #2

Closed tarelli closed 10 years ago

tarelli commented 10 years ago

See here https://github.com/openworm/OpenWorm/issues/208#issuecomment-42156148

jrieke commented 10 years ago

I have added a method add_metadata which stores metadata of all types as attributes on the root group. Also see example1 in CreateTestGeppettoRecording.

@JimHokanson Do you also need to store metadata for specific values? @tarelli The simulator variable could be handled through add_metadata now. Do you see any reasons against that?

tarelli commented 10 years ago

@jrieke Great stuff Johannes! As for the simulator variable I think it's better to leave that separately as is. To display information regarding the original simulator Geppetto will go and look for it with that specific key and it's better if the key is explicitly defined in the file rather then being something that "happens to exist" inside metadata. Basically I think it's better to have that information "agreed" as part of the standard rather than treating it as metadata. Maybe subtle, let me know if you see my point!

jrieke commented 10 years ago

@tarelli Thanks! I see your point, I didn't know that the simulator field is used in such an explicit way by Geppetto. Only problem is if you call add_metadata('simulator', 'something'), not knowing that it conflicts with the simulator field. Should I add an exception for that?

JimHokanson commented 10 years ago

@jrieke Storing in the root group is currently fine for now. Eventually specific values might be nice but the current imlementation at least allows storing of global configurations. Perhaps you could address value specific meta data at a later point but I think it is a low priority. Thanks.