Skip to content

Commit

Permalink
Merge pull request #2 from bcgsc/release/v3.14.3
Browse files Browse the repository at this point in the history
Release/v3.14.3
  • Loading branch information
creisle committed Jan 19, 2021
2 parents 2b64138 + 8e404dc commit 2e50b50
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/npm-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: [10, 12, 14]
name: node-${{ matrix.node }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12
node-version: ${{ matrix.node }}
- run: npm ci
- name: install peers
run: npm install @bcgsc-pori/graphkb-parser
- run: npm test
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v1.6
if: always()
if: matrix.node == 12
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
files: coverage/junit.xml
- uses: codecov/codecov-action@v1
if: matrix.node == 12
with:
yml: codecov.yml
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GraphKB Schema

[![codecov](https://codecov.io/gh/bcgsc/pori_graphkb_schema/branch/master/graph/badge.svg?token=0QZTY7RA1R)](https://codecov.io/gh/bcgsc/pori_graphkb_schema) ![build](https://github.com/bcgsc/pori_graphkb_schema/workflows/build/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40bcgsc-pori%2Fgraphkb-schema.svg)](https://badge.fury.io/js/%40bcgsc-pori%2Fgraphkb-schema)
[![codecov](https://codecov.io/gh/bcgsc/pori_graphkb_schema/branch/master/graph/badge.svg?token=0QZTY7RA1R)](https://codecov.io/gh/bcgsc/pori_graphkb_schema) ![build](https://github.com/bcgsc/pori_graphkb_schema/workflows/build/badge.svg?branch=master) [![npm version](https://badge.fury.io/js/%40bcgsc-pori%2Fgraphkb-schema.svg)](https://badge.fury.io/js/%40bcgsc-pori%2Fgraphkb-schema) ![node versions](https://img.shields.io/badge/node-10%20%7C%2012%20%7C%2014-blue)

This is the package which defines the schema logic used to create the database, build the API and GUI.
It is a dependency of both the API and GUI and uses the parser package.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bcgsc-pori/graphkb-schema",
"version": "3.14.2",
"version": "3.14.3",
"description": "Shared package between the API and GUI for GraphKB which holds the schema definitions and schema-related functions",
"bugs": {
"email": "graphkb@bcgsc.ca"
Expand Down
2 changes: 1 addition & 1 deletion src/sentenceTemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const DEFAULT_TEMPLATE = `Given ${
const chooseDefaultTemplate = (record) => {
const conditionTypes = record.conditions.map(c => c['@class'].toLowerCase());
const multiVariant = conditionTypes.filter(t => t.endsWith('variant')).length > 1
? 'Co-occurence of '
? 'Co-occurrence of '
: '';
const hasVariant = conditionTypes.some(t => t.endsWith('variant'));
const hasDisease = conditionTypes.includes('disease');
Expand Down
6 changes: 3 additions & 3 deletions test/sentenceTemplates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('generateStatementSentence', () => {

test('multiple variants predict prognosis in disease', () => {
const key = 'subject:Vocabulary|conditions:Disease;PositionalVariant;PositionalVariant;Vocabulary|relevance:favourable prognosis';
const result = 'Co-occurence of chr19:y.qcopyloss, and chr1:y.pcopyloss predicts favourable prognosis in anaplastic oligodendroglioma [C4326]';
const result = 'Co-occurrence of chr19:y.qcopyloss, and chr1:y.pcopyloss predicts favourable prognosis in anaplastic oligodendroglioma [C4326]';
const { content } = generateStatementSentence(schemaDefn, examples[key]);
expect(content.replace(' ({evidence})', '')).toEqual(result);
});
Expand Down Expand Up @@ -58,15 +58,15 @@ describe('generateStatementSentence', () => {

test('multiple variants result in sensitivity to therapy', () => {
const key = 'subject:Therapy|conditions:Disease;PositionalVariant;PositionalVariant;Therapy|relevance:sensitivity';
const result = 'Co-occurence of KIT:p.V560D, and KIT:p.D820G is associated with sensitivity to imatinib [DB00619] in gastrointestinal stromal tumor [C3868]';
const result = 'Co-occurrence of KIT:p.V560D, and KIT:p.D820G is associated with sensitivity to imatinib [DB00619] in gastrointestinal stromal tumor [C3868]';
const { content } = generateStatementSentence(schemaDefn, examples[key]);
expect(content.replace(' ({evidence})', '')).toEqual(result);
});
});

describe('functional effects', () => {
test('co-occuring variants result in tumourigenesis', () => {
const result = 'Co-occurence of PARK2 copy loss, and APC mutation contributes to tumourigenesis of colorectal cancer';
const result = 'Co-occurrence of PARK2 copy loss, and APC mutation contributes to tumourigenesis of colorectal cancer';
const input = {
conditions: [
{
Expand Down

0 comments on commit 2e50b50

Please sign in to comment.