From d694cb37aa73367673a13662f582464d8d06b65b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Ver=C3=ADssimo?= <211358+averissimo@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:52:17 +0200 Subject: [PATCH] Uses generic `is.infinite` that is compatible with previous R versions (#35) # Pull Request Closes #34 ### Changes description * Fix bug reported by @chlebowa as `is.infinite.POSIXlt` is not available in previous versions of R --- .github/workflows/check.yaml | 1 - DESCRIPTION | 2 +- NEWS.md | 2 +- R/utils.R | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 1cd763e9..b801ff72 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -10,7 +10,6 @@ on: - ready_for_review branches: - main - - training push: branches: - main diff --git a/DESCRIPTION b/DESCRIPTION index f88a0765..28bd76d3 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: verdepcheck Title: Check Package using Various Versions of Dependencies -Version: 0.0.0.9000 +Version: 0.0.0.9001 Date: 2023-02-14 Authors@R: c( person("Pawel Rucki", , , "pawel.rucki@roche.com", role = c("aut", "cre")), diff --git a/NEWS.md b/NEWS.md index bf2ca14a..0568656b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,3 @@ -# verdepcheck 0.0.0.9000 +# verdepcheck 0.0.0.9001 - Initialize the package. diff --git a/R/utils.R b/R/utils.R index cf0d024c..8b72a9da 100644 --- a/R/utils.R +++ b/R/utils.R @@ -29,7 +29,7 @@ base_pkgs <- function() { #' get_ppm_snapshot_by_date(Sys.Date() + 10) get_ppm_snapshot_by_date <- function(date) { fallback_repo <- file.path(pkgcache::ppm_repo_url(), "latest") - if (is.na(date) || is.infinite.POSIXlt(date)) { + if (is.na(date) || is.infinite(date)) { return(fallback_repo) }