Skip to content

vimc/vimpact

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fe2af64 · Feb 26, 2025
Aug 3, 2021
Feb 26, 2025
Oct 13, 2022
Oct 13, 2022
Apr 7, 2022
Feb 20, 2025
Feb 26, 2025
Feb 2, 2022
Oct 14, 2021
Nov 11, 2021
Feb 26, 2025
Jul 20, 2021
Oct 11, 2021
Nov 12, 2021
Feb 26, 2025
Feb 6, 2024
Feb 6, 2024
Oct 13, 2022
Jul 28, 2020

Repository files navigation

vimpact

Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept. Build Status codecov.io

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

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.