<commit_before>Python PIP Prepare
==================

This plugin creates a virtualenv and installs the packages given by the
``requirements.txt`` file in your project.

It tries to be clever with package caching; if it has seen the ``requirements.txt``
file before, it instructs pip not to check the index and just to fetch
the packages from the cache, which does speed up redeploys somewhat.

The basic process it takes is this:

.. code-block:: bash

	$ virtualenv <environment name>
	$ . <environment name>/bin/activate
	$ pip install -r <requirements file name>
	$ virtualenv relocatable <environment name>

.. warning::
	This plugin is not heavily tested. Please let us know about your experiences
	with this plugin.

.. note::
	If you have issues with this plugin, for example if you aborted the prepare
	and on subsequent times it fails, you might want to clear out the checkfiles
	to reset the cache:

	.. code-block:: bash

		$ rm scratch/paasmaker.prepare.pythonpip/*.checkfile

Application Configuration
-------------------------

.. colanderdoc:: paasmaker.pacemaker.prepare.pythonpip.PythonPipPrepareParametersSchema

	The plugin has the following runtime parameters:

Server Configuration
--------------------

This plugin has no server configuration options.<commit_msg>Updated the documentation for the Python PIP plugin.<commit_after>Python PIP Prepare
==================

This plugin creates a virtualenv and installs the packages given by the
``requirements.txt`` file in your project.

This plugin is very crude and only does just enough to speed up deployments
with PIP. It will create a checksum of your ``requirements.txt`` contents, and then
download and install packages into a persistent ``.pybundle`` file. This ``.pybundle``
file is re-used on subsequent deploys instead of fetching from the internet.

The basic process it takes is this:

.. code-block:: bash

	$ virtualenv <environment name>
	$ . <environment name>/bin/activate
	$ virtualenv relocatable <environment name>
	$ # If this is the first time we've seen this requirements.txt file:
	$ pip bundle /persistent/bundle/location -r <requirements file name>
	$ pip install /persistent/bundle/location

.. warning::
	This plugin is quite crude, and is the minimum to get you started. Please
	let us know how we can improve it.

Application Configuration
-------------------------

.. colanderdoc:: paasmaker.pacemaker.prepare.pythonpip.PythonPipPrepareParametersSchema

	The plugin has the following runtime parameters:

Server Configuration
--------------------

This plugin has no server configuration options.
{'fraction_non_alphanumeric': 0.10850327048864948, 'fraction_numerical': 0.0, 'mean_word_length': 3.753199268738574, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3826882', 'n_tokens_mistral': 671, 'n_tokens_neox': 638, 'n_words': 315}