Skip to content

Commit

Permalink
Made stream_resource::run_start optional and fixed incorrect description
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Oct 5, 2023
1 parent 6d3d8f2 commit 8a23344
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions event_model/documents/stream_datum.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class StreamDatum(TypedDict):
uid: Annotated[
str,
Field(
description="A slice object passed to the StreamResource "
"handler so it can hand back data and timestamps."
description="Globally unique identifier for this Datum. A suggested "
"formatting being '<stream_resource>/<stream_name>/<block_id>"
),
]
seq_nums: Annotated[
Expand Down
14 changes: 8 additions & 6 deletions event_model/documents/stream_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ class StreamResource(TypedDict):
description="Subset of resource_path that is a local detail, not semantic."
),
]
run_start: Annotated[
str,
Field(
description="Globally unique ID to the run_start document "
"this Stream Resource is associated with.",
),
run_start: NotRequired[
Annotated[
str,
Field(
description="Globally unique ID to the run_start document "
"this Stream Resource is associated with.",
),
]
]
spec: Annotated[
str,
Expand Down
2 changes: 1 addition & 1 deletion event_model/schemas/stream_datum.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
},
"uid": {
"title": "Uid",
"description": "A slice object passed to the StreamResource handler so it can hand back data and timestamps.",
"description": "Globally unique identifier for this Datum. A suggested formatting being '<stream_resource>/<stream_name>/<block_id>",
"type": "string"
}
},
Expand Down
1 change: 0 additions & 1 deletion event_model/schemas/stream_resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"resource_kwargs",
"resource_path",
"root",
"run_start",
"spec",
"uid"
],
Expand Down

0 comments on commit 8a23344

Please sign in to comment.