NSLS-II / metadatastore

DEPRECATED: Incorporated into https://github.com/NSLS-II/databroker
Other
2 stars 11 forks source link

Add a Comment collection #256

Closed danielballan closed 7 years ago

danielballan commented 7 years ago

Enable users to add comments at any time after a run that are loaded with the header.

# Add a comment associated with zero, one, or more uids.
# A comment always has a timestamp. It can also include a string and an arbitrary dict.
>>> uids = RE(...)
>>> db.mds.comment(uids, string, **any_kwargs_you_want)

# Or, to easily comment on the runs from the last RE call, an IPython magic:
>>> %comment bad trial

# Comments can be added much later after the fact.
>>> db.mds.comment(db[some_old_scan_id], 'published trial')

# When a Header is retrieved, DataBroker searches the Comments collection for any
# comments that refer to that header.
>>> db[-1].comments
[list, of, comments]

I ran this by a couple BL scientists and it was well-received. Apparently this is a SPEC feature that we are still missing.

CJ-Wright commented 7 years ago

Hmm, I was thinking that this would be more on the analysis side, although we can have it in both. I think this would also solve xpdAcq/xpdAn#47

danielballan commented 7 years ago

Good.

danielballan commented 7 years ago

Ported to https://github.com/NSLS-II/databroker/issues/179