Closed RobertASmith closed 3 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.
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:
assertHE::summarise_model
to include exclusions on tests and functions - while doing this a project path should be added.get_foo_coverage
to include exclusions on tests and functions - also add project path here & ensure tests/functions are relative to this.source_files
has an exclusion argument, add excluded files to this.