<commit_before>.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.

.. _install:

==================
Installing Bedrock
==================

Installation
------------

These instructions assume you have `git` and `pip` installed. If you don't have `pip` installed, you can install it with `easy_install pip`.

Start by getting the source::

    $ git clone --recursive git://github.com/mozilla/bedrock.git
    $ cd bedrock

**(Make sure you use --recursive so that legal-docs are included)**

You need to create a virtual environment for Python libraries. Skip the first instruction if you already have virtualenv installed::

    $ pip install virtualenv                       # installs virtualenv, skip if already have it
    $ virtualenv venv                              # create a virtual env in the folder `venv`
    $ source venv/bin/activate                     # activate the virtual env
    $ bin/peep.py install -r requirements/dev.txt  # installs dependencies<commit_msg>Modified virtualenv command to explicitly use py 2.7<commit_after>.. This Source Code Form is subject to the terms of the Mozilla Public
.. License, v. 2.0. If a copy of the MPL was not distributed with this
.. file, You can obtain one at http://mozilla.org/MPL/2.0/.

.. _install:

==================
Installing Bedrock
==================

Installation
------------

These instructions assume you have `git` and `pip` installed. If you don't have `pip` installed, you can install it with `easy_install pip`.

Start by getting the source::

    $ git clone --recursive git://github.com/mozilla/bedrock.git
    $ cd bedrock

**(Make sure you use --recursive so that legal-docs are included)**

You need to create a virtual environment for Python libraries. Skip the first instruction if you already have virtualenv installed::

    $ pip install virtualenv                       # installs virtualenv, skip if already have it
    $ virtualenv -p python2.7 venv                 # create a virtual env in the folder `venv`
    $ source venv/bin/activate                     # activate the virtual env
    $ bin/peep.py install -r requirements/dev.txt  # installs dependencies
{'fraction_non_alphanumeric': 0.11323210412147505, 'fraction_numerical': 0.005206073752711497, 'mean_word_length': 2.7679738562091503, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5956183', 'n_tokens_mistral': 611, 'n_tokens_neox': 573, 'n_words': 276}