-
clone this repo
-
create a
gh-sprints/local_settings.pyfile to override values ingh-sprints/settings.pylike GH token, DB creds, repo name, and org -
create a venv
-
run
pip install -r requirements.txt -
create a DB and add creds to
gh-sprints/local_settings.pynote: If you want to use PostgreSQL, the easiest way on OSX is to download postgres.app, update your $PATH, and then open the Postgres cli by typing
psql.Then you can create a user and database:
CREATE USER yourname WITH PASSWORD 'super-strong-password'; CREATE DATABASE sprints_db; GRANT ALL PRIVILEGES ON DATABASE sprints_db to yourname;additional notes:
-
your
$USERis already theSuperuserfor all ofpsql -
psqlcheat sheet:\lList databases
\c <database name>Connect to a database
\duList roles (think "describe users")
\dtList tables in a connected DB (think "describe tables" ...don't think "drop tables" :p )
\d <tablename>List columns on table
\dfList functions in a connected DB (think "describe functions")
-
-
initialize the DB by running
python gh-sprints/sprints.py init -
populate the DB by running
python gh-sprints/sprints.py snapshotor click the "Update" button in the UI -
main it rain PRs

The web app uses Flask, so see their documentation for deployment options.
Once the web app is deployed, you probably want to have snapshots happen automatically. The following cron line will do a snapshot once an hour (at the 30 minute mark):
30 * * * * <path to python> <path to the repo>/sprints.py snapshot 2>&1 | /usr/bin/logger
You may also want to automatically lock a sprint. The following cron line will lock the current sprint on Friday afternoons:
0 19 * * 5 <path to python> <path to the repo>/sprints.py lock -s current 2>&1 | /usr/bin/logger