2020
2121# Choose which server to test
2222# cr.server = 'https://dev.cohd.io/api'
23- # cr.server = 'https://cohd-api.ci.transltr.io/api'
24- # cr.server = 'https://cohd-api.test.transltr.io/api' # Temporarily default to Test as Translator consrotia has only deployed TRAPI 1.4 to Test
25- cr .server = 'https://cohd-api.transltr.io/api' # Default to ITRB-Production instance
23+ cr .server = 'https://cohd-api.ci.transltr.io/api'
24+ # cr.server = 'https://cohd-api.test.transltr.io/api'
25+ # cr.server = 'https://cohd-api.transltr.io/api'
2626
2727# Specify what Biolink and TRAPI versions are expected by the server
28- BIOLINK_VERSION = '3.5.0 '
29- TRAPI_VERSION = '1.4.2 '
28+ BIOLINK_VERSION = '4.1.6 '
29+ TRAPI_VERSION = '1.5.0 '
3030
3131# Static instance of the Biolink Model Toolkit
3232bm_toolkit = Toolkit ()
3737_s = namedtuple ('_s' , ['key' , 'type' ])
3838
3939# Proxy for main TRAPI version
40- translator_query = cr .translator_query_130
40+ translator_query = cr .translator_query
4141
4242_logging_level_from_str = {logging .getLevelName (level ): level for level in
4343 [logging .DEBUG , logging .INFO , logging .WARNING , logging .ERROR ]}
@@ -47,11 +47,11 @@ def _validate_trapi_response(response):
4747 vms = validate_trapi_response (TRAPI_VERSION , BIOLINK_VERSION , response )
4848
4949 # expect no validation errors
50- assert len (vms ['errors ' ]) == 0 and len (vms ['critical' ]) == 0 , print (vms )
50+ assert len (vms ['error ' ]) == 0 and len (vms ['critical' ]) == 0 , print (vms )
5151
5252 # If there are validation warnings, display them, but don't fail
53- if len (vms ['warnings ' ]) > 0 :
54- warnings .warn (str (vms ['warnings ' ]))
53+ if len (vms ['warning ' ]) > 0 :
54+ warnings .warn (str (vms ['warning ' ]))
5555
5656
5757def _print_trapi_log (trapi_response , print_level = logging .WARNING ):
@@ -682,7 +682,7 @@ def test_translator_query_multiple_categories():
682682 "query_graph": {
683683 "nodes": {
684684 "subj": {
685- "ids": ["UMLS:C0451709 "]
685+ "ids": ["SNOMEDCT:197356006 "]
686686 },
687687 "obj": {
688688 "categories": ["biolink:DiseaseOrPhenotypicFeature"]
@@ -723,7 +723,7 @@ def test_translator_query_multiple_categories():
723723 "query_graph": {
724724 "nodes": {
725725 "subj": {
726- "ids": ["UMLS:C0451709 "]
726+ "ids": ["SNOMEDCT:197356006 "]
727727 },
728728 "obj": {
729729 "categories": ["biolink:Procedure"]
@@ -764,7 +764,7 @@ def test_translator_query_multiple_categories():
764764 "query_graph": {
765765 "nodes": {
766766 "subj": {
767- "ids": ["UMLS:C0451709 "]
767+ "ids": ["SNOMEDCT:197356006 "]
768768 },
769769 "obj": {
770770 "categories": ["biolink:DiseaseOrPhenotypicFeature", "biolink:Procedure"]
@@ -954,7 +954,7 @@ def test_translator_workflows():
954954 }
955955 },
956956 "workflow": [
957- {"id": "lookup "}
957+ {"id": "lookup_and_score "}
958958 ],
959959 "query_options": {
960960 "max_results": 1
0 commit comments