model_input_schemas
AbstractScenarioSchema
Bases: DataFrameModel
Base schema for scenario dataframe as used when creating a model.
Structure:
- Index: datetime (time series)
- Columns:
- load_
check_datetime_index
classmethod
check_datetime_index(df: DataFrame)
Ensure index is datetime-like or timedelta-like.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
22 23 24 25 26 | |
check_required_columns
classmethod
check_required_columns(df: DataFrame)
Ensure shared required columns are present.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
28 29 30 31 32 33 34 35 36 37 38 | |
check_load_columns
classmethod
check_load_columns(df: DataFrame)
Ensure load columns are in the correct format and contain numeric values.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
40 41 42 43 44 45 46 47 48 | |
check_numeric_columns
classmethod
check_numeric_columns(df: DataFrame)
Ensure ambient temperature column contains numeric values.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
50 51 52 53 54 55 56 57 58 | |
check_no_missing_values
classmethod
check_no_missing_values(df: DataFrame)
Ensure there are no missing values in the scenario dataframe.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
60 61 62 63 64 65 66 | |
ScenarioSchemaAir
Bases: AbstractScenarioSchema
Air scenario schema extending the base scenario schema.
This schema currently does not add extra checks beyond AbstractScenarioSchema, but exists to allow air-specific evolution in the future.
ScenarioSchemaSoil
Bases: AbstractScenarioSchema
Soil scenario schema extending the base scenario with required soil properties.
check_required_soil_columns
classmethod
check_required_soil_columns(df: DataFrame)
Ensure soil-specific required columns are present.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
80 81 82 83 84 85 86 87 | |
check_numeric_soil_columns
classmethod
check_numeric_soil_columns(df: DataFrame)
Ensure soil thermal columns contain numeric values.
Source code in cable_thermal_model/model/schemas/model_input_schemas.py
89 90 91 92 93 94 95 96 97 | |