<commit_before># Cronenberg

A dashboard front-end for Graphite.

## Overview

Words. Words about pictures.

### Screenshot

![screenshot](docs/screenshot-single-node-light.png)

## Setup

### Creating the Database

Cronenberg runs off of a sqlite backing store, which has to be
initialized, and can be populated with a bunch of demo dashboards. To
initialize the database and generate the demo dashboards:

```shell
$ manage.py initdb
```

### Importing Dashboards from Graphite-Web

Importing dashboard definitions from the built-in dashboard system in
graphite-web is currently supported, via the command
**import_graphite_dashboards**, which supports three optional
arguments **query**, **layout**, and **columns**.

To import everything with default settings, which will create a 4
column fluid layout:

```shell
$ manage.py import_graphite_dashboards
```

You can import a subset of dashboards with the ``--query`` parameter.

```shell
$ manage.py import_graphite_dashboards --query=hbase
```

The importer also allows specify the basic layout type (``fluid`` or
``fixed``), and the number of columns.

```shell
$ manage.py import_graphite_dashboards --query=api --layout=fixed --columns=1
```



## Developing or Running from Source ##

```shell
git clone git@github.com:urbanairship/cronenberg.git
cd cronenberg
virtualenv .
. bin/activate

# If you are on a Mac and have XCode 5.1 installed, you'll need this
# set before installing the dependencies from requirements.txt for
# SQLAlchemy's C extensions to compile.  export
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

# Install dependencies
pip install -r requirements.txt

# Create the database and generate the demo dashboards
./manage.py initdb

# Run it (defaults to http://localhost:5000)
./manage.py run
```

### Third-Party Code ###

Server Side:

* [Flask](http://flask.pocoo.org/)
* [Flask-Script](http://packages.python.org/Flask-Script/)
* [Flask-SQLAlchemy](http://pythonhosted.org/Flask-SQLAlchemy/)
* [requests](https://github.com/kennethreitz/requests)
* inflection
* pybars
<commit_msg>Add npm instructions to README<commit_after># Cronenberg

A dashboard front-end for Graphite.

## Overview

Words. Words about pictures.

### Screenshot

![screenshot](docs/screenshot-single-node-light.png)

## Setup

### Creating the Database

Cronenberg runs off of a sqlite backing store, which has to be
initialized, and can be populated with a bunch of demo dashboards. To
initialize the database and generate the demo dashboards:

```shell
$ manage.py initdb
```

### Importing Dashboards from Graphite-Web

Importing dashboard definitions from the built-in dashboard system in
graphite-web is currently supported, via the command
**import_graphite_dashboards**, which supports three optional
arguments **query**, **layout**, and **columns**.

To import everything with default settings, which will create a 4
column fluid layout:

```shell
$ manage.py import_graphite_dashboards
```

You can import a subset of dashboards with the ``--query`` parameter.

```shell
$ manage.py import_graphite_dashboards --query=hbase
```

The importer also allows specify the basic layout type (``fluid`` or
``fixed``), and the number of columns.

```shell
$ manage.py import_graphite_dashboards --query=api --layout=fixed --columns=1
```



## Developing or Running from Source ##

### Setting up the Python Environment

```shell
git clone <EMAIL>:urbanairship/cronenberg.git
cd cronenberg
virtualenv .
. bin/activate

# If you are on a Mac and have XCode 5.1 installed, you'll need this
# set before installing the dependencies from requirements.txt for
# SQLAlchemy's C extensions to compile.  export
export ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future

# Install dependencies
pip install -r requirements.txt

```

### Setting up the Javascript Environment

Javascript code is bundled using [Grunt](http://gruntjs.com/). To set
up grunt and generate the bundled .js files that the web app loads:

```shell
npm install -g grunt-cli
npm install
grunt
```

If you're going to edit the javascript files and wish to automatically
regenerate the bundled files as they're edited, run

```
grunt watch &
```

### Create the database and run

```
# Create the database and generate the demo dashboards
./manage.py initdb

# Run it (defaults to http://localhost:5000)
./manage.py run
```

### Third-Party Code ###

Server Side:

* [Flask](http://flask.pocoo.org/)
* [Flask-Script](http://packages.python.org/Flask-Script/)
* [Flask-SQLAlchemy](http://pythonhosted.org/Flask-SQLAlchemy/)
* [requests](https://github.com/kennethreitz/requests)
* inflection
* pybars

{'fraction_non_alphanumeric': 0.11158706361105161, 'fraction_numerical': 0.0034268579995716426, 'mean_word_length': 4.744157441574416, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '586254', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1346, 'n_words': 498}