vt_get_child_files: Identify ordering of validation or user-designated child...

View source: R/child_files.R

vt_get_child_filesR Documentation

Identify ordering of validation or user-designated child files

Description

Identify ordering of validation or user-designated child files

Usage

vt_get_child_files(
  loc = c("folder", "yml"),
  validation_order = c("requirements", "test_cases", "test_code")
)

Arguments

loc

location to explore. Either "folder" for naive inclusion of validation folder contents, or "yml" to use validation_folder field of validation.yml

validation_order

optional ordering of validation folders to search

Value

vector of child file names to include in validation report

Examples

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"))

})

phuse-org/valtools documentation built on Nov. 10, 2024, 1:36 a.m.