Wflow.jl icon indicating copy to clipboard operation
Wflow.jl copied to clipboard

consider using Configurations.jl for Config handling

Open visr opened this issue 2 years ago • 6 comments

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

visr avatar Feb 17 '23 12:02 visr

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

verseve avatar Feb 20 '23 08:02 verseve

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

evetion avatar Feb 20 '23 15:02 evetion

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

verseve avatar Apr 03 '23 07:04 verseve

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).

verseve avatar Jun 07 '23 06:06 verseve

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

evetion avatar Jun 07 '23 10:06 evetion

see main issue #351

JoostBuitink avatar Apr 18 '24 07:04 JoostBuitink