This page explains how to get started contributing code to the SoftLayer API Python Bindings project.
Before installing/downloading anything I highly recommend learning how to use Python’s virtualenv. Virtualenv allows you to have isolated python environments, which is extremely useful for development. After you have a virtualenv, download the SoftLayer API Python Bindings source code. That’s explained here: Installation. After you have the source, change into the base directory and run the following to install the pre-requisites for testing the project. Make sure you’ve activated your virtualenv before you do this.
pip install -r requirements
The project have a mix of functional and unit tests. All the tests run using nose. To run the test suite, change into the base directory and run:
python setup.py nosetests
To test with all supported versions of Python, this project utilizes tox.
To avoid having to install those versions of Python locally, you can also set up Travis on your fork. This can run all the required tests on every code push to github. This is highly recommended.
The project is documented in reStructuredText and built using Sphinx. If you have fabric installed, you simply need to run the following to build the docs:
fab make_html
The documentation will be built in docs/_build/html. If you don’t have fabric, use the following commands.
cd docs
make html
The primary docs are built at Read the Docs.
This project follows PEP 8 and most of the style suggestions that pyflakes recommends. Flake8 should be ran regularly.
Contributing to the Python API bindings follows the fork-pull-request model on github. The project uses Github’s issues and pull requests to manage source control, bug fixes and new feature development regarding the API bindings and the CLI.