-
Notifications
You must be signed in to change notification settings - Fork 3
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
Validate IO #131
Merged
Merged
Validate IO #131
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
liamhuber
added
the
enhancement
New feature; can be answer partner of "feature request"
label
Nov 22, 2022
Reminder to self: A quick end-of-day notebook test showed this introducing a nasty performance hit once it's actually rendered, even though the tests run as fast as ever. Try again after rebooting and if the problem persists, fix it. Edit: performance is fine after rebooting. |
Only applied it to the Lammps job output so far.
The blueprint always has a dtype, but non-dt output still doesn't. (NodeInput always does, and I could make it so NodeOutput always did, but it's a trade-off between consistency and needing to wrap less of the ryven library. Today, I choose wrapping less.)
🐛 stops the match check from borking when one has no valid classes
This is what was making it impossible to connect nodes; the connection method threw an error and stopped the connection process.
Since it always has them now, we need to modify some checks
Now that we *always* have the dtype attribute (even if it's sometimes None), we can simplify the port setup and API a bit.
Otherwise the validity of inputs gets broken by users setting what looks like a string!
Those that have corresponding widget types at least
Where poorly defined means there is no one-to-one correspondance between the dtype and the widget
They were there in the type checking import, so my IDE didn't pick up the problem. This solves the issue of the lammps node buttons not working.
Standard representations are always included now, and in this case include the structure which has the same effect.
It throws a type error.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature; can be answer partner of "feature request"
format_black
Invoke black formatting CI
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Layer type checking on top of ports.
At a high level:
Implementation TODOs:
ryvencore.dtypes.DType
valid_instance_classes
__eq__
ormatch
or something operator that compares class or instancesChoice
)Session
,Script
, andFlow
as described above, so that you can add the match criterion tocheck_connection_validity
whenever the input has a dtypeNone
for dtypesNodeOutput
to make it work with dtypes just likeNodeInput
create_output_dt
to myNode
setup_ports
in myNode
PortWidget
to re-colour it when the value matches the dtypeinput_ready
method toNode
that checks the match of all input portsrun
unless all input is presentdelete_existing_job=True
for now, since we don't otherwise handle loading jobs nicely.