Skip to content

Commit

Permalink
Merge pull request #40 from poissonconsulting/f-cran-checks
Browse files Browse the repository at this point in the history
Cran updates
  • Loading branch information
aylapear authored Sep 13, 2024
2 parents d586afb + 1038606 commit 01e1e14
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 31 deletions.
95 changes: 95 additions & 0 deletions .github/workflows/rhub.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# R-hub's generic GitHub Actions workflow file. It's canonical location is at
# https://github.com/r-hub/actions/blob/v1/workflows/rhub.yaml
# You can update this file to a newer version using the rhub2 package:
#
# rhub::rhub_setup()
#
# It is unlikely that you need to modify this file manually.

name: R-hub
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"

on:
workflow_dispatch:
inputs:
config:
description: 'A comma separated list of R-hub platforms to use.'
type: string
default: 'linux,windows,macos'
name:
description: 'Run name. You can leave this empty now.'
type: string
id:
description: 'Unique ID. You can leave this empty now.'
type: string

jobs:

setup:
runs-on: ubuntu-latest
outputs:
containers: ${{ steps.rhub-setup.outputs.containers }}
platforms: ${{ steps.rhub-setup.outputs.platforms }}

steps:
# NO NEED TO CHECKOUT HERE
- uses: r-hub/actions/setup@v1
with:
config: ${{ github.event.inputs.config }}
id: rhub-setup

linux-containers:
needs: setup
if: ${{ needs.setup.outputs.containers != '[]' }}
runs-on: ubuntu-latest
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.containers) }}
container:
image: ${{ matrix.config.container }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/run-check@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}

other-platforms:
needs: setup
if: ${{ needs.setup.outputs.platforms != '[]' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.label }}
strategy:
fail-fast: false
matrix:
config: ${{ fromJson(needs.setup.outputs.platforms) }}

steps:
- uses: r-hub/actions/checkout@v1
- uses: r-hub/actions/setup-r@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/platform-info@v1
with:
token: ${{ secrets.RHUB_TOKEN }}
job-config: ${{ matrix.config.job-config }}
- uses: r-hub/actions/setup-deps@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
- uses: r-hub/actions/run-check@v1
with:
job-config: ${{ matrix.config.job-config }}
token: ${{ secrets.RHUB_TOKEN }}
10 changes: 5 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ S3method("dtt_time<-",Date)
S3method("dtt_time<-",POSIXct)
S3method("dtt_year<-",Date)
S3method("dtt_year<-",POSIXct)
S3method(c,POSIXct)
S3method(c,hms)
S3method(base::c,POSIXct)
S3method(base::c,hms)
S3method(base::max,hms)
S3method(base::min,hms)
S3method(base::unique,hms)
S3method(dtt_add_days,Date)
S3method(dtt_add_days,default)
S3method(dtt_add_hours,default)
Expand Down Expand Up @@ -107,9 +110,6 @@ S3method(dtt_year,Date)
S3method(dtt_year,POSIXct)
S3method(dtt_year_decimal,Date)
S3method(dtt_year_decimal,POSIXct)
S3method(max,hms)
S3method(min,hms)
S3method(unique,hms)
export("dtt_date<-")
export("dtt_day<-")
export("dtt_days<-")
Expand Down
6 changes: 3 additions & 3 deletions R/internal.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sub_day <- function(x, value) {
sub("^(\\d{1,4}-\\d{1,2}-)(\\d{1,2})$", paste0("\\1", value), x)
}

#' @exportS3Method
#' @exportS3Method base::max
max.hms <- function(..., na.rm = FALSE) {
dots <- list(...)
dots <- c(unlist(lapply(dots, unclass)))
Expand All @@ -37,7 +37,7 @@ max.hms <- function(..., na.rm = FALSE) {
dtt_time(max)
}

#' @exportS3Method
#' @exportS3Method base::min
min.hms <- function(..., na.rm = FALSE) {
dots <- list(...)
dots <- c(unlist(lapply(dots, unclass)))
Expand All @@ -46,7 +46,7 @@ min.hms <- function(..., na.rm = FALSE) {
dtt_time(min)
}

#' @exportS3Method
#' @exportS3Method base::unique
unique.hms <- function(x, incomparables = FALSE, ...) {
chk_unused(...)
x <- dtt_floor(x)
Expand Down
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#' @exportS3Method
#' @exportS3Method base::c
c.POSIXct <- function(..., recursive = FALSE) {
dots <- list(...)
.POSIXct(c(unlist(lapply(dots, unclass))), tz = dtt_tz(dots[[1]]))
}

#' @exportS3Method
#' @exportS3Method base::c
c.hms <- function(..., recursive = FALSE) {
dots <- list(...)
hms::as_hms(c(unlist(lapply(dots, unclass))))
Expand Down
8 changes: 4 additions & 4 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 1 reverse dependencies (0 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

## Response to Emails from CRAN
# Response to CRAN email

Removed the skip tests on various operating systems.
Removed tests that were failing due to fix of fractional seconds bug in R.
- Updated the code to fix failures due to the set operators changes in r-devel.

32 changes: 16 additions & 16 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Platform

|field |value |
|:--------|:------------------------------------------------------------------------------------------|
|version |R version 4.3.1 (2023-06-16) |
|os |macOS Sonoma 14.0 |
|system |aarch64, darwin20 |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Vancouver |
|date |2023-11-10 |
|rstudio |2023.09.1+494 Desert Sunflower (desktop) |
|pandoc |3.1.1 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/ (via rmarkdown) |
|field |value |
|:--------|:---------------------------------------------------------------------------------------------------|
|version |R version 4.4.1 (2024-06-14) |
|os |macOS Sonoma 14.6 |
|system |aarch64, darwin20 |
|ui |RStudio |
|language |(EN) |
|collate |en_US.UTF-8 |
|ctype |en_US.UTF-8 |
|tz |America/Vancouver |
|date |2024-09-12 |
|rstudio |2024.04.2+764 Chocolate Cosmos (desktop) |
|pandoc |3.1.11 @ /Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/aarch64/ (via rmarkdown) |

# Dependencies

|package |old |new |Δ |
|:-------|:-----|:----------|:--|
|dttr2 |0.4.1 |0.4.1.9001 |* |
|package |old |new |Δ |
|:-------|:----------|:----------|:--|
|dttr2 |0.5.0.9001 |0.5.0.9002 |* |

# Revdeps

2 changes: 1 addition & 1 deletion revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## revdepcheck results

We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 1 reverse dependencies (0 from CRAN + 1 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
Expand Down

0 comments on commit 01e1e14

Please sign in to comment.