Skip to content

Commit

Permalink
conflict resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
marcodarko committed Sep 7, 2021
2 parents 9e6542c + 65d946e commit 32fc883
Show file tree
Hide file tree
Showing 21 changed files with 466 additions and 11,153 deletions.
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,29 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.18.0](https://github.com/biothings/bte_trapi_query_graph_handler/compare/v1.17.6...v1.18.0) (2021-08-20)


### Features

* add caching param in cache handler ([bfaa179](https://github.com/biothings/bte_trapi_query_graph_handler/commit/bfaa17908a0c7ef584b146390659186fe06896dc))
* add workflow validation for trapi v1.2 ([76a4164](https://github.com/biothings/bte_trapi_query_graph_handler/commit/76a4164bcacfc1a4c9dc74fb5d4024ece7ef0e08))


### Bug Fixes

* :bug: check if cachedQueryResults is empty ([062d931](https://github.com/biothings/bte_trapi_query_graph_handler/commit/062d931bcc9d51e966fb65e470bd1897588ee312))
* :bug: set a default caching expiration ([173f34b](https://github.com/biothings/bte_trapi_query_graph_handler/commit/173f34b51b7a033e4a4a77dae766473ae45d5d6e))
* biolink v2.1 related fixes ([ff15564](https://github.com/biothings/bte_trapi_query_graph_handler/commit/ff155648163f74ef209ed71666bce860fb5c7f26))
* cache extra properties just in case ([344aabd](https://github.com/biothings/bte_trapi_query_graph_handler/commit/344aabd2037e172bd3f3970db1e31f0ac7ce00c6))
* clone records recursively for caching ([b7a71c4](https://github.com/biothings/bte_trapi_query_graph_handler/commit/b7a71c49c7e29f124b87b6b73e2eed747844aa13))
* code line length reformat ([7000a0b](https://github.com/biothings/bte_trapi_query_graph_handler/commit/7000a0b7eaaa0539648e2d6e231f8e871b941dd6))
* correctly cache semanticType ([7d21651](https://github.com/biothings/bte_trapi_query_graph_handler/commit/7d21651fc013154d9704e22e89be800f968f3c08))
* input->output for output node ([aa4a529](https://github.com/biothings/bte_trapi_query_graph_handler/commit/aa4a529a597efc5c33fddbed6796527e2ba7438d))
* issue [#164](https://github.com/biothings/bte_trapi_query_graph_handler/issues/164). add score. rm unused methods. ([57b4c4b](https://github.com/biothings/bte_trapi_query_graph_handler/commit/57b4c4b756100bcd6faa40c83bc4f637cb752c79))
* tests pass for issue [#164](https://github.com/biothings/bte_trapi_query_graph_handler/issues/164) ([8dfb3ca](https://github.com/biothings/bte_trapi_query_graph_handler/commit/8dfb3cabdee3e052793d503c7bf4eebddd99601e))
* WIP for https://github.com/biothings/BioThings_Explorer_TRAPI/issues/164 ([97963b6](https://github.com/biothings/bte_trapi_query_graph_handler/commit/97963b6f3379de4f1ed7ff8e5bedbcd303f34271))

### [1.17.6](https://github.com/biothings/bte_trapi_query_graph_handler/compare/v1.17.5...v1.17.6) (2021-06-24)


Expand Down
54 changes: 37 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,25 @@ npm i @biothings-explorer/query_graph_handler
const handler = require("@biothings-explorer/query_graph_handler");
const queryHandler = new handler.TRAPIQueryHandler();
const oneHopQuery = {
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"edges": {
"e00": {
"object": "n01",
"subject": "n00",
"predicate": "biolink:functional_association"
"predicates": ["biolink:functional_association"]
}
},
"nodes": {
"n00": {
"category": "biolink:Gene",
"id": "ENSEMBL:ENSG00000123374"
"categories": ["biolink:Gene"],
"ids": ["ENSEMBL:ENSG00000123374"]
},
"n01": {
"category": "biolink:BiologicalProcess"
"categories": ["biolink:BiologicalProcess"]
}
}
}
Expand All @@ -50,6 +53,9 @@ console.log(queryHandler.getResponse())

```json
{
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"edges": {
Expand Down Expand Up @@ -1771,18 +1777,21 @@ console.log(queryHandler.getResponse())
const handler = require("@biothings-explorer/query_graph_handler");
const queryHandler = new handler.TRAPIQueryHandler();
const multiHopQuery = {
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"nodes": {
"n0": {
"category": "biolink:Disease",
"id": "MONDO:0005737"
"categories": ["biolink:Disease"],
"ids": ["MONDO:0005737"]
},
"n1": {
"category": "biolink:Gene"
"categories": ["biolink:Gene"]
},
"n2": {
"category": "biolink:ChemicalSubstance"
"categories": ["biolink:SmallMolecule"]
}
},
"edges": {
Expand All @@ -1809,6 +1818,9 @@ console.log(queryHandler.getResponse())

```json
{
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"nodes": {
Expand Down Expand Up @@ -7461,18 +7473,21 @@ console.log(queryHandler.getResponse())
const handler = require("@biothings-explorer/query_graph_handler");
const queryHandler = new handler.TRAPIQueryHandler();
const branchedQuery = {
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"nodes": {
"n0": {
"category": "biolink:Disease",
"id": "MONDO:0005737"
"categories": ["biolink:Disease"],
"ids": ["MONDO:0005737"]
},
"n1": {
"category": "biolink:Gene"
"categories": ["biolink:Gene"]
},
"n2": {
"category": "biolink:ChemicalSubstance"
"categories": ["biolink:SmallMolecule"]
}
},
"edges": {
Expand All @@ -7498,6 +7513,9 @@ console.log(queryHandler.getResponse())

```json
{
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"nodes": {
Expand Down Expand Up @@ -87547,22 +87565,25 @@ console.log(queryHandler.getResponse())
const handler = require("@biothings-explorer/query_graph_handler");
const queryHandler = new handler.TRAPIQueryHandler();
const multiPredicatesQuery = {
"workflow": [
{"id": "lookup"}
],
"message": {
"query_graph": {
"nodes": {
"n0": {
"category": "biolink:Disease",
"id": "MONDO:0005737"
"categories": ["biolink:Disease"],
"ids": ["MONDO:0005737"]
},
"n1": {
"category": "biolink:ChemicalSubstance"
"categories": ["biolink:SmallMolecule"]
}
},
"edges": {
"e01": {
"subject": "n0",
"object": "n1",
"predicate": ["biolink:treated_by", "biolink:affected_by"]
"predicates": ["biolink:treated_by", "biolink:affected_by"]
}
}
}
Expand All @@ -87572,4 +87593,3 @@ queryHandler.setQueryGraph(multiPredicatesQuery);
await queryHandler.query();
console.log(queryHandler.getResponse())
```

2 changes: 1 addition & 1 deletion __test__/integration/BatchEdgeQueryHandler.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("Testing BatchEdgeQueryHandler Module", () => {
describe("Testing query function", () => {
// test("test with one query edge", async () => {
// let gene_node1 = new QNode("n1", { category: "Gene", id: "NCBIGene:1017" });
// let chemical_node1 = new QNode("n3", { category: "ChemicalSubstance" });
// let chemical_node1 = new QNode("n3", { category: "SmallMolecule" });
// const edge1 = new QEdge("e01", { subject: gene_node1, object: chemical_node1 });
// const exeEdge1 = new QExeEdge(edge1, false, undefined);
// const batchHandler = new BatchEdgeQueryHandler(kg);
Expand Down
Loading

0 comments on commit 32fc883

Please sign in to comment.