Skip to content

Propagate version info constraints#162

Merged
liamhuber merged 10 commits intomainfrom
propagate-constraints
Feb 27, 2026
Merged

Propagate version info constraints#162
liamhuber merged 10 commits intomainfrom
propagate-constraints

Conversation

@liamhuber
Copy link
Member

@liamhuber liamhuber commented Feb 25, 2026

While constraints were there to demand that workflows or atomic nodes had versions, or weren't in __main__, or weren't <locals>, these were not actually passed down to the on-the-fly parsing of atomic nodes encountered during the workflow parsing. Now they are.

Needs pyiron/pyiron_snippets#77 though, and I'm not 100% convinced of the VersionConstraints vs introducing some sort of parser class, so I'm going to leave this as a draft. The propagation is key to proper version info validation, but the actual call signatures might change a bit here.

Update: Ok, so I force pushed over the last bit now it depends on pyiron/pyiron_snippets#78 instead, but this is a net simplification. Overall I think this simplified the code a little by grouping the parsing state into a single argument to pass around, and squashes (and now tests for) the critical bug of passing the version parsing state deeply into child nodes.

To not fake parsing version info, since the validation is now delayed until the parsing is finished. To reach the validation errors, we need to test things that actually parse!

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

Binder 👈 Launch a binder notebook on branch pyiron/flowrep/propagate-constraints

Through to children as we walk the state.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@liamhuber liamhuber force-pushed the propagate-constraints branch from 2414536 to 05797df Compare February 26, 2026 03:58
To reduce the number of arguments we're passing around to create fresh body walkers

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Streamline away the other protocols by putting a `fork` method right on the walker

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
So the walker comes first. This makes the parsers look more like methods of `WorkflowParser`, which they rightly are, we're just breaking them out (and introducing a protocol to do it) to keep the files better focused

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
To be narrower and more demanding. YAGNI.

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
To better align protocol and implementation order of appearance (the implementation `visit` is inherited, but now the `visit_*` methods appear in the "right" spot

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
For similarity with other fork

Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
Signed-off-by: liamhuber <liamhuber@greyhavensolutions.com>
@liamhuber liamhuber marked this pull request as ready for review February 27, 2026 04:03
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (f8eecff) to head (e565b42).
⚠️ Report is 11 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #162   +/-   ##
=======================================
  Coverage   98.94%   98.95%           
=======================================
  Files          27       27           
  Lines        1898     1908   +10     
=======================================
+ Hits         1878     1888   +10     
  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.

@liamhuber liamhuber merged commit c277da5 into main Feb 27, 2026
20 checks passed
@liamhuber liamhuber deleted the propagate-constraints branch February 27, 2026 04:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant