Closed liamhuber closed 5 months ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Coverage variation | Diff coverage |
---|---|
:white_check_mark: +0.05% (target: -1.00%) | :white_check_mark: 95.24% |
:rocket: Don’t miss a bit, follow what’s new on Codacy.
Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more
I considered and (for now) rejected the idea of moving things the nodes/channels use but don't inherit from into their own submodule (e.g. draw
, parse_output
, topology
, etc, into tools
or similar). I found unlike the mixins/nodes which could be clearly identified by their up/downstream position in the Node
inheritance hierarchy, for these objects there was no such clear-cut way to distinguish what should be moved into the submodule and what should be left at the main level.
It is still clear that something like topology
is more niche than something like io
, so I see room to further pare down the main level of the module in the future -- I just don't have a clear vision for how to do it right now.
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
io.py | 12 | 94.35% | ||
workflow.py | 16 | 80.87% | ||
<!-- | Total: | 28 | --> |
Totals | |
---|---|
Change from base Build 9457867783: | 0.05% |
Covered Lines: | 3174 |
Relevant Lines: | 3428 |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
io.py | 14 | 94.35% | ||
workflow.py | 16 | 80.87% | ||
<!-- | Total: | 30 | --> |
Totals | |
---|---|
Change from base Build 9457867783: | 0.05% |
Covered Lines: | 3174 |
Relevant Lines: | 3428 |
This is a refactor, but since there was not a concrete API and things are in different places, it's a minor rather than patch bump.
I took everything downstream of
Node
(exceptWorkflow
) and moved it into the submodulenodes
, and everything upstream ofNode
(or mixed into a subclass) andChannel
and moved it into the submodulemixin
. IMO this makes the entire project structure easier to understand.While users are still intended to use
Workflow
as a single-point-of entry -- and supported in this by the creator/wrapper menus -- I also found that people developing nodes seem to like to import stuff likeas_function_node
directly and use it. This is now explicitly supported by a "node developer API" section of the__init__
file which has all the standard factories, decorators, creators, and parent classes that should be necessary for day-to-day creation of new node packages.