veriflow.datasinks.base#

Module with the base class that all datasinks should inherit from.

Classes

BaseDatasink(config)

Class to inherit from, defines the required methods and attributes.

BaseDatasinkConfig(*, export_adapter[, ...])

Base config for a datasink config.

class veriflow.datasinks.base.BaseDatasink(config)[source]#

Class to inherit from, defines the required methods and attributes.

Parameters:

config (BaseDatasinkConfig)

kind: str = ''#
config_class#

alias of BaseDatasinkConfig

abstractmethod write_data(data)[source]#

Write output data for one verification pair to the datasource.

Parameters:

data (DataTree)

Return type:

None

classmethod from_config(raw_config)#

Initialize class from config dict.

Parameters:

raw_config (dict[str, Any])

Return type:

Self

class veriflow.datasinks.base.BaseDatasinkConfig(*, export_adapter, force_overwrite=True, include_output=True, include_aligned_input_data=True, include_input_data=False, crs=None, general, **extra_data)[source]#

Base config for a datasink config.

Specific config definitions should inherit from this base class.

Parameters:
  • export_adapter (str)

  • force_overwrite (bool)

  • include_output (bool)

  • include_aligned_input_data (bool)

  • include_input_data (bool)

  • crs (Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A coordinate reference system as a string compatible with pyproj.CRS.from_string, i.e. a PROJ string, a CRS WKT string, or an authority string such as 'EPSG:4326'. The string is not parsed at configuration time so that pyproj remains an optional dependency; it is only parsed when an actual coordinate transformation is required.", metadata=[MinLen(min_length=1)])] | None)

  • general (Annotated[GeneralInfoConfig, SkipJsonSchema()])

  • extra_data (Any)

export_adapter: str#
force_overwrite: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Whether to force overwrite existing output files.')]#
include_output: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Whether to include output in the output.')]#
include_aligned_input_data: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Whether to include aligned input data in the output (per verification pair). See for reference: https://deltares.github.io/veriflow/api/_generated/veriflow.datatree.datatree.html')]#
include_input_data: Annotated[bool, FieldInfo(annotation=NoneType, required=True, description='Whether to include the input data in the output. This is the raw and validated input data as provided by the datasource(s).See for reference: https://deltares.github.io/veriflow/api/_generated/veriflow.datatree.datatree.html')]#
crs: Annotated[Annotated[str, FieldInfo(annotation=NoneType, required=True, description="A coordinate reference system as a string compatible with pyproj.CRS.from_string, i.e. a PROJ string, a CRS WKT string, or an authority string such as 'EPSG:4326'. The string is not parsed at configuration time so that pyproj remains an optional dependency; it is only parsed when an actual coordinate transformation is required.", metadata=[MinLen(min_length=1)])] | None, FieldInfo(annotation=NoneType, required=False, default=None, description="Optional coordinate reference system for the output. When set, the results' coordinates are reprojected to this CRS before writing.See for reference: https://deltares.github.io/veriflow/api/_generated/veriflow.datatree.datatree.html")]#
general: Annotated[GeneralInfoConfig, SkipJsonSchema()]#
property verification_period: TimePeriod#