From 186ab26db35d78c69a8765137cf4f001dc93bca3 Mon Sep 17 00:00:00 2001 From: Rhian Davies Date: Mon, 10 Mar 2025 15:59:33 +0000 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=94=A5=20Remove=20redundent=20install?= =?UTF-8?q?=20steps.=20Fixes=20Remove=20VSCode=20from=20docs=20#67?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- readme.md | 46 +++++++++------------------------------------- 1 file changed, 9 insertions(+), 37 deletions(-) diff --git a/readme.md b/readme.md index 353d8a0..1aa3ed8 100644 --- a/readme.md +++ b/readme.md @@ -1,51 +1,23 @@ # New Hospitals Demand Model + + +[![Project Status: Active – The project has reached a stable, usable +state and is being actively +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) + [![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) + + ## Welcome 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. -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. +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) 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). -## Running the model - -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. - -### Install - -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. -2. Install [VS Code](https://code.visualstudio.com/). You can accept the default values while installing. -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". - -### Set up VS Code - -4. Open Visual Studio Code, on the left hand panel, press the "extensions" button (or press Ctrl+Shift+X) -5. Search for "python" and press install -6. Search for "jupyter" and press install -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`. - -### Set up Python - -8. Open the repository in Visual Studio Code, then open a terminal `Terminal -> New Terminal (Ctrl+Shift+')`. -9. In the terminal - ``` py - conda init - conda env create -f environment.yml - ``` -9. Press `Ctrl+Shift+p`, then type `Select Interpreter`. Press the down key and select `Python 3.10.4 ('nhp')`. -10. Download the data (see *Downloading the data*), and extract the contents to the project's folder. - -## Running the model - -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. - -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. - -There is a Jupyter notebook, [`run_model.ipynb`](run_model.ipynb) which runs the models for a given params file. - ## Deployment 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`. From 2772ea99688004d99b39bb41813af0d030462ddd Mon Sep 17 00:00:00 2001 From: Rhian Davies Date: Mon, 10 Mar 2025 16:11:02 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=84=20Add=20MIT=20license?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LICENSE.txt | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..a685fd1 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 NHS England + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. From 17fba426f1327d456b1cc2e6d76a944d7f336a91 Mon Sep 17 00:00:00 2001 From: Rhian Davies Date: Mon, 10 Mar 2025 16:12:55 +0000 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=91=A5=20Add=20CODEOWNERS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CODEOWNERS | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..5b2c003 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,5 @@ +# These owners will be the default owners for everything in +# the repo. Unless a later match takes precedence, +# @primary-owner and @secondary-owner will be requested for +# review when someone opens a pull request. +* @tomjemmett @yiwen-h