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

Parse output labels automatically #770

Merged
merged 68 commits into from
Aug 2, 2023
Merged

Parse output labels automatically #770

merged 68 commits into from
Aug 2, 2023

Conversation

liamhuber
Copy link
Member

@liamhuber liamhuber commented Jul 13, 2023

Closes #717

First, this makes it easier to define new nodes, since there will just be less to write. Second, this will let us free up *args in Function(Node) to be used for providing input data (as discussed in #769). We'll still allow explicitly providing different output labels, but this becomes an optional kwarg instead of mandatory args.

Best-practice becomes to give good variable names to all the return values in your wrapped function, but Sam's parser is super generic and you'll still be able to access weirdly-named nodes with ["node name"] even if they're not dot-accessible. (At least that's the plan!)

@liamhuber liamhuber added the .workflow Pertaining to the workflow submodule label Jul 13, 2023
@liamhuber liamhuber requested a review from samwaseda July 13, 2023 20:11
@liamhuber liamhuber self-assigned this Jul 13, 2023
@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_contrib/parse_output_labels

@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2023

Pull Request Test Coverage Report for Build 5578967633

  • 83 of 83 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.4%) to 13.352%

Totals Coverage Status
Change from base Build 5578949334: 0.4%
Covered Lines: 1940
Relevant Lines: 14530

💛 - Coveralls

@liamhuber liamhuber marked this pull request as ready for review July 14, 2023 21:20
@liamhuber liamhuber changed the title WIP: Parse output labels automatically Parse output labels automatically Jul 14, 2023
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

liamhuber added 18 commits July 18, 2023 11:17
Namely, on_run should be a property returning a callable
They are not implemented and working yet, so at least fail cleanly!
And downstream stuff like `update` and thus `__call__`. This was requested by Joerg and now makes things really start to feel like regular python
We may wish to later make Macro's slow, but for Workflows, since the IO is just routing through to the owned nodes, input updates are _anyhow_ most of the time re-running things, so it's a sensible default IMO
Return output when calling `run`
@liamhuber liamhuber added format_black Invoke a black formatting commit and removed format_black Invoke a black formatting commit labels Aug 2, 2023
@liamhuber liamhuber merged commit 8dd5251 into main Aug 2, 2023
@delete-merged-branch delete-merged-branch bot deleted the parse_output_labels branch August 2, 2023 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black Invoke a black formatting commit .workflow Pertaining to the workflow submodule
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Workflow: Automatic parsing of outputs
3 participants