Skip to content
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

TRAPI 1.5: add "attributes": [] to NodeBindings, EdgeBindings, AuxGraphs #801

Closed
colleenXu opened this issue Mar 26, 2024 · 2 comments
Closed
Assignees
Labels
On Test Related changes are deployed to Test server trapi 1.5

Comments

@colleenXu
Copy link
Collaborator

colleenXu commented Mar 26, 2024

In TRAPI 1.5, we're now required to have attributes properties in some objects. Since we don't have any data to put in them, we'll make the values empty arrays.

  • every node-binding inside a result's node_bindings (same level as id). Lines 670-671,675
  • every edge-binding inside a result-analysis's edge_bindings (same level as id). Lines 763-764,768
  • every auxiliary-graph (same level as edges). Lines 795-796,800
example result (NodeBinding + EdgeBinding)

        "results": [
            {
                "node_bindings": {
                    "n0": [
                        {
                            "id": "HP:0003259",
                            "attributes": []
                        },
                        {
                            "id": "MONDO:0024519",
                            "attributes": []
                        }
                    ],
                    "n1": [
                        {
                            "id": "MONDO:0007352",
                            "attributes": []
                        }
                    ]
                },
                "analyses": [
                    {
                        "resource_id": "infores:biothings-explorer",
                        "edge_bindings": {
                            "eA": [
                                {
                                    "id": "c2e81fa1c90f4e50392668e038d718e1",
                                    "attributes": []
                                },
                                {
                                    "id": "83b87938309041742a4ce2be2d2230df",
                                    "attributes": []
                                },
                                {
                                    "id": "c5f313da531201b1f1494d30823b3795",
                                    "attributes": []
                                }
                            ]
                        },
                        "score": 0.6351489523872873
                    }
                ]
            }
        ]

example auxiliary-graph

        "auxiliary_graphs": {
            "support0-MONDO:0024519-phenotype_of-MONDO:0008488-via_subclass": {
                "edges": [
                    "40ca82bb6188e8c46ec4cd7797d47a9b",
                    "expanded-HP:0008718-subclass_of-MONDO:0024519"
                ],
                "attributes": []
            },

Note: we already have attributes on every KG Node, which is where we put the equivalent IDs and synonyms (names). This includes "normal" KG nodes and subclass nodes that come from ID-node expansion. Requirement added on lines 1009-1010, 1020.

@colleenXu colleenXu changed the title Minor: add "attributes": [] to NodeBindings, EdgeBindings, AuxGraphs, KG Nodes Minor: add "attributes": [] to NodeBindings, EdgeBindings, AuxGraphs Mar 26, 2024
@tokebe tokebe self-assigned this Mar 26, 2024
@colleenXu colleenXu changed the title Minor: add "attributes": [] to NodeBindings, EdgeBindings, AuxGraphs TRAPI 1.5: add "attributes": [] to NodeBindings, EdgeBindings, AuxGraphs Mar 29, 2024
@colleenXu
Copy link
Collaborator Author

@tokebe Looks good. I looked a query response and saw the added empty attributes arrays in all 3 kinds of places.

@tokebe tokebe added the On CI Related changes are deployed to CI server label Apr 12, 2024
@colleenXu colleenXu added On CI -> Test and removed On CI Related changes are deployed to CI server labels May 3, 2024
@tokebe tokebe added On Test Related changes are deployed to Test server and removed On CI -> Test labels May 9, 2024
@colleenXu
Copy link
Collaborator Author

The code was deployed today to Prod as part of the Octopus release. I tested and it's live.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
On Test Related changes are deployed to Test server trapi 1.5
Projects
None yet
Development

No branches or pull requests

2 participants