-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix node registration #53
Conversation
When single value node fails to find an attribute on its single value
And import and create node packages as requested based off these references
For now at least, to keep behaviour the same
Pull Request Test Coverage Report for Build 6700105758
💛 - Coveralls |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
So updates to Function and SingleValue happen in a single place
So it can be extended when we support more sophisticated identifiers
The 3.9 tests break:
At first I was confused why importing from This failure happens in:
In each case starting with
So I guess I've somehow added a "bad" type hint somewhere before we get to the |
The problem is when What doesn't yet make sense is why there's a creator existing in, e.g., the |
Ah, ok, I think maybe because right in We no longer get away with this because now we Alright, so all perfectly sensible now how to fix it. |
For packages that rely on type hinting only available in >=3.10
…node_registration
Notebook failure is expected since I stopped registering atomistics by default and broke the scatter plot node over to its own package. |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Coverage is just angry because |
Adds the node registration method back, although at the moment it's just called in
Creator.__init__
so you don't see it.TODO:
nodes
attribute (as long as it has the right type), or URLs? (EDIT: Right now I'm still only accepting string import paths to modules that have anodes: list[Node]
property, but theCreator.register
method has good encapsulation of the logic for checking whether (a) newly proposed packages are just a re-registration of an existing package, and (b) whether the proposed package will actually be usable for generating nodes, so extending this in the future to other node package identifiers should be easy. For now I want to prioritize getting any fix in so we at least have some way to register things!)atomistics
by default and update the demo and docs as needed.create...
(i.e. unless the macro is part of the same .py file that all its children are coming from, in which case they should be available in-scope without.create
Outside of scope:
Closes #51