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

Create README files at assay folder level, and clean up inst/ folder #233

Open
wants to merge 24 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
576036b
add README creation to use_visc_report()
kelliemac Sep 4, 2024
790e2af
remove README creation from visc_pdf_document and visc_word_document
kelliemac Sep 4, 2024
39efc4b
save README at assay level
kelliemac Sep 4, 2024
cf986e5
Update NEWS.md
kelliemac Sep 4, 2024
7397051
add back report level READMEs but with different naming convention to…
kelliemac Jan 10, 2025
87880ef
clarify when and how assay level readme is created
kelliemac Jan 10, 2025
7867acc
rename assay level readme and fix formatting of report history table
kelliemac Jan 10, 2025
35adacc
Update assay_level_README_template.md
kelliemac Jan 10, 2025
ae1a821
Update assay_level_README_template.md
kelliemac Jan 10, 2025
27299d5
Update assay_level_README_template.md
kelliemac Jan 10, 2025
9ba9ff6
Create report_level_README_template.md
kelliemac Jan 10, 2025
bcbac1c
reorganize inst folder
kelliemac Jan 10, 2025
263763f
update news
kelliemac Jan 10, 2025
15cdaf9
revert unintentional change to VISCtemplates.Rproj
kelliemac Jan 10, 2025
6e57c0c
reorganize inst
kelliemac Jan 10, 2025
ed9a038
make everything work with the new inst folder organization
kelliemac Jan 11, 2025
e01e009
move use_visc_readme back to original location
kelliemac Jan 11, 2025
40108c8
simplify some of the changes
kelliemac Jan 11, 2025
3305baf
simplify PR even more
kelliemac Jan 11, 2025
23e66d7
rename some files
kelliemac Jan 11, 2025
c272617
simplify code changes
kelliemac Jan 11, 2025
7ad5a7a
resolve merge conflicts with develop
kelliemac Jan 11, 2025
91e43c3
actually finish resolving the merge conflict
kelliemac Jan 11, 2025
3be81bf
update project readme to describe where files are located
kelliemac Jan 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
move use_visc_readme back to original location
  • Loading branch information
kelliemac committed Jan 11, 2025
commit e01e0098e7e37b8b4e0a184f1a95f1edc74ead74
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Other improvements
* Update PT report naming practices to the format VDCnnn_assay_PTreport_interim/final_(un)blinded.Rmd (#202)
* Add auxiliary files to template .gitignore (.aux, .toc, .lof, .lot, .out, cache files, and .smbdelete files) (#230)
* README.md files are now created at the assay folder level at the time of calling use_visc_report() (#233)
* inst/ folder within package has been reorganized for clarity (#233)
* Reorganized inst/ folder within package for clarity (#233)

# VISCtemplates 1.3.2

Expand Down
35 changes: 0 additions & 35 deletions R/create_visc_project.R
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
#' Use a VISC README template
#'
#' @param study_name name of study in VDCNNN format
#' @param save_as where to save README.Rmd. Defaults to top-level.
#'
#' @export
#'
#' @examples
#' \dontrun{
#' use_visc_readme("Gallo477")
#' }
use_visc_readme <- function(study_name, save_as = "README.Rmd") {
usethis::use_template(
template = "README_visc_project.Rmd",
save_as = save_as,
data = list(study_name = study_name),
package = "VISCtemplates"
)
# knit the md from the Rmd on request of SRA team
rmarkdown::render(
usethis::proj_path('README.Rmd'),
quiet = TRUE
)
# remove Rmd at request of SRA team; they just manually edit the *.md
# so the Rmd file merely clutters their working directory
unlink(
usethis::proj_path(
paste0(
'README',
c('.Rmd', '.html')
)
)
)
}

#' Create a VISC project
#'
#' Creates a new R project with a VISC analysis project structure.
Expand Down
35 changes: 35 additions & 0 deletions R/use_visc_report.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
#' Use a VISC README template
#'
#' @param study_name name of study in VDCNNN format
#' @param save_as where to save README.Rmd. Defaults to top-level.
#'
#' @export
#'
#' @examples
#' \dontrun{
#' use_visc_readme("Gallo477")
#' }
use_visc_readme <- function(study_name, save_as = "README.Rmd") {
usethis::use_template(
template = "README_visc_project.Rmd",
save_as = save_as,
data = list(study_name = study_name),
package = "VISCtemplates"
)
# knit the md from the Rmd on request of SRA team
rmarkdown::render(
usethis::proj_path('README.Rmd'),
quiet = TRUE
)
# remove Rmd at request of SRA team; they just manually edit the *.md
# so the Rmd file merely clutters their working directory
unlink(
usethis::proj_path(
paste0(
'README',
c('.Rmd', '.html')
)
)
)
}

#' Create a VISC docs directory with template files
#'
#' Creates the docs/ directory and presentations/ directory with templates
Expand Down