Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,35 +1,40 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
workflow_run:
workflows: ["smoke-test"]
types:
- completed

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: CI checks fail on pull requests due to trigger change

The R-CMD-check workflow no longer triggers on pull requests. The workflow_run trigger, configured with a branches: [main, master] filter, replaced the direct pull_request trigger. This change means pull requests from feature branches now lack full R-CMD-check coverage, significantly reducing CI validation.

Fix in Cursor Fix in Web

branches: [main, master]

name: R-CMD-check

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
# Only run if smoke-test succeeded
if: ${{ github.event.workflow_run.conclusion == 'success' }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: macos-latest, r: 'release', vignettes: false}
- {os: windows-latest, r: 'release', vignettes: false}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release', vignettes: false}
- {os: ubuntu-latest, r: 'release', vignettes: true}
- {os: ubuntu-latest, r: 'oldrel-1', vignettes: false}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -43,22 +48,35 @@ jobs:
with:
extra-packages: any::rcmdcheck
needs: check
cache-version: 2

- name: Install tex for vignette building
if: matrix.config.vignettes == true
uses: r-lib/actions/setup-tinytex@v2

- run: tlmgr --version
- name: Check TinyTeX version
if: matrix.config.vignettes == true
run: tlmgr --version

- name: Install tex packages
if: matrix.config.vignettes == true
run: |
tinytex::tlmgr_install("ae")
tinytex::tlmgr_install("grfext")
shell: Rscript {0}

- uses: r-lib/actions/check-r-package@v2
if: matrix.config.vignettes == true
with:
args: 'c("--no-manual", "--as-cran")'
build_args: '"--compact-vignettes=gs+qpdf"'
check-dir: '"check"'
upload-snapshots: true

- uses: r-lib/actions/check-r-package@v2
if: matrix.config.vignettes == false
with:
args: 'c("--no-manual", "--as-cran", "--no-build-vignettes")'
check-dir: '"check"'
upload-snapshots: true

1 change: 1 addition & 0 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
with:
extra-packages: any::pkgdown, local::.
needs: website
cache-version: 2

- name: Build site
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/smoke-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

name: smoke-test

permissions: read-all

jobs:
smoke-test:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::testthat, local::.
needs: test
cache-version: 2

- name: Run smoke tests
shell: Rscript {0}
run: |
# Run only the fast unit tests, skip extensive test-all.R
library(testthat)
test_dir("tests/testthat", filter = "(td|numeric|output|misc)", reporter = "progress")
5 changes: 4 additions & 1 deletion .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,16 @@ on:

name: test-coverage

permissions: read-all

jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -25,6 +27,7 @@ jobs:
with:
extra-packages: any::covr, any::xml2
needs: coverage
cache-version: 2

- name: Test coverage
run: |
Expand Down
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Title: Methods for Temporal Disaggregation and Interpolation of Time Series
Authors@R: c(
person("Christoph", "Sax", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-7192-7044")),
person("Peter", "Steiner", role = c("aut")),
person("Tommaso", "Di Fonzo", role = "ctb"))
person("Tommaso", "Di Fonzo", role = "ctb"),
person("Nelson", "Stevens", role = "ctb"),
person("Tobias", "Schieferdecker", role = "ctb"))
URL: https://journal.r-project.org/archive/2013-2/sax-steiner.pdf, http://cynkra.github.io/tempdisagg/
BugReports: https://github.com/cynkra/tempdisagg
Imports:
cli
Suggests:
tsbox,
testthat,
Expand Down
8 changes: 4 additions & 4 deletions R/td.R
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ td <- function(formula, conversion = "sum", to = "quarterly",
}

if (method == "denton") {
cli::cli_alert_info(
message(
"'denton-cholette' removes the transient movement at the beginning of ",
"the series and is preferable to the original 'denton' method in most ",
"cases."
Expand Down Expand Up @@ -371,7 +371,7 @@ td <- function(formula, conversion = "sum", to = "quarterly",
lf.dt <- tsbox::ts_span(lf.dt, start = hf[1])
y_l.series <- tsbox::ts_span(y_l.series, start = hf[1])
lf <- lf[lf >= hf[1]]
cli::cli_alert_info("High frequency series shorter than low frequency. Discarding low frequency before ", lf[1], ".")
message("High frequency series shorter than low frequency. Discarding low frequency before ", lf[1], ".")
}

# last time stamp covered by lf, in hf units. This could be infered from hf
Expand Down Expand Up @@ -436,12 +436,12 @@ td <- function(formula, conversion = "sum", to = "quarterly",
X.end_l <- SubConvertEnd(hf.end = X.end, f = f, f_l = f_l)
if (X.start_l > start + 0.001) {
start <- X.start_l
cli::cli_alert_info("High frequency series shorter than low frequency. Discarding low frequency before ", start, ".")
message("High frequency series shorter than low frequency. Discarding low frequency before ", start, ".")
y_l.series <- window(y_l.series, start = start)
}
if (X.end_l < end - 0.001) {
end <- X.end_l
cli::cli_alert_info("High frequency series shorter than low frequency. Discarding low frequency after ", end, ".")
message("High frequency series shorter than low frequency. Discarding low frequency after ", end, ".")
y_l.series <- window(y_l.series, end = end)
}

Expand Down
4 changes: 3 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ knitr::opts_chunk$set(
# tempdisagg: Methods for Temporal Disaggregation and Interpolation of Time Series

<!-- badges: start -->
[![Codecov test coverage](https://codecov.io/gh/cynkra/tempdisagg/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cynkra/tempdisagg?branch=main)
[![smoke-test](https://github.com/cynkra/tempdisagg/actions/workflows/smoke-test.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/smoke-test.yaml)
[![R-CMD-check](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/cynkra/tempdisagg/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cynkra/tempdisagg?branch=main)
[![pkgdown](https://github.com/cynkra/tempdisagg/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/pkgdown.yaml)
<!-- badges: end -->

Temporal disaggregation methods are used to disaggregate or interpolate a low
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@

<!-- badges: start -->

[![smoke-test](https://github.com/cynkra/tempdisagg/actions/workflows/smoke-test.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/smoke-test.yaml)
[![R-CMD-check](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/cynkra/tempdisagg/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cynkra/tempdisagg?branch=main)
[![R-CMD-check](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/R-CMD-check.yaml)
[![pkgdown](https://github.com/cynkra/tempdisagg/actions/workflows/pkgdown.yaml/badge.svg)](https://github.com/cynkra/tempdisagg/actions/workflows/pkgdown.yaml)
<!-- badges: end -->

Temporal disaggregation methods are used to disaggregate or interpolate
Expand Down