-
Notifications
You must be signed in to change notification settings - Fork 192
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
updated io tree response to add link type information #2033
Conversation
aiida/restapi/translator/node.py
Outdated
@@ -596,6 +597,7 @@ def get_node_shape(ntype): | |||
"displaytype": display_type, | |||
"group": "inputs", | |||
"description": description, | |||
"linklabel": linklabel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the linklabel should be attached to the nodes, but to the edges
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information is used in materials cloud when user mouse hover on node. So it needs to be passed in node.
@@ -604,20 +606,21 @@ def get_node_shape(ntype): | |||
"to": 0, | |||
"arrows": "to", | |||
"color": {"inherit": 'from'}, | |||
"linktype": linktype, | |||
"label": linktype, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linklabel should be moved here from nodes
, and this should remain to be called linktype
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'label' is the name used by JS library to display value on edge. This endpoint is specifically written for materials cloud and passes the data in format used in MC. Otherwise we can reprocess the data completely in frontend again before passing it to the visualization library.
aiida/restapi/translator/node.py
Outdated
@@ -634,6 +637,7 @@ def get_node_shape(ntype): | |||
"displaytype": display_type, | |||
"group": "outputs", | |||
"description": description, | |||
"linklabel": linklabel, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
@@ -642,7 +646,7 @@ def get_node_shape(ntype): | |||
"to": nodeCount, | |||
"arrows": "to", | |||
"color": {"inherit": 'to'}, | |||
"linktype": linktype | |||
"label": linktype |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
@waychal you can merge this when tests finish to run. |
No description provided.