edbennett / cogs3

Project Management System
MIT License
0 stars 2 forks source link

cogs3 cogs3

Build Status codecov Codacy Badge license

Demo

Development server

Sequence Diagrams

Getting started

  1. Checkout the source code.

    mkdir -p ~/code && cd $_
    git clone git@github.com:tystakartografen/cogs3.git
  2. Create a virtual environment.

    mkdir -p ~/venvs/cogs3 && cd $_
    virtualenv -p /usr/local/bin/python3 .
    source bin/activate

    Replace /usr/local/bin/python3 with the path to a Python 3 executable. On macOS this should be installed from Homebrew.

  3. Install the requirements.

    cd ~/code/cogs3
    pip install -r requirements.txt
  4. Configure the environment variables.

    cd cogs3
    mv .template_env .env
  5. Edit .env to include, at a minimum, an arbitrary SECRET_KEY. Email, RQ, OpenLDAP, and Shibboleth can be configured if desired, but are not required for development and testing not touching those features.

  6. Create the database.

    cd ..
    python manage.py migrate
  7. Load institution data into the database, default institution data is available in fixtures.

    python manage.py loaddata institutions.yaml
  8. Create an admin user.

    python manage.py createsuperuser
  9. Run the unit tests.

    python manage.py test -v 3
  10. Generate coverage report.

    coverage run manage.py test
    coverage html
  11. Install redis.

    brew install redis

    Replace brew with your package manager. On Debian and Ubuntu, the package is named redis-server; i.e.

    sudo apt install redis-server
  12. Start the redis server.

    redis-server &
  13. Test redis server is running.

    redis-cli ping
    >>> PONG
  14. Start the development server.

    python manage.py runserver