Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.5.1 release #1183

Merged
merged 128 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
128 commits
Select commit Hold shift + click to select a range
0f21fbc
prevent doc version check while saving
briehl Sep 20, 2017
9e4cc0d
Merge pull request #1167 from briehl/develop
briehl Sep 20, 2017
940dba0
Fixes PUBLIC-123: The number of reactions and compounds associated wi…
JamesJeffryes Sep 21, 2017
d1dd996
must look up object by objId, not object itself
thomasoniii Sep 21, 2017
ba4d932
change oxygenRegular to oxygenBold for kbase-list-items
tiramisu24 Sep 21, 2017
3640042
Merge pull request #1170 from tiramisu24/develop
briehl Sep 21, 2017
afd00bf
availabletypes dropdown no longer refreshes with workspace refresh
tiramisu24 Sep 21, 2017
e90ea73
filter results updates with workspace updates
tiramisu24 Sep 21, 2017
805b854
sort updates with workspace update
tiramisu24 Sep 22, 2017
4373206
Merge pull request #1168 from JamesJeffryes/compound_counts
briehl Sep 22, 2017
a1b0e26
add back in reverseData
tiramisu24 Sep 22, 2017
c7e03fb
updated to sort on non-qualified name
thomasoniii Sep 22, 2017
c525942
Merge pull request #1172 from tiramisu24/develop
briehl Sep 22, 2017
57f098d
last item in list not cut off
tiramisu24 Sep 26, 2017
d522a4d
last item in list not cut off
tiramisu24 Sep 27, 2017
9e12cef
dynamic type list
thomasoniii Sep 27, 2017
681c918
ES5 syntax. Bah.
thomasoniii Sep 27, 2017
957d0a3
ES5 syntax. Bah.
thomasoniii Sep 27, 2017
0bbf2da
ES5 syntax. Bah.
thomasoniii Sep 27, 2017
e8c8477
STILL MORE ES6 syntax. Dagnabbit.
thomasoniii Sep 27, 2017
8600ba1
STILL MORE ES6 syntax. Dagnabbit.
thomasoniii Sep 27, 2017
1fb6b1f
STILL MORE ES6 syntax. Dagnabbit.
thomasoniii Sep 27, 2017
54b7205
remove style for testing
tiramisu24 Sep 27, 2017
e83f2cd
nav buttons in firefox are not overlaying over elements
tiramisu24 Sep 27, 2017
0f02594
fix double scroll
tiramisu24 Sep 27, 2017
48c8c86
Merge pull request #1173 from kbase/kbase-4756
briehl Sep 28, 2017
a43adbd
Merge pull request #1174 from tiramisu24/develop
briehl Sep 28, 2017
fbb9a93
Merge pull request #1169 from kbase/ptv-225-type-sorting
briehl Sep 28, 2017
6f98209
on load distinguish between add and copy
tiramisu24 Sep 28, 2017
8e095cb
account for delete if name matches; style add/copy to be the same
tiramisu24 Sep 28, 2017
368e3d9
deleting in kbase narrative data list will update button in kbae nara…
tiramisu24 Sep 29, 2017
03de97e
add bootstrap
tiramisu24 Sep 29, 2017
42ec39e
Merge branch 'addButton' into develop
tiramisu24 Sep 29, 2017
459e81d
modal popup when pressing copy key
tiramisu24 Sep 29, 2017
23b9f2d
fix bug with toggling between tabs
tiramisu24 Sep 29, 2017
51b8c60
fix bug with buttons in different state on toggle tabs
tiramisu24 Sep 29, 2017
8188301
remove commented code and fix spaces
tiramisu24 Sep 29, 2017
675f03a
Merge pull request #1175 from tiramisu24/develop
briehl Sep 29, 2017
32681c8
add writting lock
tiramisu24 Sep 29, 2017
f12a3f1
got coverage mostly working
briehl Sep 30, 2017
e8ba5b1
fix side panel height percentage for no overflow
tiramisu24 Oct 2, 2017
f094a4a
More config fixes so tests run
briehl Oct 2, 2017
86466a4
slideout panel add scroll
tiramisu24 Oct 2, 2017
a7e111a
Merge branch 'scroll' into develop
tiramisu24 Oct 2, 2017
cd5258f
Merge pull request #1176 from tiramisu24/develop
briehl Oct 3, 2017
5daef85
update release notes
tiramisu24 Oct 3, 2017
c79e5c2
funny what decent tests flush out of the woodwork...
briehl Oct 3, 2017
3ad2c0c
some dummy stuff and stubs
briehl Oct 4, 2017
8a77694
move tooltip to top in datapanel; update release_notes
tiramisu24 Oct 4, 2017
1c01906
add logic for writting lock; update release notes
tiramisu24 Oct 4, 2017
74015f6
Merge branch 'writeLock' into develop
tiramisu24 Oct 4, 2017
f493f81
update release notes
tiramisu24 Oct 4, 2017
cb06140
TASK-1116 Add PhenoTypeSet staging uploader
Tianhao-Gu Oct 6, 2017
dbd3622
Task-1117: Add importers for FBAModel type to staging area
JamesJeffryes Oct 6, 2017
9c9c816
Merge pull request #1179 from Tianhao-Gu/add_phenotype_set_staging_up…
briehl Oct 6, 2017
ac0e38a
Merge pull request #1180 from JamesJeffryes/TASK-1117_fbamodel_upload
briehl Oct 6, 2017
dfcc522
Bump version to 3.5.1, add release notes
briehl Oct 6, 2017
1cd9807
Merge pull request #1181 from briehl/develop
briehl Oct 6, 2017
b308c5d
Missed a few release notes for 3.5.1
briehl Oct 6, 2017
be7a28b
card main content extracted
tiramisu24 Oct 9, 2017
15ab5de
change to function style instead of kbwidget
tiramisu24 Oct 10, 2017
ad12f28
seperate into layout card and add class names
tiramisu24 Oct 10, 2017
2452fa1
all information shown
tiramisu24 Oct 10, 2017
a693b70
add toggle for more content
tiramisu24 Oct 10, 2017
77cc73a
style div in same way as narrative
tiramisu24 Oct 11, 2017
483bfe3
add drag and drop
tiramisu24 Oct 11, 2017
68f358d
add pallete icon; add click action to icon; delete old layout
tiramisu24 Oct 11, 2017
5431ddf
toggle more data shown
tiramisu24 Oct 11, 2017
8f6d177
refactor NarrativeDataList genome card
tiramisu24 Oct 11, 2017
90be561
fix ellipsis and palette-icon alignment bugs
tiramisu24 Oct 11, 2017
c52e119
refactor card layout to accout for missing information
tiramisu24 Oct 12, 2017
2478eaa
shorten long title in kbaseDataCard
tiramisu24 Oct 12, 2017
91314db
add actionButton; refactor exampleTab to show all information
tiramisu24 Oct 12, 2017
990c32a
add action button option
tiramisu24 Oct 12, 2017
88e02dc
button alignment
tiramisu24 Oct 12, 2017
c93c8b9
Change "GC Content %" column header to "GC Content"
nlharris Oct 12, 2017
a8e227e
Change "GC Content %" column header to "GC Content"
nlharris Oct 12, 2017
9a0066e
update comments for card layout
tiramisu24 Oct 12, 2017
3f6dc00
replaced cards in my data and shared with me
tiramisu24 Oct 16, 2017
efc0767
cleanup if statements
tiramisu24 Oct 16, 2017
23744a1
Merge branch 'writeLock' into develop
tiramisu24 Oct 16, 2017
2485735
hover card over entire card
tiramisu24 Oct 16, 2017
d68fdfa
fix palette icon position
tiramisu24 Oct 16, 2017
af27dd8
datapanel buttons on cards centered; move click for slide down on mai…
tiramisu24 Oct 16, 2017
828c9f7
add click event to default buttons
tiramisu24 Oct 16, 2017
40729d5
move add button click into datacard
tiramisu24 Oct 16, 2017
828ee34
move click events on add buton and name window open into data card file
tiramisu24 Oct 16, 2017
b4dba98
add app card
tiramisu24 Oct 16, 2017
1227c20
writting -> writing; english is hard
tiramisu24 Oct 16, 2017
501c7ad
Merge pull request #1178 from tiramisu24/develop
briehl Oct 16, 2017
12da7ed
card with title, star, author list, type, version
tiramisu24 Oct 17, 2017
2891f4e
add option to enter fields for data card
tiramisu24 Oct 17, 2017
0a02232
functionally same as ci
tiramisu24 Oct 17, 2017
6350ea4
fix merge conflicts
tiramisu24 Oct 17, 2017
df75dd3
Merge pull request #1184 from nlharris/patch-17
briehl Oct 17, 2017
2b2a466
Merge pull request #1185 from nlharris/patch-18
briehl Oct 17, 2017
7584684
cleanup
tiramisu24 Oct 17, 2017
7e374d7
Merge branch 'card' into develop
tiramisu24 Oct 17, 2017
4f14384
Merge branch 'develop' into develop
tiramisu24 Oct 17, 2017
9136ba6
consistent style with kbaseDatacard
tiramisu24 Oct 18, 2017
524b028
Merge branch 'develop' of https://github.com/tiramisu24/narrative int…
tiramisu24 Oct 18, 2017
76b93db
only show two names for apps card
tiramisu24 Oct 18, 2017
ee006c1
fix english, code style and update comments
tiramisu24 Oct 18, 2017
f2597da
Merge pull request #1186 from tiramisu24/develop
briehl Oct 18, 2017
35884af
re add old auth
tiramisu24 Oct 19, 2017
f38a9af
removed the failsafe checking userId in token as that should not happen
tiramisu24 Oct 19, 2017
5e9645a
Merge pull request #1187 from tiramisu24/develop
briehl Oct 19, 2017
9196db0
fix problem with clicking in catalog not inserting app cells
briehl Oct 19, 2017
e253cbd
buttons in different tabs update at same time
tiramisu24 Oct 19, 2017
3f9ea8a
favorite star css
tiramisu24 Oct 19, 2017
675b933
fix app card style
tiramisu24 Oct 19, 2017
73375ca
change let to var...
tiramisu24 Oct 20, 2017
c369b2b
unit test for DataCard
tiramisu24 Oct 20, 2017
b24013a
Add AppCard unit test
tiramisu24 Oct 20, 2017
2fccd00
Merge pull request #1188 from briehl/catalog-not-inserting-apps
briehl Oct 20, 2017
f256707
Merge pull request #1189 from tiramisu24/develop
briehl Oct 20, 2017
fc75682
Merge pull request #1190 from tiramisu24/develop
briehl Oct 21, 2017
ca477fa
some cleanup
briehl Oct 23, 2017
0e5576d
more cleanup!
briehl Oct 23, 2017
b844cdc
maybe coveralls will just work again?
briehl Oct 23, 2017
03ee1a7
updated .travis.yml to install coveralls
briehl Oct 23, 2017
9373496
one more try at merging...
briehl Oct 23, 2017
e68a7ba
Exclude components we shouldn't be testing.
briehl Oct 24, 2017
d187ed5
removed 'staging' from readme build badges, as we're not using it any…
briehl Oct 24, 2017
ceca95d
added some testing docs
briehl Oct 24, 2017
4f896c5
updated to include working links
briehl Oct 24, 2017
dc0ae3e
added coverage config file
briehl Oct 25, 2017
5f4983b
Merge pull request #1177 from briehl/test-refactor
sychan Oct 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
omit =
src/biokbase/narrative/tests/*
7 changes: 6 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ branches:
- travis-firefox

before_install:
- pip install virtualenv
- pip install virtualenv coveralls
- gem install coveralls-lcov
- nvm install $TRAVIS_NODE_VERSION
- npm install -g bower
- npm install -g grunt-cli
Expand All @@ -35,3 +36,7 @@ before_script:
- sleep 3 # give xvfb some time to start

script: make build-travis-narrative && make test

after_script:
- coveralls-lcov -v -n js-coverage/lcov/lcov.info > js-coverage.json
- coveralls --merge js-coverage.json
18 changes: 9 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ module.exports = function(grunt) {
'karma': {
unit: {
configFile: 'test/unit/karma.conf.js',
reporters: ['progress', 'coverage'],
coverageReporter: {
dir: 'build/test-coverage/',
reporters: [
{
type: 'html', subdir: 'html'
}
]
}
// reporters: ['progress'], //, 'coverage'],
// coverageReporter: {
// dir: 'build/test-coverage/',
// reporters: [
// {
// type: 'html', subdir: 'html'
// }
// ]
// }
},
dev: {
// to do - add watch here
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ test: test-backend test-frontend-unit test-frontend-e2e
test-backend:
@echo "running backend tests"
sh $(BACKEND_TEST_SCRIPT)
# @echo "THIS IS A NO-OP UNTIL THE AUTH2 SWITCH"
@echo "done"

# test-frontend-unit should use karma and jasmine to test
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
| Branch | Status |
| :--- | :--- |
| master | [![Build Status](https://travis-ci.org/kbase/narrative.svg?branch=master)](https://travis-ci.org/kbase/narrative) [![Coverage Status](https://coveralls.io/repos/kbase/narrative/badge.svg?branch=master)](https://coveralls.io/r/kbase/narrative?branch=master) |
| staging | [![Build Status](https://travis-ci.org/kbase/narrative.svg?branch=staging)](https://travis-ci.org/kbase/narrative) [![Coverage Status](https://coveralls.io/repos/kbase/narrative/badge.svg?branch=staging)](https://coveralls.io/r/kbase/narrative?branch=staging) |
| develop | [![Build Status](https://travis-ci.org/kbase/narrative.svg?branch=develop)](https://travis-ci.org/kbase/narrative) [![Coverage Status](https://coveralls.io/repos/kbase/narrative/badge.svg?branch=develop)](https://coveralls.io/r/kbase/narrative?branch=develop)|

This is the repository for the KBase Narrative Interface.
Expand Down
26 changes: 26 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,32 @@
The Narrative Interface allows users to craft KBase Narratives using a combination of GUI-based commands, Python and R scripts, and graphical output elements.

This is built on the Jupyter Notebook v4.4.1 (more notes will follow).
### Version 3.5.2
- TASK-1089 - Import data slide out panel tracks what object is added to narrative. Add button turns into copy if objecct already exists. Add pop up when user copies and overrides exisiting object.
- TASK-1094 - Fix overlapping cells and buttons issue in Firefox
- TASK-1113/PUBLIC-148 - Import Panel scrolls if panel size is larger than screen size
- TASK-1088 - Data Pane maintains filters after refresh due to changes in narritve
- TASK-1114 - Add lock when editing name, that prevents data panel from refreshing with new data. Reliquenishes lock after 15 min if no activity.
- Style Fixes
- Fix bold font display inconsistencies between different browsers
- Move tooltip in datapanel from covering buttons to the top
- TASK-1158 - Standardize app and object cards in narrative and data panel


### Version 3.5.1
- TASK-1117 - Add importer for FBAModels to staging area
- TASK-1116 - Add PhenotypeSet importer to staging area
- TASK-1089 - Import data slide out panel tracks what object is added to narrative. "Add" button turns into "copy" if object already exists. Add pop up when user copies and overrides existing object.
- TASK-1094 - Fix overlapping cells and buttons issue in Firefox
- TASK-1113/PUBLIC-148 - Import Panel scrolls if panel size is larger than screen size
- TASK-1088 - Data Pane maintains filters after refresh due to changes in narrative
- Style Fixes
- Fix bold font display inconsistencies between different browsers
- Move tooltip in data panel from covering buttons to the top
- KBASE-4756 - Fix data type filtering in data panel slideout.
- PTV-225 - Fixes sorting by type in data panel
- PTV-535 - Fix RNA-seq viewer to properly handle multiple input types.
- PUBLIC-123 - Fix incorrect reaction counts in FBA Model viewer

### Version 3.5.0
- TASK-1054 - Create a new loading window with a set of tasks to load and connect to (treats the problem of slowly loading websockets, still probably needs some adjusting).
Expand Down
49 changes: 49 additions & 0 deletions docs/testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Narrative Unit Testing

### Short version
1. Install the Narrative and activate its virtualenv (if appropriate)
a. (optional) set credentials in test/
2. Run `make test` at a prompt.
3. Lament the coverage is so low.

### Long version
**About**
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/).

**How to run tests**
We aren't testing the underlying Jupyter code, but we are making use of it, so a test run requires a Narrative install as described in the [installation](../install/local_install.md) docs. If you're installing in a Virtualenv, make sure it's activated. You don't need to run the narrative yourself for tests to work, it just needs to be installed.

Then, simply run (from the narrative root directory) `make test`.

This calls a few subcommands, and those can be run independently for specific uses:
* `make test-frontend-unit` will run only the unit tests on the frontend (i.e. those with the Karma runner)
* `make test-frontend-e2e` will run only the frontend tests that make use of Selenium to simulate a browser on the real Narrative site.
* `make test-backend` will run only the backend Python tests.

**Add credentials for tests**
The Narrative Interface is one of the hubs of KBase - it touches several different services, all of which need real authentication. Some of those have been mocked in various tests (like running apps), but others (the Workspace service) still require a real Auth token. If you have a KBase Developer account, you can create a Developer Token in the Account tab of the main KBase interface.

You can store auth token files in test/. These are single line files, containing only the Auth token used for testing a single user. For example, `test/narrativetest.tok` would be for the narrativetest user, and would only contain that user's Auth token. DO NOT CHECK THESE IN TO GITHUB.

Next, these credentials need to be referenced for both the back and front end. This version requires two configs - one for Python, and one for JavaScript.

* Python:
`src/biokbase/narrative/tests/test.cfg`
In the `[users]` and `[token_files]` blocks, two sets of values are needed: test_user and private_user. They don't have any special permissions, they just need to be different users.

* JavaScript:
`test/unit/testConfig.json`
This just needs the path to the token file (with pre-pended slash), such as `"/test/narrativetest.tok"`

* *TODO (10/24/2017): Unify these token configs!*

**Testing with Travis-CI / Coveralls**
These tests are run (without credentials) automatically on a pull request to the Narrative Github repo. These are currently run through [Travis-CI](https://travis-ci.org/) and the coverage reported with [Coveralls](https://coveralls.io/). There should be nothing you need to do to make this work.

**Adding your own tests**
* **Python**
Python tests should be per module, and should all be added to the `src/biokbase/narrative/tests`. The `test.cfg` file there is in INI file format, and should be added to, as necessary.

There are some service client Mocks available using the `mock` library. Check out `test_appmanager.py` for some examples of how these can be used.
* **JavaScript**
JavaScript tests follow the common Test Spec idiom. Here, we create a new spec file for each JavaScript module. These all live under `test/unit/spec` in roughly the same subdirectory as found under `kbase-extension/static/kbase/js`. There's an example spec in `test/unit/specTemplate.js` - you can just copy this to a new module, and modify to fit your needs.
6 changes: 5 additions & 1 deletion kbase-extension/static/custom/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ span#notebook_name:hover {
right: 0;
bottom: 0;
overflow: auto;
padding-bottom: 100px;
}
#notebook-container:after{
content: "";
height: 100px;
display:block;
}


Expand Down
26 changes: 26 additions & 0 deletions kbase-extension/static/kbase/config/staging_upload.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@
"id": "media",
"name": "Media"
},
{
"id": "fba_model",
"name": "FBA Model"
},
{
"id": "assembly",
"name": "Assembly"
},
{
"id": "phenotype_set",
"name": "Phenotype Set"
}
],
"app_info": {
Expand Down Expand Up @@ -84,6 +92,15 @@
"app_output_suffix": "_media",
"multiselect": false
},
"fba_model": {
"app_id": "kb_uploadmethods/import_file_as_fba_model_from_staging",
"app_input_param": "model_file",
"app_input_param_type": "string",
"app_static_params": {},
"app_output_param": "model_name",
"app_output_suffix": "_model",
"multiselect": false
},
"assembly": {
"app_id": "kb_uploadmethods/import_fasta_as_assembly_from_staging",
"app_input_param": "staging_file_subdir_path",
Expand All @@ -92,6 +109,15 @@
"app_output_param": "assembly_name",
"app_output_suffix": "_assembly",
"multiselect": false
},
"phenotype_set": {
"app_id": "kb_uploadmethods/import_tsv_as_phenotype_set_from_staging",
"app_input_param": "staging_file_subdir_path",
"app_input_param_type": "string",
"app_static_params": {},
"app_output_param": "phenotype_set_name",
"app_output_suffix": "_phenotype_set",
"multiselect": false
}
}
}
Loading