joesingo / tom_education

Plugin for the TOM toolkit
MIT License
1 stars 0 forks source link

tom_education

Build Status Documentation Status

TOM Education is a plugin for the TOM Toolkit adding features intended for educational use. See the documentation for more information.

Features

Long-running tasks (such as running data pipelines and creating large timelapses) are performed asynchronously in separate worker processes using Dramatiq via django_dramatiq and Redis.

Requirements

In addition to the requirements listed in setup.py you will need:

Installation

  1. Set up a TOM following the getting started guide.

  2. Clone and install this package with pip:

pip install tom_education

Note: a dependency of one of tom_education's dependencies requires a Fortran compiler to install. On Ubuntu, run sudo apt-get install gfortran before installing with pip.

  1. Add tom_education to INSTALLED_APPS in settings.py.
INSTALLED_APPS = [
    ...
    'tom_education'
]
  1. Run the tom_education setup management command. Note that this overwrites settings.py and urls.py in the newly created project.
python manage.py tom_education_setup
  1. Install Redis, and start redis-server. If not running Redis on the same server as tom_education, or if using a non-default port, change the Redis connection settings in settings.py under DRAMATIQ_BROKER.

  2. Start the Dramatiq worker processes:

python manage.py rundramatiq

Note that rundramatiq must be restarted for code changes to take effect.

  1. Optional: install test dependencies and run tests to check everything is okay (Note: Redis and the Dramatiq workers do not have to be running to run the tests).
pip install tomtoolkit[test]
python manage.py test tom_education

Install Development version

Clone this repo and install the package with pip:

git clone https://github.com/joesingo/tom_education
pip install -e tom_education