Frontend administration application for the digital marketplace
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.
app foo Dec 12, 2018
example_responses Toggle services (suspend/unsuspend) Nov 14, 2018
scripts Remove bower and upgrade dependencies Jan 12, 2018
tests Use dmtestutils FrameworkStub in tests Jan 10, 2019
.coveragerc Coverage only required for the app itself. Mar 14, 2017
.dockerignore Remove bower and upgrade dependencies Jan 12, 2018
.flake8 Ignore both W503 and W504 in flake8 file, we don't want to be that pr… Dec 12, 2018
.gitignore Remove bower and upgrade dependencies Jan 12, 2018
.pyup.yml Update .pyup.yml Jan 2, 2019
.travis.yml Remove bower and upgrade dependencies Jan 12, 2018
Dockerfile Update base Docker image Dec 3, 2018
LICENCE Update LICENCE Nov 27, 2017
Makefile Use new utils python freeze script in Makefile for freeze-requirement… Nov 19, 2018
README.md Add a Python version badge to README Nov 27, 2018
application.py Bring in 11.1.1 of utils Oct 28, 2015
config.py Use signed URLs to fetch supplier and user CSVs Sep 24, 2018
default.nix default.nix: ensure generated venv is always placed relative to defau… Dec 11, 2018
gulpfile.js Copy fonts directly to static folder Nov 30, 2018
local.example.nix default.nix: add mechanism for making local modifications to nix envi… Jul 24, 2017
package.json Bump jquery Jan 3, 2019
requirements-app.txt Update lxml from 4.2.6 to 4.3.0 Jan 4, 2019
requirements-dev.txt Update pytest from 4.0.2 to 4.1.0 Jan 11, 2019
requirements.txt Update lxml from 4.2.6 to 4.3.0 Jan 4, 2019
setup.cfg Remove bower_components from setup.cfg Jan 16, 2018
yarn.lock

README.md

Digital Marketplace admin frontend

Coverage Status Requirements Status Python 3.6

Frontend administration application for the digital marketplace.

Quickstart

Install dependencies, build assets and run the app

make run-all

Full setup

Create a virtual environment

python3 -m venv ./venv

Activate the virtual environment

source ./venv/bin/activate

Upgrade dependencies

Install new Python dependencies with pip

make requirements-dev

Install frontend dependencies with yarn and gulp How to install yarn

yarn

Compile the front-end code

You need Node (try to install the version we use in production - see the base docker image).

To check the version you're running, type:

node --version

Run the tests

make test

Run the development server

To run the Admin Frontend App for local development use the run-all target. This will install requirements, build assets and run the app.

make run-all

To just run the application use the run-app target.

The admin frontend runs on port 5004. Use the app at http://127.0.0.1:5004/admin/

Updating application dependencies

requirements.txt file is generated from the requirements-app.txt in order to pin versions of all nested dependencies. If requirements-app.txt has been changed (or we want to update the unpinned nested dependencies) requirements.txt should be regenerated with

make freeze-requirements

requirements.txt should be committed alongside requirements-app.txt changes.

Frontend tasks

YARN is used for all frontend build tasks. The commands available are:

  • yarn run frontend-build:development (compile the frontend files for development)
  • yarn run frontend-build:production (compile the frontend files for production)
  • yarn run frontend-build:watch (watch all frontend files & rebuild when anything changes)