From fe08e04b076ea39f40389f18bc01ca1a45f2f0d5 Mon Sep 17 00:00:00 2001 From: Caralyn Reisle Date: Mon, 18 Jan 2021 13:22:05 -0800 Subject: [PATCH 1/4] Use array of node versions --- .github/workflows/npm-test.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml index 79f49b1..438bf63 100644 --- a/.github/workflows/npm-test.yml +++ b/.github/workflows/npm-test.yml @@ -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 }} From f769ed7962a514dd17d870eb05c16f55f1fb2d70 Mon Sep 17 00:00:00 2001 From: Caralyn Reisle Date: Mon, 18 Jan 2021 13:25:05 -0800 Subject: [PATCH 2/4] Add node versions badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b095aa6..f6b756d 100644 --- a/README.md +++ b/README.md @@ -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. From aaea21d31235f0867b61f9d417bb53596ef6ddd2 Mon Sep 17 00:00:00 2001 From: Caralyn Reisle Date: Tue, 19 Jan 2021 14:30:50 -0800 Subject: [PATCH 3/4] Fix spelling error in generating statement templates --- src/sentenceTemplates.js | 2 +- test/sentenceTemplates.test.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sentenceTemplates.js b/src/sentenceTemplates.js index 27a2e80..0c73a5a 100644 --- a/src/sentenceTemplates.js +++ b/src/sentenceTemplates.js @@ -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'); diff --git a/test/sentenceTemplates.test.js b/test/sentenceTemplates.test.js index 72a9685..08b8e0f 100644 --- a/test/sentenceTemplates.test.js +++ b/test/sentenceTemplates.test.js @@ -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); }); @@ -58,7 +58,7 @@ 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); }); @@ -66,7 +66,7 @@ describe('generateStatementSentence', () => { 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: [ { From 8e404dc456fe775ed5c5748970009efd1c67e16e Mon Sep 17 00:00:00 2001 From: Caralyn Reisle Date: Tue, 19 Jan 2021 15:37:42 -0800 Subject: [PATCH 4/4] Bump version to 3.14.3 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 320bcc8..96550c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@bcgsc-pori/graphkb-schema", - "version": "3.14.2", + "version": "3.14.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fa09aec..de6770a 100644 --- a/package.json +++ b/package.json @@ -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"