You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.Rmd
+9-6Lines changed: 9 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -40,16 +40,18 @@ The app is built and maintained by members of [the Strategy Unit's Data Science
40
40
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
41
Users arrive at the selection app before being routed to the main app.
42
42
43
-
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/). Server and UI modules can be found in `R/`, configuration in `inst/golem-config.yml` and supporting data and text in `inst/app/`.
44
-
45
-
Packages used in the app are listed in `DESCRIPTION`, and can be installed with `devtools::install_deps(dependencies = TRUE)`.
43
+
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/).
44
+
Server and UI modules can be found in `R/`, configuration in `inst/golem-config.yml` and supporting data and text in `inst/app/`.
46
45
47
46
### Run locally
48
47
49
48
Run the app locally on your machine to test that your changes work as expected.
50
49
51
-
To prepare, add an `.Renviron` file to the project root that contains the required environment variables. There is an `.Renviron.example` file which describes the required variables.
52
-
You can get these from a member of the Data Science team.
50
+
First, install the required packages listed in the DESCRIPTION with `pak::local_install_deps(dependencies = TRUE)`.
51
+
52
+
Then add an `.Renviron` file to the project root that contains the required environment variables.
53
+
Copy into it the required variables, which are listed in the `.Renviron.example`.
54
+
You can get the values you need from a member of the Data Science team.
53
55
54
56
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.
The first argument is the name of the folder in which to put the branch content.
63
66
If you want a development version of the inputs selection app, you can specify the branch name as the second of the arguments to `git worktree add`.
64
67
65
68
To run the app from RStudio, start up the selection app by opening the `dev/watch.R` script, go to the 'Background Jobs' tab of the console pane and click the 'Start Background Job' button.
@@ -84,7 +87,7 @@ To test the unreleased app in our development environment:
84
87
85
88
1. Merge any PRs you want to test into the `main` branch.
86
89
2. If you've changed any dependencies, run `dev/generate_manifest.R` to update `manifest.json`.
87
-
3. If you've made any changes to the inputs selection app, run the manual `deploy()` call under the 'development' heading in the `deploy.R` script in your selectionapp development branch.
90
+
3. If you've made any changes to the inputs selection app, run the manual `deploy()` call under the 'development' heading in the `deploy.R` script in your selection-app development branch.
88
91
89
92
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.
90
93
That way you'll be taken to the dev inputs app when you hit 'Start'.
0 commit comments