Skip to content

Commit

Permalink
Merge pull request #312 from burkeds/hint_NX_class
Browse files Browse the repository at this point in the history
ENH: Added NX_class as a PerObjectHint to the event descriptor.
  • Loading branch information
danielballan authored Aug 23, 2024
2 parents 1451187 + 6ae878b commit a2f134c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions event_model/documents/event_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ class PerObjectHint(TypedDict):
Field(description="The 'interesting' data keys for this device."),
]
]
NX_class: NotRequired[
Annotated[
str,
Field(
description="The NeXus class definition for this device.",
pattern=r"^NX[A-Za-z_]+$",
),
]
]


class Configuration(TypedDict):
Expand Down
6 changes: 6 additions & 0 deletions event_model/schemas/event_descriptor.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@
"description": "The 'interesting' data keys for this device.",
"type": "object",
"properties": {
"NX_class": {
"title": "Nx Class",
"description": "The NeXus class definition for this device.",
"type": "string",
"pattern": "^NX[A-Za-z_]+$"
},
"fields": {
"title": "Fields",
"description": "The 'interesting' data keys for this device.",
Expand Down

0 comments on commit a2f134c

Please sign in to comment.