hydroflows.methods.dummy.prepare_dummy_events#

“Dummy methods for testing and user documentation.

pydantic model hydroflows.methods.dummy.prepare_dummy_events.PrepareDummyEventsInput[source]#

Input files for the PrepareDummyEvents 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 timeseries_csv: Path [Required]#

Input timeseirse csv file

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.dummy.prepare_dummy_events.PrepareDummyEventsOutput[source]#

Output files for the PrepareDummyEvents 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 event_csv: Path [Required]#

Event csv file

field event_set_yaml: Path [Required]#

Overview of all events

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.dummy.prepare_dummy_events.PrepareDummyEventsParams[source]#

Parameters for the PrepareDummyEvents 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 index_col: int = 0#

Index column

field output_dir: Path [Required]#

Output directory

field rps: <lambda>, json_schema_input_type=PydanticUndefined)] = [1, 10, 100, 1000]#

Return periods [years]

field wildcard: str = 'return_period'#

Wildcard for expanding

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.

class hydroflows.methods.dummy.prepare_dummy_events.PrepareDummyEvents(timeseries_csv: Path, output_dir: Path, rps: list[int] = [1, 10, 100, 1000], wildcard: str = 'return_period', **params)[source]#

Prepare events for some model.

Parameters:
  • timeseries_csv (Path) – Input timeseries csv file

  • output_dir (Path) – Output directory

  • rps (List[int]) – Return periods [years]. This is used to expand the outputs and create a file for each return period.

  • wildcard (str) – Wildcard name used to expand the outputs over rps.

  • **params – Additional parameters for the method, see PrepareDummyEventsParams.

Create a new expand method instance.