di2ag / chp_api Goto Github PK
View Code? Open in Web Editor NEWThe NCATS Connections Hypothesis Provider (CHP) API
License: Apache License 2.0
The NCATS Connections Hypothesis Provider (CHP) API
License: Apache License 2.0
Is your feature request related to a problem? Please describe.
We don't have a repo inside the NCATSTranslator organization. This is a requirement in https://docs.google.com/document/d/1jGIjN36-LxUyFR0ZtryCsuLe3pr0MR_xJvPr4juvJEw/edit
Describe the solution you'd like
Just fork our repo into the NCATSTranslator Organization.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Figure out how code updates work for github forks.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Describe the bug
I get a 302 http error message when I send queries to http://chp.thayer.dartmouth.edu/query
To Reproduce
Steps to reproduce the behavior:
curl -X 'POST' \
'http://chp.thayer.dartmouth.edu/query' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"message": {
"query_graph": {
"nodes": {
"n0": {
"ids": null,
"categories": [
"biolink:Gene"
],
"constraints": []
},
"n1": {
"ids": [
"UBERON:0009835"
],
"categories": [
"biolink:GrossAnatomicalStructure"
],
"constraints": []
}
},
"edges": {
"e0": {
"predicates": [
"biolink:expressed_in"
],
"relation": null,
"subject": "n0",
"object": "n1",
"constraints": []
}
}
}
}
}'
Expected behavior
I get a 200 response back with a valid TRAPI response
Describe the bug
when using chp.dartmout.thayer.edu/query (as opposed to chp.dartmout.thayer.edu/query/) we get:
nginx_1 | 172.19.0.1 - - [12/May/2021:16:32:02 +0000] "POST /query HTTP/1.1" 301 0 "-" "python-httpx/0.16.1" "-"
web_1 | WARNING:django.request:Method Not Allowed: /query/
Expected behavior
Patrick seems to think its a weird issue with sending messages over http instead of https. Somehow it turns a POST into a GET without trailing forward slash.
Additional context
Determined in the graceful error handling session in may 2021 relay
See issue
Solution: try except line 50 and on exception return empty message with appropriate error message.
Describe the bug
Requests to the CHP api using ill-formed query graphs results in a 502 error code being returned. 502 is a "Bad Gateway error". Confirmed in the docker log were the correct exception messages. Expected was a 500 error.
To Reproduce
Using the following Query Graph structure:
reasoner_std['query_graph']['nodes']['n0'] = { 'category':'biolink:Gene'}
reasoner_std['query_graph']['nodes']['n1'] = { 'category':'biolink:Drug',
'id':'CHEMBL:CHEMBL88'
}
reasoner_std['query_graph']['edges']['e0'] = { 'predicate':'biolink:affects',
'subject': 'n1',
'object': 'n0'
}
In the one-hop wildcard query will fail. The issue is that we anticipate the object node having the curie, whether ensembl for gene or chembl for drug.
Expected behavior
500 Error
Additional context
This issue should also double as a feature request.
At the message level we should include LogEntry objects (for specification see: https://github.com/NCATSTranslator/ReasonerAPI/blob/master/TranslatorReasonerAPI.yaml)
This object can hold on to our internal exception messages so that they can be passed back to the requester as well as other helpful debugging information.
Is your feature request related to a problem? Please describe.
We aren't on the Translator ARS status page and need to register, I think... Link to the page is here: https://ars.transltr.io/ars/app/status
Describe the solution you'd like
Talk to Chenyu or Jiwen about how to get on this page and then do it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.