Skip to content
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

Model.read creates empty node tables for each node type #1278

Open
visr opened this issue Mar 15, 2024 · 0 comments
Open

Model.read creates empty node tables for each node type #1278

visr opened this issue Mar 15, 2024 · 0 comments
Labels
python Relates to one of the Ribasim python packages

Comments

@visr
Copy link
Member

visr commented Mar 15, 2024

Preferably these node tables are kept None, such that it is clear that they are not present, e.g. in _nodes() from #1270. With #1279 we now work around this by not only checking node.df is None but additionally attr.node.df.empty.

In #1276 I came across this issue and try to adapt the filter function, which caused several other issues.

With the workaround the issue itself is not so pressing, though it is worth seeing if we fully understand and perhaps can simplify some of the validation logic causing the unwanted side effects seen in #1276.

@visr visr added python Relates to one of the Ribasim python packages improvement labels Mar 15, 2024
@github-project-automation github-project-automation bot moved this to To do in Ribasim Mar 15, 2024
Huite pushed a commit that referenced this issue Mar 18, 2024
This supersedes #1276 by working around #1278 and still enabling the
round tripping tests.

Also simplifies `__assert_equal` a bit and stimulates
`Model.read(toml_path)` usage over `Model(filepath=toml_path)`.
@visr visr removed the improvement label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Relates to one of the Ribasim python packages
Projects
Status: To do
Development

No branches or pull requests

1 participant