Setting up a circuits Development Environment

This is the recommended way to setup a development enviornment for developing with or on circuits.

Note

This document assumes you already have a working Python environment with a minimum Python version of 2.7 as well as pip already installed.

Prequisites

It is highly recommended that you install and use virtualenv for all your Python development and production deployments (not just circuits).

It is also convenient to install and use the accompanying shell scripts and tools virtualenvwrapper which adds a nice set of workflows and functions useful for both development and deployments.

$ pip install -U virtualenvwrapper
$ source $(which virtualenvwrapper.sh)

Note

You should put source $(which virtualenvwrapper.sh) in either your $HOME/.bashrc or $HOME/.profile depending on how you login and interact with your terminals.

In addition to the above recommendations you must also have a Git client installed and ready to use as well as your Editor/IDE of choice ready to use.

Getting Started

  1. Fork circuits (if you haven’t done so already)

  2. Clone your forked repository using Git

  3. Create a new virtual environment using virtualenvwrapper

  4. Install the Development Requirements

  5. Install circuits in “develop” mode

And you’re done!

Example:

$ git clone git@github.com:prologic/circuits.git
$ cd circuits
$ mkvirtualenv circuits
$ pip install -r requirements-dev.txt
$ python setup.py develop

Alternatively if you already have Fabric installed:

$ git clone git@github.com:prologic/circuits.git
$ cd circuits
$ mkvirtualenv circuits
$ fab develop