Skip to main content

Repository: govuk-ai-graph-tools

Ownership
#publishing-classification-systems-metadata owns the repo. #publishing-csm-alerts receives automated alerts for this repo.
Category
AI apps

README

TODO: Fill in project description

Local Setup


Prerequisites

  • Python 3.13 - managed via uv
  • uv — Python package manager

Install uv if not already installed:

brew install uv

or

pip install uv


1. Install dependencies

uv init --python 3.13
uv python pin 3.13
uv add -r requirements.txt

2. Run the app

Debug mode (Flask dev server):

uv run app.py

Production mode (Uvicorn ASGI server):

uv run uvicorn 'app:create_asgi_app' --factory --port 3000

The app runs on http://localhost:3000.


3. Docker run

Build and run using Docker:

docker build -t govuk-ai-graph-tools-app .

docker run -p 3000:3000 -t govuk-ai-graph-tools-app



Development and Code Quality

1. Manual Checks

You can run the full suite of checks using the Makefile:

# Run all checks
make lint && make format && make typecheck

Run individual checks

make lint make format make typecheck

2. Pre-commit Hooks

The project is configured with pre-commit to automatically run these checks before every git commit.

To install the hooks in your local repository:

make install-hooks

Once installed, your code will be automatically linted and type-checked whenever you commit. If you need to skip the hooks (e.g., for an urgent WIP commit), you can use git commit --no-verify.


Tests

uv run pytest

Licence

MIT LICENCE