-
clone this repo
-
create a
gh-sprints/local_settings.py
file to override values ingh-sprints/settings.py
like 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.py
note: 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
$USER
is already theSuperuser
for all ofpsql
-
psql
cheat sheet:\l
List databases
\c <database name>
Connect to a database
\du
List roles (think "describe users")
\dt
List tables in a connected DB (think "describe tables" ...don't think "drop tables" :p )
\d <tablename>
List columns on table
\df
List 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 snapshot
or 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