Deltares / Wflow.jl

Hydrological modeling
https://deltares.github.io/Wflow.jl/dev/
MIT License
115 stars 19 forks source link

consider using Configurations.jl for Config handling #243

Open visr opened 1 year ago

visr commented 1 year ago

In https://github.com/Deltares/Ribasim.jl/pull/66 @evetion improved the TOML config handling, which includes some validation. It is worth considersing using a similar approach in Wflow. This could simplify code and catch user errors earlier.

Currently we create our own struct, and overload a bunch of functions to have things like config.option work:

https://github.com/Deltares/Wflow.jl/blob/v0.6.2/src/io.jl#L36-L39

That could be turned into something like this:

https://github.com/Deltares/Ribasim.jl/blob/3c8f9c48fae613e1e45d3dfffc97e861a95324a6/src/config.jl#L32-L59

verseve commented 1 year ago

Thanks for sharing! Seems indeed quite nice, we will look into this.

evetion commented 1 year ago

If it has no priority, I can look into it in a month or two.

verseve commented 1 year ago

Indeed this issue has no priority, so great if you can look into this!

verseve commented 1 year ago

Hi @evetion, do you have time to look into this? If not, @JoostBuitink has interest to look into this issue (with some guidance/help from your side).

evetion commented 1 year ago

@JoostBuitink Feel free to pick it up, let me know if there are questions.

JoostBuitink commented 5 months ago

see main issue #351