Open mariev opened 2 years ago
I was able to follow the following and it worked without error for me, so thats interesting.... but I think it is related to lines around this link: https://github.com/phuse-org/valtools/blob/c11ad030b7265a0a312070b7b6838f45e072563f/R/write_validation_report.R#L72
We can add an if statement to make sure we are or are not working in an R package.
However, both add_package_to_desc and add_field_to_desc already have a check to make sure they are being called within a package: https://github.com/phuse-org/valtools/blob/c11ad030b7265a0a312070b7b6838f45e072563f/R/utils.R#L162
@mariev Could you double check this? I was able to do the following using the current develop version:
library(valtools)
vt_create_packet("sample_packet", target = "fake_pkg")
## in the newly opened project
library(valtools)
vt_use_req("Requirement_1.md") ## and enter the interactive info
vt_use_report(template = "requirements")
I see we should adjust the requirements report:
However, once those were commented out, I could knit the report via the knit button and via valtools::vt_validate_report(version = "1.0")
.
vt_use_report()
looks for DESCRIPTION, either viaget_val_leads
orget_config_package