From 4b9aa452b2ea8b445f2af325c75fd8a876329238 Mon Sep 17 00:00:00 2001 From: marshHawk4 Date: Thu, 19 Sep 2024 15:10:49 -0400 Subject: [PATCH] multiple map units (#66) * map units * here * updated --- cdr_schemas/cdr_responses/legend_items.py | 6 ++++-- cdr_schemas/features/polygon_features.py | 4 ++-- pyproject.toml | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/cdr_schemas/cdr_responses/legend_items.py b/cdr_schemas/cdr_responses/legend_items.py index be94bd9..51dc363 100644 --- a/cdr_schemas/cdr_responses/legend_items.py +++ b/cdr_schemas/cdr_responses/legend_items.py @@ -42,8 +42,10 @@ class LegendItemResponse(BaseModel): ) validated: Optional[bool] = Field(default=None, description="Validated by human") confidence: Optional[float] = None - map_unit_age_text: str = Field(default="", description="Age of map unit") - map_unit_lithology: str = Field(default="", description="Map unit lithology") + map_unit_age_text: list = Field(default_factory=list, description="Age of map unit") + map_unit_lithology: list = Field( + default_factory=list, description="Map unit lithology" + ) map_unit_b_age: Optional[float] = None map_unit_t_age: Optional[float] = None diff --git a/cdr_schemas/features/polygon_features.py b/cdr_schemas/features/polygon_features.py index 3871288..260c24a 100644 --- a/cdr_schemas/features/polygon_features.py +++ b/cdr_schemas/features/polygon_features.py @@ -123,8 +123,8 @@ class PolygonLegendAndFeaturesResult(BaseModel): pattern: str = Field(default="", description="The pattern of the map unit") ### TODO Agreed on Apr 15th call that category can be removed category: str = Field(default="", description="TODO - what is this?") - map_unit: Optional[MapUnit] = Field( - default=None, description="Human annotated information on the map unit" + map_unit: List[MapUnit] = Field( + default_factory=list, description="Human annotated information on the map units" ) reference_id: str = Field( default="", diff --git a/pyproject.toml b/pyproject.toml index 56eaa20..4a66a3d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cdr_schemas" -version = "0.4.8" +version = "0.4.9" description = "CDR Schemas" authors = [] readme = "README.md"