Ripley heroically supports UC Berkeley's Canvas LMS instance.
- Install Python 3
- Create your virtual environment (venv)
- Install dependencies
pip3 install -r requirements.txt [--upgrade]
nvm use
npm install
If you plan to use any resources outside localhost, put your configurations in a separately encrypted area:
mkdir /Volumes/XYZ/ripley_config
export RIPLEY_LOCAL_CONFIGS=/Volumes/XYZ/ripley_config
createuser ripley --no-createdb --no-superuser --no-createrole --pwprompt
createdb nostromo --owner=ripley
createdb nostromo_test --owner=ripley
createdb ripley_loch_test --owner=ripley
# Load schema
export FLASK_APP=application.py
flask initdb
brew install redis
# Start server
redis-server
REDIS_HOST = '127.0.0.1'
REDIS_PORT = 6379
REDIS_USE_FAKE_CLIENT = False
Listen on the queue for jobs, with Redis.
On macOS 10.13 and later, disable the fork() crash behavior (see rq/rq#1418):
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
Start the worker:
.platform/hooks/postdeploy/02_start_rq_worker.sh
We use Tox for continuous integration. Under the hood, you'll find PyTest, Flake8 and ESLint. Please install NPM dependencies (see above) before running tests.
# Run tests and linters in parallel:
tox -p
# Pytest
tox -e test
# Run specific test(s)
tox -e test -- tests/test_models/test_foo.py
tox -e test -- tests/test_externals/
# Linters, à la carte
tox -e lint-py
tox -e lint-vue
# Auto-fix linting errors in Vue code
tox -e lint-vue-fix
# Lint specific file(s)
tox -e lint-py -- scripts/foo.py