Skip to content

Central point for articles, advice and how-tos for the Data Hub

Notifications You must be signed in to change notification settings

uktrade/data-hub-helpcentre

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

data-hub-helpcentre (aka Data Services Helpcentre)

Coding Styles

We use the following tools to maintain a consistent coding style

  • black - for python code formatting
  • flake8 - Python code style
  • prettier - for javascript and sass code formatting

These style rules are enforced by CircleCI so please check your code locally before pushing changes!

Quickly check coding quality locally

make prettier
make black
make flake8

Local Development - Python

Create a local env file

cp sample.env .env

Add entry to hosts

Append entry 127.0.0.1 data-workspace-sso.test and 127.0.0.1 helpcentre-sso.test to hosts file (probably located at /etc/hosts).

Set up and run the site:

make migrate
make front-end
make up

Superuser privileges

These are needed to develop on the CMS site of the platform in Wagtail. Go to the user_user table in the helpcentre database (running in Postgres container locally) and change the value of 'is_superuser' to true on your test user ([email protected]).

Run website locally

Browse the website at http://localhost:8000

Run unit tests

make test

Changing requirements files

Make any changes using poetry, then run:

make all-requirements

Building the front end styles

make front-end

Accessing Wagtail Admin