Install the policy compass web application and all dependent services for development.
Requirements:
- Ubuntu linux 64bit (tested with 14.04 LTS)
- git
- make
- bash
- python3.4 (optional for automatic installation)
- postgres, elasticsearch, and tons of other dependencies (see Makefile for reference)
This requires an github.com account with ssh keys.
git clone [email protected]:policycompass/policycompass.git
cd policycompass
Install dependencies:
sudo make install_deps
Install dependency services and build shell environment with all development tools:
make
Start all installed services and the frontend using supervisord:
supervisord -c etc/supervisord.conf
Install Adhocracy:
make adhocracy3_install
Run Adhocracy:
supervisorctl start adhocracy:
Setup resources:
make adhocracy3_setup_resources
Install basic requirements:
- python3.4
- firefox (default setting for browser acceptance tests)
Checkout sub repositories:
git submodule foreach --recursive "(git checkout master; git submodule init; git submodule update; git pull)"
To update all repositories run:
git pull
git submodule foreach --recursive "(git submodule init; git submodule update; git-pull)"
Create Python virtualenv:
pyvenv-3.4 .
Install test runner:
bin/pip3.4 install -r requirements.txt
Install dependency services:
Read the README files in the subproject directories (./policycompass-*).
The API documentation for all the Policy Compass services can be found here.
Acceptance tests for the frontend webapplication and functional tests/specification that show how to use a service.
To ease distributed development every service API has a mock HTTP server which specifies HTTP responses for given HTTP requests.
- pytest (test runner)
- pytest_splinter (test fixtures/configuration for the splinter browser)
- splinter (test browser based on webdriver)
- webdriver (browser automation)
- requests (library for http requests)
You can start the example mock server with:
bin/python tests-mock-services/example-service.py
Test that it is working correctly:
wget http://localhost:9900/test/value
bin/py.test tests-acceptance-frontend
bin/py.test tests-api-services
This project (i.e. all files in this repository if not declared otherwise) is licensed under the GNU Affero General Public License (AGPLv3), see LICENSE.txt.