-
Notifications
You must be signed in to change notification settings - Fork 18
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
Address ropensci review #213
Changes from 42 commits
efa078d
814d31d
27dca9e
06323ab
7048575
37598fa
34c3a94
0d4647b
e58b719
f7e8a40
4a6b195
e8f9d71
cd333e6
f0efa80
1d66ea7
7f1896b
cd722cb
f2f9980
84fa09b
044dd38
7d02908
12bf148
ab4598a
5f659ea
c917315
69d1021
5dab654
c209c87
834b30f
67e59e3
4740c90
82c223f
18cb1ee
94b179f
009dd81
bb3fa1a
2045cbe
ba86b1a
da5988c
2648c5c
8269778
1b95ccd
8c1fd73
0f7e58d
1bc4699
1adacd0
3272e18
9cf0e6f
a45bf8d
4e045f0
0c066f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,5 @@ | |
^\.circleci/config\.yml$ | ||
^\.pre-commit-config\.yaml$ | ||
^\.lintr$ | ||
^tests/testthat/tic$ | ||
^\.vscode$ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
inst/doc | ||
.DS_Store | ||
.vscode | ||
tests/testthat/tic |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,22 @@ LocalCI <- R6Class( | |
|
||
public = list( | ||
get_branch = function() { | ||
system2("git", "rev-parse --abbrev-ref HEAD", stdout = TRUE) | ||
suppressWarnings(system2("git", "rev-parse --abbrev-ref HEAD", stdout = TRUE)) | ||
}, | ||
get_tag = function() { | ||
system2("git", "describe", stdout = TRUE) | ||
suppressWarnings(system2("git", "describe", stdout = TRUE)) | ||
}, | ||
is_tag = function() { | ||
length(system2("git", c("tag", "--points-at", "HEAD"), stdout = TRUE)) > 0 | ||
suppressWarnings(length(system2("git", c("tag", "--points-at", "HEAD"), stdout = TRUE)) > 0) | ||
}, | ||
get_slug = function() { | ||
remote <- gh::gh_tree_remote() | ||
paste0(remote$username, "/", remote$repo) | ||
tryCatch( | ||
{ | ||
remote <- gh::gh_tree_remote() | ||
paste0(remote$username, "/", remote$repo) | ||
}, | ||
error = "" | ||
) | ||
Comment on lines
+20
to
+26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What motivated this tryCatch? |
||
}, | ||
get_build_number = function() { | ||
"local build" | ||
|
@@ -23,7 +28,7 @@ LocalCI <- R6Class( | |
NULL | ||
}, | ||
get_commit = function() { | ||
git2r::revparse_single(revision = "HEAD")$sha | ||
tryCatch(git2r::revparse_single(revision = "HEAD")$sha, error = "") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What motivated this tryCatch? |
||
}, | ||
can_push = function(name = "TRAVIS_DEPLOY_KEY") { | ||
TRUE | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ InstallDeps <- R6Class( | |
}, | ||
|
||
prepare = function() { | ||
if (!file.exists("DESCRIPTION")) { | ||
stopc("No DESCRIPTION file found. The step_install_deps step and the do_package_checks macro are only available for packages.") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I recently like to format error messages as cli_alert_danger("<extended descriptive message>")
stopc("No DESCRIPTION file found.") The advantage is that you can wrap the extended description and also use cli formatting in it. The plain message in the stop call is then just to state the main reason of the error. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. rlang conditions are better here, see There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, looks promising. |
||
} | ||
verify_install("remotes") | ||
}, | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
── install ──────────────────────────────────────────────────────────── stage ── | ||
▶ step_install_deps(repos = repo_default()) | ||
── deploy ───────────────────────────────────────────────────────────── stage ── | ||
▶ step_build_bookdown() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
── install ──────────────────────────────────────────────────────────── stage ── | ||
▶ step_install_deps() | ||
▶ step_install_deps(repos = repo_default()) | ||
── script ───────────────────────────────────────────────────────────── stage ── | ||
▶ step_rcmdcheck() | ||
── deploy ───────────────────────────────────────────────────────────── stage ── | ||
▶ step_build_pkgdown() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a comment what we are suppressing here?