A Python-powered terminal user interface (TUI) for Azure Table Storage (ATS). Edit metadata for model runs developed by schemes in the New Hospital Programme (NHP). This is a safer and faster alternative to editing tables manually.
This tool is intended for use by developers of the NHP model and not for wider public use.
For now, the tool lets you review and update a model run's:
- run-stage property (
run_stage), which flags scenarios for use by nhp_output_reports and other secondary products - site properties (
sites_ip,sites_opandsites_aae), which are used to filter results in nhp_output_reports
After cloning the repo, set two values in a .env file in the project directory:
AZURE_STORAGE_ACCOUNT_NAMEMODEL_RUNS_TABLE_NAME
They're used to build the table endpoint in the form https://demoaccount.table.core.windows.net/demotable.
Authorised users can obtain these values from the Data Science team.
Then you can develop the tool with the project in editable mode:
uv pip install -e .Alternatively, you can install the tool from the web using uv.
uv tool install git+https://github.com/The-Strategy-Unit/nhp_ats_tui.gitYou can set the required environment variables in several ways. You could:
- add a
.envto the directory you're working in - use e.g.
setx AZURE_STORAGE_ACCOUNT_NAME "demoaccount"in Powershell (then restart the terminal) to set them persistently - use
$env:AZURE_STORAGE_ACCOUNT_NAME = "demoaccount"in Powershell to set them in the current session
Before using the tool, you must first login to Azure with the Azure CLI:
az loginAssuming you're authorised, select the account where the table exists.
Having completed the steps above, you can enter the interactive TUI:
edit-runsUse your keyboard to navigate and provide input.
You can force-quit out of the tool with Ctrl + C.