Skip to content

Commit

Permalink
using BTE TRAPI endpoint for JSON tests
Browse files Browse the repository at this point in the history
  • Loading branch information
colleenXu committed Mar 23, 2021
1 parent 0bca91a commit 4a535f4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
5 changes: 3 additions & 2 deletions onehop/test_triples/KP/Service_Provider/MyChem.info_API.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"url": "https://smart-api.info/ui/8f08d1446e0bb9c2b323713ce83e2bd3",
"TRAPI": false,
"url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI",
"myChem_smartAPI_ID": "8f08d1446e0bb9c2b323713ce83e2bd3",
"TRAPI": true,
"edges": [
{
"subject_category": "biolink:ChemicalSubstance",
Expand Down
5 changes: 3 additions & 2 deletions onehop/test_triples/KP/Service_Provider/MyGene.info_API.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"url": "https://smart-api.info/ui/59dce17363dce279d389100834e43648",
"TRAPI": false,
"url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI",
"myChem_smartAPI_ID": "59dce17363dce279d389100834e43648",
"TRAPI": true,
"edges": [
{
"subject_category": "biolink:Gene",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"url": "https://smart-api.info/ui/1c056ffc7ed0dd1229e71c4752239465",
"TRAPI": false,
"url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI",
"myChem_smartAPI_ID": "1c056ffc7ed0dd1229e71c4752239465",
"TRAPI": true,
"edges": [
{
"subject_category": "biolink:Disease",
Expand Down
5 changes: 3 additions & 2 deletions onehop/test_triples/KP/Service_Provider/OpenTarget_API.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"url": "https://smart-api.info/ui/542ba165e1b4227854cf7c0a8addcc79",
"TRAPI": false,
"url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI",
"myChem_smartAPI_ID": "542ba165e1b4227854cf7c0a8addcc79",
"TRAPI": true,
"edges": [
{
"subject_category": "biolink:Gene",
Expand Down
4 changes: 1 addition & 3 deletions onehop/test_triples/KP/Service_Provider/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
These KPs are not TRAPI APIs.

The tests described in the JSON files are written as-if these are TRAPI APIs. The expectation there is that a TRAPI query is made through BTE (the endpoint /v1/smartapi/{smartapi_id}/query) using the info in the JSON files. The edge to the "answer" node should have an attribute with the name "api" and value as the name of the API.
The JSON files assume that these APIs will be queried through BTE's TRAPI endpoint for querying individual SmartAPIs. They therefore include the url for the BTE endpoint, and the SmartAPI ID for the actual SmartAPI. The edge to the answer/object node should have an "api" attribute, with the name of the SmartAPI as the value.

Notes:
- tests are also described as queries that can be made directly to the API, in the additional README files. Notice that many API endpoints do not handle curies (ID prefixes) or predicates. The format of these queries is specified by the x-bte-annotated endpoint in the SmartAPI registry file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"url": "https://smart-api.info/ui/671b45c0301c8624abbd26ae78449ca2",
"TRAPI": false,
"url": "https://smart-api.info/ui/dc91716f44207d2e1287c727f281d339#/1.0.0/querySmartAPI",
"myChem_smartAPI_ID": "671b45c0301c8624abbd26ae78449ca2",
"TRAPI": true,
"edges": [
{
"subject_category": "biolink:Disease",
Expand Down

0 comments on commit 4a535f4

Please sign in to comment.