This repo is a spike to explore using Django as the framework for our new service.
The new service is a system for managing breast screening clinics, including:
- Viewing and managing daily clinic lists
- Tracking participants through their screening journey
- Managing participant information and status
To install the toolchain dependencies and setup the project, run
make config
This command assumes you have a few things already installed:
- Docker container runtime or a compatible tool, e.g. Podman
- asdf version manager
- GNU make 3.82 or later
make run
This will serve the app at http://localhost:8000
To run all the tests:
make test
Python dependencies are managed via poetry.
poetry install
installs dependencies from the lockfilepoetry add
andpoetry remove
adds and removes dependenciespoetry run [COMMAND]
runs a command in the context of the project's virtual environment
npm
is used to manage javascript dependencies and frontend assets.
You can run make dependencies
to install anything that's missing after pulling new changes from GitHub.
We'll probably remove it before deploying to production, but currently Django admin is enabled.
To use it, first create a superuser
poetry run ./manage.py createsuperuser
Then run the app and navigate to http://localhost:8000/admin
The manage_breast_screening
directory contains all the Django project code.
config
is a subpackage containing the configuration. The other subpackages - such as clinics
- are Django apps. These each represent a bounded context within our overall domain of screening events. Django apps can be built with customisability and extendability in mind, and published as python packages, but we aren't doing that yet.
To generate a new app, run:
poetry run ./manage.py startapp <app_name> manage_breast_screening/`
- Make sure you have
pre-commit
running so that pre-commit hooks run automatically when you commit - this should have been set up automatically when you ranmake config
. - Consider switching on format-on-save in your editor (e.g. Black for python)
- (Internal contributions only) contact the
#screening-manage
team on slack with any questions
scripts/
contains various scripts that can be used in the CI/CD workflows.
For more information, see the following developer guides:
Unless stated otherwise, the codebase is released under the MIT License. This covers both the codebase and any sample code in the documentation. See LICENCE.md.
Any HTML or Markdown documentation is © Crown Copyright and available under the terms of the Open Government Licence v3.0.