Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • GraceDB Client GraceDB Client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • IGWN Computing and Software
  • GraceDB
  • GraceDB ClientGraceDB Client
  • Merge requests
  • !15

Create event with labels

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Tanner Prestegard requested to merge create_event_with_labels into master May 19, 2017
  • Overview 0
  • Commits 2
  • Changes 2

Adds a 'labels' argument to the createEvent() method. 'labels' can be specified as a string (for a single label) or a list of strings (for one or more labels). 'labels' is then joined into a comma-separated string for passing to the server, which parses the string and adds the labels.

Adds the allowed_labels property to the GraceDb class, which gets the list of available labels from the server. This is used to test the labels submitted by the user and raise an exception if it doesn't match a label in the list.

Adds unit tests for testing this feature and for testing removal of labels. I've run the unit tests successfully and manually tested creating events with no labels, one label, several labels, bad labels, etc. to ensure that it works as expected.

This patch should be coordinated with the merge request to the server code shown here: https://git.ligo.org/lscsoft/gracedb/merge_requests/3. It cannot function properly unless the server code patch is already in place.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: create_event_with_labels