<commit_before>Install
=========

Getting up and running
----------------------

The steps below will get you up and running with a local development environment. We assume you have the following installed:

* pip
* virtualenv
* PostgreSQL

First make sure to create and activate a virtualenv_, then open a terminal at the project root and install the requirements for local development::

    $ pip install -r requirements/local.txt

.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/

You can now run the ``runserver_plus`` command::

    $ python manage.py runserver_plus

The base app will run but you'll need to carry out a few steps to make the sign-up and login forms work. These are currently detailed in `issue #39`_.

.. _issue #39: https://github.com/pydanny/cookiecutter-django/issues/39

It's time to write the code!!!
<commit_msg>docs/install.rst updated.<commit_after>Install
=========

Getting up and running
----------------------

The steps below will get you up and running with a local development environment. We assume you have the following installed:

* pip
* virtualenv
* PostgreSQL

Install all the apt packages from requirements.apt file.
You can use the following command for debian based systems::

    $ sudo apt-get install $(grep -vE "^\s*#" requirements.apt  | tr "\n" " ")

First make sure to create and activate a virtualenv_

.. _virtualenv: http://docs.python-guide.org/en/latest/dev/virtualenvs/

And now install the requirements from requirements/development.txt::

    $ pip install -r requirements/development.txt

Now change user to postgres::

    $ su - postgres

Login to psql to create database by::

    $ psql

Create a database named 'fossevents' by logging in your postgres server

    $ create database fossevents

Create a role for your database:

    $ create role fossevents with login encrypted password 'password' createdb;

Here quoted password is the password you want for the database

Now make a .env file in the root directory. You can check about python-dotenv_

.. _python-dotenv: https://github.com/theskumar/python-dotenv

In the .env file put the settings for your database configuration as:

`DATABASE_URL="postgres://fossevents:password@localhost/fossevents"`

Here, fossevents is the db name
password is the password you set for the db

Now migrate your changes for the database by::

    $ python manage.py migrate

Now run the server with this command::

    $ python manage.py runserver_plus

Your server is up and running on http://127.0.0.1:8000/

It's time to write code :)
{'fraction_non_alphanumeric': 0.0938108213312573, 'fraction_numerical': 0.006228104320747372, 'mean_word_length': 3.6223021582733814, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1151288', 'n_tokens_mistral': 732, 'n_tokens_neox': 686, 'n_words': 319}