Skip to content

Commit

Permalink
Merge pull request #9 from kevinxin90/tmp_fix
Browse files Browse the repository at this point in the history
Upgrade dependencies
  • Loading branch information
kevinxin90 authored Mar 25, 2021
2 parents 793f973 + 1a6b94e commit 766db23
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 22 deletions.
42 changes: 42 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,48 @@

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.1.6](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.1.5...v1.1.6) (2021-03-25)

### [1.1.5](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.1.4...v1.1.5) (2021-03-25)


### Bug Fixes

* :bug: fix getCategories of undefined error ([8d19f74](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/8d19f74f371d8a04dd78de18b95c7b40623e647c))

### [1.1.4](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.1.3...v1.1.4) (2021-03-24)


### Bug Fixes

* :bug: fix wrong edge id in results section ([a31c7eb](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/a31c7eb62005663940558d3be2d854f7debc8f67))

### [1.1.3](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.1.2...v1.1.3) (2021-03-24)


### Bug Fixes

* :bug: fix missing biolink prefix ([0700e71](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/0700e7149f1c9d3a25b7db67dd46d8c9e7d66f2c))

### [1.1.2](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.1.1...v1.1.2) (2021-03-24)


### Bug Fixes

* :bug: fix publications not display ([560f3fd](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/560f3fd5cd9759418de3b06b8b6a728c85984cb7))
* :bug: fix tyypo ([e630909](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/e6309090c6ec432b0af537d8b3471daa21512698))

### [1.0.1](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v0.8.0...v1.0.1) (2021-03-24)

## [0.8.0](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v1.0.0...v0.8.0) (2021-03-23)


### Features

* :sparkles: add chemicalsubstance node when user specify drug as output ([ffb81b3](https://github.com/kevinxin90/bte_trapi_query_graph_handler/commit/ffb81b3f9397bd325ca38f3242f5cd110c03b288))

## [1.0.0](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v0.7.0...v1.0.0) (2021-03-23)

### [1.1.1](https://github.com/kevinxin90/bte_trapi_query_graph_handler/compare/v0.7.0...v1.1.1) (2021-03-24)


Expand Down
6 changes: 3 additions & 3 deletions __test__/integration/graph/graph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ describe("Test graph class", () => {
},
api_name: "API1",
source: "source1",
publications: ["PMID:1", "PMID:2"],
predicate: "predicate1"
},
publications: ["PMID:1", "PMID:2"],
$output: {
obj: [
{
Expand All @@ -45,9 +45,9 @@ describe("Test graph class", () => {
},
api_name: "API2",
source: "source2",
publications: ["PMC:1", "PMC:2"],
predicate: "predicate1"
},
publications: ["PMC:1", "PMC:2"],
$output: {
obj: [
{
Expand All @@ -74,9 +74,9 @@ describe("Test graph class", () => {
},
api_name: "API3",
source: "source3",
publications: ["PMC:3", "PMC:4"],
predicate: "predicate2"
},
publications: ["PMC:3", "PMC:4"],
$output: {
obj: [
{
Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@biothings-explorer/query_graph_handler",
"version": "1.1.1",
"version": "1.1.6",
"description": "A nodejs module to query TRAPI Query Graph",
"main": "built/index.js",
"scripts": {
Expand Down Expand Up @@ -50,10 +50,10 @@
"typescript": "^4.2.3"
},
"dependencies": {
"@biothings-explorer/call-apis": "^1.15.0",
"@biothings-explorer/call-apis": "^1.15.1",
"@biothings-explorer/smartapi-kg": "^3.1.1",
"biolink-model": "^0.3.0",
"biomedical_id_resolver": "^3.4.1",
"biomedical_id_resolver": "^3.4.2",
"debug": "^4.3.1",
"lodash": "^4.17.21",
"ms": "^2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/graph/knowledge_graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = class KnowledgeGraph {

_createNode(kgNode) {
const res = {
category: kgNode._semanticType,
category: 'biolink:' + kgNode._semanticType,
name: kgNode._label,
attributes: [
{
Expand Down Expand Up @@ -75,7 +75,7 @@ module.exports = class KnowledgeGraph {
type: 'bts:api',
},
{
name: 'publicatiions',
name: 'publications',
value: Array.from(kgEdge.publications),
type: 'biolink:publication',
},
Expand Down
2 changes: 1 addition & 1 deletion src/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = class QueryGraphHelper {
}

_getPublication(record) {
return record.$edge_metadata.publications || undefined;
return record.publications || undefined;
}

_getKGEdgeID(record) {
Expand Down
2 changes: 1 addition & 1 deletion src/query_execution_edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = class QExeEdge {

getHashedEdgeRepresentation() {
const toBeHashed =
this.subject.getCategories() + this.predicate + this.object.getCategories() + this.getInputCurie();
this.getSubject().getCategories() + this.getPredicate() + this.getObject().getCategories() + this.getInputCurie();
return new helper()._generateHash(toBeHashed);
}

Expand Down
2 changes: 1 addition & 1 deletion src/query_results.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = class QueryResult {
return {
[record.$edge_metadata.trapi_qEdge_obj.getID()]: [
{
id: helper._createUniqueEdgeID(record),
id: helper._getKGEdgeID(record),
},
],
};
Expand Down

0 comments on commit 766db23

Please sign in to comment.