diff --git a/DESCRIPTION b/DESCRIPTION index 7edb315..77d511c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: projecttemplates Title: Project Templates for Reproducible Research and Analyses -Version: 0.5.5 +Version: 0.5.6 Authors@R: person(given = "Jasen", family = "Finch", diff --git a/NEWS.md b/NEWS.md index de6a977..28cdd1c 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,11 @@ +# projecttemplates 0.5.6 + +* `.dockerignore` file is now added to output project to ignore the `_targets` directory if present. + +* Target build time and object size are now added to the output pipeline graph in `run.R`. + +* `targets` package options set by `tar_options_set()` now moved to `utils.R`. + # projecttemplates 0.5.5 * Fixed the use of user `renv` settings during initialisation to ensure that the user cache is used. diff --git a/R/docker.R b/R/docker.R index 9b02ad0..3039c21 100644 --- a/R/docker.R +++ b/R/docker.R @@ -84,4 +84,7 @@ docker run -v $(pwd):/home/{project_name_directory} {str_to_lower(project_name_d ``` ") %>% write(file = str_c(project_directory,'/README.md'),append = TRUE) + + '_targets' %>% + write(file = str_c(project_directory,'/.dockerignore')) } \ No newline at end of file diff --git a/R/targets.R b/R/targets.R index b7b24e4..1f58701 100644 --- a/R/targets.R +++ b/R/targets.R @@ -58,11 +58,8 @@ targetsScript <- function(project_directory,type = projectTypes()){ source("R/utils.R") "R/functions/" %>% - list.files(full.names = T) %>% + list.files(full.names = TRUE) %>% walk(source) - -tar_option_set(error = "continue") - ') writeLines(template,str_c(project_directory,'_targets.R',sep = '/')) @@ -159,7 +156,7 @@ targetsRun <- function(project_directory,renv = TRUE){ {restore} targets::tar_make() -pipeline_graph <- targets::tar_visnetwork() +pipeline_graph <- targets::tar_visnetwork(label = c("time", "size")) visNetwork::visSave(pipeline_graph, file = "exports/pipeline_graph.html") ') diff --git a/R/utils.R b/R/utils.R index 0ecb15a..8f65b62 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,5 +1,5 @@ -#' Add R package loading utilities -#' @description Add package utilites to a project directory. +#' Add R package settings +#' @description Add package utilities to a project directory such as package loading and settings. #' @param project_directory the project directory file path #' @param cran character vector of cran R package dependencies #' @param bioc character vector of bioconductor R package dependencies @@ -52,6 +52,9 @@ utils <- function(project_directory = '.', ## Resolve conflicts # conflict_prefer(quiet = TRUE) +## Targets options +tar_option_set(error = "continue") + ') writeLines(script,glue('{project_directory}/utils.R')) } diff --git a/README.md b/README.md index 5fa72ea..0b22777 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,12 @@ # projecttemplates + +[![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://lifecycle.r-lib.org/articles/stages.html#stable) [![R build status](https://github.com/jasenfinch/projecttemplates/workflows/R-CMD-check/badge.svg)](https://github.com/jasenfinch/projecttemplates/actions) [![Codecov test coverage](https://codecov.io/gh/jasenfinch/projecttemplates/branch/master/graph/badge.svg)](https://codecov.io/gh/jasenfinch/projecttemplates?branch=master) [![license](https://img.shields.io/badge/license-GNU%20GPL%20v3.0-blue.svg)](https://github.com/jasenfinch/projecttemplates/blob/master/DESCRIPTION) [![GitHub release](https://img.shields.io/github/release/jasenfinch/projecttemplates.svg)](https://GitHub.com/jasenfinch/projecttemplates/releases/) + Quick and simple generation of [targets](https://docs.ropensci.org/targets/) and [renv](https://rstudio.github.io/renv/index.html) powered project templates for reproducible research and analyses. diff --git a/docs/404.html b/docs/404.html index 1596d8a..9bde632 100644 --- a/docs/404.html +++ b/docs/404.html @@ -71,7 +71,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/LICENSE.html b/docs/LICENSE.html index e265730..d36b3b7 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -71,7 +71,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/authors.html b/docs/authors.html index 05c5d5d..83a8900 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -71,7 +71,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/index.html b/docs/index.html index 0b56e1b..dc31a28 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ projecttemplates - 0.5.5 + 0.5.6 @@ -72,6 +72,7 @@
+

Quick and simple generation of targets and renv powered project templates for reproducible research and analyses.

@@ -116,6 +117,7 @@

Developers

Dev status

    +
  • Lifecycle: stable
  • R build status
  • Codecov test coverage
  • license
  • diff --git a/docs/news/index.html b/docs/news/index.html index 35d2769..91a1fe4 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -71,7 +71,7 @@ projecttemplates - 0.5.5 + 0.5.6
@@ -114,6 +114,15 @@

Changelog

Source: NEWS.md
+
+

+projecttemplates 0.5.6

+ +

projecttemplates 0.5.5

diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 9d01690..b327911 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.11.4 pkgdown: 1.6.1 pkgdown_sha: ~ articles: {} -last_built: 2021-11-09T09:24Z +last_built: 2021-11-16T09:26Z urls: reference: https://jasenfinch.github.io/projecttemplates//reference article: https://jasenfinch.github.io/projecttemplates//articles diff --git a/docs/reference/createGit.html b/docs/reference/createGit.html index 9691943..13b9a06 100644 --- a/docs/reference/createGit.html +++ b/docs/reference/createGit.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6
diff --git a/docs/reference/createGithub.html b/docs/reference/createGithub.html index 655e191..29875bb 100644 --- a/docs/reference/createGithub.html +++ b/docs/reference/createGithub.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6
diff --git a/docs/reference/docker.html b/docs/reference/docker.html index 60d66fe..38cd253 100644 --- a/docs/reference/docker.html +++ b/docs/reference/docker.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/githubActions.html b/docs/reference/githubActions.html index 6163d5b..9c1dd41 100644 --- a/docs/reference/githubActions.html +++ b/docs/reference/githubActions.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/index.html b/docs/reference/index.html index d3c617d..98f6d35 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -71,7 +71,7 @@ projecttemplates - 0.5.5 + 0.5.6 @@ -228,7 +228,7 @@

utils()

-

Add R package loading utilities

+

Add R package settings

diff --git a/docs/reference/output.html b/docs/reference/output.html index d90aafe..1774863 100644 --- a/docs/reference/output.html +++ b/docs/reference/output.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/projectDirectory.html b/docs/reference/projectDirectory.html index 3df42b4..3c694c9 100644 --- a/docs/reference/projectDirectory.html +++ b/docs/reference/projectDirectory.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/projectSkeleton.html b/docs/reference/projectSkeleton.html index 6705e9d..23d1672 100644 --- a/docs/reference/projectSkeleton.html +++ b/docs/reference/projectSkeleton.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/projectTypes.html b/docs/reference/projectTypes.html index aaef20d..ac1f6bd 100644 --- a/docs/reference/projectTypes.html +++ b/docs/reference/projectTypes.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/readme.html b/docs/reference/readme.html index 7ee4ed3..865f243 100644 --- a/docs/reference/readme.html +++ b/docs/reference/readme.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/renvInitialise.html b/docs/reference/renvInitialise.html index a900caf..92a727a 100644 --- a/docs/reference/renvInitialise.html +++ b/docs/reference/renvInitialise.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/targets.html b/docs/reference/targets.html index 2fda0da..581118c 100644 --- a/docs/reference/targets.html +++ b/docs/reference/targets.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/targetsPipeline.html b/docs/reference/targetsPipeline.html index 8bd7023..8671a7a 100644 --- a/docs/reference/targetsPipeline.html +++ b/docs/reference/targetsPipeline.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/targetsRun.html b/docs/reference/targetsRun.html index ff91630..6caa007 100644 --- a/docs/reference/targetsRun.html +++ b/docs/reference/targetsRun.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/targetsScript.html b/docs/reference/targetsScript.html index 42ee0ed..9b24628 100644 --- a/docs/reference/targetsScript.html +++ b/docs/reference/targetsScript.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/template.html b/docs/reference/template.html index 68e7e7a..b386c9d 100644 --- a/docs/reference/template.html +++ b/docs/reference/template.html @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 diff --git a/docs/reference/utils.html b/docs/reference/utils.html index 852149e..c4ae042 100644 --- a/docs/reference/utils.html +++ b/docs/reference/utils.html @@ -6,7 +6,7 @@ -Add R package loading utilities — utils • projecttemplates +Add R package settings — utils • projecttemplates @@ -39,8 +39,8 @@ - - + + @@ -72,7 +72,7 @@ projecttemplates - 0.5.5 + 0.5.6 @@ -111,13 +111,13 @@
-

Add package utilites to a project directory.

+

Add package utilities to a project directory such as package loading and settings.

utils(
diff --git a/man/utils.Rd b/man/utils.Rd
index b0bc26f..6a25cd2 100644
--- a/man/utils.Rd
+++ b/man/utils.Rd
@@ -2,7 +2,7 @@
 % Please edit documentation in R/utils.R
 \name{utils}
 \alias{utils}
-\title{Add R package loading utilities}
+\title{Add R package settings}
 \usage{
 utils(
   project_directory = ".",
@@ -24,7 +24,7 @@ utils(
 \item{install}{value to set install argument of `pacman` package loading functions}
 }
 \description{
-Add package utilites to a project directory.
+Add package utilities to a project directory such as package loading and settings.
 }
 \examples{
 \dontrun{