hydroflows.methods.dummy.run_dummy_event#

“Dummy methods for testing and user documentation.

pydantic model hydroflows.methods.dummy.run_dummy_event.RunDummyEventInput[source]#

Input files for the RunDummyEvent 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 model_exe: Path | None = None#

Model executable, required if run_method is ‘exe’

field settings_toml: Path [Required]#

Model sttings 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.run_dummy_event.RunDummyEventOutput[source]#

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

Model output netcdf 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.run_dummy_event.RunDummyEventParams[source]#

Parameters for the RunDummyEvent 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_name: str [Required]#

The event name

field output_dir: Path [Required]#

The output directory

field run_method: Literal['exe', 'docker'] = 'exe'#

How to run the model

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.run_dummy_event.RunDummyEvent(event_csv: Path, settings_toml: Path, output_dir: Path, event_name: str | None = None, model_exe: Path | None = None, **params)[source]#

Run a dummy event.

Parameters:
  • event_csv (Path) – Event csv file

  • settings_toml (Path) – Model settings file

  • output_dir (Path) – Output directory

  • event_name (str, optional) – The event name, by default None

  • model_exe (Path, optional) – Model executable, required if run_method is ‘exe’, by default None

  • **params – Additional parameters to pass to the RunDummyEvent Params instance. See RunDummyEventParams.