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

Re-evaluate code-generation in Ribasim Python #1077

Closed
Hofer-Julian opened this issue Feb 5, 2024 · 2 comments · Fixed by #1096
Closed

Re-evaluate code-generation in Ribasim Python #1077

Hofer-Julian opened this issue Feb 5, 2024 · 2 comments · Fixed by #1096
Labels
python Relates to one of the Ribasim python packages

Comments

@Hofer-Julian
Copy link
Contributor

Hofer-Julian commented Feb 5, 2024

What
We currently generate code from Julia core for Ribasim Python.

Why
The code-generation in Ribasim Python is convenient for developers, but complicated to understand.
We also see problems that we can trace back to it.

How
We should take a closer look and see if we can improve/simplify it.
There are two angles to it:

  • generate pandera models directly instead of going via pydantic
  • remove code generation
@Hofer-Julian Hofer-Julian added the python Relates to one of the Ribasim python packages label Feb 5, 2024
@github-project-automation github-project-automation bot moved this to To do in Ribasim Feb 5, 2024
@Hofer-Julian
Copy link
Contributor Author

Summary of discussions:

With @deltamarnix:
There are two good options to generate Python files with Pandera classes:

  • From within Julia with OteraEnginge.jl
  • Keeping the JSON Schema, and generating with Python and Jinja

With @visr:

  • Removing JSON Schema generating might simplify code quite a bit (still to investigate)
  • On the other hand, if we keep the JSON Schema we could generate Table docs within Quarto&Python instead of writing them by hand as we do now

@deltamarnix
Copy link
Contributor

I have rewritten the code generator, we now have complete control of the code that is being generated via OteraEngine. This will also give us the opportunity to retrieve other data from Julia, like the sorting order. #1096

@deltamarnix deltamarnix removed their assignment Feb 9, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Ribasim Feb 9, 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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants