<commit_before># Set up

## Prerequisites

1. [Python][] 2.7
2. [PIP][]
3. [Node][] >= 0.10.0
4. [Ruby][] 2.0
5. [PostgreSQL][]

## Recommended

1. [Virtualenv][]
2. [Virtualenvwrapper][]

## Building technical documentation

1. cd docs
2. make clean
3. make html
4. Docs files now available here: docs/_build/html

## Setting up the development environment

### Virtual Environment (optional)

It is recommended that you create a virtual environment for Python. For more
information see the documentation on [virtualenv][] and [virtualenvwrapper][].

### Installing backend dependencies

    $ pip install -r requirements.txt

If you are not installing in a virtual environment, you may require root
privileges, so you'll need to `sudo` the above command.

### Installing frontend dependencies

    $ npm install
    $ npm install -g gulp bower
    $ bower install
    $ sudo gem install sass compass

If you don't want to install `gulp` or `bower` globally (with the `-g` flag),
you can run them from the copies installed in `node_modules` by running

    $ ./node_modules/.bin/gulp
    $ ./node_modules/.bin/bower

## Setting up the database

Our backend is built off of postgres.  In order to quickly install postgres and
get started on building the application, either install postgres with homebrew
or with http://postgresapp.com/.

The current settings file ( which you should edit especially if deploying to
a a remote server ;-) ) has the password for the django login to: <PASSWORD>
so feel free to set the djangoapp password to that when getting started!

    $ createuser --no-createdb --no-createrole --no-superuser --password djangoapp
    Password:
    $ createdb polio --owner djangoapp
    $ python manage.py syncdb
    $ python manage.py migrate

The password for the djangoapp user can be found in `settings.py`.

## Building

    $ npm run build<commit_msg>add line about the webpack config set up to README<commit_after># Set up

## Prerequisites

1. [Python][] 2.7
2. [PIP][]
3. [Node][] >= 0.10.0
4. [Ruby][] 2.0
5. [PostgreSQL][]

## Recommended

1. [Virtualenv][]
2. [Virtualenvwrapper][]

## Building technical documentation

1. cd docs
2. make clean
3. make html
4. Docs files now available here: docs/_build/html

## Setting up the development environment

### Virtual Environment (optional)

It is recommended that you create a virtual environment for Python. For more
information see the documentation on [virtualenv][] and [virtualenvwrapper][].

### Installing backend dependencies

    $ pip install -r requirements.txt

If you are not installing in a virtual environment, you may require root
privileges, so you'll need to `sudo` the above command.

### Installing frontend dependencies

    $ npm install
    $ npm install -g gulp bower
    $ bower install
    $ sudo gem install sass compass

You will also need to copy the sample webpack config to make the FE build work"

    $ cp webpack.config.dev.sample.js webpack.config.dev.js

If you don't want to install `gulp` or `bower` globally (with the `-g` flag),
you can run them from the copies installed in `node_modules` by running

    $ ./node_modules/.bin/gulp
    $ ./node_modules/.bin/bower

## Setting up the database

Our backend is built off of postgres.  In order to quickly install postgres and
get started on building the application, either install postgres with homebrew
or with http://postgresapp.com/.

The current settings file ( which you should edit especially if deploying to
a a remote server ;-) ) has the password for the django login to: <PASSWORD>
so feel free to set the djangoapp password to that when getting started!

    $ createuser --no-createdb --no-createrole --no-superuser --password djangoapp
    Password:
    $ createdb polio --owner djangoapp
    $ python manage.py syncdb
    $ python manage.py migrate

The password for the djangoapp user can be found in `settings.py`.

## Building

    $ npm run build
{'fraction_non_alphanumeric': 0.0867022629036359, 'fraction_numerical': 0.00966183574879227, 'mean_word_length': 3.6227967097532314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4167117', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1107, 'n_words': 519}