Skip to content

Commit

Permalink
Added validation field to features (#35)
Browse files Browse the repository at this point in the history
* Added validation field to features

* black

* version

* update
  • Loading branch information
marshHawk4 authored Jun 7, 2024
1 parent 0dfaf04 commit 114c4f6
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions cdr_schemas/area_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class Area_Extraction(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

# Model Provenance
model: str = Field(description="Name of the model used to generate this data")
Expand Down
2 changes: 2 additions & 0 deletions cdr_schemas/features/line_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class LineProperty(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")
model_config = ConfigDict(protected_namespaces=())


Expand Down Expand Up @@ -124,6 +125,7 @@ class LineLegendAndFeaturesResult(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

# Segmentation Fields
crs: str = Field(
Expand Down
3 changes: 3 additions & 0 deletions cdr_schemas/features/point_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ class PointProperties(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

model_config = ConfigDict(protected_namespaces=())


Expand Down Expand Up @@ -126,6 +128,7 @@ class PointLegendAndFeaturesResult(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

# Segmentation Fields
crs: str = Field(
Expand Down
3 changes: 3 additions & 0 deletions cdr_schemas/features/polygon_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class PolygonProperty(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

confidence: Optional[Union[float, int]] = Field(
default=None, description="The prediction confidence of the model"
)
Expand Down Expand Up @@ -131,6 +133,7 @@ class PolygonLegendAndFeaturesResult(BaseModel):
aiding in tracking provenance.
""",
)
validated: bool = Field(False, description="Validated by human")

# Segmentation Fields
crs: str = Field(
Expand Down
1 change: 1 addition & 0 deletions cdr_schemas/georeference.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ class ProjectionResult(BaseModel):
Name of file uploaded for this projection.
""",
)
validated: bool = Field(False, description="Validated by human")


class GeoreferenceResult(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "cdr_schemas"
version = "0.2.8"
version = "0.2.9"
description = "CDR Schemas"
authors = []
readme = "README.md"
Expand Down

0 comments on commit 114c4f6

Please sign in to comment.