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

remove -aux from golr url #89

Merged
merged 4 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ See https://github.com/geneontology/go-fastapi/blob/main/provision/production/PR


### API sources
1) Golr: "https://golr-aux.geneontology.io/solr/"
1) Golr: "https://golr.geneontology.org/solr/"
2) GO RDF endpoint: "https://rdf.geneontology.org/sparql"
3) precomputed JSON files for GO-CAM models: "https://go-public.s3.amazonaws.com/files/go-cam/[model_id].json"

Expand Down
2 changes: 1 addition & 1 deletion app/conf/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
solr_url:
url: "https://golr-aux.geneontology.io/solr/"
url: "https://golr.geneontology.org/solr/"
timeout: 30
ontologies:
- id: go
Expand Down
2 changes: 1 addition & 1 deletion app/routers/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ async def get_ancestors_shared_between_two_terms(
else:
logger.info("got here")
fields = "neighborhood_graph_json"
# https://golr-aux.geneontology.io/solr/select?q=*:*&fq=document_category:%22ontology_class%22&fq=id:%22GO:0006259%22&fl=neighborhood_graph_json&wt=json&indent=on
# https://golr.geneontology.org/solr/select?q=*:*&fq=document_category:%22ontology_class%22&fq=id:%22GO:0006259%22&fl=neighborhood_graph_json&wt=json&indent=on
subres = run_solr_on(ESOLR.GOLR, ESOLRDoc.ONTOLOGY, subject, fields)
objres = run_solr_on(ESOLR.GOLR, ESOLRDoc.ONTOLOGY, object, fields)

Expand Down
2 changes: 2 additions & 0 deletions app/routers/pathway_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ async def get_gocams_by_geneproduct_id(
si = SparqlImplementation(ont_r)
converter = Converter.from_prefix_map(cmaps, strict=False)
id = converter.expand(id)
print("in the method")
print(id)
logger.info("reformatted curie into IRI using identifiers.org from api/gp/%s/models endpoint", id)
query = (
"""
Expand Down
2 changes: 1 addition & 1 deletion app/routers/ribbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ async def get_ribbon_results(
for entity in to_remove:
subjects.remove(entity)

# http://golr-aux.geneontology.io/solr/select/?q=*:*&fq=document_category:%22bioentity%22&rows=10&wt=json&fl=
# http://golr.geneontology.org/solr/select/?q=*:*&fq=document_category:%22bioentity%22&rows=10&wt=json&fl=
# bioentity,bioentity_label,taxon,taxon_label&fq=bioentity:(%22MGI:MGI:98214%22%20or%20%22RGD:620474%22)

result = {"categories": categories, "subjects": subjects}
Expand Down
50 changes: 33 additions & 17 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion provision/vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##############
stage_dir: "{{ lookup('env', 'PWD') }}/stage_dir"

solr_url: https://golr-aux.geneontology.io/solr/
solr_url: https://golr.geneontology.org/solr/
sparql_url: https://rdf.geneontology.org/sparql
fastapi_host: REPLACE_ME
fastapi_host_alias: '{{ fastapi_host }}'
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ oaklib = ">=0.5.12"
go-deploy = ">=0.4.1"
biothings-client = "^0.3.0"
email-validator = "^2.0.0.post2"
bmt = "^1.1.2"

[tool.poetry.dev-dependencies]
pytest = ">=7.4.0"
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_bioentity_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_golr_solr(self):

:return: None
"""
self.assertEqual(ESOLR.GOLR.value, "https://golr-aux.geneontology.io/solr/")
self.assertEqual(ESOLR.GOLR.value, "https://golr.geneontology.org/solr/")
self.assertEqual(ESOLRDoc.ONTOLOGY.value, "ontology_class")

def test_bioentity_id_endpoints(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_ontology_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TestOntologyUtils(unittest.TestCase):
def test_get_ontology_config(self):
"""Test getting the ontology config from golr."""
golr_url = get_golr_config()["solr_url"]["url"]
self.assertIn("golr-aux.geneontology.io", golr_url)
self.assertIn("golr.geneontology.org", golr_url)

def test_go_sparql(self):
"""Test fetching label for a given GO term."""
Expand Down
19 changes: 11 additions & 8 deletions tests/unit/test_pathway_widget_endpoints.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from app.main import app

test_client = TestClient(app)
gene_ids = ["WB:WBGene00002147", "MGI:3588192", "FB:FBgn0003731"]

gene_ids = ["WB:WBGene00002147", "FB:FBgn0003731"] # , "SGD:S000003407", "MGI:3588192"]
logging.basicConfig(filename="combined_access_error.log", level=logging.INFO, format="%(asctime)s - %(message)s")
logger = logging.getLogger()

Expand Down Expand Up @@ -36,13 +37,15 @@ def test_get_gocams_by_geneproduct_id_causal2(self):

:return: None
"""
id = urllib.parse.quote("FB:FBgn0003731")
data = {
"causalmf": 2,
}
response = test_client.get(f"/api/gp/{id}/models", params=data)
self.assertGreater(len(response.json()), 0)
self.assertEqual(response.status_code, 200)
for gid in gene_ids:
id = urllib.parse.quote(gid)
print(id)
data = {
"causalmf": 2,
}
response = test_client.get(f"/api/gp/{id}/models", params=data)
self.assertGreater(len(response.json()), 0)
self.assertEqual(response.status_code, 200)


if __name__ == "__main__":
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_ribbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def test_wb_ribbon(self):
self.assertTrue(subject.get("taxon_label") == "Caenorhabditis elegans")
self.assertTrue(subject.get("groups").get("GO:0003674"))
self.assertTrue(subject.get("groups").get("GO:0003674").get("ALL").get("nb_annotations") >= 19)
self.assertTrue(subject.get("groups").get("GO:0008150").get("ALL").get("nb_annotations") >= 72)
print(subject.get("groups").get("GO:0008150").get("ALL").get("nb_annotations"))
self.assertTrue(subject.get("groups").get("GO:0008150").get("ALL").get("nb_annotations") >= 71)
self.assertTrue(subject.get("groups").get("GO:0005575").get("ALL").get("nb_annotations") >= 10)
assert response.status_code == 200

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_search_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_golr_solr(self):

:return: None
"""
self.assertEqual(ESOLR.GOLR.value, "https://golr-aux.geneontology.io/solr/")
self.assertEqual(ESOLR.GOLR.value, "https://golr.geneontology.org/solr/")
self.assertEqual(ESOLRDoc.ONTOLOGY.value, "ontology_class")

def test_search_entity_ssh(self):
Expand Down
Loading