Initial upload/instantiation of custom nodes#66
Closed
Conversation
Factors out some duplicate code. PR #57 adds a `to_json()` method that might be able to replace the `extract_node_info()` method here. TBD.
`check_missing_packages()` is duplicated from `vp/views.py`. It should find a home.
Member
Author
|
Latest commits don't change much from the initial PR. It does refactor a lot of node-parsing code (with The latest commits add Custom Nodes to the same |
Member
Author
|
I'm working on a refactored approach that handles Nodes differently than this PR. Closing for now, but we can revert to this state of implementation if the refactor is too problematic. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We probably want to hold off on merging until we figure some issues out, but this PR has an implementation of adding custom nodes. Other approaches/questions are discussed in #67.
What this does
POST /workflow/custom_nodeendpoint that accepts a file and adds it to acustom_nodesdirectory withinpyworkflow.Provides aAdds to the existingGET /custom_nodesendpoint that parses any files located withincustom_nodes. This returns a JSON-representation of the nodes similar to theGET /nodesendpoint for "system nodes".GET /nodesendpoint for system nodes, but now adds searching/parsing of files located withincustom_nodes.it adds a message telling the user to install the packages and restart the server.it compiles a list of packages and is keyed asmissing_packagesin the JSON response.node_factory.What this does not do/things to fix
pyworkflow/custom_nodesso that they can import theNodeclass to extend. We may or may not want to stored custom nodes separately from the package, in which case we'll need a way to referenceNode.root_dir, or elsewhere).upload_filemethods inworkflow.pyand the Workflow view. If we want to pursue this approach, we should refactor uploading to accept different kinds of files and for different purposes.Pipfile(like pandas), but this should be addressed.