NOAA-OWP / t-route

Tree based hydrologic and hydraulic routing
Other
44 stars 50 forks source link

Configuration validation fails in `strict_mode` when files that aren't needed at runtime are specified #799

Closed aaraney closed 4 months ago

aaraney commented 4 months ago

Configuration validation fails in strict mode in cases when a user wouldn't expect it to. I think this is best illustrated by example:

compute_parameters:
  data_assimilation_parameters:
      reservoir_rfc_da:
        reservoir_rfc_forecasts: false
        # ...
        reservoir_rfc_forecasts_time_series_path: rfc_timeseries/ # <- this is the issue

Validation in strict mode would fail if rfc_timeseries/ does not exist. Given that reservoir_rfc_forecasts is false I wouldn't expect that t-route would care that a file or directory does not exist if it is not going to be used. This was not a use case I was thinking about when I wrote configuration strict mode, but I do think its something that troute.config should support.

Ill start looking into potential avenues of how to address this.