This chapter is a list of resources and notes that I thought would be helpful to new people who want to contribute to this software. There’s also some design decisions and code conventions in here, too.
richard has migrated to
which makes settings in Django behave more like regular old class inheritance.
Prod in the
module all handle the expected domains. You can override these by:
- creating a
from . import settings
- creating your class (or creating a Dev / Prod class) and extending from
- Updating your deployment scripts to run
manage.py --settings richard.config.settings_local
richard uses virtualenv and pip to build the environment for richard to run.
Requirements are listed in the
extra_requiresdefined for local development and postgres. Since richard is meant for deployment rather than a framework, requirements are pinned hard. This makes it easy to install various options without having multiple requirements files.
richard uses git for version control. This has a big effect on how the project evolves in respects to code changes.
pyflakes is a great code checker that eliminates a class of possible errors from your code. I highly recommend using it.
I use it with Emacs. This page covers setting up pyflakes with Emacs in a couple of different ways.
Another way to run it is as a pre-commit hook with check.py.
This software is built using Django. I tried to use Django pieces where possible.
We use pytest and the django wrapper.
This runs the search system. I picked whoosh because it’s a pure Python package and thus really easy to install and use. That makes richard easy for contributors to get up and running.
You can pick a different backend by setting the appropriate configuration in
settings_local.py. See the django-haystack documentation for details.
South manages schema and data migrations independent on the database.
django-rest-framework provides a RESTful API that can be used to retrieve videos programmatically and can ease importing many videos for site admins.