Skip to content

Commit

Permalink
removed block_idx from StreamDatum
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 committed Aug 14, 2023
1 parent 0813db2 commit 3856a88
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 19 deletions.
2 changes: 0 additions & 2 deletions docs/user/explanations/data-model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ Minimal nontrivial valid example:
{'resource': '272132cf-564f-428f-bf6b-149ee4287024', # foreign key
'datum_kwargs': {}, # format-specific parameters
'datum_id': '272132cf-564f-428f-bf6b-149ee4287024/1',
'block_idx': 0,
'event_count': 1
}
Expand All @@ -538,7 +537,6 @@ Typical example:
{'resource': '3b300e6f-b431-4750-a635-5630d15c81a8',
'datum_kwargs': {'index': 3},
'datum_id': '3b300e6f-b431-4750-a635-5630d15c81a8/3',
'block_idx': 0,
'event_count': 5,
'event_offset': 14}
Expand Down
4 changes: 1 addition & 3 deletions event_model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2010,11 +2010,9 @@ def __call__(
validate: bool = True,
) -> StreamDatum:
resource_uid = self.stream_resource["uid"]
block_idx = next(self.counter)
doc = StreamDatum(
stream_resource=resource_uid,
uid=f"{resource_uid}/{block_idx}",
block_idx=block_idx,
uid=f"{resource_uid}/{next(self.counter)}",
data_keys=data_keys,
seq_nums=seq_nums,
indices=indices,
Expand Down
8 changes: 0 additions & 8 deletions event_model/documents/stream_datum.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,6 @@ class StreamDatum(TypedDict):
str,
Field(description="UID of the EventDescriptor to " "which this Datum belongs"),
]

block_idx: Annotated[
int,
Field(
description="The order in the stream of this block of data. This must "
"be contiguous for a given stream.",
),
]
stream_resource: Annotated[
str,
Field(
Expand Down
6 changes: 0 additions & 6 deletions event_model/schemas/stream_datum.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
}
},
"properties": {
"block_idx": {
"title": "Block Idx",
"description": "The order in the stream of this block of data. This must be contiguous for a given stream.",
"type": "integer"
},
"data_keys": {
"title": "Data Keys",
"description": "A list to show which data_keys of the Descriptor are being streamed",
Expand Down Expand Up @@ -74,7 +69,6 @@
}
},
"required": [
"block_idx",
"data_keys",
"descriptor",
"indices",
Expand Down

0 comments on commit 3856a88

Please sign in to comment.