Skip to content

Commit

Permalink
Merge pull request #37 from vimc/vimc-vimpact-readme
Browse files Browse the repository at this point in the history
no ticket: add installation instruction
  • Loading branch information
kgaythorpe authored Feb 6, 2024
2 parents a2fa6bc + 289ef16 commit aa3cba3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: vimpact
Title: Vaccine Impact Calculation
Version: 0.1.0
Version: 0.1.2
Authors@R:
c(person(given = "Rich",
family = "FitzJohn",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# vimpact 0.1.2

* Add to readme installation instruction.

# vimpact 0.1.1

* Able to recognise different no-vaccination scenario types.
Expand Down
6 changes: 6 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@

Support code for impact calculations.

## Installation
Package can be installed via
```
devtools::install_github("vimc/vimpact")
```

## Running tests which rely on PostgreSQL database

Some require a PostgreSQL database. These tests will be skipped by default when running locally. To enable them, run the `./scripts/test_db_start.sh` script to run up a Postgres db within a docker container. When finished testing locally run `./scripts/test_db_stop.sh` to stop the container.
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@

Support code for impact calculations.

## Installation
Package can be installed via
```
devtools::install_github("vimc/vimpact")
```

## Running tests which rely on PostgreSQL database

Some require a PostgreSQL database. These tests will be skipped by default when running locally. To enable them, run the `./scripts/test_db_start.sh` script to run up a Postgres db within a docker container. When finished testing locally run `./scripts/test_db_stop.sh` to stop the container.

You can connect directly to the Postgres db by running `./scripts/connect_db.sh`.
You can connect directly to the Postgres db by running `./scripts/connect_db.sh`

## Running tests which rely on Montagu database
Some tests require access to montagu database. You need to make the montagu science db password available as an env var for these tests to run. You can do this by getting the password from the vault and adding it to `~/.Renviron` as MONTAGU_PASSWORD=<pswd_from_vault>. Tests will be skipped if montagu science db password does not exist. `tests/testthat/helper-vimpact.R` will use `.Renviron` to handle db access. `helper-generate_test_data.R` extracts minimal needed data from montagu, and creates an in-memory database against which vimpact functions are run. `vimpact-test-data` stores test data (copied artefacts from github.com/vimc/montagu-reports/oneoff-collate-vimpact-test-data, and uploaded to github.com/vimc/vimpact-test-data). vimpact outputs must be equivalent to the test data for passing tests.

0 comments on commit aa3cba3

Please sign in to comment.