Find MoJ data is an internal service for finding and sharing data across the Ministry of Justice. It is powered by Datahub, an open source data catalogue. This repository contains a custom UI that uses the GOV.UK design system, and focuses on data discovery.
Required for building the front end javascript dependencies
Required for managing python package dependencies. Follow installation instructions here https://python-poetry.org/docs/#installation
Organisational level tool for storing application secrets and passwords securely. There are a number of 1password utilities available to manage credentials from cli and desktop environments.
- Install the 1Password desktop app - https://support.1password.com/get-the-apps/
- Install the 1Password CLI app - https://developer.1password.com/docs/cli/get-started/
- Follow the steps to turn on and test the 1password desktop app integration
Tests will require chromedriver at a version compatible with your chrome browser (https://googlechromelabs.github.io/chrome-for-testing/)
Datahub is the backend for Find MoJ data. These instructions assume you will use the existing development environment hosted in cloud platform.
Please refer to Prerequisites for dependencies and installation instructions
- Export a local var with the environment name
export ENV=local
- Run
make build
to install dependencies and build the app- Make any needed customizations required to
.env
file
- Make any needed customizations required to
- Run
make test
to run unit tests for the app. This step requireschromedriver
up-to-date with your google chrome version: https://googlechromelabs.github.io/chrome-for-testing/ - Run
make run
to run the app locally on http://localhost:8000
export ENV=local
make build
make test
make run
Note: in local development we are using SQLite. Another option is running the app against RDS.
If you are considering reusing this frontend, please get in touch with us first.
We recommend you follow these steps:
- start with the latest release of Find MoJ data
- replace all references to Find MoJ data in
locale/en/LC_MESSAGES/django.po
- generate an access token in Datahub
- review
core/settings.py
. Your deployment must set various environment variables for this to work, e.gCATALOGUE_URL
, the URL to your Datahub instance, andCATALOGUE_TOKEN
, the access token. - alternatively, you can create your own
settings.py
and set theDJANGO_SETTINGS_MODULE
environment variable.
We have enabled feature switches in find-moj-data
. These have been enabled using a package called django-waffle.
Switches can be managed via the cli or via the django admin page.
Our switches are created via the cli; the commands can be seen in the Dockerfile.
Current swicthes and default settings:
search-sort-radio-buttons
off - switches on/off radio selection buttons for sort order of search results.display-result-tags
off - switches on/off the display of tags in search and results pagesshow_is_nullable_in_table_details_column
off - switches on/off theIs Nullable
column in the table details page