pyiron / pyiron_workflow

Graph-and-node based workflows
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

[patch] Scrape macro output #281

Closed liamhuber closed 2 months ago

liamhuber commented 2 months ago

Just like Function nodes do, but additionally implicitly left-strips the first argument macro. (or self. or wf. or whatever the graph_creator's first self-like argument is called)

E.g. we now allow

from pyiron_workflow import Workflow

@Workflow.wrap.as_macro_node()
def Example(self, x):
    self.some_functionality = Workflow.create.standard.UserInput(x)
    return self.some_functionality

Example.preview_output_channels()
>>> {'some_functionality': None}
github-actions[bot] commented 2 months ago

Binder :point_left: Launch a binder notebook on branch _pyiron/pyiron_workflow/scrape_macrooutput

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: +0.27% (target: -1.00%) :white_check_mark: 100.00%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (61eac44116687614a5093da3ca1fcdc48ce65052) | 3431 | 2990 | 87.15% | | | Head commit (e20199f238475297544ca0623e8cbfa9612e1c81) | 3449 (+18) | 3015 (+25) | 87.42% (**+0.27%**) | **Coverage variation** is the difference between the coverage for the head and common ancestor commits of the pull request branch: ` - `
Diff coverage details | | Coverable lines | Covered lines | Diff coverage | | ------------- | ------------- | ------------- | ------------- | | Pull request (#281) | 20 | 20 | **100.00%** | **Diff coverage** is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: `/ * 100%`

See your quality gate settings    Change summary preferences

You may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation