dark-peak-analytics / assertHE

R package to assist in the verification of health economic decision models.
https://dark-peak-analytics.github.io/assertHE/
Other
4 stars 10 forks source link

Include file and folder exclusions in the visualiser function #60

Closed RobertASmith closed 3 months ago

RobertASmith commented 4 months ago

Currently there is no option to exclude certain folders or files in the visualiser function. This means that if a model being reviewed has some error in a file, the code won't run and the visual won't be created. One solution to this is for the reviewer to edit the original source code, but it would be preferential to be able to ignore that file and proceed.

https://github.com/dark-peak-analytics/assertHE/blob/90b8ddef23829701b9fe238f4fb31d80f4864097/R/project_visualiser.R#L33

I think this involves:

Smit-tay commented 4 months ago

I have tested this functionality.
I think it works as expect with my patch.

For example, I run this command:

visualise_project( project_path = "~/dev/assertHE", foo_path = "R", exclude_dirs = "cdx2", test_path = "tests/testthat", run_coverage = F)

I then generate the visualization for assertHE without any of the cdx2 stuff showing up

removing the exclude_dirs parameter then shows cdx2 as well as assertHE in a single visualization.