pyiron / pyiron_workflow

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

change style depending on the state #460

Closed samwaseda closed 2 months ago

samwaseda commented 2 months ago

In the draw method I find it extremely difficult to figure out which (especially input) parameters still have to be defined, and I'm sure I'm not the only one feeling this way, but I'm not really sure what would be the best way to distinguish different states. In this example, only Add__y has no color, because it's not connected and no value is assigned:

from pyiron_workflow import Workflow, function_node

def add(x, y):
    output = x + y
    return output

def mul(x, y=2):
    output = x * y
    return output

wf = Workflow("draw")
wf.Add = function_node(add, x=1)
wf.Mul = function_node(mul, x=wf.Add)

wf.draw()
Screenshot 2024-09-19 at 13 21 45

I find it pretty nice because you can immediately see that Add__y has to get a value or be connected. But this example is just a suggestion, which I don't consider to be the best possible product. So let me know what you think. @liamhuber @JNmpi @Tara-Lakshmipathy.

github-actions[bot] commented 2 months ago

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

codacy-production[bot] commented 2 months ago

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
:white_check_mark: -0.01% (target: -1.00%) :white_check_mark: 88.89%
Coverage variation details | | Coverable lines | Covered lines | Coverage | | ------------- | ------------- | ------------- | ------------- | | Common ancestor commit (c33c9e1e9503fba6b1edb44df289eff10545cd44) | 3244 | 2961 | 91.28% | | | Head commit (c62bdb9d043dfc3b5e3103d09194dece388f5d0a) | 3253 (+9) | 2969 (+8) | 91.27% (**-0.01%**) | **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 (#460) | 9 | 8 | **88.89%** | **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

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

coveralls commented 2 months ago

Pull Request Test Coverage Report for Build 10939959740

Details


Files with Coverage Reduction New Missed Lines %
draw.py 14 92.45%
<!-- Total: 14 -->
Totals Coverage Status
Change from base Build 10927133806: -0.006%
Covered Lines: 2969
Relevant Lines: 3253

💛 - Coveralls