Skip to content

Comments

Parsing recipes#108

Merged
liamhuber merged 180 commits intomainfrom
parsing_recipes
Feb 20, 2026
Merged

Parsing recipes#108
liamhuber merged 180 commits intomainfrom
parsing_recipes

Conversation

@liamhuber
Copy link
Member

Like #75, this is a placeholder PR to aggregate the individual PRs to get a parser and universal decorator for getting a WorkflowNode recipe from a (subset of) python functions.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/flowrep/parsing_recipes

@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.93%. Comparing base (0496cb1) to head (3840e59).
⚠️ Report is 181 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #108      +/-   ##
==========================================
+ Coverage   98.42%   98.93%   +0.51%     
==========================================
  Files          16       27      +11     
  Lines        1266     1882     +616     
==========================================
+ Hits         1246     1862     +616     
  Misses         20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Break apart `atomic_parser`
For the helper file. It was already not just ast.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Refactor: extract and move methods
Restricted to nested workflow and atomic nodes -- no flow controls yet

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Base automatically changed from more_models to main February 3, 2026 18:54
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
For the other should-be-impossible error branch

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
So that the two label-related functions are adjacent

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
They were executing fine in pycharm and the CI, but this helps with some other dev environments

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
To include all four flow controls

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Into a subdirectory, so they don't overwhelm other integration tests visually

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
It's only used here

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
For dealing with conditional cases is while, if, and try

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
By introducing a named data structure

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
With a simple alias and comment

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
So method name documents intent

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@liamhuber liamhuber marked this pull request as ready for review February 20, 2026 00:16
@liamhuber
Copy link
Member Author

Alright, I'm happy enough with this for now. All flow control structures in the pydantic models can now be parsed from constrained python. Critical feedback is welcome @samwaseda (and @XzzX and others), but I won't insist on or wait for review; we can patch and change things as we go.

A pedagogical notebook or two is absolutely needed, but I want to address some core mismatches between the pydantic models and the nested dictionaries (namely #130, #131, and #146) before I bother with that.

The python interpreter itself won't allow us to have a bare `try:`. Since we currently forbid `else:` and `finally:`, having an `except:` is all that is left available. If, at some point, we _do_ except the other clauses, we would anyhow not need to demand an except clause. So the check is redundant.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
That is not actually looped as input, but is nonetheless updated at each cycle.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
This was referenced Feb 20, 2026
@liamhuber liamhuber linked an issue Feb 20, 2026 that may be closed by this pull request
@liamhuber liamhuber merged commit ddeba61 into main Feb 20, 2026
20 checks passed
@liamhuber liamhuber deleted the parsing_recipes branch February 20, 2026 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants