Skip to content

Commit

Permalink
Merge pull request #712 from NCATSTranslator/ADKP_addition
Browse files Browse the repository at this point in the history
ADKP addition
  • Loading branch information
ShervinAbd92 authored Nov 19, 2024
2 parents bf1b9a3 + 0432c32 commit 9a416ed
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ httpclients:
infores:multiomics-clinicaltrials:
endpoint: query
params:
infores:multiomics-drugapprovals:
endpoint: query
params:
infores:molepro:
endpoint: query
params:
Expand Down
1 change: 1 addition & 0 deletions config/tr_sys_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'tr_ara_wfr.wfr_app.AppConfig',
'tr_kp_genetics.genetics_app.AppConfig',
'tr_kp_clinical.clinical_app.AppConfig',
'tr_kp_drug.drug_app.AppConfig',
'tr_kp_molecular.molecular_app.AppConfig',
'tr_kp_cam.cam_app.AppConfig',
'tr_kp_textmining.textmining_app.AppConfig',
Expand Down
1 change: 1 addition & 0 deletions config/url-config-legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ infores:connections-hypothesis: https://chp-api.ci.transltr.io
infores:cohd: https://cohd-api.ci.transltr.io/api
infores:genetics-data-provider: https://genetics-kp.ci.transltr.io/genetics_provider/trapi/v1.5
infores:multiomics-clinicaltrials: https://multiomics.ci.transltr.io/ctkp
infores:multiomics-drugapprovals: https://multiomics.ci.transltr.io/dakp
infores:molepro: https://molepro-trapi.ci.transltr.io/molepro/trapi/v1.5
infores:openpredict: https://openpredict.ci.transltr.io
infores:text-mining-provider-targeted: https://biothings.ci.transltr.io/text_mining_targeted_association
27 changes: 27 additions & 0 deletions tr_sys/tr_kp_drug/drug_app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from tr_ars.default_ars_app.ars_app import AppConfig as ARSAppConfig
from django.urls import path, include
from tr_ars.default_ars_app.api import *

class AppConfig(ARSAppConfig):
name = 'tr_kp_drug.drug_app' # must be dot path for module
actors = [make_actorconf('infores:multiomics-drugapprovals',
'runquery', ['general'],
'query')] # tuple of remote, name, channel
app_path = 'kp-drug'
regex_path = '^' + app_path + '/'

### code below this line is required, but doesn't require updating in most cases

apipatterns = [path(r'', init_api_index(AppConfig.actors, AppConfig.app_path), name=AppConfig.app_path + '-api')]
for actor in AppConfig.actors:
query_path = actor.name()
query_name = AppConfig.app_path + '-' + query_path
apipatterns.append(path(query_path, init_api_fn(actor), name=query_name))

urlpatterns = [
path(r'', init_redirect(AppConfig.app_path), name=AppConfig.app_path + '-base'),
path(r'api/', include(apipatterns)),
]



1 change: 1 addition & 0 deletions tr_sys/tr_sys/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
'tr_ara_cqs.cqs_app.AppConfig',
'tr_kp_genetics.genetics_app.AppConfig',
'tr_kp_clinical.clinical_app.AppConfig',
'tr_kp_drug.drug_app.AppConfig',
'tr_kp_molecular.molecular_app.AppConfig',
'tr_kp_cam.cam_app.AppConfig',
'tr_kp_textmining.textmining_app.AppConfig',
Expand Down
2 changes: 2 additions & 0 deletions tr_sys/tr_sys/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
from tr_ara_cqs.cqs_app import AppConfig as CqsApp
from tr_kp_genetics.genetics_app import AppConfig as GeneticsApp
from tr_kp_clinical.clinical_app import AppConfig as ClinicalApp
from tr_kp_drug.drug_app import AppConfig as DrugApp
from tr_kp_molecular.molecular_app import AppConfig as MolecularApp
from tr_kp_cam.cam_app import AppConfig as CamApp
from tr_kp_textmining.textmining_app import AppConfig as TextMiningApp
Expand All @@ -54,6 +55,7 @@
re_path(UnsecretApp.regex_path, include(UnsecretApp.name)),
re_path(GeneticsApp.regex_path, include(GeneticsApp.name)),
re_path(ClinicalApp.regex_path, include(ClinicalApp.name)),
re_path(DrugApp.regex_path, include(DrugApp.name)),
re_path(MolecularApp.regex_path, include(MolecularApp.name)),
re_path(CamApp.regex_path, include(CamApp.name)),
re_path(TextMiningApp.regex_path, include(TextMiningApp.name)),
Expand Down

0 comments on commit 9a416ed

Please sign in to comment.