Development

Installing requirements

Using pip

$ pip install -r requirements/docs.txt -r requirements/testing.txt

Building the documentation locally

  1. Install the documentation requirements:

    $ pip install -r requirements/docs.txt
    
  2. Change directory to docs and run make html:

    $ cd docs
    $ make html
    
  3. Load HTML documentation in a web browser of your choice:

    $ firefox docs/_build/html/index.html
    

Running tests

  1. Install the development requirements:

    $ pip install -r requirements/testing.txt
    
  2. Run nosetests in the project root.

    $ nosetests
    

To run all tests against all supported versions of python, use tox.

Running tests with tox

tox allows us to use one command to run tests against all versions of python that we support.

Setting up tox

  1. Decide how you want to manage multiple python versions.

    1. System level using a package manager such as apt-get. This approach will likely require adding additional apt-get sources in order to install alternative versions of python.
    2. Use pyenv to manage and install multiple python versions. After installation, see the pyenv command reference.
  2. Install tox.

    $ pip install tox
    
  3. Configure tox.

Running tox

Now that you have tox setup, you just need to run the command tox from the project root directory.

$ tox

Getting involved

The terrarium project welcomes help in any of the following ways:

  • Making pull requests on github for code, tests and documentation.
  • Participating on open issues and pull requests, reviewing changes

Pull Request Checklist

To have the best chance at an immediate merge, your pull request should have:

  • A passing Travis-CI build. If it fails, check the console output for reasons why.
  • New unit tests for new features or bug fixes.
  • New documentation in docs for any new features. You do want people to know how to use your new stuff, right?

Release process

  1. Update CHANGELOG.
  2. Bump the version number in __init__.py on master.
  3. Tag the version.
  4. Push to PyPI.