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

Fast nodes #646

Merged
merged 19 commits into from
May 1, 2023
Merged

Fast nodes #646

merged 19 commits into from
May 1, 2023

Conversation

liamhuber
Copy link
Member

Introduces two new node classes following our discussion here:

  • FastNode: a Node that has default values for all input and is hard-coded to update automatically and at instantiation
  • SingleValueNode: a FastNode that has exactly one output channel. Attribute and item access falls back to looking at this output value.

This gives some quality of life improvements for working with these really simple nodes in the notebook. E.g. we can now do the following and get a sensible result:

from pyiron_contrib.workflow.nodes import bulk_structure
struct = bulk_structure()
type(struct)
>>> abc.BulkStructure
struct.plot3d()
# Falls back to looking at the output structure to find the method, 
# and successfully returns the NGLWidget

@delete-merged-branch delete-merged-branch bot deleted the branch main May 1, 2023 18:32
@liamhuber liamhuber changed the base branch from single_import to main May 1, 2023 18:35
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@coveralls
Copy link

coveralls commented May 1, 2023

Pull Request Test Coverage Report for Build 4854021870

  • 37 of 50 (74.0%) changed or added relevant lines in 3 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 12.735%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pyiron_contrib/workflow/node.py 34 39 87.18%
pyiron_contrib/workflow/nodes.py 0 8 0.0%
Files with Coverage Reduction New Missed Lines %
pyiron_contrib/workflow/nodes.py 1 0%
Totals Coverage Status
Change from base Build 4853782170: 0.2%
Covered Lines: 1561
Relevant Lines: 12258

💛 - Coveralls

liamhuber added 2 commits May 1, 2023 12:03
I forgot to update them after making the base Node class "slow"
@liamhuber liamhuber merged commit 419f480 into main May 1, 2023
@delete-merged-branch delete-merged-branch bot deleted the fast_nodes branch May 1, 2023 19:13
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.

2 participants