Skip to content

Commit

Permalink
Merge pull request #21 from jasenfinch/devel
Browse files Browse the repository at this point in the history
v0.5.6
  • Loading branch information
jasenfinch committed Nov 16, 2021
2 parents 3075db0 + 612c1b8 commit fc8b6a0
Show file tree
Hide file tree
Showing 30 changed files with 64 additions and 39 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 3 additions & 0 deletions R/docker.R
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
}
7 changes: 2 additions & 5 deletions R/targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '/'))
Expand Down Expand Up @@ -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")
')
Expand Down
7 changes: 5 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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'))
}
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# projecttemplates

<!-- badges: start -->
[![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/)
<!-- badges: end -->

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.

Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion docs/news/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/createGit.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/createGithub.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/docker.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/githubActions.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/output.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/projectDirectory.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/projectSkeleton.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/projectTypes.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/readme.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/renvInitialise.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/targets.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/targetsPipeline.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/targetsRun.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/targetsScript.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/template.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions docs/reference/utils.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/utils.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fc8b6a0

Please sign in to comment.