Here's how to get started with Horseradish. The basic architecture is inspired by netflix lemur.
Using virtualenv
, but feel free to swap it out for your preferred python
environment manager.
$ sudo pip install --upgrade pip
$ sudo pip install virtualenv
$ sudo pip install virtualenvwrapper
$ mkvirtualenv horseradish
$ (horseradish) pip install --upgrade pip
$ (horseradish) pip install "setuptools>=0.9.8"
$ (horseradish) pip install --upgrade pip-tools
$ (horseradish) pip-compile --output-file requirements.txt requirements.in -U --no-index
$ (horseradish) pip install -e .
$ (horseradish) pre-commit install
$ (horseradish) pre-commit run --all-files # just to verify that the repo is in good shape
workon horseradish
to activate the
horseradish
Python environment. You can always disable the linting+style check steps with
pre-commit uninstall
.
Install PostgreSQL: https://postgresapp.com/downloads.html.
Add PostgreSQL Tools to your $PATH
:
export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/{version}/bin/"
(substitute {version} of PostgreSQL.)
Initialize the database:
$ psql
postgres=# CREATE USER horseradish WITH PASSWORD '{pw}' SUPERUSER; # superuser needed for pg_trgm extension
postgres=# CREATE DATABASE horseradish;
None yet, but soon.
horseradish create_config
cd horseradish
horseradish -c ../horseradish.conf.py init
horseradish -c horseradish.conf.py runserver -p 8000
Horseradish follows pep8 with some exceptions for line length and suppressing some warnings related to black, the code style of choice.
PRs are welcome, though they'll need to pass TravisCI checks before merging.