EXAMINE (Expedient Analysis of Management Information to Notice Errors) is a system that helps CCS identify potential errors in supplier-reported Management Information (MI), particularly under-reported or missing spend.
python3 -m venv venvActivate:
- Linux/macOS:
source venv/bin/activate - Windows:
.\venv\Scripts\activate
Install dependencies:
python -m pip install -r requirements.txtInstall the repo itself to find the util functions:
python -m pip install -e .Create a local .env file (not committed) based on env.example:
cp env.example .envbash install_drivers.shThis project uses:
- pre-commit for running checks automatically before each commit.
- Ruff for fast linting.
- pytest for unit testing.
If you already installed dependencies from requirements.txt, install the remaining developer tools:
python -m pip install pre-commit ruffOr install all at once:
python -m pip install -r requirements.txt pre-commit ruffInstall hooks locally:
pre-commit installRun all hooks manually across the repository:
pre-commit run --all-filesRun Ruff:
ruff check .Run tests:
pytest -qCI also runs Ruff and pytest on every push.
The EXAMINE data analysis pipeline is fully reproducible using DVC. The pipeline supports dummy and live modes via the data_mode parameter in params.yaml. Live mode requires database credentials, dummy mode runs without external access.
To run the pipeline, set the data_mode in params.yaml to either dummy:
data_mode: dummyOr live:
data_mode: liveThen run DVC:
python -m dvc reproDVC templating passes the mode into scripts:
--mode ${data_mode}
--outdir data/${data_mode}
--indir data/${data_mode}
No Python files contain hard-coded paths.
| Stage | Script | Outputs |
|---|---|---|
| get_data | scripts/get_data.py |
contracts.csv, mi.csv, reg_number_supplier_key.csv |
| combine | scripts/combine_data.py |
combined.csv, unmatched.csv |
| summarise | scripts/summarise_data.py |
summary_stats.csv, line_level.csv |
If the DVC pipeline is not running:
- Ensure DVC is initialized:
python -m dvc init - Check
params.yamlhas correctdata_mode(dummy or live) - Verify all dependencies installed:
pip install -r requirements.txt