-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
concat_models #49
concat_models #49
Conversation
@visr, some things to consider solving in the Model.merge_model method ( Ribasim-NL/src/ribasim_nl/ribasim_nl/concat.py Lines 56 to 61 in 239d638
|
@d2hydro nice that you are already using model merging. However, why do you need the above index modifications? In Ribasim python we don't use those indices anywhere |
@SouthEndMusic, I read and merge a list of models iteratively. Issues arise while writing the merged model to filepath. Two issues arise:
You can reproduce the above behavior with these two models: https://we.tl/t-sscLwd3Vhw |
Thanks for the response. I fixed the second point (in an upcoming commit), but I'm unsure about the first. Since Deltares/Ribasim#794 extra columns are prefixed with |
@d2hydro the first problem will not be fixed in my PR, I made a new issue: Deltares/Ribasim#934. |
I can't replicate this validation error on writing. Note that with the new PR, the node_id will be renamed meta_node_id automatically. |
@SouthEndMusic and @evetion, that is all OK, and I am looking forward to the meta_{colomn_name} implementation. Is it possible to merge #ribasim:914 and release it to a higher ribasim-version asap? I want to update the toml in this branch before merging to main so that the concat-function works. |
We're working on that now, I expect a new release tomorrow. |
@d2hydro I can now merge and write your models without problems on the model1 = ribasim.Model.read(datadir / "HHNK_Ribasim/HHNK.toml")
model2 = ribasim.Model.read(datadir / "rijkswateren/ribasim.toml")
model1.smart_merge(model2)
model1.write(datadir / "merged/ribasim.toml") |
@SouthEndMusic and @evetion, in Ribasim-NL/src/ribasim_nl/ribasim_nl/concat.py Lines 22 to 27 in 3d53e58
I don't know if you want to fix this, but this will give an Exception:
|
fixes #48
Works with: https://github.com/Deltares/Ribasim/blob/e88ad64d225dd1db58847c05e7c2e2c203c325c7/python/ribasim/tests/test_model.py#L150