diff --git a/python/ngen_conf/src/ngen/config/pet.py b/python/ngen_conf/src/ngen/config/pet.py index 3e15a099..b9481764 100644 --- a/python/ngen_conf/src/ngen/config/pet.py +++ b/python/ngen_conf/src/ngen/config/pet.py @@ -8,7 +8,7 @@ class PET(BMIC): #should all be reasonable defaults for pET main_output_variable: Literal["water_potential_evaporation_flux"] = "water_potential_evaporation_flux" #NOTE aliases don't propagate to subclasses, so we have to repeat the alias - model_name: str = Field("PET", alias="model_type_name") + model_name: Literal["PET"] = Field("PET", alias="model_type_name") # source: https://github.com/NOAA-OWP/evapotranspiration/blob/0a66999db9695bccf4c1e35d904aa86f04e6cacf/src/bmi_pet.c#L1215 registration_function: str = "register_bmi_pet" diff --git a/python/ngen_conf/src/ngen/config/sloth.py b/python/ngen_conf/src/ngen/config/sloth.py index ccfbb99d..cc9cad1b 100644 --- a/python/ngen_conf/src/ngen/config/sloth.py +++ b/python/ngen_conf/src/ngen/config/sloth.py @@ -1,4 +1,4 @@ -from typing import Optional, Mapping +from typing import Literal, Optional, Mapping from pydantic import BaseModel, Field from .bmi_formulation import BMICxx @@ -9,4 +9,4 @@ class SLOTH(BMICxx): model_params: Optional[Mapping[str, str]] #Is this a better represntation of SLOTH params??? just generic mappings? registration_function: str = "none" #FIXME this isn't required for CXX bmi in ngen? #NOTE aliases don't propagate to subclasses, so we have to repeat the alias - model_name: str = Field("SLOTH", const=True, alias="model_type_name") + model_name: Literal["SLOTH"] = Field("SLOTH", const=True, alias="model_type_name")