Skip to content

Commit 09c8179

Browse files
feat: add info_filename field to sample_data table (#175)
* updated table schema * style(pre-commit): autofix * update default value * update default value * added optional string * update test * replace type hint * style(pre-commit): autofix * remove unused import
1 parent 34c12cf commit 09c8179

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

t4_devkit/schema/tables/sample_data.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ class SampleData(SchemaBase):
8484
prev (str): Foreign key pointing the sample_data that precedes this in time.
8585
Empty if start of scene.
8686
is_valid (bool): True if this data is valid, else False. Invalid data should be ignored.
87+
info_filename (str): Relative path to metainfo data-blob on disk.
8788
8889
Shortcuts:
8990
---------
@@ -103,6 +104,9 @@ class SampleData(SchemaBase):
103104
next: str = field(validator=validators.instance_of(str)) # noqa: A003
104105
prev: str = field(validator=validators.instance_of(str))
105106
is_valid: bool = field(default=True, validator=validators.instance_of(bool))
107+
info_filename: str | None = field(
108+
default=None, validator=validators.optional(validators.instance_of(str))
109+
)
106110

107111
# shortcuts
108112
modality: SensorModality | None = field(init=False, default=None)

tests/schema/conftest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ def sample_data_dict() -> dict:
221221
"ego_pose_token": "d6779d73ac9c5a1f3f372aa182bc8158",
222222
"calibrated_sensor_token": "0c434d5a27ef0404331549435b9861e4",
223223
"filename": "data/camera/0.jpg",
224+
"info_filename": "",
224225
"fileformat": "jpg",
225226
"width": 1440,
226227
"height": 1080,

0 commit comments

Comments
 (0)