Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
I'm always frank and earnest with bugs. Uh, in GitHub I'm Frank, and Bugzilla I'm Ernest.
Python JavaScript HTML CSS Other
branch: master

Stopgap fix for autorefresh issues

If you're editing the notes on the sprint details page and the
autorefresh kicks in, then you lose all the things you wrote so far.
That sucks.

This is a stopgap fix in that it's not a great fix, but it's easy to do
and it alleviates the problem. It adds a button letting you
enable/disable the autorefresh. It also changes the page so that it
defaults to autorefresh being disabled.

Fixes #75
latest commit a472b4402b
@willkg authored
Failed to load latest commit information.
alembic Split project name from bugzilla_product
ernest Stopgap fix for autorefresh issues
.gitignore Test controllers.
CONTRIBUTORS Update CONTRIBUTORS
LICENSE Update docs
Makefile Add error handling for api resource
Procfile Rework for better Heroku-fu
README.rst Split project name from bugzilla_product
alembic.ini Add project and sprint models and alembic
karma.conf.js Test controllers.
manage.py
package.json
requirements-dev.txt Flake8 pass
requirements.txt Fix psycopg requirement
setup.py Initial pass

README.rst

README

Summary

I'm always frank and earnest with bugs. Uh, in GitHub I'm Frank, and Bugzilla I'm Ernest.

Ernest is a Bugzilla dashboard.

The code is distributed under MPL-v2. See LICENSE file for more details.

October 2nd, 2013 status

This is pretty hard-coded for SUMO as we fiddle with it and get it to our liking. Then maybe I'll work on generalizing it. If you're interested in working on it, that's totally cool---just let us know.

Install and configure

  1. Create a virtual environment.

  2. pip install -r requirements.txt

  3. (optional) npm install if you want to run the JS tests.

  4. cp ernest/settings_local.py-dist ernest/settings_local.py

  5. Edit ernest/settings_local.py.

    You can see which settings are editable/overrideable in ernest/settings.py.

    Note: You MUST provide a SECRET_KEY either in settings_local.py or in the environment. No secret key--no soup!

  6. Create the database and give it the alembic stamp:

    $ python manage.py db_create
    

    This creates the database based on the settings in ernest/settings_local.py.

Create projects and sprints

To create a project:

$ python manage.py create_project <projectname>

To create a sprint for that project:

$ python manage.py create_sprint <projectname> <sprintname>

Run server

Run:

$ python manage.py runserver

Run tests

Run the python tests with:

$ nosetests

Run the clientside tests with:

$ karma start karma.conf.js --single-run

Manage db and migrations

To generate the tables for your db, do:

$ python manage.py db_create

Note: If you run this command twice, it shouldn't wipe your data.

To update your db by applying all unapplied migrations, do:

$ alembic upgrade head

To create a new migration make the model changes you need to make and then, do:

$ alembic revision -m "some message" --autogenerate

See: https://alembic.readthedocs.org/en/latest/tutorial.html#auto-generating-migrations

You can see the current migration with:

$ alembic current

Setup on Heroku

Create the app:

# Log in if you haven't already
$ heroku login

# Use the buchner buildpack
$ heroku create --stack cedar --buildpack \
    git://github.com/rehandalal/heroku-buildpack-python.git

# Push the repository
$ git push heroku master

More details on Buchner build pack here.

Create the db:

$ heroku config | grep POSTGRESQL

# Heroku creates a color db and tells you the variable.
$ heroku pg:promote <COLOR VAR FROM PREVIOUS OUTPUT>

# Create db
$ heroku run "python manage.py db_create"

More details on Postgres on Heroku here.

Create a dyno and make sure it's working:

# Create a dyno
$ heroku ps:scale web=1

# Make sure it's working
$ heroku ps

# Open in your browser
$ heroku open

Helpful documentation

Locations of things

Project settings:
ernest/settings.py and ernest/settings_local.py-dist
API View code:
ernest/main.py
Database models:
ernest/models.py
Templates:
ernest/templates/
Static assets:
ernest/static/
Something went wrong with that request. Please try again.