Skip to content

Commit

Permalink
Adds CMA schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ajmuelle committed Jul 8, 2024
1 parent a06d617 commit efb6b9b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cdr_schemas/prospectivity_input.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from enum import Enum
from pathlib import Path
from typing import List, Optional, Union

from geojson_pydantic import Polygon
from pydantic import BaseModel, Field


Expand Down Expand Up @@ -58,6 +60,17 @@ class ProcessedDataLayer(BaseModel):
normalization_method: str # source: LayerDataType


class CriticalMineralAssessment(BaseModel):
crs: str
extent: Polygon
resolution: tuple


class CMATemplate(BaseModel):
cma: CriticalMineralAssessment
file: Union[str, Path]


class StackMetaData(BaseModel):
title: Optional[str] = Field(
...,
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.10"
pydantic = "^2.6.3"
geojson-pydantic = "^1.0.0"

[tool.poetry.group.dev.dependencies]
ruff = "^0.3.4"
Expand Down

0 comments on commit efb6b9b

Please sign in to comment.