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

Mcq urls #459

Merged
merged 3 commits into from
Aug 21, 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
8 changes: 8 additions & 0 deletions strider/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@ class Settings(BaseSettings):
use_cache: bool = True
offline_mode: bool = False

# MCQ KP URLS
mcq_answer_coalescer: AnyUrl = "https://answercoalesce.renci.org/query"
mcq_genetics: AnyUrl = (
"https://translator.broadinstitute.org/genetics_provider/trapi/v1.5/query"
)
mcq_cohd: AnyUrl = "https://cohd.io/api/query"
mcq_semsemian: AnyUrl = "http://mcq-trapi.monarchinitiative.org/1.5/query"
Comment on lines +31 to +36
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do this via the smartapi metadata instead? It looks like the KPs have multicuriequery: true in the x-trapi block of their smartapi listings.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is news to me

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it is not standard.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semsemian isn't even registered on SmartAPI

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The decision was made on architecture that any service that provides MCQ should have that labelled. It looks like genetics and COHD at least do, while the other two don't. We should encourage them to do as such, since hard coding URLs isn't the greatest solution. But, if it's all we have for now, then there's nothing we can do about it.


class Config:
env_file = ".env"

Expand Down
8 changes: 4 additions & 4 deletions strider/query_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,31 +245,31 @@ async def generate_plan(
# TODO: update from hard-coded MCQ KPs
direct_kps = {
"infores:answer-coalesce": {
"url": "https://answercoalesce.renci.org/query",
"url": settings.mcq_answer_coalescer,
"title": "Answer Coalescer",
"infores": "infores:answer-coalesce",
"maturity": "development",
"operations": [],
"details": {"preferred_prefixes": {}},
},
"infores:genetics-data-provider": {
"url": "https://translator.broadinstitute.org/genetics_provider/trapi/v1.5/query",
"url": settings.mcq_genetics,
"title": "Genetics KP",
"infores": "infores:genetics-data-provider",
"maturity": "development",
"operations": [],
"details": {"preferred_prefixes": {}},
},
"infores:cohd": {
"url": "https://cohd.io/api/query",
"url": settings.mcq_cohd,
"title": "COHD KP",
"infores": "infores:cohd",
"maturity": "development",
"operations": [],
"details": {"preferred_prefixes": {}},
},
"infores:semsemian": {
"url": "http://mcq-trapi.monarchinitiative.org/1.5/query",
"url": settings.mcq_semsemian,
"title": "Semsemian Monarch KP",
"infores": "infores:semsemian",
"maturity": "development",
Expand Down
2 changes: 1 addition & 1 deletion strider/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
title="Strider",
description=DESCRIPTION,
docs_url=None,
version="4.8.0",
version="4.8.1",
terms_of_service=(
"http://robokop.renci.org:7055/tos"
"?service_long=Strider"
Expand Down
Loading