pytuflow.ArrConfig.from_files#
- classmethod ArrConfig.from_files(paths)#
Loads a batch of JSON config files where only
sitemay differ between files - every other setting is taken from the first config file (the “primary”/base config) regardless of what any later file contains, matching the legacy script’s multi-catchment (catch_no) batching: one shared set of run options (events, losses, climate change, temporal patterns, output, etc), applied across multiple catchments/sites.Every file after the first must still contain a
sitesection, but any other top-level key it contains is ignored (with a warning) rather than being merged in or validated against the base config - this keeps the override rule simple and unambiguous (silently-differing settings between “batched” sites would otherwise be easy to miss).- Parameters:
paths (Sequence[PathLike]) – Paths to the JSON config files. The first file is the primary config.
- Returns:
One config per file, in the same order as
paths.- Return type:
list[ArrConfig]
- Raises:
ArrConfigError – If no paths are given, a file is missing or invalid, or a later file has no
sitesection.