Skip to content

Conversation

@liamhuber
Copy link
Member

The node creator now allows you to register entire packages instead of just a single module. Access is then chained with the same semantic paths as the package.

Each non-package submodule is required to have a nodes: list[Node] attribute inside it; I'm open to changing that in the future, e.g. to simply look in each module for such an attribute (or maybe something more specific like pyiron_workflow_nodes) and pass silently if it's not there. But in the meantime this gives us sub-modules with the minimal change to the API promises/expectations.

E.g. now:

from pyiron_workflow import Workflow

Workflow.register("atomistics", "pyiron_workflow.node_library.atomistics")

wf = Workflow("ev_curve")

wf.structure = wf.create.atomistics.task.Bulk("Al")
wf.calculator = wf.create.atomistics.calculator.Emt()
...

closes #104.

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions
Copy link

Binder 👈 Launch a binder notebook on branch pyiron/pyiron_workflow/nested_packages

@codacy-production
Copy link

codacy-production bot commented Dec 11, 2023

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.05% (target: -1.00%) 95.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (e67b986) 2440 2072 84.92%
Head commit (a55eda4) 2448 (+8) 2080 (+8) 84.97% (+0.05%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#133) 20 19 95.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: <covered lines added or modified>/<coverable lines 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

@coveralls
Copy link

coveralls commented Dec 11, 2023

Pull Request Test Coverage Report for Build 7173710830

  • 24 of 24 (100.0%) changed or added relevant lines in 1 file are covered.
  • 12 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 89.916%

Files with Coverage Reduction New Missed Lines %
interfaces.py 12 85.45%
Totals Coverage Status
Change from base Build 7153993170: 0.04%
Covered Lines: 4405
Relevant Lines: 4899

💛 - Coveralls

@liamhuber liamhuber added the format_black trigger the Black formatting bot label Dec 11, 2023
@liamhuber liamhuber merged commit 92c849c into main Dec 11, 2023
@liamhuber liamhuber deleted the nested_packages branch December 11, 2023 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

format_black trigger the Black formatting bot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node creator needs to allow for sub-domains

4 participants