<commit_before># PulseGuardian

A system to manage Pulse: creates users and handle overgrowing queues. More
information on [the wiki][].

## Pre-requisites

* RabbitMQ (tested on 3.3.0)
* Python (2.6+)
* pip (to install external dependencies)
* MySQL (if you're using the sqlalchemy MySQL engine, see below)

## Setup

* Clone the repository and cd into it
* Create and activate a virtualenv:
```
  virtualenv venv
  source venv/bin/activate
```
* Install the requirements:
```
  pip install -r requirements.txt
```
* Copy `pulseguardian/config.py.example` to `pulseguardian/config.py` and
  update it with the correct settings (database, email password, etc.)

## Usage

Make sure `rabbitmq-server` is running and you're inside the source directory
(`pulseguardian`) before you run the following commands.

**WARNING**: The tests will mess with your local rabbitmq instance (wiping out
existing queues, possibly deleting users) so make sure you don't run the tests
on a production instance.

* Initialize the db with: `python dbinit.py`. *WARNING*: This removes any
  existing data the app might have previously stored in the databse.
* Optional: Generate some dummy data (dummy user account, admin account):
  `python dbinit.py --dummy`
* Run the Pulse Guardian daemon with: `python guardian.py`
* Run the web app (for development) with: `python web.py`
* For production, the web app can be run with [gunicorn][] and such.
* Run tests with: `python runtests.py`


[the wiki]: https://wiki.mozilla.org/Auto-tools/Projects/Pulse/PulseGuardian
[gunicorn]: https://www.digitalocean.com/community/articles/how-to-deploy-python-wsgi-apps-using-gunicorn-http-server-behind-nginx<commit_msg>Updated README with fake account argument.<commit_after># PulseGuardian

A system to manage Pulse: creates users and handle overgrowing queues. More
information on [the wiki][].

## Pre-requisites

* RabbitMQ (tested on 3.3.0)
* Python (2.6+)
* pip (to install external dependencies)
* MySQL (if you're using the sqlalchemy MySQL engine, see below)

## Setup

* Clone the repository and cd into it
* Create and activate a virtualenv:
```
  virtualenv venv
  source venv/bin/activate
```
* Install the requirements:
```
  pip install -r requirements.txt
```
* Copy `pulseguardian/config.py.example` to `pulseguardian/config.py` and
  update it with the correct settings (database, email password, etc.)

## Usage

Make sure `rabbitmq-server` is running and you're inside the source directory
(`pulseguardian`) before you run the following commands.

**WARNING**: The tests will mess with your local rabbitmq instance (wiping out
existing queues, possibly deleting users) so make sure you don't run the tests
on a production instance.

* Initialize the db with: `python dbinit.py`. *WARNING*: This removes any
  existing data the app might have previously stored in the databse.
* Optional: Generate some dummy data (dummy user account, admin account):
  `python dbinit.py --dummy`
* Run the Pulse Guardian daemon with: `python guardian.py`
* Run the web app (for development) with: `python web.py --fake-account <EMAIL>` - it will create a fake account and disable HTTPS
* For production, the web app can be run with [gunicorn][] and such.
* Run tests with: `python runtests.py`


[the wiki]: https://wiki.mozilla.org/Auto-tools/Projects/Pulse/PulseGuardian
[gunicorn]: https://www.digitalocean.com/community/articles/how-to-deploy-python-wsgi-apps-using-gunicorn-http-server-behind-nginx
{'fraction_non_alphanumeric': 0.1005184331797235, 'fraction_numerical': 0.002880184331797235, 'mean_word_length': 4.592592592592593, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, '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': '1477928', 'n_tokens_mistral': 1074, 'n_tokens_neox': 992, 'n_words': 415}