This document guides into different development tasks without installing and running the complete production system on a personal workstation.
The core of the system is written in Python 3 and installing that is the minimum requirement. Then, clone the project and get started!
Following terminal commands create an environment and install required packages.
Linux & OS X:
python3 -m virtualenv -p python3 py_venv
source py_venv/bin/activate
pip install -r requirements.txt
Windows:
C:\Python35\python -m venv py_venv
py_venv\Scripts\activate.bat
pip install -r requirements.txt
When starting a new terminal for development, access the same virtual enviroment by entering the activate command alone (2nd line).
The repository contains a Django web framework project where directory radar
is the main module. Django offers a command line interface for controlling the system and this project further extends it with custom commands. Executing python manage.py
lists all commands.
Useful maintenance actions:
python manage.py migrate
Creates/updates changed database models (default settings store data in filesystemdb.sqlite3
).python manage.py createsuperuser
Creates a user that can login to the web UI.
Useful testing actions:
python manage.py runserver
Runs the web UI in http://localhost:8000/ as well as Django database admin in http://localhost:8000/admin/python manage.py loadsubmissions testcourse/exercise1 user1/sub1 user1/sub2 user2/sub1 ...
Loads file submissions into analysis queue from the given directories (wildcards should work too, e.g. data/rainfall/9*/*). Each submission is a single directory - even if there is only one submitted file per submission.python manage.py matchsubmissions testcourse/exercise1
Processes file submissions from the analysis queue. Beware, time requirement is exponential so better start with ten rather than hundred submissions. Once submissions have been inserted the button at top "Recompare all..." needs to be clicked to feed new submissions for matching.
Tip: create empty file radar/local_settings.py
in order to get rid of extra warnings.