hydroflows.methods.catalog.merge_catalogs#

Merge multiple data catalogs into one method.

class hydroflows.methods.catalog.merge_catalogs.MergeCatalogs(catalog_path1: Path, catalog_path2: Path, merged_catalog_path: Path, **catalog_paths: dict[str, Path])[source]#

Merge multiple data catalogs into one.

Parameters:
  • catalog_path1 (Path) – The path to the first data catalog file to be merged.

  • catalog_path2 (Path) – The path to the second data catalog file to be merged.

  • merged_catalog_path (Path) – The path to the (output) merged data catalog file.

  • catalog_paths (Path, Optional) – Additional catalog files to merge. For example catalog_path3=Path(“path/to/catalog3”), catalog_path4=Path(“path/to/catalog4”), etc.

pydantic model hydroflows.methods.catalog.merge_catalogs.Input[source]#

Input parameters for the MergeCatalogs method.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Fields:
field catalog_path1: Path [Required]#

The path to the first data catalog file to be merged.

field catalog_path2: Path [Required]#

The path to the second data catalog file to be merged.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.

pydantic model hydroflows.methods.catalog.merge_catalogs.Output[source]#

Output parameters for the MergeCatalogs method.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Fields:
field merged_catalog_path: Path [Required]#

The file path to the merged data catalog.

model_post_init(context: Any, /) None#

This function is meant to behave like a BaseModel method to initialise private attributes.

It takes context as an argument since that’s what pydantic-core passes when calling it.

Parameters:
  • self – The BaseModel instance.

  • context – The context.