FredHutch / VISCtemplates

Tools for writing reproducible reports at VISC
Other
6 stars 2 forks source link

skeleton.Rmd file not being created when using use_visc_report() #157

Closed lemireg closed 3 months ago

lemireg commented 4 months ago

skeleton.Rmd file is not being created when using use_visc_report() to generate an assay specific folder, skeleton (for the report) and methods folder (with background, statistical-methods, lab-methods rmds)

To Reproduce Steps to reproduce the behavior:

  1. run use_visc_report()

Screenshots Error message (while using report_type = "generic") image Screenshot of no skeleton.Rmd file being created (while using report_type = "BAMA") image Same issue for the report_type = "nab" argument: image for `report_type = "empty", no folder is being created whatsoever in the analysis repo: image

Additional Information: Saw this while discussing creating a test for the Rmd rendering with Dave on May 23, 2024. sessionInfo(): image

kelliemac commented 4 months ago

@lemireg the issue is with the path variable, because that subfolder doesn't exist yet. If you don't specify path (equivalently, use the default of path = "."), it should work fine (I just tested on my end).

lemireg commented 4 months ago

@lemireg the issue is with the path variable, because that subfolder doesn't exist yet. If you don't specify path (equivalently, use the default of path = "."), it should work fine (I just tested on my end).

Thank you @kelliemac ! I'll rerun on my end and mark the issue resolved/delete it.

kelliemac commented 4 months ago

if you want to create a subfolder, one way is to use e.g. usethis::use_directory('BAMA') and then run use_visc_report(report_name = ..., path = 'BAMA', report_type = 'bama')

or you can manually make the subfolder before running use_visc_report

we could potentially make use_visc_report do that first step automatically if the subfolder specified in path doesn't exist yet.

kelliemac commented 4 months ago

we could also add a note to the vignette https://github.com/FredHutch/VISCtemplates/blob/main/vignettes/using_pdf_and_word_template.Rmd about the subfolder needing to be created before running use_visc_report

lemireg commented 4 months ago

if you want to create a subfolder, one way is to use e.g. usethis::use_directory('BAMA') and then run use_visc_report(report_name = ..., path = 'BAMA', report_type = 'bama')

or you can manually make the subfolder before running use_visc_report

we could potentially make use_visc_report do that first step automatically if the subfolder specified in path doesn't exist yet.

@kelliemac , I've rerun and I see what you mean. I'm thinking for now I'll add a note to the vignette, and then I can make an issue to make some adjustments to the code to create a directory if it doesn't exist already in the use_visc_report().

kelliemac commented 4 months ago

@lemireg that sounds like a great plan!

kelliemac commented 3 months ago

I just realized this is a duplicate of https://github.com/FredHutch/VISCtemplates/issues/124 so we can close both of these issues at the same time, hopefully