Skip to content

Commit

Permalink
Merge pull request #1793 from briehl/develop
Browse files Browse the repository at this point in the history
add release notes, bump version to 4.3.0
  • Loading branch information
dakotablair authored Aug 14, 2020
2 parents 365ae0c + 7005da3 commit 2c96ddb
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 64 deletions.
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,7 @@ cd narrative
kbase-narrative
```

Long version:

[Local Narrative setup/deployment](docs/install/local_install.md)

## Server installation (for administrators)

If you want to set up your own Narrative server that uses the Docker framework, the below document will walk you through it. Once the server is set up, you only need to pull new code and build a new Docker image from it. You can also pull Narrative images directly from Dockerhub in the KBase namespace.

The document specifically describes how you would build the system on a [Vagrant](https://www.vagrantup.com) image, but is applicable to any Ubuntu-based system.

[Production Narrative setup/deployment](docs/install/deployment.md)
[Dockerhub Narrative builds](docs/install/dockerhub_builds.md)
Long version: [Local Narrative setup](docs/install/local_install.md)

## Architecture

Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ The Narrative Interface allows users to craft KBase Narratives using a combinati

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

### Version 4.3.0
- SCT-2664 - Show the app cell status when in a collapsed state.
- Added an "Info" tab to all app cells with app information.
- Updated links to new KBase home page and docs site.
- Fixed an uploader issue where uploads taking longer than 30 seconds would fail.

### Version 4.2.1
- Address problems with SampleSet / AMA Viewer widget.
- SCT-1822 - fix problems with drag and drop data upload failing for more than 100 files (updated the Dropzone widget to version 5.7.0)
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kbase-narrative",
"version": "4.2.1",
"version": "4.3.0",
"homepage": "https://kbase.us",
"dependencies": {
"bluebird": "3.4.7",
Expand Down
25 changes: 25 additions & 0 deletions docs/developer/release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Staging a new Narrative release
(Updated 8/12/2020)

1. Update versions following (roughly) semantic versioning. The file to be updated are:
* package.json, package-lock.json, bower.json, src/config.json, src/config.json.templ, src/biokbase/narrative/\_\_init\_\_.py
* Major - backward incompatible changes, like the move from Python 2 -> Python 3, or Narrative typed object changes.
* Minor - new features that don't affect compatibility.
* Patch - adjustments to existing features, bug fixes.

2. Add release notes in RELEASE_NOTES.md
* Add a new heading with the updated version.
* Add a list of changes with some reasonable detail. You don't need to add the name of every module changed, just the overall feature affected. Include JIRA ticket numbers where appropriate.

3. PR these changes to the develop branch.
* Ensure that tests pass.
* Ensure that things work as expected on the CI environment.

4. PR the develop branch to the master branch.
* Deploy on the next environment.
* Ensure that things work as expected.

5. Create a new release in the narrative repo.
* tag it with the new version, prefixed with v (e.g. v4.2.1).

That's it. The deployment image is automatically pushed to Dockerhub (as of this writing) on a successfully merged pull request, and deployed from there.
57 changes: 13 additions & 44 deletions docs/install/local_install.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
## Installing and Running the Narrative Interface
(Updated 8/12/2020)

### Requirements

* Python > 2.7 and < 3.0 (for now, a Python 3.6+ version is upcoming)
* Python's virtualenv package
* NodeJS and NPM >= v8.0.0 (available here: https://nodejs.org/en/)
* Python > 3.6+
* NodeJS and NPM >= v10.0.0 (available here: https://nodejs.org/en/, LTS recommended)
* Bower (install with `npm install -g bower` or instructions here https://bower.io/)
* Highly recommended - a Python environment manager. Conda is mostly used here, but venv, Poetry, or Pipenv should work as well.

### Install - Short version

From the root of the narrative repo:
```
./scripts/install_narrative.sh -v narrative_venv
```
or, for another directory target
```
./scripts/install_narrative.sh -v /path/to/my_venv
./scripts/install_narrative.sh
```

This will create a virtual environment and install the Narrative in to it. You can also leave off the `-v` and install it globally, though that might cause problems with other installed Python packages (especially other versions of the Jupyter Notebook, or Jupyter extensions).
Expand All @@ -25,53 +22,25 @@ If you've never used virtual environments before, read this: https://packaging.p

### Install - Detailed version - read this if you have any problems with the above

1. Create a virtual environment with virtualenv. This creates a directory that encapsulates a complete environment that is separate from others on your system, and protects your system from module and version conflicts. This needs to have a Python2 executable. So do the following to make sure the right version is there. This document will use the directory/environment name "narrative_venv" throughout, but you can call it whatever you want.

First, we're going to find the path to a Python 2 executable.
```
python --version
```
Will give a line like `Python 2.7.15` or `Python 3.6.7 :: Anaconda custom (64-bit)`. If the version is 2.7, then you can use this one. Find the path with
It's highly recommended to create a Python virtual environment with one of the many tools around. This encapsulates a complete environment that is separate from others on your system, and protects your system from module and version conflicts. E.g. with conda installed, the command to create a new environment would be
```
which python
conda create -n narrative-env
```
(will probably return something like `/usr/bin/python`)
If the version is Python 3, then you'll have to find the path to a Python 2 executable. You can do this with
Then activate it with
```
which python2
conda activate narrative-env
```
(which may return soething like `/usr/local/bin/python2`)

With whatever path you get, keep it in mind.

Next, make sure you have `virtualenv` installed. If the `virtualenv` command works, then you're set. If not, do the following:
```
pip install virtualenv --upgrade # vanilla Ubuntu 14.04 images come with a very old version of virtualenv that might be problematic
```

Now, we can make that environment. With the path to your Python 2 executable, do:
```
virtualenv --python=/path/to/python narrative_venv
```

2. Activate that environment
```
source narrative_venv/bin/activate
```

3. Install a few pre-requisite pip packages. There's drift between the local installer and the deployed environments, and this is a patch while things get put back in line (will be fixed on release of the Python 3 Narrative, hopefully before January 1, 2020).
```
pip install scikit-learn pandas clustergrammer_widget
```

4. Run the installation script. With your virtual environment activated, any dependencies will be installed there. This'll take ~450MB in your virtualenv.
2. Run the installation script. With your virtual environment activated, any dependencies will be installed there.
```
sh scripts/install_narrative.sh
```

### Running the Narrative Interface
With your virtualenv active (or not, if you didn't use one), just run:
Just run:
```
kbase-narrative
```
This will automatically open a browser window and run the Narrative inside of it. It will open the Jupyter-based 'tree' page that lists all available Narratives. If you get prompted for a "dev" authentication token, you'll need one from CI.

By default, this will be open on port 8888. If port 8888 is in use, it'll go to the next available one. You can set an optional port with `kbase-narrative -port ####`
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,7 +1,7 @@
{
"name": "kbase-narrative-core",
"description": "Core components for the KBase Narrative Interface",
"version": "4.2.1",
"version": "4.3.0",
"private": true,
"repository": "github.com/kbase/narrative",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/biokbase/narrative/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__all__ = ['magics', 'common', 'handlers', 'contents', 'services', 'widgetmanager']

from semantic_version import Version
__version__ = Version("4.2.1")
__version__ = Version("4.3.0")
version = lambda: __version__

# if run directly:
Expand Down
6 changes: 3 additions & 3 deletions src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@
"google_analytics_id": "UA-74532036-1"
},
"dev_mode": true,
"git_commit_hash": "465a86a62",
"git_commit_time": "Fri May 22 16:29:47 2020 -0700",
"git_commit_hash": "bf62933",
"git_commit_time": "Fri Jun 5 13:45:19 2020 -0700",
"loading_gif": "/narrative/static/kbase/images/ajax-loader.gif",
"name": "KBase Narrative",
"next": {
Expand Down Expand Up @@ -333,5 +333,5 @@
"globus_upload_url": "https://app.globus.org/file-manager?destination_id=c3c0a65f-5827-4834-b6c9-388b0b19953a"
},
"use_local_widgets": true,
"version": "4.2.1"
"version": "4.3.0"
}
2 changes: 1 addition & 1 deletion src/config.json.templ
Original file line number Diff line number Diff line change
Expand Up @@ -333,5 +333,5 @@
"globus_upload_url": "https://app.globus.org/file-manager?destination_id=c3c0a65f-5827-4834-b6c9-388b0b19953a"
},
"use_local_widgets": true,
"version": "4.2.1"
"version": "4.3.0"
}

0 comments on commit 2c96ddb

Please sign in to comment.