-
Notifications
You must be signed in to change notification settings - Fork 74
Developers Guide
This document contains some quick notes that are needed to get started with developing in Adagios.
Adagios python code should more or less conform with PEP8, although line length up to 120 chars is common and no plans to change that.
Make sure you have all the dependencies installed on your machine and optimally have gotten adagios to work. You will need a set of nagios configuraiton under /etc/nagios but if you are not working on the status views it should be optional to have nagios installed and running.
# Clone our repo
git clone http://github.com/opinkerfi/adagios.git
# Start the django web server
cd adagios/adagios
python manage.py runserver
Most of the complex code logic lies in underlying libraries like pynag.
We use Django's unit tests for smoke-testing views. Please do not commit your code if you break any of the unit tests.
Unit tests themselves live within every django app so for examples tests for the status module live in /status/tests.py. You can run the unit tests from the command line with:
python manage.py test
Creating test database for alias 'default'...
.................
----------------------------------------------------------------------
Ran 17 tests in 2.906s
OK
Destroying test database for alias 'default'...
If you create any new views, you are also responsible for creating unit tests for them.