Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

requirement report can't be generated from template in validate separate from pkg #204

Open
mariev opened this issue Oct 18, 2021 · 3 comments

Comments

@mariev
Copy link
Collaborator

mariev commented Oct 18, 2021

vt_use_report() looks for DESCRIPTION, either via get_val_leads or get_config_package

@mariev mariev mentioned this issue Oct 18, 2021
@thebioengineer
Copy link
Collaborator

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:

add_package_to_desc(

We can add an if statement to make sure we are or are not working in an R package.

@thebioengineer
Copy link
Collaborator

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:

if(is_package(pkg = pkg)){

@thebioengineer
Copy link
Collaborator

@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:

  • to not by default try to use the package being validated (line 28 in the report currently)
  • Remove reference to change lot or set code to see if the change log even exists (lines 75-80 in report currently)

However, once those were commented out, I could knit the report via the knit button and via valtools::vt_validate_report(version = "1.0").

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

No branches or pull requests

2 participants