hydromt_fiat.components.ConfigComponent#

class hydromt_fiat.components.ConfigComponent(model: Model, *, filename: str = 'settings.toml')[source]#

Custom config component for FIAT models.

Parameters:
  • model (Model) – HydroMT model instance.

  • filename (str, optional) – A path relative to the root where the configuration file will be read and written if user does not provide a path themselves. By default ‘settings.toml’.

Attributes

data

Model config values.

data_catalog

Return the data catalog of the model this component is associated with.

dir

The absolute directory of configurations file.

filename

Filename of the config file.

model

Return the model object this component is associated with.

root

Return the root of the model this component is associated with.

Methods

get(key[, fallback, abs_path])

Get a config value at key(s).

read([filename])

Read the FIAT model config file.

set(key, value)

Update the config dictionary at key(s) with values.

test_equal(other)

Test if two components are equal.

write([filename])

Write the FIAT model config file.