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

Mark table columns as optional as described in the docs #1394

Open
Hofer-Julian opened this issue Apr 16, 2024 · 0 comments
Open

Mark table columns as optional as described in the docs #1394

Hofer-Julian opened this issue Apr 16, 2024 · 0 comments
Labels
core Issues related to the computational core in Julia python Relates to one of the Ribasim python packages tech-debt Improvements related to technical debt

Comments

@Hofer-Julian
Copy link
Contributor

Looking at the Ribasim docs the optional table columns are well documented.

These docs don't really reflect what is happening on the Ribasim Python side.

Expectation

If a column is non-optional and it isn't set, Ribasim Python should error with a clear error message.
The information shouldn't be duplicated too often. Ideally it would be shared between docs, Ribasim Core and Ribasim Python, but at least it should be shared between Ribasim Python and Core.

Reality

  • Ribasim Python floats and string are nullable and therefore optional if Core allow missing for them
    max_flow_rate::Union{Missing, Float64}
  • Ribasim Python integers are always optional with default value 0, because node_id needs to have a default because of Ribasim Python implementation details
    {{ f[1] }}: {{ f[2] }} = pa.Field(nullable={{ f[3] }}, default=0)

Options

@Hofer-Julian Hofer-Julian added python Relates to one of the Ribasim python packages core Issues related to the computational core in Julia tech-debt Improvements related to technical debt labels Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues related to the computational core in Julia python Relates to one of the Ribasim python packages tech-debt Improvements related to technical debt
Projects
Status: To do
Development

No branches or pull requests

1 participant