Skip to content

Commit

Permalink
Remove client side CURIE support ...
Browse files Browse the repository at this point in the history
Pivot to adding testing and verification that the API / server side
implementation supports the CURIE ID
  • Loading branch information
Johnathan Schaff committed Feb 6, 2024
1 parent 9233d9e commit b4ad216
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 177 deletions.
4 changes: 0 additions & 4 deletions biothings_client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import requests

from .utils import str_types, is_py27
from .utils.curie import generate_annotation_prefix_patterns, transform_query

try:
from collections.abc import Iterable
Expand Down Expand Up @@ -142,7 +141,6 @@ def __init__(self, url=None):
}
)
self._cached = False
self.annotation_prefix_patterns = generate_annotation_prefix_patterns(self._biolink_model_prefix_mapping)

def use_http(self):
"""Use http instead of https for API calls."""
Expand Down Expand Up @@ -334,7 +332,6 @@ def _get_fields(self, search_term=None, verbose=True):
logger.info(self._from_cache_notification)
return ret

@transform_query
def _getannotation(self, _id, fields=None, **kwargs):
"""Return the object given id.
This is a wrapper for GET query of the biothings annotation service.
Expand Down Expand Up @@ -368,7 +365,6 @@ def _annotations_generator(self, query_fn, ids, verbose=True, **kwargs):
for hit in hits:
yield hit

@transform_query
def _getannotations(self, ids, fields=None, **kwargs):
"""Return the list of annotation objects for the given list of ids.
This is a wrapper for POST query of the biothings annotation service.
Expand Down
11 changes: 0 additions & 11 deletions biothings_client/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@
}
# project specific kwargs
MYGENE_KWARGS = copy(COMMON_KWARGS)
MYGENE_BIOLINK_MODEL_PREFIX_BIOTHINGS_MAPPING = {
"NCBIGene": {"type": "gene", "field": "entrezgene"},
"ENSEMBL": {"type": "gene", "field": "ensembl.gene"},
"UniProtKB": {"type": "gene", "field": "uniprot.Swiss-Prot"},
}

MYGENE_KWARGS.update(
{
Expand All @@ -80,7 +75,6 @@
"_default_cache_file": "mygene_cache",
"_entity": "gene",
"_docstring_obj": GENE_DOCSTRING,
"_biolink_model_prefix_mapping": MYGENE_BIOLINK_MODEL_PREFIX_BIOTHINGS_MAPPING,
}
)

Expand All @@ -94,7 +88,6 @@
"_entity": "variant",
"_top_level_jsonld_uris": MYVARIANT_TOP_LEVEL_JSONLD_URIS,
"_docstring_obj": VARIANT_DOCSTRING,
"_biolink_model_prefix_mapping": {}
}
)
MYCHEM_KWARGS = copy(COMMON_KWARGS)
Expand All @@ -106,7 +99,6 @@
"_entity": "chem",
"_default_cache_file": "mychem_cache",
"_docstring_obj": CHEM_DOCSTRING,
"_biolink_model_prefix_mapping": {}
}
)
MYDISEASE_KWARGS = copy(COMMON_KWARGS)
Expand All @@ -117,7 +109,6 @@
"_optionally_plural_object_type": "disease(s)",
"_entity": "disease",
"_default_cache_file": "mydisease_cache",
"_biolink_model_prefix_mapping": {}
}
)
MYTAXON_KWARGS = copy(COMMON_KWARGS)
Expand All @@ -128,7 +119,6 @@
"_optionally_plural_object_type": "taxon/taxa",
"_entity": "taxon",
"_default_cache_file": "mytaxon_cache",
"_biolink_model_prefix_mapping": {}
}
)
MYGENESET_KWARGS = copy(COMMON_KWARGS)
Expand All @@ -139,7 +129,6 @@
"_optionally_plural_object_type": "geneset(s)",
"_entity": "geneset",
"_default_cache_file": "mygeneset_cache",
"_biolink_model_prefix_mapping": {}
}
)

Expand Down
162 changes: 0 additions & 162 deletions biothings_client/utils/curie.py

This file was deleted.

0 comments on commit b4ad216

Please sign in to comment.