veriflow.configuration.base#
The base configuration definitions for the veriflow pipeline.
Classes
|
General configuration information that is shared across the pipeline. |
|
Mapping from internal IDs to external IDs per data source. |
|
Config for mapping external ids to their internal definition. |
- class veriflow.configuration.base.GeneralInfoConfig(*, verification_period, verification_pairs, lead_times=None, cache=None)[source]#
General configuration information that is shared across the pipeline.
- Parameters:
verification_period (VerificationPeriod)
verification_pairs (list[VerificationPair])
lead_times (LeadTimes | None)
cache (ZarrCacheConfig | None)
- verification_period: Annotated[VerificationPeriod, FieldInfo(annotation=NoneType, required=True, description='The start and end of the verification period.')]#
- verification_pairs: Annotated[list[VerificationPair], FieldInfo(annotation=NoneType, required=True, description='Specify pairs for computation of verification metrics. This allows you to verify multiple variables and multiple sources. For example, by specifying two pairs: verify simulated discharge for ModelA and ModelB against observed discharge fromsource Observed.')]#
- lead_times: Annotated[LeadTimes | None, FieldInfo(annotation=NoneType, required=False, default='A set of lead times for which to evaluate of the verification scores. A lead time is the timedelta between the forecast reference time of a forecast (t0, analysis_time, initialization time) and the valid time (time, observed time) and is also known as: lead time or forecast horizon)')]#
- cache: Annotated[ZarrCacheConfig | None, FieldInfo(annotation=NoneType, required=True, description='Veriflow has built-in support for caching data in a local or remote zarr archive store. This allows you to reuse data across multiple runs of the pipeline, which can speed up execution. See the docs for more details and configuration options: https://deltares.github.io/veriflow/')]#
- get_verification_pair(pair_id)[source]#
Get one verification_pair by its id.
- Parameters:
pair_id (str)
- Return type:
- property verification_period_on_time: TimePeriod#
The verification period along the time dimension.
- property verification_period_on_frt: TimePeriod#
The verification period along the forecast reference time dimension.
- class veriflow.configuration.base.IdMap(root=PydanticUndefined)[source]#
Mapping from internal IDs to external IDs per data source.
- Parameters:
root (RootModelRootType)
- get_external_to_internal_mapping(source)[source]#
Return external → internal mapping for this data source.
- rename_external_to_internal(external_ids, source)[source]#
Apply the mapping to a set of external IDs for a given source.
Returns the corresponding internal IDs.
- classmethod model_construct(root, _fields_set=None)#
Create a new model using the provided root object and update fields set.
- root#
- class veriflow.configuration.base.IdMappingConfig(*, variable=None, station=None)[source]#
Config for mapping external ids to their internal definition.
- variable: Annotated[IdMap | None, FieldInfo(annotation=NoneType, required=True, description='Mapping of internal to external definitions per source as a dictionary. The key corresponds to the internal definition and the value is another dictionary with keys corresponding to the source and the value to the external definition. ')]#
- station: Annotated[IdMap | None, FieldInfo(annotation=NoneType, required=True, description='Mapping of internal to external definitions per source as a dictionary. The key corresponds to the internal definition and the value is another dictionary with keys corresponding to the source and the value to the external definition. ')]#