hydromt_fiat.components.ConfigComponent#
- class hydromt_fiat.components.ConfigComponent(model: Model, *, filename: str = 'settings.toml')[source]#
Config component.
Container for all the settings of a Delft-FIAT model.
- Parameters:
model (Model) – HydroMT model instance (FIATModel).
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
Model config values.
data_catalogReturn the data catalog of the model this component is associated with.
dirThe absolute directory of configurations file.
filenameFilename of the config file.
modelReturn the model object this component is associated with.
name_in_modelFind the name of the component in the parent model components.
rootReturn the root of the model this component is associated with.
Methods
clear()Clear the config data.
close()Clean up all open datasets.
finish_write()Finish the write functionality after cleanup was called for all components in the model.
get(key[, fallback, abs_path])Get a configurations value.
read([filename])Read the FIAT model config file.
set(key, value)Set an entry in the configurations.
test_equal(other)Test if two components are equal.
write([filename])Write the FIAT model config file.