phuse-org / valtools

Validation framework for R packages used in clinical research and drug development.
https://phuse-org.github.io/valtools/
Other
51 stars 10 forks source link

creating validation structure for validate separate from installation #125

Closed mariev closed 3 years ago

mariev commented 3 years ago

when users are following the validate separate from install paradigm, e.g. validation of package(s) authored by others, the validation directory structure does not live within an R package structure. This appears to throw errors if users are calling the standalone alternative to vt_create_package, vt_use_validation

withr::with_tempdir({
  print(basename(getwd()))
  vt_use_validation(pkg = "my_validation_folder", working_dir = "vignettes") ## I expect this to create my_validation_folder/vignettes/validation/ in current directory.
})
√ Adding '!*' to 'my_validation_folder/vignettes/validation/.gitignore'
Created vignettes/validation  in package structure
Error: Failed to create validation structure. Error: Error in file(con, "r"): cannot open the connection

Run `rlang::last_error()` to see where the error occurred.
In addition: Warning message:
In file(con, "r") :

 Error: Failed to create validation structure. Error: Error in file(con, "r"): cannot open the connection

Run `rlang::last_error()` to see where the error occurred. 
 

Appears that the issue is that "validation" gets written to pkg/working_dir correctly but when vt_use_config is called it assumes that current wd is one level up from pkg ?? 😕

thebioengineer commented 3 years ago

resolved in #131