# qa-dashboard

## Setup
TODO: Add Docker instructions.

### Python

Install Python

  `brew install python3`

Upgrade `pip` (Python analog of `gem`) and install `virtualenv`
  ```
  pip install --upgrade pip
  pip install virtualenv
  ```

Create and activate `virtualenv` (Python analog of `rvm`)

  ```
  virtualenv env
  . env/bin/activate
  ```

Install libraries from `requirements.txt` (Python analog of `Gemfile`)

  `pip install -r requirements.txt`

### Database

Install `postgres`

  `brew install postgres`

Create server configuration file

  `initdb /usr/local/var/postgres -E utf8`

Create the log
  `make create_log`

Start the database server

  `make start_database`

Create jenkins_analytics database

  `createdb jenkins_analytics`

Migrate and populate the development database

  `make database`

### Django

Create superuser credentials
  `python manage.py createsuperuser`

Start the development server

  `python manage.py runserver`

Verify that the development server is running properly

  `http://127.0.0.1:8000/qa_analytics/` - should load a hello world page

  `http://127.0.0.1:8000/qa_analytics/admin` - sign in with the credentials you created

## Contributing

Run linter and tests

  `make test`

Push to personal fork, make a pull request, check that the PR build passes, and merge after code review
