A better course evaluation tool.
Make sure you have Python 2.7, pip, and PostgreSQL, and npm installed. Then, run:
$ pip install -r requirements/local.txt
$ python manage.py migrate
$ npm install
$ npm run build
To run the server:
$ python manage.py runserver
Scraping the registrar is pretty simple. Make sure that you have RabbitMQ and you have migrated the site.
On a Mac with Homebrew set up:
$ brew install rabbitmq
$ brew services start rabbitmq
$ python manage.py migrate
Then, start the worker and assign it tasks:
$ celery multi start Jones -A easypce -l info
$ python manage.py scrape --all
If you intend to develop on the build, you may enjoy hot code reloading on the client side. To set this up, run:
$ npm run watch &
$ python manage.py runserver
Additionally, if you want scraping functionality to work, you'll need too install Redis and Celery for task scheduling. Then, you can run this:
$ celery worker -A easypce -l info
$ python manage.py runserver
You can also do lots of fun stuff with concurrency if you use Celery multi:
$ celery multi start num_workers -A easypce -l info
This project uses a mostly custom folder structure as an almagamation of various starting templates, adapted for our specific purposes.
Folder | Description |
---|---|
api |
REST API-related code |
assets |
created on npm run build , bundle outputs for production use |
easypce |
The project folder; Django settings and routes |
requirements |
Python requirements, separated by environment |
static |
Static assets, including client-side code |
webpack |
Webpack configuration |
celery worker -A easypce -l info
: Run a celery worker for the project.celery multi start num_workers -A easypce -l info
: Run a worker cluster for the project.python manage.py runserver
: Run a development server.python manage.py scrape [--all] [--meta] [--terms (terms)]
: Run scraping tasks on workers.npm run build
: Builds the client-side bundle for production use.npm run build-local
: Like above, but for local use.npm run clean
: Remove all generated files.npm run watch
: Launch a server that watches and serves client-side files.