<commit_before>Popcorn Gallery
===============

Django app to power the Popcorn Maker! http://mozillapopcorn.org/

The Project structure is based on Mozilla Playdoh http://playdoh.readthedocs.org/en/latest/index.html


Getting the source code
=======================

Clone the repository and its dependencies:

    git clone --recursive <EMAIL>:alfredo/popcorn_gallery.git


Setup the application
=====================

The recommended setup is using vagrant and virtual box, you can get them from:

- Virtualbox: https://www.virtualbox.org/wiki/Downloads
- Vagrant: http://vagrantup.com/

This will keep the code living in your filesystem but the application running inside a VM.

Once you've installed vagrant, from the root of the repository copy the local vagrant settings.

    cp vagrantconfig_local.yaml-dist vagrantconfig_local.yaml

Edit ``vagrantconfig_local.yaml`` if you want to change any of the defaults.

Now we are ready to provision the machine run.

    vagrant up
    
This will take a few minutes, so go on and reward yourself with a nice cup of tea!


Update the local settings file
==============================

Amend ``popcorn_gallery/settings/local.py``  with your details:

- ADMINS: Add your email address and name.
- SECRET_KEY
- HMAC_KEYS: Uncomment or add your own key.


Preapare the static assets
==========================

Because the project is has a lot of media that needs to be served the files need to be collected and prepared to be served.

Run from te root of the project:

    fab collectstatic


Add a host alias
================

This is done so ou can access the application via: http://local.mozillapopcorn.org

Add to /etc/hosts in your local machine:

    33.33.33.11 local.mozillapopcorn.org

Now the application should be available at:

    http://local.mozillapopcorn.org


Runing the test suite
=====================

SSH into the virtualbox:
<commit_msg>Better wording on the instructions<commit_after>Popcorn Gallery
===============

Django app to power the Popcorn Maker! http://mozillapopcorn.org/

The Project structure is based on Mozilla Playdoh http://playdoh.readthedocs.org/en/latest/index.html


Getting the source code
=======================

Clone the repository and its dependencies:

    git clone --recursive <EMAIL>:alfredo/popcorn_gallery.git


Setup the application
=====================

The recommended setup is using vagrant and virtual box, you can get them from:

- Virtualbox: https://www.virtualbox.org/wiki/Downloads
- Vagrant: http://vagrantup.com/

This will keep the code living in your filesystem but the application running inside a VM.

Once you've installed vagrant, from the root of the repository copy the local vagrant settings.

    cp vagrantconfig_local.yaml-dist vagrantconfig_local.yaml

Edit ``vagrantconfig_local.yaml`` if you want to change any of the defaults.

Now we are ready to provision the machine run.

    vagrant up

This will take a few minutes, so go on and reward yourself with a nice cup of tea!


Update the local settings file
==============================

Amend ``popcorn_gallery/settings/local.py``  with your details:

- ADMINS: Add your email address and name.
- SECRET_KEY
- HMAC_KEYS: Uncomment or add your own key.


Preapare the static assets
==========================

Because the project is has a lot of media that needs to be served the files need to be collected and prepared.

SSH into the virtualbox:

    vagrant ssh

Run from te root of the project:

    fab collectstatic


Add a host alias
================

This is done so ou can access the application via: http://local.mozillapopcorn.org

Add to /etc/hosts in your local machine:

    33.33.33.11 local.mozillapopcorn.org

Now the application should be available at:

    http://local.mozillapopcorn.org


Runing the test suite
=====================

SSH into the virtualbox:

{'fraction_non_alphanumeric': 0.1295577967416602, 'fraction_numerical': 0.004137574347039048, 'mean_word_length': 4.184986595174263, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, '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': '6731262', 'n_tokens_mistral': 1135, 'n_tokens_neox': 1045, 'n_words': 469}