Developers

Coding guidelines

Python coding guidelines are standard PEP-8, with the following variations:

  • No wildcard imports (from foo import *). Ever.
  • Indent your code with 4 spaces per indentation level. Tabs are forbidden. (SublimeText users: "translate_tabs_to_spaces": true)
  • Remove any trailing whitespace upon save. (SublimeText users: "trim_trailing_white_space_on_save": true)
  • Source code encoding is US-ASCII. When US-ASCII is insufficient, use UTF-8, not latin-1.

Unit Testing guidelines

velo project follows pyramid unit testing guidelines

Get velo running

Mongo DB

Two options:

  1. Install and run mongodb locally: http://www.mongodb.org/downloads
  2. Open an account on https://www.mongohq.com/ and create a (free) database

Velo

  1. To download all necesary dependencies, in a virtualenv, run:

    (env)$ pip install -r requirements-dev.txt
    (env)$ python setup.py develop
  2. Export mongo environment variables with mongo database info:

    (env)$ export MONGO_DB_NAME=<database_name>
    (env)$ export MONGO_URI=mongodb://<user>:<password>@<mongo_server_hostname>/<database_name>
  3. To run tests:

    (env)$ nosetests
  4. To run local server:

    (env)$ pserve development.ini --reload

Table Of Contents

Previous topic

VELO

Next topic

Resources

This Page