From 0faea8aa56ed78bb63199f11004979df75bef862 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Sat, 10 Jan 2026 23:25:39 +0100 Subject: [PATCH 1/2] feat(metadata_schema): add scan_name and comment fields to basic schema --- bec_lib/bec_lib/metadata_schema.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bec_lib/bec_lib/metadata_schema.py b/bec_lib/bec_lib/metadata_schema.py index fe36f505b..23cf9a2bf 100644 --- a/bec_lib/bec_lib/metadata_schema.py +++ b/bec_lib/bec_lib/metadata_schema.py @@ -13,11 +13,15 @@ class BasicScanMetadata(BaseModel): - """Basic scan metadata class. Only requires a sample name. Accepts any additional + """Basic scan metadata class. Accepts any additional metadata that the user wishes to provide. Can be extended to add required fields for specific scans.""" model_config = ConfigDict(extra="allow", validate_assignment=True) + scan_name: str = Field( + "", title="Scan name", description="A human-friendly identifier for the scan" + ) + comment: str = Field("", title="Comment", description="A comment about the scan") sample_name: str = Field( "", title="Sample name", description="A human-friendly identifier for the sample" ) From ac0c6f938740ca8cf3290d61e910017df9bd36c2 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Mon, 12 Jan 2026 14:15:05 +0100 Subject: [PATCH 2/2] fix(metadata_schema): standardize field titles in BasicScanMetadata --- bec_lib/bec_lib/metadata_schema.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bec_lib/bec_lib/metadata_schema.py b/bec_lib/bec_lib/metadata_schema.py index 23cf9a2bf..7049ec4d1 100644 --- a/bec_lib/bec_lib/metadata_schema.py +++ b/bec_lib/bec_lib/metadata_schema.py @@ -19,11 +19,11 @@ class BasicScanMetadata(BaseModel): model_config = ConfigDict(extra="allow", validate_assignment=True) scan_name: str = Field( - "", title="Scan name", description="A human-friendly identifier for the scan" + "", title="Scan Name", description="A human-friendly identifier for the scan" ) comment: str = Field("", title="Comment", description="A comment about the scan") sample_name: str = Field( - "", title="Sample name", description="A human-friendly identifier for the sample" + "", title="Sample Name", description="A human-friendly identifier for the sample" )