Skip to content

Commit f151891

Browse files
authored
Merge pull request #2425 from kbase/develop
Staging release of version 4.5.0
2 parents 3b09924 + 4684ca6 commit f151891

File tree

125 files changed

+38962
-6866
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+38962
-6866
lines changed

Diff for: .coveragerc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
[run]
22
omit =
3-
src/biokbase/narrative/tests/*
3+
*/biokbase/narrative/tests/*
4+
*/biokbase/narrative/sphinxext/*
5+
6+
[html]
7+
directory = ./python-coverage
8+
9+
[xml]
10+
output = ./python-coverage/coverage.xml

Diff for: .eslintrc.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ env:
44
es6: true
55
node: true
66
extends:
7-
- 'eslint:recommended'
7+
- "eslint:recommended"
88
- prettier
99
parserOptions:
10-
ecmaVersion: 2018
10+
ecmaVersion: 2018
1111
root: true
1212
rules:
1313
strict:
@@ -16,8 +16,8 @@ rules:
1616
no-console:
1717
- error
1818
- allow:
19-
- warn
20-
- error
19+
- warn
20+
- error
2121
require-await:
2222
- error
2323
no-confusing-arrow:
@@ -40,3 +40,7 @@ rules:
4040
- warn
4141
prefer-spread:
4242
- warn
43+
indent:
44+
- error
45+
- 4
46+
- SwitchCase: 1

Diff for: .github/workflows/integration_test.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI-integration-testing
2+
3+
on:
4+
[push, pull_request]
5+
6+
jobs:
7+
build-and-test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: conda-incubator/[email protected]
12+
with:
13+
miniconda-version: 'latest'
14+
activate-environment: test-environment
15+
python-version: 3.6.10
16+
auto-activate-base: false
17+
auto-update-conda: true
18+
condarc-file: test/condarc.yml
19+
20+
- name: Use Node JS 14.x
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 14.x
24+
25+
- name: Install JS dependencies
26+
run: |
27+
npm ci
28+
npm install bower
29+
./node_modules/bower/bin/bower install
30+
31+
- name: Install Narrative Application
32+
shell: bash -l {0}
33+
run: |
34+
bash ./scripts/install_narrative.sh
35+
npm run minify
36+
sed <src/config.json.templ >src/config.json "s/{{ .Env.CONFIG_ENV }}/dev/"
37+
sed -i 's/{{ if ne .Env.CONFIG_ENV "prod" }} true {{- else }} false {{- end }}/true/' src/config.json
38+
jupyter notebook --version
39+
40+
- name: Run Narrative Frontend Integration Tests
41+
shell: bash -l {0}
42+
env:
43+
KBASE_TEST_TOKEN: ${{ secrets.NARRATIVE_TEST_TOKEN }}
44+
run: make test-integration

Diff for: .github/workflows/test.yml renamed to .github/workflows/unit_test.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI-testing
1+
name: CI-unit-testing
22

33
on:
44
[push, pull_request]
@@ -45,23 +45,17 @@ jobs:
4545
shell: bash -l {0}
4646
run: make test-frontend-unit
4747

48-
- name: make test output available as artefact in case of failure
48+
- name: make test output available as artifact in case of failure
4949
if: ${{ failure() }}
5050
uses: actions/upload-artifact@v2
5151
with:
5252
name: karma-result.json
5353
path: karma-result.json
5454

55-
- name: Run Narrative Frontend Integration Tests
56-
shell: bash -l {0}
57-
env:
58-
KBASE_TEST_TOKEN: ${{ secrets.NARRATIVE_TEST_TOKEN }}
59-
run: make test-integration
60-
6155
- name: Send to Codecov
62-
uses: codecov/codecov-action@v1
56+
uses: codecov/codecov-action@v1.5.2
6357
with:
6458
file: |
65-
./coverage.xml
59+
./python-coverage/coverage.xml
6660
./js-coverage/lcov/lcov.info
6761
fail_ci_if_error: true

Diff for: .gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ kbase-extension/log/
1111
kbase-extension/kbase_templates/old/
1212
kbase-extension/static/components/
1313
kbase-extension/static/ext_components/
14+
kbase-extension/static/ext_modules/
1415
node_modules/
1516
install.log
1617
/src/build/
@@ -24,6 +25,7 @@ narrative_venv/
2425
new_narrative_env_2/
2526
js-coverage
2627
cover
28+
_attic
2729

2830
# From https://github.com/github/gitignore/blob/master/Python.gitignore
2931

@@ -65,6 +67,7 @@ pip-delete-this-directory.txt
6567

6668
# Unit test / coverage reports
6769
/coverage/
70+
/python-coverage/
6871
htmlcov/
6972
.tox/
7073
.coverage
@@ -99,3 +102,6 @@ target/
99102
.vscode
100103
/tags
101104
.idea
105+
106+
# For yarn users
107+
yarn.lock

Diff for: .husky/pre-push

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4-
npm run husky_msg && npm run prettier_check
4+
#npm run husky_msg && npm run prettier_check
5+
npx lint-staged

Diff for: .prettierignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,11 @@
22
.github
33
docs
44
js-coverage
5+
python-coverage
56
kbase-extension/static/ext_components
67
kbase-extension/static/ext_packages
8+
kbase-extension/static/ext_modules
79
kbase-extension/static/kbase/js/patched-components
8-
venv
10+
node_modules
911
cover
12+
venv

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ build-travis-narrative:
3838
test: test-backend test-frontend
3939
@echo "done running backend and frontend test scripts"
4040

41-
# test-backend should use nose, or the like, to test our
41+
# test-backend uses pytest to test our
4242
# Python extensions to the IPython notebook.
4343
#
4444
# Testing the IPython notebook itself is out of the scope

Diff for: RELEASE_NOTES.md

+33
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,39 @@ The Narrative Interface allows users to craft KBase Narratives using a combinati
44

55
This is built on the Jupyter Notebook v6.0.2 (more notes will follow).
66

7+
### Version 4.5.0
8+
- PTV-1561 - SampleSet viewer fixes to allow AMA features; not complete support for AMA features as GenomeSearchUtil does not yet support AMA.
9+
- SCT-3100 - Improve SampleSet viewer; add improved JSON-RPC 1.1 client and associatedKBase service client; add msw (Mock Service Worker) support;
10+
- SCT-3084 - Fixed broken (non-functional) search in the data panel
11+
- SCT-3602 - refseq public data tool now searches by lineage as well; for all public data tools: automatically focus the search input; fix paging bug.
12+
- No ticket - migrate from `nosetests` to `pytest` for testing the Python stack.
13+
- Python dependency updates
14+
- bokeh 2.3.2 -> 2.3.3
15+
- pillow 8.2.0 -> 8.3.1
16+
- plotly 4.14.3 -> 5.1.0
17+
- pymongo 3.11.4 -> 3.12.0
18+
- pytest 6.2.3. -> 6.2.4
19+
- pytest-cov 2.11.1 -> 2.12.1
20+
- requests 2.25.1 -> 2.26.0
21+
- setuptools 57.0.0 -> 57.4.0
22+
- Javascript dependency updates
23+
- @types/puppeteer 5.0.0 -> 5.4.4
24+
- @wdio/browserstack-service 7.7.3 -> 7.9.0
25+
- @wdio/cli 7.7.3 -> 7.9.0
26+
- @wdio/local-runner 7.7.3 -> 7.9.0
27+
- @wdio/mocha-framework 7.7.3 -> 7.9.0
28+
- @wdio/selenium-standalone-service 7.7.3 -> 7.7.4
29+
- @wdio/spec-reporter 7.7.7 -> 7.9.0
30+
- chromedriver 91.0.0 -> 91.0.1
31+
- eslint 7.28.0 -> 7.32.0
32+
- husky 6.0.0 -> 7.0.1
33+
- karma 6.3.3. -> 6.3.4
34+
- puppeteer 10.0.0 -> 10.1.0
35+
- selenium-standalone 6.23.0 -> 7.1.0
36+
- terser 5.7.0 -> 5.7.1
37+
- wdio-chromedriver-service 7.1.0 -> 7.1.1
38+
- webdriverio 7.7.3 -> 7.9.1
39+
740
### Version 4.4.0
841
- No ticket: boatloads of code cleanup and fixes to the unit and internal testing
942
- PTV-1635: fix bug in data slideout tab selection

Diff for: bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kbase-narrative",
3-
"version": "4.4.0",
3+
"version": "4.5.0",
44
"homepage": "https://kbase.us",
55
"dependencies": {
66
"bluebird": "3.7.2",

Diff for: docs/developer/local-docker.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ The following changes are required:
2424
- `ENV` sets the `CONFIG_ENV` environment variable for the Docker container; ci is the environment in which you are working (needs to be same as the ui is running on.)
2525
- `PORT` sets the host port that can be used. E.g. if you use PORT=12345, then http://localhost:12345 will start the Narrative. Default is 8888.
2626
- Note that the logging on the console will always show 8888 since that will be used internal to the container.
27-
- uses the config set $env; makes it easy to test different environments alongside ui
28-
- uses kbase-dev network; allows interoperation with the kbase-ui proxier
29-
- uses name "narrative"; same
30-
- mounts kbase static directory inside container; allows editing files on host and having changes reflected with a Narrative reload
27+
- uses the config set in `$ENV`; makes it easy to test different environments alongside ui
28+
- uses `kbase-dev` network; allows interoperation with the kbase-ui proxier to access local services
29+
- uses container host name "narrative"
30+
- mounts `kbase-extension/static/kbase` directory inside container; allows editing files on host and having changes reflected with a Narrative reload
3131
- removes container when done; easy cleanup
3232
- uses "dev" tagged container; matches the docker build task above
3333

Diff for: docs/testing/integration-testing.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
- `source ./venv/bin/activate`
3232
- build the narrative locally
3333
- `make install`
34-
- obtain a kbase login (or dev) CI token
34+
- obtain a KBase login (or dev) CI token
35+
- it must be either for the "narrativetest" account, or account which has view access to the same narratives as narrativetest (e.g. kbaseuitest).
3536
- log into `https://ci.kbase.us`
3637
- in the browser console issue
3738
- `document.cookie`

Diff for: docs/testing/testing.md

+19-10
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@
22

33
***Table of Contents***
44

5-
- [Installation](#installation)
6-
- [Short Version](#short-version)
7-
- [Long Version](#long-version)
8-
- [About](#about)
9-
- [How to Run Tests](#how-to-run-tests)
10-
- [Add Credentials for Tests](#add-credentials-for-tests)
11-
- [Testing with Travis-CI and Coveralls](#testing-with-travis-ci-and-coveralls)
12-
- [Adding Your Own Tests](#adding-your-own-tests)
13-
- [Manual Testing and Debugging](#manual-testing-and-debugging)
5+
- [Narrative Unit Testing](#narrative-unit-testing)
6+
- [Installation](#installation)
7+
- [Short version](#short-version)
8+
- [Long version](#long-version)
9+
- [About](#about)
10+
- [How to Run Tests](#how-to-run-tests)
11+
- [Add Credentials for Tests](#add-credentials-for-tests)
12+
- [***Python***](#python)
13+
- [***JavaScript***](#javascript)
14+
- [***Frontend Integration Tests***](#frontend-integration-tests)
15+
- [Testing with Github Actions and Codecov](#testing-with-github-actions-and-codecov)
16+
- [Adding Your Own Tests](#adding-your-own-tests)
17+
- [***Python***](#python-1)
18+
- [***JavaScript***](#javascript-1)
19+
- [***Frontend Integration Tests***](#frontend-integration-tests-1)
20+
- [Manual Testing and Debugging](#manual-testing-and-debugging)
21+
- [***Python***](#python-2)
22+
- [***JavaScript***](#javascript-2)
1423

1524
## Installation
1625

@@ -31,7 +40,7 @@ npm install -g grunt-cli
3140

3241
### About
3342

34-
Because the Narrative Interface is built on both the front and back ends of the Jupyter Notebook, there's two sides to Narrative testing. The front end tests are in JavaScript, and make use of [Karma](http://karma-runner.github.io/1.0/index.html) as a test runner, and [Jasmine](https://jasmine.github.io/2.0/introduction.html) as a testing language. The back end tests are written in Python using the unittest framework, and run with [nose](http://nose.readthedocs.io/en/latest/).
43+
Because the Narrative Interface is built on both the front and back ends of the Jupyter Notebook, there's two sides to Narrative testing. The front end tests are in JavaScript, and make use of [Karma](http://karma-runner.github.io/1.0/index.html) as a test runner, and [Jasmine](https://jasmine.github.io/2.0/introduction.html) as a testing language. The back end tests are written in Python using the unittest framework, and run with [pytest](https://docs.pytest.org/en/6.2.x/).
3544

3645
### How to Run Tests
3746

0 commit comments

Comments
 (0)