From b515deef3ab7a0bafc00faf2619ee937c11f19ff Mon Sep 17 00:00:00 2001 From: slager Date: Tue, 5 Nov 2024 19:50:33 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20phuse-or?= =?UTF-8?q?g/valtools@7c6e4538ad0e47a9071418d4c6504ef31b70ab3d=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgdown.yml | 2 +- reference/new_item.html | 2 +- reference/scraping.html | 2 +- reference/validation_paths.html | 2 +- search.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgdown.yml b/pkgdown.yml index a380b1f..d6849bf 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -5,7 +5,7 @@ articles: starting-validated-package: starting-validated-package.html validating-external-resources: validating-external-resources.html validation_figure_tests: validation_figure_tests.html -last_built: 2024-11-05T19:21Z +last_built: 2024-11-05T19:50Z urls: reference: https://phuse-org.github.io/valtools/reference article: https://phuse-org.github.io/valtools/articles diff --git a/reference/new_item.html b/reference/new_item.html index 97bf89c..20ad69a 100644 --- a/reference/new_item.html +++ b/reference/new_item.html @@ -126,7 +126,7 @@

Examples }) #> Creating example.package/. -#> Setting active project to "/tmp/RtmpWCYD6J/file17f158da6fa6/example.package". +#> Setting active project to "/tmp/Rtmpl1LShL/file17f77dfad8b4/example.package". #> Creating R/. #> Writing DESCRIPTION. #> Package: example.package diff --git a/reference/scraping.html b/reference/scraping.html index 404f446..d48b590 100644 --- a/reference/scraping.html +++ b/reference/scraping.html @@ -170,7 +170,7 @@

Examples }) -#> Setting active project to "/tmp/RtmpWCYD6J/file17f15629a662". +#> Setting active project to "/tmp/Rtmpl1LShL/file17f742e93665". #> Creating R/. #> Writing DESCRIPTION. #> Writing NAMESPACE. diff --git a/reference/validation_paths.html b/reference/validation_paths.html index e8fa6c5..2b0f999 100644 --- a/reference/validation_paths.html +++ b/reference/validation_paths.html @@ -87,7 +87,7 @@

Examples valtools::vt_find_config() })}) -#> [1] "/tmp/RtmpWCYD6J/file17f1bf7e813/validation/validation.yml" +#> [1] "/tmp/Rtmpl1LShL/file17f75c6f16f6/validation/validation.yml" diff --git a/search.json b/search.json index 409008e..11fec4e 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://phuse-org.github.io/valtools/CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http:contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"How you can contribute","title":"How you can contribute","text":"Thanks interest contributing valtools! several ways can contribute package: Propose idea. idea new valtools feature? Take look issue list first see isn’t included suggested yet. , suggest idea issue GitHub. Report bug. Report bug issue GitHub can fix . filing issue, important thing include minimal reproducible example can quickly verify problem, figure fix . three things need include make example reproducible: required packages, data, code. Packages loaded top script. easiest way include data use dput() generate R code recreate . even better can create data.frame() just handful rows columns still illustrates problem. Spend little bit time ensuring code easy others read: (1) Make sure ’ve used spaces variable names concise, informative. (2) Use comments indicate problem lies. (3) best remove everything isn’t related problem. shorter code , easier understand. Improve documentation. Noticed typo? Think function use better example? Improvements documentation welcome! Contribute code. ’d like fix bug implement new feature, look issue list leave comment things want work . new idea, first file issue make sure someone team agrees ’s problem, happy basic proposal fixing . Also see development guidelines .","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"development-guidelines","dir":"","previous_headings":"","what":"Development guidelines","title":"How you can contribute","text":"follow Gitflow development model guidelines R packages Hadley Wickham Jenny Bryan. Create branch git make changes. Write code. Restart R Session Cmd+Shift+F10 (Ctrl+Shift+F10 Windows) Build Reload Cmd+Shift+B (Ctrl+Shift+B Windows) Test Package Cmd+Shift+T (Ctrl+Shift+T Windows) Document Package Cmd+Shift+D (Ctrl+Shift+D Windows) Check Package Cmd+Shift+E (Ctrl+Shift+E Windows) Push branch github issue pull request (PR). Discuss pull request. Iterate maintainer accepts PR decides ’s good fit valtools. might feel overwhelming first time get set , gets easier practice.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"before-every-commit","dir":"","previous_headings":"","what":"Before every commit","title":"How you can contribute","text":"commit, run following commands one time make sure didn’t break anything. Restart R Session Cmd+Shift+F10 (Ctrl+Shift+F10 Windows) Check Package Cmd+Shift+E (Ctrl+Shift+E Windows) Document Package Cmd+Shift+D (Ctrl+Shift+D Windows)","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"pull-requests","dir":"","previous_headings":"","what":"Pull requests","title":"How you can contribute","text":"pull request follow guidelines: Motivation changes. pull request clearly concisely motivate need change. related changes. submit pull request, please check make sure haven’t accidentally included unrelated changes. make harder see exactly ’s changed, evaluate unexpected side effects. PR corresponds git branch, expect submit multiple changes make sure create multiple branches. Coding style. Please follow official tidyverse style. Maintaining consistent style across whole code base makes much easier jump code. ’re modifying existing valtools code doesn’t follow style guide, separate pull request fix style greatly appreciated. Documentation. ’re adding new parameters new function, ’ll also need document roxygen. Make sure re-run devtools::document() code submitting. fixing bug adding new feature, please add testthat unit test.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of conduct","title":"How you can contribute","text":"Please note valtools released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"learn-about-package-development","dir":"","previous_headings":"","what":"Learn about package development","title":"How you can contribute","text":"contributing, may want read bit package development general. Package development workflow usethis package Emil Hvitfeldt. (blog post) Writing R package scratch Hilary Parker updated version Tomas Westlake shows efficiently using usethis package. (blog post) can create R package 20 minutes Jim Hester. (conference talk) R packages Hadley Wickham Jenny Bryan. (book) Building Tidy Tools. (rstudio::conf workshop) contributing guide inspired modified ggplot2 contributing.md, rOpenSci’s contributing guide, template.","code":""},{"path":"https://phuse-org.github.io/valtools/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 PHUSE Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"creating-a-new-r-package","dir":"Articles","previous_headings":"","what":"Creating A New R Package","title":"Starting New Validation Package using {valtools}","text":"Starting new R package using {valtools} one line command, information required path location new package structure built, last folder name path new name package. package constructed using usethis::create_package() function, function acts wrapper adds necessary validation infrastructure required {valtools}. Importantly, now vignettes/validation folder, working directory validation. almost content validation created. Inside folder, validation.yml file, referred validation config file going forward. YML file informs {valtools} interact various pieces validation created, information needs shared across multiple sessions/users. user need interact file directly, functions inside {valtools} update file necessary.","code":"# create a new package skeleton vt_create_package(\"example.package\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial","dir":"Articles","previous_headings":"Creating A New R Package","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run chunk code create package temporary directory follow along tutorial. new package created new session. Run subsequent code new session. examine folder structure new package, run following function:","code":"valtools::vt_create_package(file.path(tempdir(),\"example.package\")) fs::dir_tree(recurse = TRUE)"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"add-requirements","dir":"Articles","previous_headings":"","what":"Add Requirements","title":"Starting New Validation Package using {valtools}","text":"Requirements document goals package - solve whatever problem task - documented code written. Requirements recorded within vignettes/validation/requirements folder default. collection requirements may called specifications. make adding validation content easy, {valtools} extended usethis approach package contents creation family “vt_use_*” functions. vt_use_req() creates new requirement vignettes/validation/requirements folder, main argument name requirement, optional argument username record name person writing requirement. username argument passed, {valtools} automatically get computer username user creating requirement attempt put full name. user created validation contents , ask user questions (Name, Title, Role) record validation config file documentation validation report.","code":"valtools::vt_use_req(\"Requirement_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-1","dir":"Articles","previous_headings":"Add Requirements","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command newly opened requirements file, line 5, Replace REQUIREMENTS 1.1, ASSESSMENT 1, Low Risk, Small Impact indicate requirement 1.1 risk assessment determined low risk small impact wrong. Add new line underneath line (line 6) line contains: #' 1.2: 5, Low risk, Medium Impact Copy following content:","code":"## Say Hello + 1.1 Say Hello to users + 1.2 Say Hello to multiple users at once"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"package-development","dir":"Articles","previous_headings":"","what":"Package Development","title":"Starting New Validation Package using {valtools}","text":"Now requirements set, normal package development process can followed. {valtools} expects developers using usethis devtools create rest package contents, required. critical piece validation development tracking programmers wrote functions. {valtools} supports augmenting {roxygen2} framework function documentation two custom roxygen tags: @editor @editDate. @editor tracking last editor function, @editDate recording whenever function modified.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-2","dir":"Articles","previous_headings":"Package Development","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command create R file package copy following code file.","code":"usethis::use_r(\"hello_world\") #' Hello World #' @param name name to say hello to #' @returns character string saying hello #' @editor Ellis Hughes #' @editDate 2021-03-12 #' @export hello_world <- function(name){ paste(\"Hello,\",name) } #' Hello World - internal #' @param name name to say hello to #' @returns character string saying hello #' @editor Ellis Hughes #' @editDate 2021-03-12 hello_world_internal <- function(name){ paste(\"hello,\",name) } # generate documentation devtools::document() #GPP: unit testing, update DESCRIPTION, ..."},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"change-log","dir":"Articles","previous_headings":"","what":"Change Log","title":"Starting New Validation Package using {valtools}","text":"Similar news file, {valtools} suggests use change log directly tied validation. purpose separate package update information useful developers information important capture validation. create change log file, {valtools} function vt_use_change_log(). create change log file inside working directory open editing. header information tracks version validation (usually tied package version developing package), date release validation. markdown file, normal markdown can used document changes. However, critically , bullets marked [validation] recorded validation report.","code":"valtools::vt_use_change_log()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-3","dir":"Articles","previous_headings":"Change Log","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command create change log.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"testing","dir":"Articles","previous_headings":"","what":"Testing","title":"Starting New Validation Package using {valtools}","text":"Testing done ensure package meets requirements set project. Testing done two major steps: firsts consists writing series cases prove requirements met, second application cases.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"test-cases","dir":"Articles","previous_headings":"Testing","what":"Test Cases","title":"Starting New Validation Package using {valtools}","text":"addition writing test cases handled vt_use_test_case() function. Similarly vt_use_req(), username can passed, look determine user calling function input information. function creates test case file vignettes/validation/test_cases folder package opens editing.","code":"valtools::vt_use_test_case(\"Test_case_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-4","dir":"Articles","previous_headings":"Testing > Test Cases","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run code newly opened test case file, replace TESTCASE 1.1, REQUIREMENT 1.1 indicate test case 1.1 shows requirement 1.1 met. Add new line underneath line (line 6) line contains: #' 1.2: 1.1, 1.2 indicate test case 1.2 shows requirements 1.1 1.2 met. Copy following test case file test cases documented:","code":"## Test Case 1: hello_world + 1.1 test that the software can say \"hello, Johnny\" by passing a user \"Johnny\" to the hello_world function + 1.2 test that the software can say hello to multiple people by passing a vector of users - \"Johnny\", \"Beth\", \"Andy\",\"Elisabeth\" to the hello_world function and getting back a vector of: c(\"Hello, Johnny\", \"Hello, Beth\", \"Hello, Andy\",\"Hello, Elisabeth\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"test-code","dir":"Articles","previous_headings":"Testing","what":"Test Code","title":"Starting New Validation Package using {valtools}","text":"Test code implementation test cases code. goal code completely reproducible able run without human interaction. Additionally, test code written third party - someone involved writing actual code test case. helps ensure integrity testing well providing valuable review documentation test cases package code. Similarly vt_use_req() requirements vt_use_test_case test cases, {valtools} provide function creating test code files recording user created file.","code":"valtools::vt_use_test_code(\"Test_code_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-5","dir":"Articles","previous_headings":"Testing > Test Code","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Add “Val Dashun” validation config file: Now persons information recorded, construct test code file use record test code code . newly opened test code file. Update TESTNUMBER 1.1 new test code file copy code body test: add new test following beneath test. Replace “TODAYS DATE” today’s date.","code":"valtools::vt_add_user_to_config( username = \"user_b\", name = \"Val A Dashun\", title = \"Programmer II\", role = \"tester\" ) valtools::vt_use_test_code(\"Test_code_001\", username = \"Val A Dashun\") hello_result <- hello_world(\"Johnny\") expect_equal( hello_result, \"Hello, Johnny\" ) #' @editor Val A Dashun #' @editDate TODAYS DATE test_that(\"1.2\",{ hello_result <- hello_world(c(\"Johnny\", \"Beth\", \"Andy\",\"Elisabeth\")) expect_equal( hello_result, c(\"Hello, Johnny\", \"Hello, Beth\", \"Hello, Andy\",\"Hello, Elisabeth\") ) })"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"authoring-validation-reports","dir":"Articles","previous_headings":"","what":"Authoring Validation Reports","title":"Starting New Validation Package using {valtools}","text":"{valtools} provides dynamic access via Rmarkdown file details necessary generating validation report push button. validation report documents package meets stated goals can re-evaluated necessary generate report PDF HTML format. function vt_use_report() creates validation report rmarkdown file pre-populated code scrape pieces information generated prior steps create final report knit. vt_use_report() saves validation report rmarkdown file working directory identified validation config file. Within packages defaults vignettes folder. rmarkdown file default name validation.Rmd unspecified. several sections included default provided validation report rmarkdown: Signatures: Capture signatures everyone involved validation. Release Details: Records validation environment Presents change log validation. Subsections show last editor piece validation; requirements, functions, test cases test code. Traceability table show requirements Risk Assessment: Combines risk assessments made single table Validation: record requirement, test case, results test code {valtools} also supports concept called “dynamic referencing”, explained another vignette. editing report, key functions know extending report included {valtools} : vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape various pieces information validation infrastructure returns data.frame. vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report. Keep mind, report Rmarkdown, limit editing customization, templates.","code":"valtools::vt_use_report(template = \"validation\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-6","dir":"Articles","previous_headings":"Authoring Validation Reports","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run code generate report, inspect overall structure report. See happens contents moved around.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"running-a-validation-report","dir":"Articles","previous_headings":"","what":"Running a Validation Report","title":"Starting New Validation Package using {valtools}","text":"Now validation report Rmarkdown, validation compiling report away. However, different organizations might follow different approaches validation documentation might necessary. {valtools} can support several different methods validation moment:","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-7","dir":"Articles","previous_headings":"Running a Validation Report","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run method validation observe differences","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-running-on-source","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Running on Source","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_source()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-generating-validated-bundle-for-distribution","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Generating validated bundle for distribution","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_build()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-validating-and-installing-package","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Validating and installing package","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_install()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-re-validating-an-installed-package","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Re-validating an installed package","title":"Starting New Validation Package using {valtools}","text":"Compare result original validation vignette:","code":"valtools::vt_validate_installed_package(\"example.package\") vignette(\"validation\",\"example.package\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"creating-a-new-validation-packet","dir":"Articles","previous_headings":"","what":"Creating A New Validation Packet","title":"Validating External Resources with {valtools}","text":"Starting new validation packet using {valtools} starts vt_create_packet(). , user passes directory project performed , optionally target validation. “target validation” packet intends validate - external package, environment, software, etc. target provided, {valtools} request user provide information validation packet folder constructed using usethis::create_project() function, necessary validation infrastructure required {valtools}. Importantly, now validation folder, working directory validation. almost content validation created. Inside folder, validation.yml file, referred validation config file going forward. YML file informs {valtools} interact various pieces validation created, information needs shared across multiple sessions/users. user need interact file directly, functions inside {valtools} update file necessary.","code":"# create a new validation packet skeleton vt_create_packet( path = \"/my/path/to/example_validation_packet\", target = \"super.package\" )"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial","dir":"Articles","previous_headings":"Creating A New Validation Packet","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run chunk code create validation packet temporary directory follow along tutorial {whoami} package. new packet project opened new session. Run subsequent code new session. examine folder structure new package, run following function:","code":"valtools::vt_create_packet( path = file.path(tempdir(),\"validation_packet_whoami\"), target = \"whoami\" ) fs::dir_tree(recurse = TRUE)"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"add-requirements","dir":"Articles","previous_headings":"","what":"Add Requirements","title":"Validating External Resources with {valtools}","text":"Requirements document users needs target - problems target solves users - must documented test cases written. Requirements recorded within validation/requirements folder default. collection requirements may called specifications. Requirements written markdown (.md) documents special roxygen headers. requirement must following roxygen comments header: title, editor, editDate, riskAssessment. last roxygen comments custom {valtools} supported roxygen tags support validation. @editor tracking last editor function, @editDate recording whenever function modified, @riskAssessment tracking risks requirement. make adding validation content easy, {valtools} extended usethis approach package contents creation family “vt_use_*” functions. vt_use_req() creates new requirement validation/requirements folder, main argument name requirement, optional argument username record name person writing requirement. username argument passed, {valtools} automatically get computer username user creating requirement attempt put full name. user created validation contents , ask user questions (Name, Title, Role) record validation config file documentation validation report.","code":"valtools::vt_use_req(\"Requirement_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-1","dir":"Articles","previous_headings":"Add Requirements","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run command newly opened requirements file, line 5, Replace REQUIREMENTS 1.1, ASSESSMENT 1, Low Risk, Small Impact indicate requirement 1.1 risk assessment determined low risk small impact wrong. Add new line underneath line (line 6) line contains: #' 1.2: 5, Low risk, Medium Impact Copy following content:","code":"+ 1.1 Collect user id for current session + 1.2 Collect full name of user for current session"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"change-log","dir":"Articles","previous_headings":"","what":"Change Log","title":"Validating External Resources with {valtools}","text":"Similar news file, {valtools} suggests use change log directly tied validation recording changes. purpose capture update information useful developers information important capture validation. create change log file, {valtools} function vt_use_change_log(). create change log file inside working directory open editing. header information tracks version validation date release validation. markdown file, normal markdown can used document changes. However, critically , bullets marked [validation] recorded validation report.","code":"valtools::vt_use_change_log()"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-2","dir":"Articles","previous_headings":"Change Log","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run command create change log.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"testing","dir":"Articles","previous_headings":"","what":"Testing","title":"Validating External Resources with {valtools}","text":"Testing done ensure target meets requirements set project. Testing done two major steps: firsts consists writing series cases prove requirements met, second application cases.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"test-cases","dir":"Articles","previous_headings":"Testing","what":"Test Cases","title":"Validating External Resources with {valtools}","text":"addition writing test cases handled vt_use_test_case() function. Similarly vt_use_req(), username can passed, look determine user calling function input information. function creates test case file validation/test_cases folder package opens editing.","code":"valtools::vt_use_test_case(\"Test_case_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-3","dir":"Articles","previous_headings":"Testing > Test Cases","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run code newly opened test case file, replace TESTCASE 1.1, REQUIREMENT 1.1 indicate test case 1.1 shows requirement 1.1 met. Add new line underneath line (line 6) line contains: #' 1.2: 1.1, 1.2 indicate test case 1.2 shows requirements 1.1 1.2 met. Copy following test case file test cases documented:","code":"+ 1.1 Test that the software can identify the username pf the user by setting the environment variable `LOGNAME` to `jsmith` for the duration of the test and confirming that the output of whoami::username is `jsmith`. + 1.2 Test that the software can identify the full name of the user by setting the environment variable `FULLNAME` to \"John Smith\" for the duration of the test and confirming that the output of whoami::fullname() is \"John Smith\""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"test-code","dir":"Articles","previous_headings":"Testing","what":"Test Code","title":"Validating External Resources with {valtools}","text":"Test code implementation test cases code. goal code completely reproducible able run without human interaction. Additionally, test code written third party - someone involved writing actual code test case. helps ensure integrity testing well providing valuable review documentation test cases package code. Similarly vt_use_req() requirements vt_use_test_case test cases, {valtools} provide function creating test code files recording user created file.","code":"valtools::vt_use_test_code(\"Test_code_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-4","dir":"Articles","previous_headings":"Testing > Test Code","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Add “Val Dashun” validation config file: Now persons information recorded, construct test code file use record test code code . newly opened test code file. Update TESTNUMBER 1.1 new test code file copy code body test: add new test following beneath test. Replace “TODAYS DATE” today’s date.","code":"valtools::vt_add_user_to_config( username = \"user_b\", name = \"Val A Dashun\", title = \"Programmer II\", role = \"tester\" ) valtools::vt_use_test_code(\"Test_code_001\", username = \"Val A Dashun\") withr::with_envvar( new = list(LOGNAME = \"jsmith\"), { user <- whoami::username() expect_equal( user, \"jsmith\" ) }) #' @editor Val A Dashun #' @editDate TODAYS DATE test_that(\"1.2\",{ withr::with_envvar( new = list(FULLNAME = \"John Smith\"), { user_full_name <- whoami::fullname() expect_equal( user_full_name, \"John Smith\" ) }) })"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"authoring-validation-reports","dir":"Articles","previous_headings":"","what":"Authoring Validation Reports","title":"Validating External Resources with {valtools}","text":"{valtools} provides dynamic access via Rmarkdown file details necessary generating validation report push button. validation report documents package meets stated goals can re-evaluated necessary generate report PDF HTML format. function vt_use_report() creates validation report rmarkdown file pre-populated code scrape pieces information generated prior steps create final report knit. vt_use_report() saves validation report rmarkdown file working directory identified validation config file. Within packages defaults base folder. rmarkdown file default name validation.Rmd unspecified. several sections included default provided validation report rmarkdown: Signatures: Capture signatures everyone involved validation. Release Details: Records validation environment Presents change log validation. Subsections show last editor piece validation; requirements, test cases test code. Traceability table show requirements Risk Assessment: Combines risk assessments made single table Validation: record requirement, test case, results test code {valtools} also supports concept called “dynamic referencing”, explained another vignette. editing report, key functions know extending report included {valtools} : vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape various pieces information validation infrastructure returns data.frame. vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report. Keep mind, report Rmarkdown, limit editing customization, templates.","code":"valtools::vt_use_report(template = \"packet\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-5","dir":"Articles","previous_headings":"Authoring Validation Reports","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run code generate report, inspect overall structure report. See happens contents moved around.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"running-a-validation-report","dir":"Articles","previous_headings":"","what":"Running a Validation Report","title":"Validating External Resources with {valtools}","text":"Now validation report Rmarkdown, validation compiling report away. validate target, execute report non-interactively save results.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-6","dir":"Articles","previous_headings":"Running a Validation Report","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run validation report","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"validation-mode-running-on-source","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Running on Source","title":"Validating External Resources with {valtools}","text":"","code":"valtools::vt_validate_report()"},{"path":"https://phuse-org.github.io/valtools/articles/validation_figure_tests.html","id":"image-comparison-example","dir":"Articles","previous_headings":"","what":"Image Comparison Example","title":"Validation: Figure Tests","text":"test cases need provide enough instruction another programmer consistently generate results. comes test cases related figure comparison, holds true. test case author needs provide specific set instructions, including layering plot elements, generate plots. Additionally, test case author needs provide instructions compare files. Usually device use save generated plot (ie. PNG, JPEG, TIFF) reference file test code writer compare . comparison file types can done comparing raw file contents raw text via compare_file_binary() compare_file_text() found {testthat} V3.0.4.9000 newer. performing comparison, two files generated OS ensure consistency. situation, test case author generated reference png OS code intended run saved validation folder test_case/references/reference_plot.png test code writer compare .","code":"Figure Expectation 01 --- First create the temporary file path via `tempfile()` and assign to the object `tmp_png`. Set the RNG seed to 100. Run the function `png()`, with the argument `filename` set to be `tmp_png` to start capturing the plot generated. Create a histogram with the function `hist()` and set the arg `x` to be the result of 100 values randomly generated from the normal distribution. Stop capturing the plot by calling `dev.off()`. Compare this plot against the reference file provided by the the test case writer using the `compare_file_binary()` function from {testthat} by passing the pass to the reference file to the first argument (`vt_file(\"test_case/references/reference_plot.png\")`) and `tmp_png` to the second argument and confirming the result is \"TRUE\""},{"path":"https://phuse-org.github.io/valtools/articles/validation_figure_tests.html","id":"test-code","dir":"Articles","previous_headings":"","what":"Test Code","title":"Validation: Figure Tests","text":"test code writer now follows instructions write test case compares file. Note last instructions confirm output true, final expectation use expect_true() expectation {testthat}.","code":"test_that(\"Figure Expectation 01\",{ tmp_png <- tempfile() set.seed(100) png(tmp_png) hist(rnorm(100)) dev.off() expect_true( compare_file_binary( vt_file(\"test_case/references/reference_plot.png\"), tmp_plot ) })"},{"path":"https://phuse-org.github.io/valtools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ellis Hughes. Author, maintainer. Eli Miller. Author. Marie Vendettuoli. Author. Peyman Eshghi. Author. Maya Gans. Contributor. PHUSE. Copyright holder.","code":""},{"path":"https://phuse-org.github.io/valtools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hughes, E., Vendettuoli, M., Miller, E., Peyman, E. (2021). Automate Validated Package Creation. See also: 'R Validation Framework', https://github.com/phuse-org/valtools.","code":"@Manual{, title = {Automate Validated Package Creation}, author = {{Hughes} and {E.} and {Vendettuoli} and {M.} and {Miller} and {E.} and {Peyman} and {E.}}, year = {2021}, url = {https://github.com/phuse-org/valtools}, note = {See also: `R Validation Framework`}, }"},{"path":"https://phuse-org.github.io/valtools/index.html","id":"valtools-","dir":"","previous_headings":"","what":"Automate Validated Package Creation","title":"Automate Validated Package Creation","text":"valtools helps automate validation R packages used clinical research drug development: provides useful templates helper functions tasks arise project set development validation framework. package created R Package Validation Framework PHUSE Working Group. background R Package Validation Framework, watch presentation RStudio::Global Pharma X Session.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Automate Validated Package Creation","text":"install recent version officially released GitHub, use: install latest development version, use:","code":"remotes::install_github(\"phuse-org/valtools\", ref = remotes::github_release()) remotes::install_github(\"phuse-org/valtools\", ref = \"develop\")"},{"path":"https://phuse-org.github.io/valtools/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Automate Validated Package Creation","text":"{valtools} intended bolt-addition standard package development process followed usethis devtools. {valtools} functions start vt followed verb/descriptor make easy follow. common usage valtools add elements required validation R Package Validation Framework facilitating validation. See Starting New Validation Package using {valtools} vignette details.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"adding-validation-content","dir":"","previous_headings":"Usage","what":"Adding Validation Content","title":"Automate Validated Package Creation","text":"vt_use_validation() adds validation infrastructure existing R package. vt_use_req(), vt_use_test_case(), vt_use_test_code add requirements, test cases test code validation folder. vt_use_change_log() creates change log validation folder vt_use_report() creates validation report Rmd gets rendered validation report.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"authoring-a-validation-report","dir":"","previous_headings":"Usage","what":"Authoring A Validation Report","title":"Automate Validated Package Creation","text":"functions helper functions use within validation report Rmd. vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape information validation infrastructure returns data.frame. vt_scrape_sig_table() Scrapes usernames roles validation config file vt_scrape_val_env() Scrapes environment give snapshot packages versions loaded validation vt_scrape_change_log() Scrapes change log vt_scrape_coverage_matrix() Scrapes coverage roxygen tags test case vt_scrape_function_editors() Scrapes editors functions vt_scrape_requirement_editors() Scrapes requirement editors vt_scrape_test_case_editors() Scrapes test case editors vt_scrape_test_code_editors() Scrapes test code editors vt_scrape_risk_assessment() Scrapes risk assessments vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"validating","dir":"","previous_headings":"Usage","what":"Validating","title":"Automate Validated Package Creation","text":"vt_validate_source() installs package temporarily executes validation report rmd validate source code current system. vt_validate_build() installs package temporarily, executes validation report rmd, compiles bundle installing. vt_validate_install() installs package temporarily, executes validation report rmd, installs library machine. vt_validate_installed_package() runs validation report rmd package installed using vt_validate_install() environment changed.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Automate Validated Package Creation","text":"Read Starting New Validation Package using {valtools} vignette high level overview functions exist {valtools} intended uses.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"cheat-sheet","dir":"","previous_headings":"","what":"Cheat Sheet","title":"Automate Validated Package Creation","text":"Cheat sheet use {valtools} R Package","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of conduct","title":"Automate Validated Package Creation","text":"Please note {valtools} project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape change log from a validation project — vt_scrape_change_log","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"Scrape change log validation project Format change log info table validation report Initiate change_log file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"","code":"vt_scrape_change_log() vt_kable_change_log(change_log_info, format = vt_render_to()) vt_use_change_log(date = NULL, version = NULL, open = interactive())"},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"change_log_info data.frame exported vt_scrape_change_log format passed knitr::kable date passed template version version set news file open whether open file ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"data.frame variables version, effective_date, description knitr_kable object path change log file, used side effect creating change_log","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"Extracts validation version, date, description change log items start [validation].","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"","code":"withr::with_tempdir({ file.create(\".here\") vt_use_validation() vt_use_change_log() log_data <- vt_scrape_change_log() print(log_data) vt_kable_change_log(log_data) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Change log created in the validation folder. #> version effective_date description #> 1 1.0 2024-11-05 Validation release notes for version 1.0 #> #> #> #> #> #>
Version <\/th> #> Effective Date <\/th> #> Activity Description <\/th> #> <\/tr> #> <\/thead> #>
1.0 <\/td> #> 2024-11-05 <\/td> #> Validation release notes for version 1.0 <\/td> #> <\/tr> #> <\/tbody> #> <\/table>"},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":null,"dir":"Reference","previous_headings":"","what":"Dynamic Reference Rendering — dynamic_reference_rendering","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"enable dynamic referencing reading file converting dynamic references values rendering validation report.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"","code":"dynamic_reference_rendering(input, reference = NULL)"},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"input R object path file convert dynamic referencing values reference dynamic referencer use. NULL, uses internal dynamic referencer.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"text dynamic referencing evaluated","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate the test code file — vt_run_test_code_file","title":"Evaluate the test code file — vt_run_test_code_file","text":"Evaluate test code file Turn test code results data.frame kable output","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate the test code file — vt_run_test_code_file","text":"","code":"vt_run_test_code_file(file, test_env = new.env(), ..., ref = vt_path()) vt_kable_test_code_results(results, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate the test code file — vt_run_test_code_file","text":"file full path test code file. test_env environment perform tests ... argument passed knitr::kable() ref reference path use. Defaults vt_path() results results data.frame vt_run_test_code_file() format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate the test code file — vt_run_test_code_file","text":"kable variables: Test, Expected, Results, Pass/Fail. Suitable including validation report kableExtra object formatting","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a validation requirement, test case, or test code file — vt_use_test_case","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"Create validation requirement, test case, test code file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"","code":"vt_use_test_case( name, username = vt_username(), title = NULL, open = interactive(), add_before = NULL, add_after = NULL ) vt_use_test_code( name, username = vt_username(), open = interactive(), add_before = NULL, add_after = NULL ) vt_use_req( name, username = vt_username(), title = NULL, open = interactive(), add_before = NULL, add_after = NULL )"},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"name name/path validation item. can named file system separator organized directory structure. Items located ./inst/validation//{name}. username username insert validation item author. title Title requirement defaults base name passed sans file paths extensions. open newly made file opened editing. add_before, add_after either parameters supplied, location add validation item validation configuration. parameter passed item added end.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"Path newly created validation item file, invisibly.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"","code":"withr::with_tempdir({ vt_create_package(\"example.package\") setwd(\"example.package\") vt_add_user_to_config( username = whoami::username(), name = \"Sample Name\", title = \"Sample\", role = \"example\" ) # Create req at the cases top level `inst/validation/cases/case1` vt_use_test_case(\"case1\", open = FALSE) # Create req at `inst/validation/cases/regTests/Update2/case2` vt_use_test_case(\"regTests/Update2/case2\", open = FALSE, add_before = \"case1.md\") # Create a test case using tidy select vt_use_test_case(\"case1a\", open = FALSE, add_after = tidyselect::starts_with(\"case1\")) }) #> ✔ Creating example.package/. #> ✔ Setting active project to \"/tmp/RtmpWCYD6J/file17f158da6fa6/example.package\". #> ✔ Creating R/. #> ✔ Writing DESCRIPTION. #> Package: example.package #> Title: What the Package Does (One Line, Title Case) #> Version: 0.0.0.9000 #> Authors@R (parsed): #> * First Last [aut, cre] (YOUR-ORCID-ID) #> Description: What the package does (one paragraph). #> License: `use_mit_license()`, `use_gpl3_license()` or friends to #> pick a license #> Encoding: UTF-8 #> Roxygen: list(markdown = TRUE) #> RoxygenNote: 7.3.2 #> ✔ Writing NAMESPACE. #> ✔ Setting active project to \"\". #> Created package structure #> ✔ Adding \"!*\" to example.package/vignettes/validation/.gitignore. #> Created vignettes/validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> User `runner` added to validation config file. #> Item created:test_cases/case1.md #> Filename(s): case1.md added to validation config file. #> Item created:test_cases/regTests/Update2/case2.md #> Filename(s): regTests/Update2/case2.md added to validation config file. #> Item created:test_cases/case1a.md #> Filename(s): case1a.md added to validation config file."},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape ","title":"Scrape ","text":"Scrape \"riskAssessment\" tag requirements generate table Kable handler output vt_scrape_risk_assessment","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape ","text":"","code":"vt_scrape_risk_assessment(reference = NULL, src = \".\", ref = vt_path()) vt_kable_risk_assessment(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape ","text":"reference dynamic reference holder already exists src, ref passed vt_scrape_tags_from x data.frame output vt_scrape_risk_assessment format passed kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape ","text":"data.frame documenting requirements risk assessments knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape Roxygen blocks — scrape_roxygen","title":"Scrape Roxygen blocks — scrape_roxygen","text":"valtools uses roxygen across multiple file types provide documentation. function provides tooling necessary scrape major file types use ( R, R test code, markdown, Rmarkdown) provides consistent output type capture information necessary help high level functions make assumptions.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape Roxygen blocks — scrape_roxygen","text":"","code":"scrape_roxygen(file, ..., type = tools::file_ext(file))"},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape Roxygen blocks — scrape_roxygen","text":"file file scrape roxygen block ... dots future extensions must empty. type method parse_roxygen use file extension","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape Roxygen blocks — scrape_roxygen","text":"list roxygen blocks found file.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape authorship information — vt_scrape_requirement_editors","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"functions provide utitilies scrape editor editDate roxygen tags put nice data.frame use validation reports. addition, opinionated kable formatting functions provided well facilitate nice printing reports.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"","code":"vt_scrape_requirement_editors( tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_test_case_editors( tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_test_code_editors( tags = c(\"editor\", \"editDate\", \"deprecate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_function_editors( tags = c(\"editor\", \"editDate\", \"export\"), src = \".\", ref = vt_path() ) vt_kable_requirement_editors(x, format = vt_render_to()) vt_kable_function_editors(x, format = vt_render_to()) vt_kable_test_case_editors(x, format = vt_render_to()) vt_kable_test_code_editors(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"tags tags keep. defaults editor editDate src path package sources. defaults current directory passed vt_scrape_tags_from ref reference path whre validation documentation lives. defaults vt_path annd passed vt_scrape_tags_from. dynamic_ref dynamic referencer object x data.frame exported vt_scrape_* format passed knitr::kable, NULL default","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"data.frame containing results scraped roxygen tags section knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"vt_scrape_functions Requires access raw R/ function documentation parsed via valtools validation/ folder. pull information installed R/ location.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"","code":"withr::with_tempdir({ captured_output <- capture.output({vt_create_package(open = FALSE)}) vt_use_req( name = \"req1\", username = \"B user\", title = \"Requirement 1\", open = FALSE) writeLines(c( \"#' @title Say Hello\", \"#' @editor B User\", \"#' @editDate 2021-04-27\", \"#' @export\", \"hello <- function(){print(\\\"Hello\\\")}\" ), con = \"R/hello.R\") vt_use_test_case( name = \"testcase1\", username = \"B user\", title = \"TesT Case 1\", open = FALSE) vt_use_test_code( name = \"testcode1\", username = \"C user\", open = FALSE) req_editors <- vt_scrape_requirement_editors() vt_kable_requirement_editors(req_editors) fun_editors <- vt_scrape_function_editors() vt_kable_function_editors(fun_editors) t_case_editors <- vt_scrape_test_case_editors() vt_kable_test_case_editors(t_case_editors) t_code_editors <- vt_scrape_test_code_editors() vt_kable_test_code_editors(t_code_editors) }) #> ✔ Setting active project to \"/tmp/RtmpWCYD6J/file17f15629a662\". #> ✔ Creating R/. #> ✔ Writing DESCRIPTION. #> ✔ Writing NAMESPACE. #> ✔ Setting active project to \"\". #> Created package structure #> ✔ Adding \"!*\" to ./vignettes/validation/.gitignore. #> Created vignettes/validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Item created:requirements/req1.md #> Filename(s): req1.md added to validation config file. #> Item created:test_cases/testcase1.md #> Filename(s): testcase1.md added to validation config file. #> Item created:test_code/testcode1.R #> Filename(s): testcode1.R added to validation config file. #> #> #> #> #> #>
Test Code ID <\/th> #> Editor <\/th> #> Edit Date <\/th> #> <\/tr> #> <\/thead> #>
TESTNUMBER <\/td> #> C user <\/td> #> 2024-11-05 <\/td> #> <\/tr> #> <\/tbody> #> <\/table>"},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a validation structure — vt_use_validation","title":"Create a validation structure — vt_use_validation","text":"Creates structure validation artifacts. Validation items stored inst/validation Create validation packet infrastructure. Intended create validation infrastructure external R package.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a validation structure — vt_use_validation","text":"","code":"vt_use_validation(pkg = \".\", working_dir, ...) vt_create_package( pkg = \".\", ..., fields = list(), rstudio = rstudioapi::isAvailable(), roxygen = TRUE, check_name = TRUE, open = rlang::is_interactive() ) vt_create_packet( path = \".\", target, ..., rstudio = rstudioapi::isAvailable(), open = rlang::is_interactive() )"},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a validation structure — vt_use_validation","text":"pkg Top level directory package working_dir validation working directory project. Defaults ... Additional argument passed vt_use_config() fields named list fields add DESCRIPTION, potentially overriding default values. See use_description() can set personalized defaults using package options. rstudio TRUE, calls use_rstudio() make new package project RStudio Project. FALSE non-package project, sentinel .file placed directory can recognized project rprojroot packages. roxygen plan use roxygen2 document package? check_name Whether check name valid CRAN throw error . open TRUE, activates new project: using RStudio desktop, package opened new session. RStudio server, current RStudio project activated. Otherwise, working directory active project changed. path path. exists, used. exist, created, provided parent path exists. target target validation. Character name package scope validation packet performed .","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate a package — vt_validate_source","title":"Validate a package — vt_validate_source","text":"vt_validate_source runs validation current source, temporarily installing source properly evaluate report. vt_validate_build() runs step, compiles bundle includes th validation report contents required validation. Finally, vt_validate_installed_package run rerun validation report packages built installed using thevt_validate_build().","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate a package — vt_validate_source","text":"","code":"vt_validate_source(src = \".\", open = interactive()) vt_validate_build(src = \".\", ...) vt_validate_install( src = \".\", ..., install_verbose = TRUE, install_tests = TRUE, reload = TRUE ) vt_validate_installed_package( package, output_directory = \".\", open = interactive() ) vt_validate_report(version, open = interactive())"},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate a package — vt_validate_source","text":"src location source code. Assumed location \"pkg\" open validation report opened built? ... Additional argument passed devtools::build() install_verbose installation verbose? install_tests installation include installation package-specific tests ()? reload package reloaded install? defaults TRUE package installed package name output_directory Location directory output validation report version version validation report output. missing, tries use change_log.md, missing looks package version validation package R package.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate a package — vt_validate_source","text":"path either validation report bundled package","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Add validation file ordering to validation config file — vt_add_file_to_config","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"Impose ordering validation child files Remove validation file orderingfrom projects validation config file Add user information projects validation config file make easier documentation Remove user information projects validation config file Get recorded user information validation config file make easier documentation Use Validation Config File Validation configuration working/output directories, validation report naming conventions, tracking user information(username,name,title, role). Provides single location setting behaviors. Capture information user going involved validation","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"","code":"vt_add_file_to_config(filename, before = NULL, after = NULL) vt_drop_file_from_config(filename) vt_add_user_to_config(username = whoami::username(), name, title, role) vt_drop_user_from_config(username) vt_get_user_info(username, type = c(\"name\", \"title\", \"role\")) vt_use_config( pkg = \".\", package, working_dir, output_dir, report_rmd_name = \"validation.Rmd\", report_naming_format = \"Validation_Report_{package}_v{version}_{date}\", username_list = list(), validation_files = list(), ..., overwrite = FALSE ) vt_user(username, name, title, role, ...)"},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"filename character vector containing filenames order , Optional destination new filenames, default end existing list. Supports functions. Specifying error. username username user. name full name user. title title user. role role user. Can one. type type information pull. select least one: name, title, role pkg write config file package character name package set validation performed . working_dir character directory working validation contents used interactively output_dir character folder contents validation output . report_rmd_name character name rmarkdown document used validation. report_naming_format character glue friendly string naming structure output validation report. use {package} package name, {version} record package version, {date} capture date report run. username_list list user objects created make_user. user contains entries username, name, title, role used documentation. validation_files list validation files: requirements, test cases test code. Validation report content populated using list order. ... additional information user passed list. overwrite [boolean]validation file exists, overwritten? Defaults FALSE.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"Used side effect adding validation file ordering validation config file. Invisibly returns TRUE success. Used side effect removing file ordering information validation config file. Invisibly returns TRUE success. Used side effect adding user information validation config file. Invisibly returns TRUE success. Used side effect removing user information validation config file. Invisibly returns TRUE success. character vector length types requested containing user information validation config file. Used side effect create validation config file. Invisibly returns TRUE success. \"user\" object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"","code":"if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_file_to_config(filename = \"myReqFile.Rmd\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_file_to_config(filename = \"myReqFile.Rmd\") vt_drop_file_from_config(filename = \"myReqFile.Rmd\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") vt_drop_user_from_config(username = \"ellis\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") vt_get_user_info(username = \"ellis\", type = c(\"name\",\"title\")) } # } withr::with_tempdir({ vt_use_validation( package = \"test.package\", working_dir = \".\", output_dir = \".\", report_naming_format = \"Validation_Report_{package}_v{version}_{date}\", username_list = list( vt_user( name = \"test\", title = \"test\", role = \"tester\", username = \"test\" ))) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` vt_user( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") #> $ellis #> $ellis$name #> [1] \"Ellis Hughes\" #> #> $ellis$title #> [1] \"Statistical Programmer\" #> #> $ellis$role #> [1] \"Programmer\" #> #> #> attr(,\"class\") #> [1] \"vt_user\" \"list\""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Use dynamic file paths in a validation. — vt_path","title":"Use dynamic file paths in a validation. — vt_path","text":"vt_path() allows access files relative working directory,identified config file. also required used validation report cases validation installed packages intended shift access correct location installed package access.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use dynamic file paths in a validation. — vt_path","text":"","code":"vt_path(...) vt_find_config()"},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use dynamic file paths in a validation. — vt_path","text":"... [character] Path components validation folder, can empty. argument string containing one path components separated forward slash \"/\".","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Use dynamic file paths in a validation. — vt_path","text":"vt_find_config() locates config file working directory, returns full path .","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use dynamic file paths in a validation. — vt_path","text":"","code":"withr::with_tempdir({callr::r(function(){ valtools::vt_use_validation() valtools::vt_path() valtools::vt_path(\"some\", \"reqs\", \"req01.md\") valtools::vt_path(\"some/reqs/req01.md\") valtools::vt_find_config() })}) #> [1] \"/tmp/RtmpWCYD6J/file17f1bf7e813/validation/validation.yml\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage dynamic refrerencing — vt_dynamic_referencer","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"Manage dynamic refrerencing Manage dynamic refrerencing","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"job dynamic referencer aggregate references exist requirements, test cases, test code validation report update accordingly. helps painful cases new reference may added existing numbering subsequent references need updated user need use object directly, called upon rendering contents validation report. default, expected indicator reference \"##\", though can changed. reference starts indicator (##) can contiguous (white spaces special characters) alphanumeric sequence, include underscore dash. ie. ##req:THISIS_A-reference1234 valid entire string, ##req:THISIS_A-reference.12345 dynamic reference \".\". method 'scrape_references' takes vector strings, indicator whether input file text requirement ('req'), test case test code ('tc'). allows numbering increase independently . However, every reference must unique. ie. ##reference whether shows test case requirement reference. method 'reference_insertion' takes vector strings replaces references numeric values.","code":""},{"path":[]},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"vt_dynamic_referencer$scrape_references() vt_dynamic_referencer$reference_insertion() vt_dynamic_referencer$list_references() vt_dynamic_referencer$new() vt_dynamic_referencer$clone()","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-scrape-references-","dir":"Reference","previous_headings":"","what":"Method scrape_references()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"collect references text.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$scrape_references(text)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"text character vector collect references . type type file converted; requirement ('req'), test case test code ('tc')","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##req:new_reference\") ref$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-reference-insertion-","dir":"Reference","previous_headings":"","what":"Method reference_insertion()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"replace references text values","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$reference_insertion(text)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"text character vector inserting references ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##new_reference\") ref$list_references() ref$reference_insertion(\"This is my ##new_reference\")"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-list-references-","dir":"Reference","previous_headings":"","what":"Method list_references()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"list references available value","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples-2","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##new_reference\") ref$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"create new dynamic reference object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$new( reference_indicator = \"##\", type = c(\"number\", \"letter\") )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"reference_indicator character vector indicates start dynamic references. defaults \"##type:reference\" type \"number\" (arabic) \"letter\" (latin uppercase) use counters","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"new vt_dynamic_reference object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"objects class cloneable method.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$clone(deep = FALSE)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"deep Whether make deep clone.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"reference <- vt_dynamic_referencer$new() reference #> #> Public: #> clone: function (deep = FALSE) #> initialize: function (reference_indicator = \"##\", type = c(\"number\", \"letter\")) #> list_references: function () #> reference_insertion: function (text) #> scrape_references: function (text) #> Private: #> add_reference: function (reference_id, type = c(\"req\", \"tc\")) #> advance_reference: function (type = c(\"req\", \"tc\")) #> ref_iter_number: list #> reference_indicator: ## #> reference_indicator_regex: \\#\\# #> references: list #> type: number ## ------------------------------------------------ ## Method `vt_dynamic_referencer$scrape_references` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##req:new_reference\") ref$list_references() #> $`req:new_reference` #> [1] 1 #> ## ------------------------------------------------ ## Method `vt_dynamic_referencer$reference_insertion` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##new_reference\") ref$list_references() #> list() ref$reference_insertion(\"This is my ##new_reference\") #> [1] \"This is my ##new_reference\" ## ------------------------------------------------ ## Method `vt_dynamic_referencer$list_references` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##new_reference\") ref$list_references() #> list()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":null,"dir":"Reference","previous_headings":"","what":"print files for report generation — vt_file","title":"print files for report generation — vt_file","text":"valtools assists user generating validation report allowing user define order ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"print files for report generation — vt_file","text":"","code":"vt_file(file, ..., dynamic_referencing = FALSE)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"print files for report generation — vt_file","text":"file file evaluate ... dots future extensions must empty. dynamic_referencing Whether employ dynamic referencing . defaults FALSE.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"print files for report generation — vt_file","text":"list roxygen blocks found file.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":null,"dir":"Reference","previous_headings":"","what":"Get all users from validation config file without knowing usernames — vt_get_all_users","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"Get users validation config file without knowing usernames","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"","code":"vt_get_all_users()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"list users config file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify ordering of validation or user-designated child files — vt_get_child_files","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"Identify ordering validation user-designated child files","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"","code":"vt_get_child_files( loc = c(\"folder\", \"yml\"), validation_order = c(\"requirements\", \"test_cases\", \"test_code\") )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"loc location explore. Either \"folder\" naive inclusion validation folder contents, \"yml\" use validation_folder field validation.yml validation_order optional ordering validation folders search","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"vector child file names include validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"","code":"withr::with_tempdir({ vt_use_validation() vt_use_test_case(\"testcase1\", username = \"a user\", open = FALSE) vt_use_req(\"req1\", username = \"a user\", open = FALSE) vt_use_test_code(\"testcode1\", username = \"another user\", open = FALSE) # as listed in validation.yml validation_files vt_get_child_files(loc = \"yml\") # as ordered in validation subfolders vt_get_child_files(loc = \"folder\", validation_order = c(\"requirements\", \"test_cases\", \"test_code\")) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Item created:test_cases/testcase1.md #> Filename(s): testcase1.md added to validation config file. #> Item created:requirements/req1.md #> Filename(s): req1.md added to validation config file. #> Item created:test_code/testcode1.R #> Filename(s): testcode1.R added to validation config file. #> [1] \"requirements/req1.md\" \"test_cases/testcase1.md\" #> [3] \"test_code/testcode1.R\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"Kable handler output vt_scrape_coverage_matrix","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"","code":"vt_kable_coverage_matrix(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"x data.frame output vt_scrape_coverage_matrix format passed kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Kable defaults for rendering validation report — vt_kable_sig_table","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"Kable defaults rendering validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"","code":"vt_kable_sig_table(people, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"people dataframe columns role, Name Title, Signature, \"Date\" format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates kable code for validation environment details — vt_kable_val_env","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"Generates kable code validation environment details","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"","code":"vt_kable_val_env(val_env, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"val_env data.frame output vt_scrape_val_env format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_to.html","id":null,"dir":"Reference","previous_headings":"","what":"output to render kable to — vt_render_to","title":"output to render kable to — vt_render_to","text":"reads knitr rmarkdown options determine output type rendered","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_to.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"output to render kable to — vt_render_to","text":"","code":"vt_render_to()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":null,"dir":"Reference","previous_headings":"","what":"provide a nice wrapper to set states around render — vt_render_validation_report","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"package intended use end users. used within valtools packages.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"","code":"vt_render_validation_report( report_path, output_dir = dirname(report_path), output_file = NULL, ..., render_time = c(\"build\", \"installed\"), package = \"\" )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"report_path path validation report rmarkdown output_dir path directory output rendered report. defaults folder output_file expected output filename sans extension ... arguments passed render render_time type rendering validation run, \"build\" \"installed\". package report type rendering validation run, \"build\" \"installed\".","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape ","title":"Scrape ","text":"Scrape \"coverage\" tag test code generate mapping","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape ","text":"","code":"vt_scrape_coverage_matrix( type = c(\"long\", \"wide\"), reference = NULL, src = \".\", ref = vt_path() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape ","text":"type one \"long\" \"wide\" determines shape output table reference dynamic reference holder already exists src, ref passed vt_scrape_tags_from","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape ","text":"data.frame mapping requirement ids test case ids.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"Looks value custom roxygen sections. Custom sections named using @section :, colon use indicate end name, value starts next line.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"","code":"vt_scrape_section(tag, block)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"tag name section, case insensitive. block character vector holds documentation block. #' may present omitted.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"section value","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last Updated By","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"Marie Vendettuoli","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last Updated Date","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"2021-02-18","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"","code":"roxy_block1 <- c(\"@title Title1\", \"@param param1 definition\", \"@section Last updated date:\", \"2021-01-01\", \"@importFrom utils sessionInfo\", \"@export\" ) vt_scrape_section(\"Last updated date:\", roxy_block1) #> [1] \"2021-01-01\" roxy_block2 <- paste0(\"#' \", roxy_block1) vt_scrape_section(\"Last updated date:\", roxy_block2) #> [1] \"2021-01-01\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a signature table for a validation report — vt_scrape_sig_table","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"Generate signature table validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"","code":"vt_scrape_sig_table(usernames = NULL)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"usernames list vt_names use validation.yml exist","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"dataframe created validation config containing row user columns: role, name_and_title, signature, date.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"Looks roxygen2 function documentation /R author details. Assumes author date tagged via custom sections @section Last updated : @section Last updated date:, respectively. exclude roxygen block scraping, omit section names. using dummy documentation file, looks @name capture function name, otherwise uses actual function call. Exported internal status affect scraping.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"","code":"vt_scrape_tags_from( type, tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"type type scraping done. one \"requirements\",\"test_cases\",\"test_code\",\"functions\". call functions. working directory must R package, path identified src must R package. tags tags keep. defaults editor editDate src path package source. defaults current directory. ref reference path validation documentation lives. defaults vt_path()","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"time, function retrieve documentation captured functions dispatched within R6 class. Tags class level documentation retrieved.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last Updated by","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"Ellis Hughes","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last updated date","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"2021-03-05","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve validation environment — vt_scrape_val_env","title":"Retrieve validation environment — vt_scrape_val_env","text":"Retrieves dependencies used validation report. Includes: OS, R version, packages listed validation package DESCRIPTION (Depends/Imports/Suggests), packages present current session.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve validation environment — vt_scrape_val_env","text":"","code":"vt_scrape_val_env(pkg = \".\")"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve validation environment — vt_scrape_val_env","text":"pkg path package","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve validation environment — vt_scrape_val_env","text":"data.frame columns: resource \"OS\", \"R\" package name type identifier requirement type: system - OS R resource package_req - DESCRIPTION Depends/Imports package validated extended_req - DESCRIPTION Suggests package validated session - packages current workspace captured via package_req/extended_req detail OS version details","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last updated by","title":"Retrieve validation environment — vt_scrape_val_env","text":"Marie Vendettuoli","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last updated date","title":"Retrieve validation environment — vt_scrape_val_env","text":"2021-02-03","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Create validation report from template — vt_use_report","title":"Create validation report from template — vt_use_report","text":"Create validation report template","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create validation report from template — vt_use_report","text":"","code":"vt_use_report( pkg_name = NULL, template = \"validation\", dynamic_referencing = FALSE, open = is_interactive() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create validation report from template — vt_use_report","text":"pkg_name name package template validation report template valtools use, one \"validation\" (default) \"requirements\" dynamic_referencing dynamic referencing enabled default. Boolean defaults FALSE. open boolean open validation report editing","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":null,"dir":"Reference","previous_headings":"","what":"Get current username — vt_username","title":"Get current username — vt_username","text":"Wrapper whoami::username","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get current username — vt_username","text":"","code":"vt_username()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get current username — vt_username","text":"@returns [character] Username person called function","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get current username — vt_username","text":"","code":"withr::with_tempdir({ vt_use_validation( username_list = list(vt_user( username = whoami::username(), name = \"test\", title = \"title\", role = \"role\"))) vt_username() }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> [1] \"test\""},{"path":[]},{"path":"https://phuse-org.github.io/valtools/news/index.html","id":"valtools-041","dir":"Changelog","previous_headings":"","what":"valtools 0.4.1","title":"valtools 0.4.1","text":"Initialize NEWS.md Update CI Fix cheatsheet link (#225) Fix error nested projects/packages (#230) Automate unit tests fix R CMD check issues (#229)","code":""}] +[{"path":"https://phuse-org.github.io/valtools/CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http:contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":null,"dir":"","previous_headings":"","what":"How you can contribute","title":"How you can contribute","text":"Thanks interest contributing valtools! several ways can contribute package: Propose idea. idea new valtools feature? Take look issue list first see isn’t included suggested yet. , suggest idea issue GitHub. Report bug. Report bug issue GitHub can fix . filing issue, important thing include minimal reproducible example can quickly verify problem, figure fix . three things need include make example reproducible: required packages, data, code. Packages loaded top script. easiest way include data use dput() generate R code recreate . even better can create data.frame() just handful rows columns still illustrates problem. Spend little bit time ensuring code easy others read: (1) Make sure ’ve used spaces variable names concise, informative. (2) Use comments indicate problem lies. (3) best remove everything isn’t related problem. shorter code , easier understand. Improve documentation. Noticed typo? Think function use better example? Improvements documentation welcome! Contribute code. ’d like fix bug implement new feature, look issue list leave comment things want work . new idea, first file issue make sure someone team agrees ’s problem, happy basic proposal fixing . Also see development guidelines .","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"development-guidelines","dir":"","previous_headings":"","what":"Development guidelines","title":"How you can contribute","text":"follow Gitflow development model guidelines R packages Hadley Wickham Jenny Bryan. Create branch git make changes. Write code. Restart R Session Cmd+Shift+F10 (Ctrl+Shift+F10 Windows) Build Reload Cmd+Shift+B (Ctrl+Shift+B Windows) Test Package Cmd+Shift+T (Ctrl+Shift+T Windows) Document Package Cmd+Shift+D (Ctrl+Shift+D Windows) Check Package Cmd+Shift+E (Ctrl+Shift+E Windows) Push branch github issue pull request (PR). Discuss pull request. Iterate maintainer accepts PR decides ’s good fit valtools. might feel overwhelming first time get set , gets easier practice.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"before-every-commit","dir":"","previous_headings":"","what":"Before every commit","title":"How you can contribute","text":"commit, run following commands one time make sure didn’t break anything. Restart R Session Cmd+Shift+F10 (Ctrl+Shift+F10 Windows) Check Package Cmd+Shift+E (Ctrl+Shift+E Windows) Document Package Cmd+Shift+D (Ctrl+Shift+D Windows)","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"pull-requests","dir":"","previous_headings":"","what":"Pull requests","title":"How you can contribute","text":"pull request follow guidelines: Motivation changes. pull request clearly concisely motivate need change. related changes. submit pull request, please check make sure haven’t accidentally included unrelated changes. make harder see exactly ’s changed, evaluate unexpected side effects. PR corresponds git branch, expect submit multiple changes make sure create multiple branches. Coding style. Please follow official tidyverse style. Maintaining consistent style across whole code base makes much easier jump code. ’re modifying existing valtools code doesn’t follow style guide, separate pull request fix style greatly appreciated. Documentation. ’re adding new parameters new function, ’ll also need document roxygen. Make sure re-run devtools::document() code submitting. fixing bug adding new feature, please add testthat unit test.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of conduct","title":"How you can contribute","text":"Please note valtools released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://phuse-org.github.io/valtools/CONTRIBUTING.html","id":"learn-about-package-development","dir":"","previous_headings":"","what":"Learn about package development","title":"How you can contribute","text":"contributing, may want read bit package development general. Package development workflow usethis package Emil Hvitfeldt. (blog post) Writing R package scratch Hilary Parker updated version Tomas Westlake shows efficiently using usethis package. (blog post) can create R package 20 minutes Jim Hester. (conference talk) R packages Hadley Wickham Jenny Bryan. (book) Building Tidy Tools. (rstudio::conf workshop) contributing guide inspired modified ggplot2 contributing.md, rOpenSci’s contributing guide, template.","code":""},{"path":"https://phuse-org.github.io/valtools/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"MIT License","title":"MIT License","text":"Copyright (c) 2024 PHUSE Permission hereby granted, free charge, person obtaining copy software associated documentation files (“Software”), deal Software without restriction, including without limitation rights use, copy, modify, merge, publish, distribute, sublicense, /sell copies Software, permit persons Software furnished , subject following conditions: copyright notice permission notice shall included copies substantial portions Software. SOFTWARE PROVIDED “”, WITHOUT WARRANTY KIND, EXPRESS IMPLIED, INCLUDING LIMITED WARRANTIES MERCHANTABILITY, FITNESS PARTICULAR PURPOSE NONINFRINGEMENT. EVENT SHALL AUTHORS COPYRIGHT HOLDERS LIABLE CLAIM, DAMAGES LIABILITY, WHETHER ACTION CONTRACT, TORT OTHERWISE, ARISING , CONNECTION SOFTWARE USE DEALINGS SOFTWARE.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"creating-a-new-r-package","dir":"Articles","previous_headings":"","what":"Creating A New R Package","title":"Starting New Validation Package using {valtools}","text":"Starting new R package using {valtools} one line command, information required path location new package structure built, last folder name path new name package. package constructed using usethis::create_package() function, function acts wrapper adds necessary validation infrastructure required {valtools}. Importantly, now vignettes/validation folder, working directory validation. almost content validation created. Inside folder, validation.yml file, referred validation config file going forward. YML file informs {valtools} interact various pieces validation created, information needs shared across multiple sessions/users. user need interact file directly, functions inside {valtools} update file necessary.","code":"# create a new package skeleton vt_create_package(\"example.package\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial","dir":"Articles","previous_headings":"Creating A New R Package","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run chunk code create package temporary directory follow along tutorial. new package created new session. Run subsequent code new session. examine folder structure new package, run following function:","code":"valtools::vt_create_package(file.path(tempdir(),\"example.package\")) fs::dir_tree(recurse = TRUE)"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"add-requirements","dir":"Articles","previous_headings":"","what":"Add Requirements","title":"Starting New Validation Package using {valtools}","text":"Requirements document goals package - solve whatever problem task - documented code written. Requirements recorded within vignettes/validation/requirements folder default. collection requirements may called specifications. make adding validation content easy, {valtools} extended usethis approach package contents creation family “vt_use_*” functions. vt_use_req() creates new requirement vignettes/validation/requirements folder, main argument name requirement, optional argument username record name person writing requirement. username argument passed, {valtools} automatically get computer username user creating requirement attempt put full name. user created validation contents , ask user questions (Name, Title, Role) record validation config file documentation validation report.","code":"valtools::vt_use_req(\"Requirement_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-1","dir":"Articles","previous_headings":"Add Requirements","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command newly opened requirements file, line 5, Replace REQUIREMENTS 1.1, ASSESSMENT 1, Low Risk, Small Impact indicate requirement 1.1 risk assessment determined low risk small impact wrong. Add new line underneath line (line 6) line contains: #' 1.2: 5, Low risk, Medium Impact Copy following content:","code":"## Say Hello + 1.1 Say Hello to users + 1.2 Say Hello to multiple users at once"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"package-development","dir":"Articles","previous_headings":"","what":"Package Development","title":"Starting New Validation Package using {valtools}","text":"Now requirements set, normal package development process can followed. {valtools} expects developers using usethis devtools create rest package contents, required. critical piece validation development tracking programmers wrote functions. {valtools} supports augmenting {roxygen2} framework function documentation two custom roxygen tags: @editor @editDate. @editor tracking last editor function, @editDate recording whenever function modified.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-2","dir":"Articles","previous_headings":"Package Development","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command create R file package copy following code file.","code":"usethis::use_r(\"hello_world\") #' Hello World #' @param name name to say hello to #' @returns character string saying hello #' @editor Ellis Hughes #' @editDate 2021-03-12 #' @export hello_world <- function(name){ paste(\"Hello,\",name) } #' Hello World - internal #' @param name name to say hello to #' @returns character string saying hello #' @editor Ellis Hughes #' @editDate 2021-03-12 hello_world_internal <- function(name){ paste(\"hello,\",name) } # generate documentation devtools::document() #GPP: unit testing, update DESCRIPTION, ..."},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"change-log","dir":"Articles","previous_headings":"","what":"Change Log","title":"Starting New Validation Package using {valtools}","text":"Similar news file, {valtools} suggests use change log directly tied validation. purpose separate package update information useful developers information important capture validation. create change log file, {valtools} function vt_use_change_log(). create change log file inside working directory open editing. header information tracks version validation (usually tied package version developing package), date release validation. markdown file, normal markdown can used document changes. However, critically , bullets marked [validation] recorded validation report.","code":"valtools::vt_use_change_log()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-3","dir":"Articles","previous_headings":"Change Log","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run command create change log.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"testing","dir":"Articles","previous_headings":"","what":"Testing","title":"Starting New Validation Package using {valtools}","text":"Testing done ensure package meets requirements set project. Testing done two major steps: firsts consists writing series cases prove requirements met, second application cases.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"test-cases","dir":"Articles","previous_headings":"Testing","what":"Test Cases","title":"Starting New Validation Package using {valtools}","text":"addition writing test cases handled vt_use_test_case() function. Similarly vt_use_req(), username can passed, look determine user calling function input information. function creates test case file vignettes/validation/test_cases folder package opens editing.","code":"valtools::vt_use_test_case(\"Test_case_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-4","dir":"Articles","previous_headings":"Testing > Test Cases","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run code newly opened test case file, replace TESTCASE 1.1, REQUIREMENT 1.1 indicate test case 1.1 shows requirement 1.1 met. Add new line underneath line (line 6) line contains: #' 1.2: 1.1, 1.2 indicate test case 1.2 shows requirements 1.1 1.2 met. Copy following test case file test cases documented:","code":"## Test Case 1: hello_world + 1.1 test that the software can say \"hello, Johnny\" by passing a user \"Johnny\" to the hello_world function + 1.2 test that the software can say hello to multiple people by passing a vector of users - \"Johnny\", \"Beth\", \"Andy\",\"Elisabeth\" to the hello_world function and getting back a vector of: c(\"Hello, Johnny\", \"Hello, Beth\", \"Hello, Andy\",\"Hello, Elisabeth\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"test-code","dir":"Articles","previous_headings":"Testing","what":"Test Code","title":"Starting New Validation Package using {valtools}","text":"Test code implementation test cases code. goal code completely reproducible able run without human interaction. Additionally, test code written third party - someone involved writing actual code test case. helps ensure integrity testing well providing valuable review documentation test cases package code. Similarly vt_use_req() requirements vt_use_test_case test cases, {valtools} provide function creating test code files recording user created file.","code":"valtools::vt_use_test_code(\"Test_code_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-5","dir":"Articles","previous_headings":"Testing > Test Code","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Add “Val Dashun” validation config file: Now persons information recorded, construct test code file use record test code code . newly opened test code file. Update TESTNUMBER 1.1 new test code file copy code body test: add new test following beneath test. Replace “TODAYS DATE” today’s date.","code":"valtools::vt_add_user_to_config( username = \"user_b\", name = \"Val A Dashun\", title = \"Programmer II\", role = \"tester\" ) valtools::vt_use_test_code(\"Test_code_001\", username = \"Val A Dashun\") hello_result <- hello_world(\"Johnny\") expect_equal( hello_result, \"Hello, Johnny\" ) #' @editor Val A Dashun #' @editDate TODAYS DATE test_that(\"1.2\",{ hello_result <- hello_world(c(\"Johnny\", \"Beth\", \"Andy\",\"Elisabeth\")) expect_equal( hello_result, c(\"Hello, Johnny\", \"Hello, Beth\", \"Hello, Andy\",\"Hello, Elisabeth\") ) })"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"authoring-validation-reports","dir":"Articles","previous_headings":"","what":"Authoring Validation Reports","title":"Starting New Validation Package using {valtools}","text":"{valtools} provides dynamic access via Rmarkdown file details necessary generating validation report push button. validation report documents package meets stated goals can re-evaluated necessary generate report PDF HTML format. function vt_use_report() creates validation report rmarkdown file pre-populated code scrape pieces information generated prior steps create final report knit. vt_use_report() saves validation report rmarkdown file working directory identified validation config file. Within packages defaults vignettes folder. rmarkdown file default name validation.Rmd unspecified. several sections included default provided validation report rmarkdown: Signatures: Capture signatures everyone involved validation. Release Details: Records validation environment Presents change log validation. Subsections show last editor piece validation; requirements, functions, test cases test code. Traceability table show requirements Risk Assessment: Combines risk assessments made single table Validation: record requirement, test case, results test code {valtools} also supports concept called “dynamic referencing”, explained another vignette. editing report, key functions know extending report included {valtools} : vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape various pieces information validation infrastructure returns data.frame. vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report. Keep mind, report Rmarkdown, limit editing customization, templates.","code":"valtools::vt_use_report(template = \"validation\")"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-6","dir":"Articles","previous_headings":"Authoring Validation Reports","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run code generate report, inspect overall structure report. See happens contents moved around.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"running-a-validation-report","dir":"Articles","previous_headings":"","what":"Running a Validation Report","title":"Starting New Validation Package using {valtools}","text":"Now validation report Rmarkdown, validation compiling report away. However, different organizations might follow different approaches validation documentation might necessary. {valtools} can support several different methods validation moment:","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"tutorial-7","dir":"Articles","previous_headings":"Running a Validation Report","what":"Tutorial","title":"Starting New Validation Package using {valtools}","text":"Run method validation observe differences","code":""},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-running-on-source","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Running on Source","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_source()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-generating-validated-bundle-for-distribution","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Generating validated bundle for distribution","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_build()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-validating-and-installing-package","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Validating and installing package","title":"Starting New Validation Package using {valtools}","text":"","code":"valtools::vt_validate_install()"},{"path":"https://phuse-org.github.io/valtools/articles/starting-validated-package.html","id":"validation-mode-re-validating-an-installed-package","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Re-validating an installed package","title":"Starting New Validation Package using {valtools}","text":"Compare result original validation vignette:","code":"valtools::vt_validate_installed_package(\"example.package\") vignette(\"validation\",\"example.package\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"creating-a-new-validation-packet","dir":"Articles","previous_headings":"","what":"Creating A New Validation Packet","title":"Validating External Resources with {valtools}","text":"Starting new validation packet using {valtools} starts vt_create_packet(). , user passes directory project performed , optionally target validation. “target validation” packet intends validate - external package, environment, software, etc. target provided, {valtools} request user provide information validation packet folder constructed using usethis::create_project() function, necessary validation infrastructure required {valtools}. Importantly, now validation folder, working directory validation. almost content validation created. Inside folder, validation.yml file, referred validation config file going forward. YML file informs {valtools} interact various pieces validation created, information needs shared across multiple sessions/users. user need interact file directly, functions inside {valtools} update file necessary.","code":"# create a new validation packet skeleton vt_create_packet( path = \"/my/path/to/example_validation_packet\", target = \"super.package\" )"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial","dir":"Articles","previous_headings":"Creating A New Validation Packet","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run chunk code create validation packet temporary directory follow along tutorial {whoami} package. new packet project opened new session. Run subsequent code new session. examine folder structure new package, run following function:","code":"valtools::vt_create_packet( path = file.path(tempdir(),\"validation_packet_whoami\"), target = \"whoami\" ) fs::dir_tree(recurse = TRUE)"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"add-requirements","dir":"Articles","previous_headings":"","what":"Add Requirements","title":"Validating External Resources with {valtools}","text":"Requirements document users needs target - problems target solves users - must documented test cases written. Requirements recorded within validation/requirements folder default. collection requirements may called specifications. Requirements written markdown (.md) documents special roxygen headers. requirement must following roxygen comments header: title, editor, editDate, riskAssessment. last roxygen comments custom {valtools} supported roxygen tags support validation. @editor tracking last editor function, @editDate recording whenever function modified, @riskAssessment tracking risks requirement. make adding validation content easy, {valtools} extended usethis approach package contents creation family “vt_use_*” functions. vt_use_req() creates new requirement validation/requirements folder, main argument name requirement, optional argument username record name person writing requirement. username argument passed, {valtools} automatically get computer username user creating requirement attempt put full name. user created validation contents , ask user questions (Name, Title, Role) record validation config file documentation validation report.","code":"valtools::vt_use_req(\"Requirement_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-1","dir":"Articles","previous_headings":"Add Requirements","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run command newly opened requirements file, line 5, Replace REQUIREMENTS 1.1, ASSESSMENT 1, Low Risk, Small Impact indicate requirement 1.1 risk assessment determined low risk small impact wrong. Add new line underneath line (line 6) line contains: #' 1.2: 5, Low risk, Medium Impact Copy following content:","code":"+ 1.1 Collect user id for current session + 1.2 Collect full name of user for current session"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"change-log","dir":"Articles","previous_headings":"","what":"Change Log","title":"Validating External Resources with {valtools}","text":"Similar news file, {valtools} suggests use change log directly tied validation recording changes. purpose capture update information useful developers information important capture validation. create change log file, {valtools} function vt_use_change_log(). create change log file inside working directory open editing. header information tracks version validation date release validation. markdown file, normal markdown can used document changes. However, critically , bullets marked [validation] recorded validation report.","code":"valtools::vt_use_change_log()"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-2","dir":"Articles","previous_headings":"Change Log","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run command create change log.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"testing","dir":"Articles","previous_headings":"","what":"Testing","title":"Validating External Resources with {valtools}","text":"Testing done ensure target meets requirements set project. Testing done two major steps: firsts consists writing series cases prove requirements met, second application cases.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"test-cases","dir":"Articles","previous_headings":"Testing","what":"Test Cases","title":"Validating External Resources with {valtools}","text":"addition writing test cases handled vt_use_test_case() function. Similarly vt_use_req(), username can passed, look determine user calling function input information. function creates test case file validation/test_cases folder package opens editing.","code":"valtools::vt_use_test_case(\"Test_case_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-3","dir":"Articles","previous_headings":"Testing > Test Cases","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run code newly opened test case file, replace TESTCASE 1.1, REQUIREMENT 1.1 indicate test case 1.1 shows requirement 1.1 met. Add new line underneath line (line 6) line contains: #' 1.2: 1.1, 1.2 indicate test case 1.2 shows requirements 1.1 1.2 met. Copy following test case file test cases documented:","code":"+ 1.1 Test that the software can identify the username pf the user by setting the environment variable `LOGNAME` to `jsmith` for the duration of the test and confirming that the output of whoami::username is `jsmith`. + 1.2 Test that the software can identify the full name of the user by setting the environment variable `FULLNAME` to \"John Smith\" for the duration of the test and confirming that the output of whoami::fullname() is \"John Smith\""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"test-code","dir":"Articles","previous_headings":"Testing","what":"Test Code","title":"Validating External Resources with {valtools}","text":"Test code implementation test cases code. goal code completely reproducible able run without human interaction. Additionally, test code written third party - someone involved writing actual code test case. helps ensure integrity testing well providing valuable review documentation test cases package code. Similarly vt_use_req() requirements vt_use_test_case test cases, {valtools} provide function creating test code files recording user created file.","code":"valtools::vt_use_test_code(\"Test_code_001\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-4","dir":"Articles","previous_headings":"Testing > Test Code","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Add “Val Dashun” validation config file: Now persons information recorded, construct test code file use record test code code . newly opened test code file. Update TESTNUMBER 1.1 new test code file copy code body test: add new test following beneath test. Replace “TODAYS DATE” today’s date.","code":"valtools::vt_add_user_to_config( username = \"user_b\", name = \"Val A Dashun\", title = \"Programmer II\", role = \"tester\" ) valtools::vt_use_test_code(\"Test_code_001\", username = \"Val A Dashun\") withr::with_envvar( new = list(LOGNAME = \"jsmith\"), { user <- whoami::username() expect_equal( user, \"jsmith\" ) }) #' @editor Val A Dashun #' @editDate TODAYS DATE test_that(\"1.2\",{ withr::with_envvar( new = list(FULLNAME = \"John Smith\"), { user_full_name <- whoami::fullname() expect_equal( user_full_name, \"John Smith\" ) }) })"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"authoring-validation-reports","dir":"Articles","previous_headings":"","what":"Authoring Validation Reports","title":"Validating External Resources with {valtools}","text":"{valtools} provides dynamic access via Rmarkdown file details necessary generating validation report push button. validation report documents package meets stated goals can re-evaluated necessary generate report PDF HTML format. function vt_use_report() creates validation report rmarkdown file pre-populated code scrape pieces information generated prior steps create final report knit. vt_use_report() saves validation report rmarkdown file working directory identified validation config file. Within packages defaults base folder. rmarkdown file default name validation.Rmd unspecified. several sections included default provided validation report rmarkdown: Signatures: Capture signatures everyone involved validation. Release Details: Records validation environment Presents change log validation. Subsections show last editor piece validation; requirements, test cases test code. Traceability table show requirements Risk Assessment: Combines risk assessments made single table Validation: record requirement, test case, results test code {valtools} also supports concept called “dynamic referencing”, explained another vignette. editing report, key functions know extending report included {valtools} : vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape various pieces information validation infrastructure returns data.frame. vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report. Keep mind, report Rmarkdown, limit editing customization, templates.","code":"valtools::vt_use_report(template = \"packet\")"},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-5","dir":"Articles","previous_headings":"Authoring Validation Reports","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run code generate report, inspect overall structure report. See happens contents moved around.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"running-a-validation-report","dir":"Articles","previous_headings":"","what":"Running a Validation Report","title":"Validating External Resources with {valtools}","text":"Now validation report Rmarkdown, validation compiling report away. validate target, execute report non-interactively save results.","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"tutorial-6","dir":"Articles","previous_headings":"Running a Validation Report","what":"Tutorial","title":"Validating External Resources with {valtools}","text":"Run validation report","code":""},{"path":"https://phuse-org.github.io/valtools/articles/validating-external-resources.html","id":"validation-mode-running-on-source","dir":"Articles","previous_headings":"Running a Validation Report > Tutorial","what":"Validation Mode: Running on Source","title":"Validating External Resources with {valtools}","text":"","code":"valtools::vt_validate_report()"},{"path":"https://phuse-org.github.io/valtools/articles/validation_figure_tests.html","id":"image-comparison-example","dir":"Articles","previous_headings":"","what":"Image Comparison Example","title":"Validation: Figure Tests","text":"test cases need provide enough instruction another programmer consistently generate results. comes test cases related figure comparison, holds true. test case author needs provide specific set instructions, including layering plot elements, generate plots. Additionally, test case author needs provide instructions compare files. Usually device use save generated plot (ie. PNG, JPEG, TIFF) reference file test code writer compare . comparison file types can done comparing raw file contents raw text via compare_file_binary() compare_file_text() found {testthat} V3.0.4.9000 newer. performing comparison, two files generated OS ensure consistency. situation, test case author generated reference png OS code intended run saved validation folder test_case/references/reference_plot.png test code writer compare .","code":"Figure Expectation 01 --- First create the temporary file path via `tempfile()` and assign to the object `tmp_png`. Set the RNG seed to 100. Run the function `png()`, with the argument `filename` set to be `tmp_png` to start capturing the plot generated. Create a histogram with the function `hist()` and set the arg `x` to be the result of 100 values randomly generated from the normal distribution. Stop capturing the plot by calling `dev.off()`. Compare this plot against the reference file provided by the the test case writer using the `compare_file_binary()` function from {testthat} by passing the pass to the reference file to the first argument (`vt_file(\"test_case/references/reference_plot.png\")`) and `tmp_png` to the second argument and confirming the result is \"TRUE\""},{"path":"https://phuse-org.github.io/valtools/articles/validation_figure_tests.html","id":"test-code","dir":"Articles","previous_headings":"","what":"Test Code","title":"Validation: Figure Tests","text":"test code writer now follows instructions write test case compares file. Note last instructions confirm output true, final expectation use expect_true() expectation {testthat}.","code":"test_that(\"Figure Expectation 01\",{ tmp_png <- tempfile() set.seed(100) png(tmp_png) hist(rnorm(100)) dev.off() expect_true( compare_file_binary( vt_file(\"test_case/references/reference_plot.png\"), tmp_plot ) })"},{"path":"https://phuse-org.github.io/valtools/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ellis Hughes. Author, maintainer. Eli Miller. Author. Marie Vendettuoli. Author. Peyman Eshghi. Author. Maya Gans. Contributor. PHUSE. Copyright holder.","code":""},{"path":"https://phuse-org.github.io/valtools/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Hughes, E., Vendettuoli, M., Miller, E., Peyman, E. (2021). Automate Validated Package Creation. See also: 'R Validation Framework', https://github.com/phuse-org/valtools.","code":"@Manual{, title = {Automate Validated Package Creation}, author = {{Hughes} and {E.} and {Vendettuoli} and {M.} and {Miller} and {E.} and {Peyman} and {E.}}, year = {2021}, url = {https://github.com/phuse-org/valtools}, note = {See also: `R Validation Framework`}, }"},{"path":"https://phuse-org.github.io/valtools/index.html","id":"valtools-","dir":"","previous_headings":"","what":"Automate Validated Package Creation","title":"Automate Validated Package Creation","text":"valtools helps automate validation R packages used clinical research drug development: provides useful templates helper functions tasks arise project set development validation framework. package created R Package Validation Framework PHUSE Working Group. background R Package Validation Framework, watch presentation RStudio::Global Pharma X Session.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Automate Validated Package Creation","text":"install recent version officially released GitHub, use: install latest development version, use:","code":"remotes::install_github(\"phuse-org/valtools\", ref = remotes::github_release()) remotes::install_github(\"phuse-org/valtools\", ref = \"develop\")"},{"path":"https://phuse-org.github.io/valtools/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Automate Validated Package Creation","text":"{valtools} intended bolt-addition standard package development process followed usethis devtools. {valtools} functions start vt followed verb/descriptor make easy follow. common usage valtools add elements required validation R Package Validation Framework facilitating validation. See Starting New Validation Package using {valtools} vignette details.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"adding-validation-content","dir":"","previous_headings":"Usage","what":"Adding Validation Content","title":"Automate Validated Package Creation","text":"vt_use_validation() adds validation infrastructure existing R package. vt_use_req(), vt_use_test_case(), vt_use_test_code add requirements, test cases test code validation folder. vt_use_change_log() creates change log validation folder vt_use_report() creates validation report Rmd gets rendered validation report.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"authoring-a-validation-report","dir":"","previous_headings":"Usage","what":"Authoring A Validation Report","title":"Automate Validated Package Creation","text":"functions helper functions use within validation report Rmd. vt_path() allows user base path validation directory. Similar idea {} package, validation. vt_file() allows user point specific files render child documents within report. vt_scrape_* family functions allows users scrape information validation infrastructure returns data.frame. vt_scrape_sig_table() Scrapes usernames roles validation config file vt_scrape_val_env() Scrapes environment give snapshot packages versions loaded validation vt_scrape_change_log() Scrapes change log vt_scrape_coverage_matrix() Scrapes coverage roxygen tags test case vt_scrape_function_editors() Scrapes editors functions vt_scrape_requirement_editors() Scrapes requirement editors vt_scrape_test_case_editors() Scrapes test case editors vt_scrape_test_code_editors() Scrapes test code editors vt_scrape_risk_assessment() Scrapes risk assessments vt_kable_* family functions provides opinionated formatting vt_scrape_* functions help quickly construct report. vt_get_child_files() returns list files indicated validation.yml included validation report. allows batch creation dynamic content report.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"validating","dir":"","previous_headings":"Usage","what":"Validating","title":"Automate Validated Package Creation","text":"vt_validate_source() installs package temporarily executes validation report rmd validate source code current system. vt_validate_build() installs package temporarily, executes validation report rmd, compiles bundle installing. vt_validate_install() installs package temporarily, executes validation report rmd, installs library machine. vt_validate_installed_package() runs validation report rmd package installed using vt_validate_install() environment changed.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Automate Validated Package Creation","text":"Read Starting New Validation Package using {valtools} vignette high level overview functions exist {valtools} intended uses.","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"cheat-sheet","dir":"","previous_headings":"","what":"Cheat Sheet","title":"Automate Validated Package Creation","text":"Cheat sheet use {valtools} R Package","code":""},{"path":"https://phuse-org.github.io/valtools/index.html","id":"code-of-conduct","dir":"","previous_headings":"","what":"Code of conduct","title":"Automate Validated Package Creation","text":"Please note {valtools} project released Contributor Code Conduct. contributing project, agree abide terms.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape change log from a validation project — vt_scrape_change_log","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"Scrape change log validation project Format change log info table validation report Initiate change_log file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"","code":"vt_scrape_change_log() vt_kable_change_log(change_log_info, format = vt_render_to()) vt_use_change_log(date = NULL, version = NULL, open = interactive())"},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"change_log_info data.frame exported vt_scrape_change_log format passed knitr::kable date passed template version version set news file open whether open file ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"data.frame variables version, effective_date, description knitr_kable object path change log file, used side effect creating change_log","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"Extracts validation version, date, description change log items start [validation].","code":""},{"path":"https://phuse-org.github.io/valtools/reference/change_log.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scrape change log from a validation project — vt_scrape_change_log","text":"","code":"withr::with_tempdir({ file.create(\".here\") vt_use_validation() vt_use_change_log() log_data <- vt_scrape_change_log() print(log_data) vt_kable_change_log(log_data) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Change log created in the validation folder. #> version effective_date description #> 1 1.0 2024-11-05 Validation release notes for version 1.0 #> #> #> #> #> #>
Version <\/th> #> Effective Date <\/th> #> Activity Description <\/th> #> <\/tr> #> <\/thead> #>
1.0 <\/td> #> 2024-11-05 <\/td> #> Validation release notes for version 1.0 <\/td> #> <\/tr> #> <\/tbody> #> <\/table>"},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":null,"dir":"Reference","previous_headings":"","what":"Dynamic Reference Rendering — dynamic_reference_rendering","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"enable dynamic referencing reading file converting dynamic references values rendering validation report.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"","code":"dynamic_reference_rendering(input, reference = NULL)"},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"input R object path file convert dynamic referencing values reference dynamic referencer use. NULL, uses internal dynamic referencer.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/dynamic_reference_rendering.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Dynamic Reference Rendering — dynamic_reference_rendering","text":"text dynamic referencing evaluated","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":null,"dir":"Reference","previous_headings":"","what":"Evaluate the test code file — vt_run_test_code_file","title":"Evaluate the test code file — vt_run_test_code_file","text":"Evaluate test code file Turn test code results data.frame kable output","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Evaluate the test code file — vt_run_test_code_file","text":"","code":"vt_run_test_code_file(file, test_env = new.env(), ..., ref = vt_path()) vt_kable_test_code_results(results, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Evaluate the test code file — vt_run_test_code_file","text":"file full path test code file. test_env environment perform tests ... argument passed knitr::kable() ref reference path use. Defaults vt_path() results results data.frame vt_run_test_code_file() format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/eval_test_code.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Evaluate the test code file — vt_run_test_code_file","text":"kable variables: Test, Expected, Results, Pass/Fail. Suitable including validation report kableExtra object formatting","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a validation requirement, test case, or test code file — vt_use_test_case","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"Create validation requirement, test case, test code file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"","code":"vt_use_test_case( name, username = vt_username(), title = NULL, open = interactive(), add_before = NULL, add_after = NULL ) vt_use_test_code( name, username = vt_username(), open = interactive(), add_before = NULL, add_after = NULL ) vt_use_req( name, username = vt_username(), title = NULL, open = interactive(), add_before = NULL, add_after = NULL )"},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"name name/path validation item. can named file system separator organized directory structure. Items located ./inst/validation//{name}. username username insert validation item author. title Title requirement defaults base name passed sans file paths extensions. open newly made file opened editing. add_before, add_after either parameters supplied, location add validation item validation configuration. parameter passed item added end.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"Path newly created validation item file, invisibly.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/new_item.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a validation requirement, test case, or test code file — vt_use_test_case","text":"","code":"withr::with_tempdir({ vt_create_package(\"example.package\") setwd(\"example.package\") vt_add_user_to_config( username = whoami::username(), name = \"Sample Name\", title = \"Sample\", role = \"example\" ) # Create req at the cases top level `inst/validation/cases/case1` vt_use_test_case(\"case1\", open = FALSE) # Create req at `inst/validation/cases/regTests/Update2/case2` vt_use_test_case(\"regTests/Update2/case2\", open = FALSE, add_before = \"case1.md\") # Create a test case using tidy select vt_use_test_case(\"case1a\", open = FALSE, add_after = tidyselect::starts_with(\"case1\")) }) #> ✔ Creating example.package/. #> ✔ Setting active project to \"/tmp/Rtmpl1LShL/file17f77dfad8b4/example.package\". #> ✔ Creating R/. #> ✔ Writing DESCRIPTION. #> Package: example.package #> Title: What the Package Does (One Line, Title Case) #> Version: 0.0.0.9000 #> Authors@R (parsed): #> * First Last [aut, cre] (YOUR-ORCID-ID) #> Description: What the package does (one paragraph). #> License: `use_mit_license()`, `use_gpl3_license()` or friends to #> pick a license #> Encoding: UTF-8 #> Roxygen: list(markdown = TRUE) #> RoxygenNote: 7.3.2 #> ✔ Writing NAMESPACE. #> ✔ Setting active project to \"\". #> Created package structure #> ✔ Adding \"!*\" to example.package/vignettes/validation/.gitignore. #> Created vignettes/validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> User `runner` added to validation config file. #> Item created:test_cases/case1.md #> Filename(s): case1.md added to validation config file. #> Item created:test_cases/regTests/Update2/case2.md #> Filename(s): regTests/Update2/case2.md added to validation config file. #> Item created:test_cases/case1a.md #> Filename(s): case1a.md added to validation config file."},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape ","title":"Scrape ","text":"Scrape \"riskAssessment\" tag requirements generate table Kable handler output vt_scrape_risk_assessment","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape ","text":"","code":"vt_scrape_risk_assessment(reference = NULL, src = \".\", ref = vt_path()) vt_kable_risk_assessment(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape ","text":"reference dynamic reference holder already exists src, ref passed vt_scrape_tags_from x data.frame output vt_scrape_risk_assessment format passed kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape ","text":"data.frame documenting requirements risk assessments knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape Roxygen blocks — scrape_roxygen","title":"Scrape Roxygen blocks — scrape_roxygen","text":"valtools uses roxygen across multiple file types provide documentation. function provides tooling necessary scrape major file types use ( R, R test code, markdown, Rmarkdown) provides consistent output type capture information necessary help high level functions make assumptions.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape Roxygen blocks — scrape_roxygen","text":"","code":"scrape_roxygen(file, ..., type = tools::file_ext(file))"},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape Roxygen blocks — scrape_roxygen","text":"file file scrape roxygen block ... dots future extensions must empty. type method parse_roxygen use file extension","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scrape_roxygen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape Roxygen blocks — scrape_roxygen","text":"list roxygen blocks found file.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape authorship information — vt_scrape_requirement_editors","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"functions provide utitilies scrape editor editDate roxygen tags put nice data.frame use validation reports. addition, opinionated kable formatting functions provided well facilitate nice printing reports.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"","code":"vt_scrape_requirement_editors( tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_test_case_editors( tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_test_code_editors( tags = c(\"editor\", \"editDate\", \"deprecate\"), src = \".\", ref = vt_path(), dynamic_ref = NULL ) vt_scrape_function_editors( tags = c(\"editor\", \"editDate\", \"export\"), src = \".\", ref = vt_path() ) vt_kable_requirement_editors(x, format = vt_render_to()) vt_kable_function_editors(x, format = vt_render_to()) vt_kable_test_case_editors(x, format = vt_render_to()) vt_kable_test_code_editors(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"tags tags keep. defaults editor editDate src path package sources. defaults current directory passed vt_scrape_tags_from ref reference path whre validation documentation lives. defaults vt_path annd passed vt_scrape_tags_from. dynamic_ref dynamic referencer object x data.frame exported vt_scrape_* format passed knitr::kable, NULL default","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"data.frame containing results scraped roxygen tags section knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"vt_scrape_functions Requires access raw R/ function documentation parsed via valtools validation/ folder. pull information installed R/ location.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/scraping.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Scrape authorship information — vt_scrape_requirement_editors","text":"","code":"withr::with_tempdir({ captured_output <- capture.output({vt_create_package(open = FALSE)}) vt_use_req( name = \"req1\", username = \"B user\", title = \"Requirement 1\", open = FALSE) writeLines(c( \"#' @title Say Hello\", \"#' @editor B User\", \"#' @editDate 2021-04-27\", \"#' @export\", \"hello <- function(){print(\\\"Hello\\\")}\" ), con = \"R/hello.R\") vt_use_test_case( name = \"testcase1\", username = \"B user\", title = \"TesT Case 1\", open = FALSE) vt_use_test_code( name = \"testcode1\", username = \"C user\", open = FALSE) req_editors <- vt_scrape_requirement_editors() vt_kable_requirement_editors(req_editors) fun_editors <- vt_scrape_function_editors() vt_kable_function_editors(fun_editors) t_case_editors <- vt_scrape_test_case_editors() vt_kable_test_case_editors(t_case_editors) t_code_editors <- vt_scrape_test_code_editors() vt_kable_test_code_editors(t_code_editors) }) #> ✔ Setting active project to \"/tmp/Rtmpl1LShL/file17f742e93665\". #> ✔ Creating R/. #> ✔ Writing DESCRIPTION. #> ✔ Writing NAMESPACE. #> ✔ Setting active project to \"\". #> Created package structure #> ✔ Adding \"!*\" to ./vignettes/validation/.gitignore. #> Created vignettes/validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Item created:requirements/req1.md #> Filename(s): req1.md added to validation config file. #> Item created:test_cases/testcase1.md #> Filename(s): testcase1.md added to validation config file. #> Item created:test_code/testcode1.R #> Filename(s): testcode1.R added to validation config file. #> #> #> #> #> #>
Test Code ID <\/th> #> Editor <\/th> #> Edit Date <\/th> #> <\/tr> #> <\/thead> #>
TESTNUMBER <\/td> #> C user <\/td> #> 2024-11-05 <\/td> #> <\/tr> #> <\/tbody> #> <\/table>"},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a validation structure — vt_use_validation","title":"Create a validation structure — vt_use_validation","text":"Creates structure validation artifacts. Validation items stored inst/validation Create validation packet infrastructure. Intended create validation infrastructure external R package.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a validation structure — vt_use_validation","text":"","code":"vt_use_validation(pkg = \".\", working_dir, ...) vt_create_package( pkg = \".\", ..., fields = list(), rstudio = rstudioapi::isAvailable(), roxygen = TRUE, check_name = TRUE, open = rlang::is_interactive() ) vt_create_packet( path = \".\", target, ..., rstudio = rstudioapi::isAvailable(), open = rlang::is_interactive() )"},{"path":"https://phuse-org.github.io/valtools/reference/val_init.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a validation structure — vt_use_validation","text":"pkg Top level directory package working_dir validation working directory project. Defaults ... Additional argument passed vt_use_config() fields named list fields add DESCRIPTION, potentially overriding default values. See use_description() can set personalized defaults using package options. rstudio TRUE, calls use_rstudio() make new package project RStudio Project. FALSE non-package project, sentinel .file placed directory can recognized project rprojroot packages. roxygen plan use roxygen2 document package? check_name Whether check name valid CRAN throw error . open TRUE, activates new project: using RStudio desktop, package opened new session. RStudio server, current RStudio project activated. Otherwise, working directory active project changed. path path. exists, used. exist, created, provided parent path exists. target target validation. Character name package scope validation packet performed .","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":null,"dir":"Reference","previous_headings":"","what":"Validate a package — vt_validate_source","title":"Validate a package — vt_validate_source","text":"vt_validate_source runs validation current source, temporarily installing source properly evaluate report. vt_validate_build() runs step, compiles bundle includes th validation report contents required validation. Finally, vt_validate_installed_package run rerun validation report packages built installed using thevt_validate_build().","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Validate a package — vt_validate_source","text":"","code":"vt_validate_source(src = \".\", open = interactive()) vt_validate_build(src = \".\", ...) vt_validate_install( src = \".\", ..., install_verbose = TRUE, install_tests = TRUE, reload = TRUE ) vt_validate_installed_package( package, output_directory = \".\", open = interactive() ) vt_validate_report(version, open = interactive())"},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Validate a package — vt_validate_source","text":"src location source code. Assumed location \"pkg\" open validation report opened built? ... Additional argument passed devtools::build() install_verbose installation verbose? install_tests installation include installation package-specific tests ()? reload package reloaded install? defaults TRUE package installed package name output_directory Location directory output validation report version version validation report output. missing, tries use change_log.md, missing looks package version validation package R package.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validate.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Validate a package — vt_validate_source","text":"path either validation report bundled package","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":null,"dir":"Reference","previous_headings":"","what":"Add validation file ordering to validation config file — vt_add_file_to_config","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"Impose ordering validation child files Remove validation file orderingfrom projects validation config file Add user information projects validation config file make easier documentation Remove user information projects validation config file Get recorded user information validation config file make easier documentation Use Validation Config File Validation configuration working/output directories, validation report naming conventions, tracking user information(username,name,title, role). Provides single location setting behaviors. Capture information user going involved validation","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"","code":"vt_add_file_to_config(filename, before = NULL, after = NULL) vt_drop_file_from_config(filename) vt_add_user_to_config(username = whoami::username(), name, title, role) vt_drop_user_from_config(username) vt_get_user_info(username, type = c(\"name\", \"title\", \"role\")) vt_use_config( pkg = \".\", package, working_dir, output_dir, report_rmd_name = \"validation.Rmd\", report_naming_format = \"Validation_Report_{package}_v{version}_{date}\", username_list = list(), validation_files = list(), ..., overwrite = FALSE ) vt_user(username, name, title, role, ...)"},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"filename character vector containing filenames order , Optional destination new filenames, default end existing list. Supports functions. Specifying error. username username user. name full name user. title title user. role role user. Can one. type type information pull. select least one: name, title, role pkg write config file package character name package set validation performed . working_dir character directory working validation contents used interactively output_dir character folder contents validation output . report_rmd_name character name rmarkdown document used validation. report_naming_format character glue friendly string naming structure output validation report. use {package} package name, {version} record package version, {date} capture date report run. username_list list user objects created make_user. user contains entries username, name, title, role used documentation. validation_files list validation files: requirements, test cases test code. Validation report content populated using list order. ... additional information user passed list. overwrite [boolean]validation file exists, overwritten? Defaults FALSE.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"Used side effect adding validation file ordering validation config file. Invisibly returns TRUE success. Used side effect removing file ordering information validation config file. Invisibly returns TRUE success. Used side effect adding user information validation config file. Invisibly returns TRUE success. Used side effect removing user information validation config file. Invisibly returns TRUE success. character vector length types requested containing user information validation config file. Used side effect create validation config file. Invisibly returns TRUE success. \"user\" object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_config.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add validation file ordering to validation config file — vt_add_file_to_config","text":"","code":"if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_file_to_config(filename = \"myReqFile.Rmd\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_file_to_config(filename = \"myReqFile.Rmd\") vt_drop_file_from_config(filename = \"myReqFile.Rmd\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") vt_drop_user_from_config(username = \"ellis\") } # } if (FALSE) { # \\dontrun{ vt_use_validation() vt_add_user_to_config( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") vt_get_user_info(username = \"ellis\", type = c(\"name\",\"title\")) } # } withr::with_tempdir({ vt_use_validation( package = \"test.package\", working_dir = \".\", output_dir = \".\", report_naming_format = \"Validation_Report_{package}_v{version}_{date}\", username_list = list( vt_user( name = \"test\", title = \"test\", role = \"tester\", username = \"test\" ))) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` vt_user( username = \"ellis\", name = \"Ellis Hughes\", title = \"Statistical Programmer\", role = \"Programmer\") #> $ellis #> $ellis$name #> [1] \"Ellis Hughes\" #> #> $ellis$title #> [1] \"Statistical Programmer\" #> #> $ellis$role #> [1] \"Programmer\" #> #> #> attr(,\"class\") #> [1] \"vt_user\" \"list\""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":null,"dir":"Reference","previous_headings":"","what":"Use dynamic file paths in a validation. — vt_path","title":"Use dynamic file paths in a validation. — vt_path","text":"vt_path() allows access files relative working directory,identified config file. also required used validation report cases validation installed packages intended shift access correct location installed package access.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Use dynamic file paths in a validation. — vt_path","text":"","code":"vt_path(...) vt_find_config()"},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Use dynamic file paths in a validation. — vt_path","text":"... [character] Path components validation folder, can empty. argument string containing one path components separated forward slash \"/\".","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Use dynamic file paths in a validation. — vt_path","text":"vt_find_config() locates config file working directory, returns full path .","code":""},{"path":"https://phuse-org.github.io/valtools/reference/validation_paths.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Use dynamic file paths in a validation. — vt_path","text":"","code":"withr::with_tempdir({callr::r(function(){ valtools::vt_use_validation() valtools::vt_path() valtools::vt_path(\"some\", \"reqs\", \"req01.md\") valtools::vt_path(\"some/reqs/req01.md\") valtools::vt_find_config() })}) #> [1] \"/tmp/Rtmpl1LShL/file17f75c6f16f6/validation/validation.yml\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":null,"dir":"Reference","previous_headings":"","what":"Manage dynamic refrerencing — vt_dynamic_referencer","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"Manage dynamic refrerencing Manage dynamic refrerencing","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"job dynamic referencer aggregate references exist requirements, test cases, test code validation report update accordingly. helps painful cases new reference may added existing numbering subsequent references need updated user need use object directly, called upon rendering contents validation report. default, expected indicator reference \"##\", though can changed. reference starts indicator (##) can contiguous (white spaces special characters) alphanumeric sequence, include underscore dash. ie. ##req:THISIS_A-reference1234 valid entire string, ##req:THISIS_A-reference.12345 dynamic reference \".\". method 'scrape_references' takes vector strings, indicator whether input file text requirement ('req'), test case test code ('tc'). allows numbering increase independently . However, every reference must unique. ie. ##reference whether shows test case requirement reference. method 'reference_insertion' takes vector strings replaces references numeric values.","code":""},{"path":[]},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"public-methods","dir":"Reference","previous_headings":"","what":"Public methods","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"vt_dynamic_referencer$scrape_references() vt_dynamic_referencer$reference_insertion() vt_dynamic_referencer$list_references() vt_dynamic_referencer$new() vt_dynamic_referencer$clone()","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-scrape-references-","dir":"Reference","previous_headings":"","what":"Method scrape_references()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"collect references text.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$scrape_references(text)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"text character vector collect references . type type file converted; requirement ('req'), test case test code ('tc')","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##req:new_reference\") ref$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-reference-insertion-","dir":"Reference","previous_headings":"","what":"Method reference_insertion()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"replace references text values","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-1","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$reference_insertion(text)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-1","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"text character vector inserting references ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples-1","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##new_reference\") ref$list_references() ref$reference_insertion(\"This is my ##new_reference\")"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-list-references-","dir":"Reference","previous_headings":"","what":"Method list_references()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"list references available value","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-2","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"examples-2","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"ref <- vt_dynamic_referencer$new() ref$list_references() ref$scrape_references(\"##new_reference\") ref$list_references()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-new-","dir":"Reference","previous_headings":"","what":"Method new()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"create new dynamic reference object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-3","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$new( reference_indicator = \"##\", type = c(\"number\", \"letter\") )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-2","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"reference_indicator character vector indicates start dynamic references. defaults \"##type:reference\" type \"number\" (arabic) \"letter\" (latin uppercase) use counters","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"returns","dir":"Reference","previous_headings":"","what":"Returns","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"new vt_dynamic_reference object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"method-clone-","dir":"Reference","previous_headings":"","what":"Method clone()","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"objects class cloneable method.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"usage-4","dir":"Reference","previous_headings":"","what":"Usage","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"vt_dynamic_referencer$clone(deep = FALSE)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"arguments-3","dir":"Reference","previous_headings":"","what":"Arguments","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"deep Whether make deep clone.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_dynamic_referencer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Manage dynamic refrerencing — vt_dynamic_referencer","text":"","code":"reference <- vt_dynamic_referencer$new() reference #> #> Public: #> clone: function (deep = FALSE) #> initialize: function (reference_indicator = \"##\", type = c(\"number\", \"letter\")) #> list_references: function () #> reference_insertion: function (text) #> scrape_references: function (text) #> Private: #> add_reference: function (reference_id, type = c(\"req\", \"tc\")) #> advance_reference: function (type = c(\"req\", \"tc\")) #> ref_iter_number: list #> reference_indicator: ## #> reference_indicator_regex: \\#\\# #> references: list #> type: number ## ------------------------------------------------ ## Method `vt_dynamic_referencer$scrape_references` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##req:new_reference\") ref$list_references() #> $`req:new_reference` #> [1] 1 #> ## ------------------------------------------------ ## Method `vt_dynamic_referencer$reference_insertion` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##new_reference\") ref$list_references() #> list() ref$reference_insertion(\"This is my ##new_reference\") #> [1] \"This is my ##new_reference\" ## ------------------------------------------------ ## Method `vt_dynamic_referencer$list_references` ## ------------------------------------------------ ref <- vt_dynamic_referencer$new() ref$list_references() #> list() ref$scrape_references(\"##new_reference\") ref$list_references() #> list()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":null,"dir":"Reference","previous_headings":"","what":"print files for report generation — vt_file","title":"print files for report generation — vt_file","text":"valtools assists user generating validation report allowing user define order ","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"print files for report generation — vt_file","text":"","code":"vt_file(file, ..., dynamic_referencing = FALSE)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"print files for report generation — vt_file","text":"file file evaluate ... dots future extensions must empty. dynamic_referencing Whether employ dynamic referencing . defaults FALSE.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_file.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"print files for report generation — vt_file","text":"list roxygen blocks found file.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":null,"dir":"Reference","previous_headings":"","what":"Get all users from validation config file without knowing usernames — vt_get_all_users","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"Get users validation config file without knowing usernames","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"","code":"vt_get_all_users()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_all_users.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get all users from validation config file without knowing usernames — vt_get_all_users","text":"list users config file","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":null,"dir":"Reference","previous_headings":"","what":"Identify ordering of validation or user-designated child files — vt_get_child_files","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"Identify ordering validation user-designated child files","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"","code":"vt_get_child_files( loc = c(\"folder\", \"yml\"), validation_order = c(\"requirements\", \"test_cases\", \"test_code\") )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"loc location explore. Either \"folder\" naive inclusion validation folder contents, \"yml\" use validation_folder field validation.yml validation_order optional ordering validation folders search","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"vector child file names include validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_get_child_files.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Identify ordering of validation or user-designated child files — vt_get_child_files","text":"","code":"withr::with_tempdir({ vt_use_validation() vt_use_test_case(\"testcase1\", username = \"a user\", open = FALSE) vt_use_req(\"req1\", username = \"a user\", open = FALSE) vt_use_test_code(\"testcode1\", username = \"another user\", open = FALSE) # as listed in validation.yml validation_files vt_get_child_files(loc = \"yml\") # as ordered in validation subfolders vt_get_child_files(loc = \"folder\", validation_order = c(\"requirements\", \"test_cases\", \"test_code\")) }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> Item created:test_cases/testcase1.md #> Filename(s): testcase1.md added to validation config file. #> Item created:requirements/req1.md #> Filename(s): req1.md added to validation config file. #> Item created:test_code/testcode1.R #> Filename(s): testcode1.R added to validation config file. #> [1] \"requirements/req1.md\" \"test_cases/testcase1.md\" #> [3] \"test_code/testcode1.R\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"Kable handler output vt_scrape_coverage_matrix","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"","code":"vt_kable_coverage_matrix(x, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"x data.frame output vt_scrape_coverage_matrix format passed kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_coverage_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kable handler for output of vt_scrape_coverage_matrix — vt_kable_coverage_matrix","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Kable defaults for rendering validation report — vt_kable_sig_table","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"Kable defaults rendering validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"","code":"vt_kable_sig_table(people, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"people dataframe columns role, Name Title, Signature, \"Date\" format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_sig_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Kable defaults for rendering validation report — vt_kable_sig_table","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Generates kable code for validation environment details — vt_kable_val_env","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"Generates kable code validation environment details","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"","code":"vt_kable_val_env(val_env, format = vt_render_to())"},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"val_env data.frame output vt_scrape_val_env format passed knitr::kable","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_kable_val_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generates kable code for validation environment details — vt_kable_val_env","text":"knitr_kable object","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_to.html","id":null,"dir":"Reference","previous_headings":"","what":"output to render kable to — vt_render_to","title":"output to render kable to — vt_render_to","text":"reads knitr rmarkdown options determine output type rendered","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_to.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"output to render kable to — vt_render_to","text":"","code":"vt_render_to()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":null,"dir":"Reference","previous_headings":"","what":"provide a nice wrapper to set states around render — vt_render_validation_report","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"package intended use end users. used within valtools packages.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"","code":"vt_render_validation_report( report_path, output_dir = dirname(report_path), output_file = NULL, ..., render_time = c(\"build\", \"installed\"), package = \"\" )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_render_validation_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"provide a nice wrapper to set states around render — vt_render_validation_report","text":"report_path path validation report rmarkdown output_dir path directory output rendered report. defaults folder output_file expected output filename sans extension ... arguments passed render render_time type rendering validation run, \"build\" \"installed\". package report type rendering validation run, \"build\" \"installed\".","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":null,"dir":"Reference","previous_headings":"","what":"Scrape ","title":"Scrape ","text":"Scrape \"coverage\" tag test code generate mapping","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scrape ","text":"","code":"vt_scrape_coverage_matrix( type = c(\"long\", \"wide\"), reference = NULL, src = \".\", ref = vt_path() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scrape ","text":"type one \"long\" \"wide\" determines shape output table reference dynamic reference holder already exists src, ref passed vt_scrape_tags_from","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_coverage_matrix.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scrape ","text":"data.frame mapping requirement ids test case ids.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"Looks value custom roxygen sections. Custom sections named using @section :, colon use indicate end name, value starts next line.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"","code":"vt_scrape_section(tag, block)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"tag name section, case insensitive. block character vector holds documentation block. #' may present omitted.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"section value","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last Updated By","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"Marie Vendettuoli","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last Updated Date","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"2021-02-18","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_section.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieve the value block of a custom section tagged via roxygen2 — vt_scrape_section","text":"","code":"roxy_block1 <- c(\"@title Title1\", \"@param param1 definition\", \"@section Last updated date:\", \"2021-01-01\", \"@importFrom utils sessionInfo\", \"@export\" ) vt_scrape_section(\"Last updated date:\", roxy_block1) #> [1] \"2021-01-01\" roxy_block2 <- paste0(\"#' \", roxy_block1) vt_scrape_section(\"Last updated date:\", roxy_block2) #> [1] \"2021-01-01\""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate a signature table for a validation report — vt_scrape_sig_table","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"Generate signature table validation report","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"","code":"vt_scrape_sig_table(usernames = NULL)"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"usernames list vt_names use validation.yml exist","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_sig_table.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate a signature table for a validation report — vt_scrape_sig_table","text":"dataframe created validation config containing row user columns: role, name_and_title, signature, date.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"Looks roxygen2 function documentation /R author details. Assumes author date tagged via custom sections @section Last updated : @section Last updated date:, respectively. exclude roxygen block scraping, omit section names. using dummy documentation file, looks @name capture function name, otherwise uses actual function call. Exported internal status affect scraping.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"","code":"vt_scrape_tags_from( type, tags = c(\"editor\", \"editDate\"), src = \".\", ref = vt_path() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"type type scraping done. one \"requirements\",\"test_cases\",\"test_code\",\"functions\". call functions. working directory must R package, path identified src must R package. tags tags keep. defaults editor editDate src path package source. defaults current directory. ref reference path validation documentation lives. defaults vt_path()","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"time, function retrieve documentation captured functions dispatched within R6 class. Tags class level documentation retrieved.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last Updated by","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"Ellis Hughes","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_tags_from.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last updated date","title":"Retrieve roxygen tags as a data.frame from requirements, test cases, test code and functions — vt_scrape_tags_from","text":"2021-03-05","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve validation environment — vt_scrape_val_env","title":"Retrieve validation environment — vt_scrape_val_env","text":"Retrieves dependencies used validation report. Includes: OS, R version, packages listed validation package DESCRIPTION (Depends/Imports/Suggests), packages present current session.","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve validation environment — vt_scrape_val_env","text":"","code":"vt_scrape_val_env(pkg = \".\")"},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieve validation environment — vt_scrape_val_env","text":"pkg path package","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve validation environment — vt_scrape_val_env","text":"data.frame columns: resource \"OS\", \"R\" package name type identifier requirement type: system - OS R resource package_req - DESCRIPTION Depends/Imports package validated extended_req - DESCRIPTION Suggests package validated session - packages current workspace captured via package_req/extended_req detail OS version details","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"last-updated-by","dir":"Reference","previous_headings":"","what":"Last updated by","title":"Retrieve validation environment — vt_scrape_val_env","text":"Marie Vendettuoli","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_scrape_val_env.html","id":"last-updated-date","dir":"Reference","previous_headings":"","what":"Last updated date","title":"Retrieve validation environment — vt_scrape_val_env","text":"2021-02-03","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Create validation report from template — vt_use_report","title":"Create validation report from template — vt_use_report","text":"Create validation report template","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create validation report from template — vt_use_report","text":"","code":"vt_use_report( pkg_name = NULL, template = \"validation\", dynamic_referencing = FALSE, open = is_interactive() )"},{"path":"https://phuse-org.github.io/valtools/reference/vt_use_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create validation report from template — vt_use_report","text":"pkg_name name package template validation report template valtools use, one \"validation\" (default) \"requirements\" dynamic_referencing dynamic referencing enabled default. Boolean defaults FALSE. open boolean open validation report editing","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":null,"dir":"Reference","previous_headings":"","what":"Get current username — vt_username","title":"Get current username — vt_username","text":"Wrapper whoami::username","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get current username — vt_username","text":"","code":"vt_username()"},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get current username — vt_username","text":"@returns [character] Username person called function","code":""},{"path":"https://phuse-org.github.io/valtools/reference/vt_username.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get current username — vt_username","text":"","code":"withr::with_tempdir({ vt_use_validation( username_list = list(vt_user( username = whoami::username(), name = \"test\", title = \"title\", role = \"role\"))) vt_username() }) #> ✔ Adding \"!*\" to ././validation/.gitignore. #> Created ./validation in package structure #> validation config file created. Add user information through `vt_add_user_to_config()` #> [1] \"test\""},{"path":[]},{"path":"https://phuse-org.github.io/valtools/news/index.html","id":"valtools-041","dir":"Changelog","previous_headings":"","what":"valtools 0.4.1","title":"valtools 0.4.1","text":"Initialize NEWS.md Update CI Fix cheatsheet link (#225) Fix error nested projects/packages (#230) Automate unit tests fix R CMD check issues (#229)","code":""}]