Skip to content

Allow events to be created with labels

Tanner Prestegard requested to merge event_labels into master

This patch allows events to be created via gracedb-client with labels attached. A log message is generated for each label which is initially attached to the event.

The changes to gracedb/api.py allow the list of labels available in the database to be available through the API. The changes to gracedb/forms.py modify the Form used for processing the event fields submitted by gracedb-client. And finally, the changes to gracedb/view_logic.py attach the corresponding labels to the event and create log messages.

I've tested creating events with one label, several labels, and with bad labels to ensure that things work as expected.

An updated version of gracedb-client is needed to take advantage of this feature, but this should be backwards-compatible. The corresponding merge request is here: https://git.ligo.org/lscsoft/gracedb-client/merge_requests/15.

Merge request reports