Skip to content

Commit

Permalink
feat: add default variable schema for qc test (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamsegl authored Jan 15, 2025
1 parent 85db026 commit efafe0b
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions atmos_validation/schemas/parameter_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@
from .dim_constants import get_acceptable_dims_from_parameter_key


class DefaultVariable(BaseModel):
"""Describes a default variable for a QC Test."""

name: str
description: str = Field(default="")
value: Union[int, float, Tuple, str]
unit_description: str = Field(default="")


class QCTest(BaseModel):
"""Describes a test to be run on a given parameter. QC tests are defined by metocean.
The default parameters are configured by those with admins access.
Expand All @@ -14,9 +23,7 @@ class QCTest(BaseModel):
test_id: str = Field(default_factory=lambda: uuid.uuid4().hex)
long_name: str = Field(default="")
metocean_pkg_ref: str = Field(default="") # standard_name field
default_variables: List[Tuple[str, str, Union[int, float, Tuple], str]] = Field(
default_factory=list
)
default_variables: List[DefaultVariable] = Field(default_factory=list)
description: str = Field(default="")


Expand Down

0 comments on commit efafe0b

Please sign in to comment.