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

Fix remaining check warnings from PEcAn.logger (fixes #2814) #2815

Merged
merged 33 commits into from
Jul 21, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
b9143c6
Update DESCRIPTION
moki1202 Jun 30, 2021
0c0bf6a
Update logger.R
moki1202 Jun 30, 2021
d89c1e1
Update print2string.R
moki1202 Jun 30, 2021
67c0bf7
Update logifnot.R
moki1202 Jun 30, 2021
9132a97
Update base/logger/DESCRIPTION
moki1202 Jul 1, 2021
f697fb0
Update DESCRIPTION
moki1202 Jul 1, 2021
80ac298
Update logifnot.R
moki1202 Jul 1, 2021
79726d2
Merge branch 'develop' into patch-14
infotroph Jul 3, 2021
da84d6b
Update base/logger/DESCRIPTION
moki1202 Jul 3, 2021
cfd1680
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
f1b6c26
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
3efa320
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
b8f3de7
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
1e9b1b4
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
df4873d
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
f0427a7
Delete check_conditions.Rd
moki1202 Jul 3, 2021
b4b380e
Delete is_definitely_true.Rd
moki1202 Jul 3, 2021
a9e9e15
Update base/logger/R/logifnot.R
moki1202 Jul 3, 2021
0716cd2
changed roxygen comments to R comments
moki1202 Jul 3, 2021
c9baaf4
Update logifnot.R
moki1202 Jul 3, 2021
548c1a0
automated documentation update
Jul 3, 2021
4bde110
quiet note about dump.log
infotroph Jul 3, 2021
f4d4f28
add myself as contributor, fix link
infotroph Jul 3, 2021
cbeab65
Update DESCRIPTION
moki1202 Jul 4, 2021
7bc8820
Merge pull request #4 from infotroph/logger-check-tweaks
moki1202 Jul 4, 2021
358c953
Create NEWS.md
moki1202 Jul 4, 2021
05c60c8
Update base/logger/NEWS.md
moki1202 Jul 4, 2021
c80d222
Update base/logger/R/logger.R
moki1202 Jul 4, 2021
5055e47
Update DESCRIPTION
moki1202 Jul 9, 2021
3c35b4e
Delete Rcheck_reference.log
moki1202 Jul 14, 2021
ae785b1
Update base/logger/DESCRIPTION
moki1202 Jul 15, 2021
dc6b1f3
Merge branch 'develop' into patch-14
infotroph Jul 15, 2021
dd5644e
Merge branch 'develop' into patch-14
infotroph Jul 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 3 additions & 4 deletions base/logger/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ Package: PEcAn.logger
Title: Logger functions for PEcAn
Version: 1.7.1
Date: 2019-09-05
Authors@R: c(person("Rob","Kooper"),
person("Alexey", "Shiklomanov"))
Author: Rob Kooper, Alexey Shiklomanov
Maintainer: Alexey Shiklomanov <ashiklom@bu.edu>
Authors@R: c(person("Rob", "Kooper", role = c("aut", "cre"), email = "kooper@illinois.edu"),
person("Alexey", "Shiklomanov", role = c("aut"), email = "ashiklom@bu.edu"))
moki1202 marked this conversation as resolved.
Show resolved Hide resolved
Description: Special logger functions for tracking execution status and the environment.
imports: utils
moki1202 marked this conversation as resolved.
Show resolved Hide resolved
Suggests: testthat
License: BSD_3_clause + file LICENSE
Encoding: UTF-8
Expand Down
4 changes: 2 additions & 2 deletions base/logger/R/logger.R
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ logger.severe <- function(msg, ..., wrap = TRUE) {
##' }
logger.message <- function(level, msg, ..., wrap = TRUE) {
if (logger.getLevelNumber(level) >= .utils.logger$level) {
dump.frames(dumpto = "dump.log")
utils::dump.frames(dumpto = "dump.log")
calls <- names(dump.log)
calls <- calls[!grepl("^(#[0-9]+: )?(PEcAn\\.logger::)?logger", calls)]
calls <- calls[!grepl("(severe|error|warn|info|debug)ifnot", calls)]
func <- sub("\\(.*", "", tail(calls, 1))
func <- sub("\\(.*", "", utils::tail(calls, 1))
if (length(func) == 0) {
func <- "console"
}
Expand Down
2 changes: 1 addition & 1 deletion base/logger/R/logifnot.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#' warnifnot("I would prefer it if you used lists.", is.list(a), is.list(b))
#' errorifnot("You should definitely use lists.", is.list(a), is.list(b))
#' try({
#' severeifnot("I absolutely cannot deal with the fact that something is not a list.", is.list(a), is.list(b))
#' severeifnot("I cannot deal with the fact that something is not a list.", is.list(a), is.list(b))
moki1202 marked this conversation as resolved.
Show resolved Hide resolved
#' })
#' @export
severeifnot <- function(msg, ...) {
Expand Down
2 changes: 1 addition & 1 deletion base/logger/R/print2string.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
#' logger.debug("Current status:\n", print2string(df, row.names = FALSE), wrap = FALSE)
#' @export
print2string <- function(x, ...) {
cout <- capture.output(print(x, ...))
cout <- utils::capture.output(print(x, ...))
paste(cout, collapse = "\n")
}