Skip to content

Commit 40a5245

Browse files
committed
Advise pak for installing packages
1 parent bc4ed39 commit 40a5245

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

README.Rmd

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ The app is built and maintained by members of [the Strategy Unit's Data Science
4040
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.
4141
Users arrive at the selection app before being routed to the main app.
4242

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/`.
4645

4746
### Run locally
4847

4948
Run the app locally on your machine to test that your changes work as expected.
5049

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.
5355

5456
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.
5557

@@ -60,6 +62,7 @@ git fetch origin inputs_selection_app
6062
git worktree add inputs_selection_app inputs_selection_app
6163
```
6264

65+
The first argument is the name of the folder in which to put the branch content.
6366
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`.
6467

6568
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:
8487

8588
1. Merge any PRs you want to test into the `main` branch.
8689
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 selection app 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.
8891

8992
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.
9093
That way you'll be taken to the dev inputs app when you hit 'Start'.

0 commit comments

Comments
 (0)