Hacking on Debmetrics

It is easy to hack on debmetrics or just setup a local instance.

  • git clone git://anonscm.debian.org/qa/debmetrics.git
  • cd debmetrics
  • mkdir graphs
  • make
  • ./minified_grabber
  • crontab crontab
  • adjust .debmetrics.ini to point to Postgres instance
  • python create_all.py

Debmetrics Structure

app.py: All the flask code is contained in app.py
create_all.py: Creates the db structure from the model files
crontab: A crontab file that runs the pull_runner.py every 5 minutes
debmetrics.wsgi: A sample wsgi file for use with Apache
minified_grabber: Downloads js and css files
pull_runner.py: Runs all the pull_scripts, inserts data in db, and generates graphs
push_runner.py: Handles data from push scripts and generates graphs
debmetrics/base.py: A universal SQLAlchemy base for the entire debmetrics project
debmetrics/config_reader.py: Reads the config file (.debmetrics.ini)
debmetrics/graph_helper.py: Implements the time_series_graph() function
debmetrics/graph_scripts/: Stores the custom graph scripts
debmetrics/manifest2index.py: Generates an index file from the manifest file names
debmetrics/manifest2orm.py: Generates the ORM from the manifest files
debmetrics/models/: Stores the autogenerated models
debmetrics/pull_scripts/: Stores the pull scripts
debmetrics/runner_helper.py: A helper for pull_runner.py and push_runner.py
docs/: Sphinx documentation
manifests/: Stores the manifests
static/: The flask static directory. Serves images, js, and css.
templates/: The flask template directory
tests/: The tests