Skip to content

Commit 0cf0259

Browse files
authored
Merge pull request #310 from The-Strategy-Unit/StatsRhian/issue203
Prepare for open
2 parents f791a64 + 17fba42 commit 0cf0259

File tree

3 files changed

+35
-37
lines changed

3 files changed

+35
-37
lines changed

CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# These owners will be the default owners for everything in
2+
# the repo. Unless a later match takes precedence,
3+
# @primary-owner and @secondary-owner will be requested for
4+
# review when someone opens a pull request.
5+
* @tomjemmett @yiwen-h

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 NHS England
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

readme.md

Lines changed: 9 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,23 @@
11
# New Hospitals Demand Model
22

3+
<!-- badges: start -->
4+
5+
[![Project Status: Active – The project has reached a stable, usable
6+
state and is being actively
7+
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
8+
39
[![codecov](https://codecov.io/gh/The-Strategy-Unit/nhp_model/branch/main/graph/badge.svg?token=uGmRhc1n9C)](https://codecov.io/gh/The-Strategy-Unit/nhp_model)
410

11+
<!-- badges: end -->
12+
513
## Welcome
614

715
Welcome to the New Hospital Programme demand and capacity modelling tool. The methodology underpinning this model code is given in [the documentation](https://connect.strategyunitwm.nhs.uk/nhp/project_information/), along with a host of other technical information about the model and data that the model was built on.
816

9-
Please note that it is important that the parameters of the model are set with great care and with proper support. It is important also that healthcare system partners are appropriately involved in parameter setting. For a description of the full process and support provision that is necessary to ensure the model functions well please see LINK FORTHCOMING.
17+
Please note that it is important that the parameters of the model are set with great care and with proper support. It is important also that healthcare system partners are appropriately involved in parameter setting. For a description of the full process and support provision that is necessary to ensure the model functions well please see the [NHS Futures workspace](https://future.nhs.uk/NewHospitalProgrammeDigital/browseFolder?fid=53572528&done=OBJChangesSaved)
1018

1119
This repo contains the model code but there are several other repositories which contain useful tools to set the [parameters of and run the model](https://github.com/The-Strategy-Unit/nhp_inputs), as well as to [explore the output of the model](https://github.com/The-Strategy-Unit/nhp_outputs).
1220

13-
## Running the model
14-
15-
To run the model locally you will need to have installed miniconda, git, and VSCode. This is assuming that you are running on Windows, steps will need to be adjusted for other platforms.
16-
17-
### Install
18-
19-
1. Install [miniconda](https://conda.io/projects/conda/en/latest/user-guide/install/windows.html). When installing, choose to install for all users, and check the box on the final page to add conda to the System PATH.
20-
2. Install [VS Code](https://code.visualstudio.com/). You can accept the default values while installing.
21-
3. Install [Git](https://git-scm.com/downloads). When asked to choose the default editor, you should pick a "VS Code" or "notepad", unless you know "vim".
22-
23-
### Set up VS Code
24-
25-
4. Open Visual Studio Code, on the left hand panel, press the "extensions" button (or press Ctrl+Shift+X)
26-
5. Search for "python" and press install
27-
6. Search for "jupyter" and press install
28-
7. Clone the git repository: the easiest way is to press `Ctrl+Shift+p` and type "clone", you should see "Git: clone". Choose that, then choose "Clone from GitHub". Follow the prompts to sign in, then when it asks you to type a repository name, type `The-Strategy-Unit/nhp_model`.
29-
30-
### Set up Python
31-
32-
8. Open the repository in Visual Studio Code, then open a terminal `Terminal -> New Terminal (Ctrl+Shift+')`.
33-
9. In the terminal
34-
``` py
35-
conda init
36-
conda env create -f environment.yml
37-
```
38-
9. Press `Ctrl+Shift+p`, then type `Select Interpreter`. Press the down key and select `Python 3.10.4 ('nhp')`.
39-
10. Download the data (see *Downloading the data*), and extract the contents to the project's folder.
40-
41-
## Running the model
42-
43-
The simplest way to test the model is to press `F5` in VS code. There are a number of debug profiles for testing each individual type of model (A&E, Inpatients, Outpatients), or to run all of the principal models, or run all of the models in parallel.
44-
45-
You can use all of the VS code debugging tools like breakpoints and the debug console. Consult the [VS code documentation](https://code.visualstudio.com/docs/python/debugging) for more on how to do this.
46-
47-
There is a Jupyter notebook, [`run_model.ipynb`](run_model.ipynb) which runs the models for a given params file.
48-
4921
## Deployment
5022

5123
The model is deployed to Azure Container Registry on pull requests, tagging the container as `nhp_model:dev`, and on releases its deployed to `nhp_model:v0.*.*` and `nhp_model:latest`.

0 commit comments

Comments
 (0)