• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pyiron / pyiron_workflow / 8403845120

23 Mar 2024 06:55PM UTC coverage: 91.766% (-0.03%) from 91.796%
8403845120

push

github

web-flow
[minor] Semantics (#244)

* Introduce a component-based mixin for handling semantics

Parentage exists, but there is not any explicit tracking of children and this provides no guarantees that children are unique in their scope.

* Rebase Node onto HasSemantics

* Add docstring

* Add children

* Reformulate as Is instead of Has

Has was causing too many problems with storage, unfortunately.

* Add a strict naming flag

* Pull responsibility for adding and removing children up to Semantic

* Refactor: rename method

To bring it in line with the add and replace methods

* Break responsibility for children into another class

* :bug: Obey return hint

* Refactor: make child-having class private and update docstring

* Remove todo

It's redundant to the type hint

* Add dunder methods

* Handle children in state

* Refactor: rename methods

To be more specific

* :bug: fix typo in super signature

* Refactor: rename property

To be more specific

* Propagate new parentage to Node

* :bug: fix typo in super signature

* :bug: fix typo

* :bug: fix infinite recursion typo

* Raise the same error as before

No good reason to change it

* :bug: fix copy pasta typo

* Remove debug print

* :bug: remember to use the bidict

* :bug: avoid recursion

* Catch the edge case

Where someone has an attribute `my_namelike_thing_thats_not_a_child42`

* Handle the case of moving a child from one label to another

And refactor

* Propagate semantics to Composite

* Don't add self as child when the new parent is None

* Always update/copy the state dict, regardless of base parent

* Skip the property getter

* Avoid changing the size of your own children

Reparenting happens from the "other_self"

* Remove outdated recursion handling

* Handle recursion in semantic classes

* Use new attribute name

* Use direct access path

Children is not a dot-dict anymore but rather a bidict, ... (continued)

225 of 237 new or added lines in 8 files covered. (94.94%)

72 existing lines in 5 files now uncovered.

5996 of 6534 relevant lines covered (91.77%)

0.92 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.2
/node.py


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc