Developing Locally

Note

The commands below are presumed to be run relative to the project root unless explicitly stated otherwise. ./ also refers to the project root.

Environment Setup

  1. Fork us on GitHub.

  2. Clone your fork locally:

    $ git clone git@github.com:<your username>/python-humble-utils.git
    
  3. Create a virtualenv ; assuming you have virtualenvwrapper installed, this is how you do it:

    $ mkvirtualenv python_humble_utils
    $ cd <cloned project root>
    $ setvirtualenvproject
    
  4. Initialize environment:

    $ python setup.py develop
    

Scenarios

Updating Requirements

Project requirements must be declared and pinned in ./requirements*.txt.

To install/upgrade/uninstall dependencies into/in/from the environment:

$ make install

Running tox with Multiple Python Distributions

Running tox locally requires a number of Python distributions to be available, which is a challenge, to say the least. pyenv helps overcome this major obstacle.

  1. Follow pyenv installation instructions to install pyenv system-wide.

  2. Install all versions of Python the project is tested against by tox (see ./tox.ini).

  3. Run tox:

    $ make test-all