Skip to content

Commit

Permalink
lintr og fiks doc, for å få det grønt
Browse files Browse the repository at this point in the history
  • Loading branch information
arnfinn committed Dec 20, 2024
1 parent acacca4 commit a0859ab
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 21 deletions.
32 changes: 17 additions & 15 deletions R/autoReport.R
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ getRegs <- function(config) {
#' @param dryRun Logical defining if emails are to be sent. If TRUE a message
#' with reference to the payload file is given but no emails will actually be
#' sent. Default is FALSE
#' @param dato Date-class date when report will be run first time. Default value
#' is set to \code{Sys.Date()}
#'
#' @return Emails with corresponding file attachment. If dryRun == TRUE just a
#' message
Expand Down Expand Up @@ -562,21 +564,21 @@ runAutoReport <- function(dayNumber = as.POSIXlt(Sys.Date())$yday + 1,
runDayOfYear <- rep$runDayOfYear
params <- rep$params
}
if (
(target == "file"
&& dayNumber %in% runDayOfYear
&& as.Date(rep$terminateDate) > Sys.Date()
&& as.Date(rep$startDate) <= Sys.Date()
) ||
(target == "db"
&& as.Date(rep$startDate) <= dato
&& as.Date(rep$terminateDate) > dato
&& dato %in% timeplyr::time_seq(
as.Date(rep$startDate), dato,
time_by = rep$interval) # 'days', 'weeks', 'months', 'years',
) # 'fortnights', 'quarters', 'semesters',
) # 'olympiads', 'lustrums', 'decades',
{ # 'indictions', 'scores', 'centuries', 'milleniums'
if ((
target == "file"
&& dayNumber %in% runDayOfYear
&& as.Date(rep$terminateDate) > Sys.Date()
&& as.Date(rep$startDate) <= Sys.Date()
) || (
target == "db"
&& as.Date(rep$startDate) <= dato
&& as.Date(rep$terminateDate) > dato
&& dato %in% timeplyr::time_seq(
as.Date(rep$startDate),
dato,
time_by = rep$interval
) # 'days', 'weeks', 'months', 'years',
)) {
# get explicit referenced function and call it
f <- .getFun(paste0(rep$package, "::", rep$fun))
content <- do.call(what = f, args = params)
Expand Down
4 changes: 0 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#' Pipe operator
#'
#' See \code{dplyr::\link[dplyr:pipe]{\%>\%}} for details.
#'
#' @name %>%
#' @rdname pipe
#' @keywords internal
Expand All @@ -12,8 +10,6 @@ NULL

#' Data pronouns
#'
#' See \code{rlang::\link[rlang:tidyeval-data]{.data}} for details
#'
#' @name .data
#' @rdname pronoun
#' @keywords internal
Expand Down
2 changes: 1 addition & 1 deletion man/pipe.Rd

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

2 changes: 1 addition & 1 deletion man/pronoun.Rd

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

3 changes: 3 additions & 0 deletions man/runAutoReport.Rd

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

0 comments on commit a0859ab

Please sign in to comment.