Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valreport #8

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Valreport #8

wants to merge 2 commits into from

Conversation

Zhenglei-BCS
Copy link

  • added tests
  • added inst/valreports

Comment on lines +25 to +33
## Test Approaches

Based on the outcome of the risk assessment, different testing approaches will be employed, and corresponding testing reports will be generated.

- **Low Risk Packages:** For packages categorized as low risk, unit tests are sufficient to verify that the package is installed correctly and functions as expected.

- **Medium Risk Packages:** For medium risk packages, examples or vignettes should be executed to verify the functionalities of the package.

- **High Risk Packages:** For high risk packages, separate system tests must be conducted to ensure comprehensive validation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit reluctant to try to make a risk decision in this report, since the interpretation of risk can vary for different use cases.

Instead, I think we may want to just focus on concrete qualities of packages. This will also help keep the scope a bit more minimalist.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a function riskcat can be created to give the user flexibility to supply their own criteria or thresholds to determin risk category.

Comment on lines +39 to +41
file_lists <- list.files(paste0(path0,"/tests/testthat/"))
if("_snaps" %in% file_lists) {file_lists <- file_lists[file_lists!="_snaps"]}
testResultsRaw_list <- lapply(file_lists,function(x)testthat::test_file(paste0(path0,"/tests/testthat/",x), reporter = testthat::ListReporter))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to handle arbitrary R packages we won't be able to assume that the package uses testthat as its testing framework.

I'm also a bit nervous about re-implementing testthat::test_package with our own handlers. testthat has some pretty strong assumptions on file names that we might also need to consider here. (setup-*.R files, and arbitrary fixtures files for test data. I think only test-* files actually get tested).

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not intended to do that but to give an example of what can be included in a single package testing protocol and testing implementation. Assuming that tests has been run by the reference image, could we take the same strategy as what has been implemented in the reference image?

@Zhenglei-BCS
Copy link
Author

About testing: pass / fail or more granular one, the bundled packages or additional ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants