Skip to content
A Flask app to let authorised users update performance data on GOV.UK
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis
application
etc
log
tests
tools
.gitignore
.travis.yml
LICENSE
Procfile
README.md
manifest.yml
requirements.txt
requirements_for_tests.txt
run_tests.sh
runtime.txt
start-app.sh
start.py

README.md

Performance Platform admin

Build status Coverage Status Code Health

Performance Platform admin is a Flask app that allows authorised users to update performance data on GOV.UK.

Application dependencies

We recommend using virtualenv to manage this application's dependencies. If you are using the performance platform development VM, run workon performanceplatform-admin to source this.

To set up, run:

pip install -r requirements.txt

Redis is also required to run the application. It is already on the dev vm. If you prefer to install it locally:

brew install redis

To start run redis-server

While the default command is enough to run the app locally, a good guide to adding redis to launchctl can be found here if you're more ambitious.

Bypassing signon in dev

If you're running this in dev, an additional route '/sign-in' is available to bypass authing with signon.

Getting set up with GOV.UK's single sign-on service

  1. Create a signon application and user
  2. Update development config with OAuth2 credentials
  3. Set an environment variable to allow OAuth over insecure TLS in development: export OAUTHLIB_INSECURE_TRANSPORT=1
  4. Run the app as normal

Compiling stylesheets

If you need to compile stylesheets outside of the normal app starting process then run:

python tools/compile_sass.py

Running the app

This app expects two environment variables to be set: PORT and REDIS_URL. Redis needs to be running when booting the app locally.

export PORT=3070
export REDIS_URL=redis://localhost:6379/12

python start.py

or if you're using the Performance Platform development environment you can

bowl admin

Starting the app in development will automatically compile stylesheets.

You can modify your local configuration without affecting version control using the instructions in the admin/config/development.py file.

Running tests

Redis needs to be running before starting the tests.

./run_tests.sh

Populating the DB with 'seed' values

Clone the stagecraft repo then from that folder, run:

 bash tools/replicate-db.sh api-postgresql-primary-1.api.integration govuk_dev
You can’t perform that action at this time.