From 19e0be37faad607adba4ed347b0bfe2d43dbc466 Mon Sep 17 00:00:00 2001 From: Christoph Sax Date: Mon, 3 Nov 2025 19:48:22 +0100 Subject: [PATCH 1/5] Revert "use cli instead of message (@christophsax please revert if unwanted)" This reverts commit 7c2a0e578ee5d7342141abce7d60529d2291bb19. --- DESCRIPTION | 2 -- R/td.R | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index ec8b383..fa2186a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -8,8 +8,6 @@ Authors@R: c( person("Tommaso", "Di Fonzo", 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, diff --git a/R/td.R b/R/td.R index 7559c1c..fbdcb8b 100644 --- a/R/td.R +++ b/R/td.R @@ -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." @@ -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 @@ -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) } From 1070d94a5465ef10d12ecb7e66046265fc01cbce Mon Sep 17 00:00:00 2001 From: Tobias Schieferdecker Date: Thu, 19 Jun 2025 11:57:57 +0200 Subject: [PATCH 2/5] add contributors :) --- DESCRIPTION | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index fa2186a..ca3966a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -5,7 +5,9 @@ Title: Methods for Temporal Disaggregation and Interpolation of Time Series Authors@R: c( person("Christoph", "Sax", email = "christoph.sax@gmail.com", 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 Suggests: From d81337a1dac1d05c96b4426ff1d8fc96f0ce756b Mon Sep 17 00:00:00 2001 From: Christoph Sax Date: Mon, 3 Nov 2025 20:07:43 +0100 Subject: [PATCH 3/5] modernize GHA --- .github/workflows/R-CMD-check.yaml | 38 +++++++++++++++++++------- .github/workflows/pkgdown.yaml | 1 + .github/workflows/smoke-test.yaml | 41 ++++++++++++++++++++++++++++ .github/workflows/test-coverage.yaml | 5 +++- README.Rmd | 4 ++- 5 files changed, 77 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/smoke-test.yaml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 0d12c65..5a9f04c 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,16 +1,21 @@ # 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 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 }}) @@ -18,18 +23,18 @@ jobs: 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 @@ -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 + diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index bfc9f4d..fa114e0 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -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) diff --git a/.github/workflows/smoke-test.yaml b/.github/workflows/smoke-test.yaml new file mode 100644 index 0000000..3fa1e4f --- /dev/null +++ b/.github/workflows/smoke-test.yaml @@ -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_check("tempdisagg", filter = "^(td|numeric|output|misc)$") diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index f859c33..9e73f27 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -8,6 +8,8 @@ on: name: test-coverage +permissions: read-all + jobs: test-coverage: runs-on: ubuntu-latest @@ -15,7 +17,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: r-lib/actions/setup-r@v2 with: @@ -25,6 +27,7 @@ jobs: with: extra-packages: any::covr, any::xml2 needs: coverage + cache-version: 2 - name: Test coverage run: | diff --git a/README.Rmd b/README.Rmd index 2b832d0..4dcbba1 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,8 +16,10 @@ knitr::opts_chunk$set( # tempdisagg: Methods for Temporal Disaggregation and Interpolation of Time Series -[![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) Temporal disaggregation methods are used to disaggregate or interpolate a low From f625a433f4e75c4f27bb6335de3983a5ae8e90dd Mon Sep 17 00:00:00 2001 From: Christoph Sax Date: Mon, 3 Nov 2025 20:11:35 +0100 Subject: [PATCH 4/5] badges --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b25f317..7d737c0 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ +[![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) Temporal disaggregation methods are used to disaggregate or interpolate From 9ecfb3c46afbf1e5ba987e2cdca6b6352b18484a Mon Sep 17 00:00:00 2001 From: Christoph Sax Date: Mon, 3 Nov 2025 20:24:30 +0100 Subject: [PATCH 5/5] smoke test fix --- .github/workflows/smoke-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke-test.yaml b/.github/workflows/smoke-test.yaml index 3fa1e4f..a3a99d7 100644 --- a/.github/workflows/smoke-test.yaml +++ b/.github/workflows/smoke-test.yaml @@ -38,4 +38,4 @@ jobs: run: | # Run only the fast unit tests, skip extensive test-all.R library(testthat) - test_check("tempdisagg", filter = "^(td|numeric|output|misc)$") + test_dir("tests/testthat", filter = "(td|numeric|output|misc)", reporter = "progress")