Skip to content

Commit

Permalink
grade and tonnage 2 (#49)
Browse files Browse the repository at this point in the history
* grade and tonnage 2

* hyper site

* hypersite to dedupsite

* version update
  • Loading branch information
scotthaleen authored Jul 17, 2024
1 parent dcdf83b commit 117566b
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 9 deletions.
51 changes: 43 additions & 8 deletions cdr_schemas/mineral.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,24 +222,59 @@ class MineralSite(BaseModel):
)


class GradeAndTonnage(BaseModel):
id: Optional[str] = Field(default=None, description="grade and tonnage record id")
class DedupSiteRecord(BaseModel):
id: Optional[str] = Field(default=None, description="dedup site record record id")
mineral_site_id: str = Field(description="Mineral Site Id")
name: str = Field(default="")
commodity: str = Field(..., description="Commodity Name")
name: str = Field(default="", description="Mineral Site Name")
country: str = Field(default="")
province: str = Field(default="")
site_rank: str = Field(default="")
site_type: str = Field(default="")


class DedupSite(BaseModel):
id: Optional[str] = Field(default=None, description="dedup site id")
sites: List[DedupSiteRecord] = Field(
default_factory=list, description="Mineral Sites"
)

commodity: str = Field(..., description="Commodity Name")
contained_metal: Optional[float] = Field(default=None)
contained_metal_units: str = Field(default="")
tonnage: Optional[float] = Field(default=None)
tonnage_units: str = Field(default="")
grade: Optional[float] = Field(default=None)
grade_units: str = Field(default="")

crs: str = Field(
default="", description="The Coordinate Reference System (CRS) of the location"
)
geom: Optional[str] = Field(
default="",
description="Type: Polygon or Point, value indicates the geolocation of the site",
)
document_url: str = Field(default="")
total_contained_metal: Optional[float] = Field(default=None)
total_tonnage: Optional[float] = Field(default=None)
total_grade: Optional[float] = Field(default=None)

top1_deposit_type_id: str = Field(default="")
top1_deposit_classification_source: str = Field(default="")
top1_deposit_classification_confidence: Optional[float] = Field(default=None)

top2_deposit_type_id: str = Field(default="")
top2_deposit_classification_source: str = Field(default="")
top2_deposit_classification_confidence: Optional[float] = Field(default=None)

top3_deposit_type_id: str = Field(default="")
top3_deposit_classification_source: str = Field(default="")
top3_deposit_classification_confidence: Optional[float] = Field(default=None)

top4_deposit_type_id: str = Field(default="")
top4_deposit_classification_source: str = Field(default="")
top4_deposit_classification_confidence: Optional[float] = Field(default=None)

top5_deposit_type_id: str = Field(default="")
top5_deposit_classification_source: str = Field(default="")
top5_deposit_classification_confidence: Optional[float] = Field(default=None)

system: str = Field(..., description="The name of the system used.")
system_version: str = Field(..., description="The version of the system used.")
data_snapshot: str = Field(..., description="version of data")
data_snapshot_date: str = Field(..., description="date of data")
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.3.6"
version = "0.3.7"
description = "CDR Schemas"
authors = []
readme = "README.md"
Expand Down

0 comments on commit 117566b

Please sign in to comment.