Giter VIP home page Giter VIP logo

narrative's Introduction

The KBase Narrative Interface

Gitter

Branch Status
master Build Status Coverage Status
develop Build Status Coverage Status

Table of Contents

About

This is the repository for the KBase Narrative Interface. The KBase Narrative Interface builds on the Jupyter Notebook and contains elements to interact with various KBase tools and data stores.

This document contains links to various documentation in the docs directory, with a brief description of each.

Installation

If you want to use the KBase Narrative Interface, just point your browser at https://narrative.kbase.us, make a free account, and jump in. This repo is only for people who wish to contribute to the development of the interface.

Local Installation

Short version: Requires the following:

  • Python 3.6+
  • Anaconda/Miniconda as an environment manager (https://www.anaconda.com/)
  • Node.js (latest LTS recommended)
  • Bower 1.8.8+

Git Pre-commit installation

Our git pre-commit hooks allow you to run flake8 and black upon git commit and save you from having to run these linters manually.

  • change into the base directory
  • pip install pre-commit
  • pre-commit install to set up the git hook scripts
  • edit a python file and git commit -m <comment> it in to test out the installation

Using a Conda Environment

This is the recommended method of installation!

git clone https://github.com/kbase/narrative
cd narrative
conda create -n my_narrative_environment
conda activate my_narrative_environment
./scripts/install_narrative.sh
kbase-narrative

If the previous instructions do not work, try

# source ~/anaconda3/bin/activate or wherever you have python installed
conda create -n my_narrative_environment
conda activate my_narrative_environment
sh scripts/install_narrative.sh
# scripts/install_narrative.sh
kbase-narrative

Without conda

This process installs lots of requirements of specific versions and may clobber things on your PYTHONPATH.

git clone https://github.com/kbase/narrative
cd narrative
./scripts/install_narrative.sh
kbase-narrative

Long version: Local Narrative setup

Architecture

In progress!

The Narrative sits on top of the Jupyter Notebook, so most of its architecture is a mirror of that. However, the Narrative's interaction with other KBase elements - namely the data stores and job running services - merits its own description. This will be ongoing (and evolving!), but a brief description of how a job gets run and registered is available here:

Narrative App/Method Running

When deployed in production, the Narrative Interface is compiled into a Docker container. When a user logs in, they have their own instance provisioned for them through an Nginx proxy, which provides a temporary server-side Narrative environment only for that user. Any changes made to a Narrative get saved as part of KBase data stores, but any changes to the file system or the Narrative kernel (e.g. local variables) are lost when the user logs out and their Docker instance gets shut down.

Testing

For general testing instructions and guidance refer to docs/testing.md. For information about headless browser testing refer to docs/HeadlessTesting.md.

Submitting code

Follow the gitflow directions located at docs/git-workflow.md to submit code to this repository.

narrative's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.