Skip to content

Commit

Permalink
Prepend underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
wlandau-lilly committed May 28, 2021
1 parent 9634e4c commit 01e8ee0
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
^\.Rproj\.user$
^_pkgdown\.yml$
^_targets$
^_targets_r$
^_targets\.R$
^_targets\.Rmd$
^_targets\.yaml$
^docs$
^CODE_OF_CONDUCT.md$
Expand All @@ -36,5 +38,3 @@
^paper\.md$
^paper\.bib$
_packages.R
^targets\.Rmd$

9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
.RData
.Rhistory
.Rproj.user/
_targets
_targets.R

docs
inst/doc
vignettes/*.html
README.html
paper.html
.Rproj.user
_packages.R
_targets.yaml
_targets
_targets.R
_targets.Rmd
_targets_r
targets.Rmd
_targets.yaml
2 changes: 1 addition & 1 deletion R/use_targets.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#' use_targets(open = FALSE)
#' })
#' }
use_targets <- function(path = "targets.Rmd", open = interactive()) {
use_targets <- function(path = "_targets.Rmd", open = interactive()) {
# Covered in tests/interactive/test-use_targets.R.
# nocov start
assert_package("usethis")
Expand Down
2 changes: 1 addition & 1 deletion man/use_targets.Rd

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

8 changes: 3 additions & 5 deletions tests/interactive/test-tar_edit.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
tar_test("tar_edit", {
skip_if_not_installed("usethis")
tar_script()
tar_edit() # Should open _targets.R.
})
tar_script()
tar_edit()
unlink("_targets.R")
7 changes: 3 additions & 4 deletions tests/interactive/test-use_targets.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
tar_test("use_targets()", {
use_targets(path = "targets.Rmd", open = FALSE)
expect_true(file.exists("targets.Rmd"))
})
use_targets(path = "_targets.Rmd", open = FALSE)
expect_true(file.exists("_targets.Rmd"))
unlink("_targets.Rmd")

0 comments on commit 01e8ee0

Please sign in to comment.