Skip to content

Commit 2d93408

Browse files
authored
Merge pull request #677 from The-Strategy-Unit/reset-cache
Note cache invalidation via query param
2 parents 981c5ba + 4d65c71 commit 2d93408

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

README.Rmd

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ You can find more information on [the NHP model project information site](https:
3333

3434
## For developers
3535

36-
The app is built and maintained by members of [the Strategy Unit's Data Science team](https://the-strategy-unit.github.io/data_science/).
36+
The guidance below is for the members of [the Strategy Unit's Data Science team](https://the-strategy-unit.github.io/data_science/), who built and maintain this app.
37+
3738

3839
### Structure
3940

4041
Technically there are two apps: the main app in the `main` branch, and the inputs selection app (where users start or edit a scenario) in the `inputs_selection_app` branch.
41-
Users arrive at the selection app before being routed to the main app.
42+
Users arrive at the selection app before being routed to the main app.
4243

4344
Both apps are built with [Shiny](https://shiny.posit.co/) and the main app uses the [the {golem} package](https://thinkr-open.github.io/golem/).
4445
Server and UI modules can be found in `R/`, configuration in `inst/golem-config.yml` and supporting data and text in `inst/app/`.
@@ -55,7 +56,7 @@ Then add an `.Renviron` file to the project root that contains the required envi
5556
Copy into it the required variables, which are listed in the `.Renviron.example`.
5657
You can get the values you need from a member of the Data Science team.
5758

58-
Then, from the `main` branch (or your development branch of it), use Git's `worktree` function to put the `inputs_selection_app` branch (or your development branch of it) in its own subfolder.
59+
Then, from the `main` branch (or your development branch of it), use Git's `worktree` function to put the `inputs_selection_app` branch (or your development branch of it) in its own subfolder.
5960

6061
In the terminal:
6162

@@ -82,7 +83,7 @@ The method for doing this depends on your IDE.
8283
In RStudio:
8384

8485
1. Open the `dev/watch.R` script and go to the 'Background Jobs' tab of the console pane and click the 'Start Background Job' button.
85-
2. Click 'Start' after checking that the 'R Script' path is pre-populated with the path to `watch.R` (otherwise select it yourself).
86+
2. Click 'Start' after checking that the 'R Script' path is pre-populated with the path to `watch.R` (otherwise select it yourself).
8687
3. When ready, a message will tell you to visit `http://127.0.0.1:9081/` in your browser.
8788

8889
In Positron: run `source('dev/watch.R')` and click the link to the URL when complete.
@@ -107,14 +108,17 @@ To test the unreleased app in our development environment:
107108
When using the dev inputs selection app on Connect, make sure to set the 'Model Version' dropdown to 'dev' in the expandable 'Advanced Options' box.
108109
That way you'll be taken to the dev inputs app when you hit 'Start'.
109110

110-
### Data extraction
111+
### Data
111112

112113
The app displays trust-specific data to users.
113114
The data is processed via Databricks scripts in [the nhp_data repository](https://github.com/The-Strategy-Unit/nhp_data) and stored in Azure storage.
114115

116+
If the data updates and you need to invalidate the current cache, you force a reset by appending `?reset_cache=true` to the app's canonical URL at `https://connect.strategyunitwm.nhs.uk/nhp/inputs/` (authorised devs only).
117+
115118
### Deployment
116119

117-
Deployment is controlled by GitHub Actions, where:
120+
Deployment is controlled by GitHub Actions in `.github/workflows/`, where:
118121

119122
* pushes to the `main` branch redeploy the app to /nhp/dev/inputs/ for purposes of quality assurance
120123
* tagged releases trigger a new deployment to /nhp/vX-Y/inputs/, where 'vX-Y' is the current version (note the hyphen)
124+
* manual deployment is possible with `connect-publish-manual.yaml`

0 commit comments

Comments
 (0)