From 299ff703055c985665cc8f6ef5f94330ff4cd058 Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Mon, 17 Feb 2025 13:31:48 +0530 Subject: [PATCH 01/22] declared new enviroment --- models/linkages/R/model2netcdf.LINKAGES.R | 2 ++ 1 file changed, 2 insertions(+) diff --git a/models/linkages/R/model2netcdf.LINKAGES.R b/models/linkages/R/model2netcdf.LINKAGES.R index 68afa4ecd6..a36b528725 100644 --- a/models/linkages/R/model2netcdf.LINKAGES.R +++ b/models/linkages/R/model2netcdf.LINKAGES.R @@ -16,6 +16,8 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, end_date = NULL, pft_names = NULL) { # , PFTs) { logger.severe('NOT IMPLEMENTED') + ## Create a new enviroment + linkages_env <- new.env() ### Read in model output in linkages format load(file.path(outdir, "linkages.out.Rdata")) # linkages.output.dims <- dim(linkages.output) From ae3b83663f9197100e040a4ee8c5435e2102c366 Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Mon, 17 Feb 2025 15:26:57 +0530 Subject: [PATCH 02/22] fix:model2netcdf for no visible bindings --- models/linkages/R/model2netcdf.LINKAGES.R | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/models/linkages/R/model2netcdf.LINKAGES.R b/models/linkages/R/model2netcdf.LINKAGES.R index a36b528725..948e7c0c22 100644 --- a/models/linkages/R/model2netcdf.LINKAGES.R +++ b/models/linkages/R/model2netcdf.LINKAGES.R @@ -15,11 +15,11 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, end_date = NULL, pft_names = NULL) { # , PFTs) { logger.severe('NOT IMPLEMENTED') - + ## Create a new enviroment linkages_env <- new.env() ### Read in model output in linkages format - load(file.path(outdir, "linkages.out.Rdata")) + load(file.path(outdir, "linkages.out.Rdata"),envir = linkages_env) # linkages.output.dims <- dim(linkages.output) ### Determine number of years and output timestep @@ -49,20 +49,20 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, ## Setup outputs for netCDF file in appropriate units output <- list() ## standard variables: Carbon Pools - output[[1]] <- ag.biomass[y, ] # Above Ground Biomass in kgC/m2 - output[[2]] <- ag.biomass[y, ] # Total Live Biomass in kgC/m2 (no distinction from AGB in linkages) - output[[3]] <- total.soil.carbon[y, ] # TotSoilCarb in kgC/m2 - output[[4]] <- c(ag.biomass[y, ], total.soil.carbon[y, ], leaf.litter[y, ], area[y, ]) # Carb Pools in kgC/m2 + output[[1]] <- linkages_env$ag.biomass[y, ] # Above Ground Biomass in kgC/m2 + output[[2]] <- linkages_env$ag.biomass[y, ] # Total Live Biomass in kgC/m2 (no distinction from AGB in linkages) + output[[3]] <- linkages_env$total.soil.carbon[y, ] # TotSoilCarb in kgC/m2 + output[[4]] <- c(linkages_env$ag.biomass[y, ], linkages_env$total.soil.carbon[y, ], linkages_env$leaf.litter[y, ], area[y, ]) # Carb Pools in kgC/m2 output[[5]] <- c("AGB", "Soil Organic Matter", "Leaf Litter", "LAI") # poolname - output[[6]] <- ag.npp[y, ] # GWBI = NPP in linkages - output[[7]] <- hetero.resp[y, ] # HeteroResp in kgC/m^2/s - output[[8]] <- ag.npp[y, ] # NPP = GWBI in linkages - output[[9]] <- nee[y, ] # NEE #possibly questionable - output[[10]] <- et[y, ] # Evap in kg/m^2/s - output[[11]] <- agb.pft[, y, ] - output[[12]] <- f.comp[, y] - output[[13]] <- area[y, ] #LAI - output[[14]] <- water[y, ] #soil moisture + output[[6]] <- linkages_env$ag.npp[y, ] # GWBI = NPP in linkages + output[[7]] <- linkages_env$hetero.resp[y, ] # HeteroResp in kgC/m^2/s + output[[8]] <- linkages_env$ag.npp[y, ] # NPP = GWBI in linkages + output[[9]] <- linkages_env$nee[y, ] # NEE #possibly questionable + output[[10]] <- linkages_env$et[y, ] # Evap in kg/m^2/s + output[[11]] <- linkages_env$agb.pft[, y, ] + output[[12]] <- linkages_env$f.comp[, y] + output[[13]] <- linkages_env$area[y, ] #LAI + output[[14]] <- linkages_env$water[y, ] #soil moisture output[[15]] <- abvgroundwood.biomass[y,] #AbvGroundWood just wood no leaves output[[16]] <- seq_along(pft_names) @@ -77,7 +77,7 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, dim.cpools <- ncdf4::ncdim_def("cpools", "", vals = 1:4, longname = "Carbon Pools") dim.cpools1 <- ncdf4::ncdim_def("cpools", "", vals = 1:4, longname = "Carbon Pools", create_dimvar = FALSE) #dim.pfts <- ncdim_def("pfts", "", vals = 1:nrow(agb.pft), longname = "PFTs", create_dimvar = FALSE) - dim.pfts <- ncdf4::ncdim_def(name = "pft", units = "unitless", vals = 1:length(agb.pft[, 1, 1]), longname = "Plant Functional Type", unlim = TRUE) + dim.pfts <- ncdf4::ncdim_def(name = "pft", units = "unitless", vals = 1:length(linkages_env$agb.pft[, 1, 1]), longname = "Plant Functional Type", unlim = TRUE) for (i in seq_along(output)) { From cc400f475b0e091ef0bd3bcdbad792a515fdfba5 Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Mon, 17 Feb 2025 15:33:13 +0530 Subject: [PATCH 03/22] fix:model2netcdf for no visible bindings --- models/linkages/R/model2netcdf.LINKAGES.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/linkages/R/model2netcdf.LINKAGES.R b/models/linkages/R/model2netcdf.LINKAGES.R index 948e7c0c22..dc27a25a6d 100644 --- a/models/linkages/R/model2netcdf.LINKAGES.R +++ b/models/linkages/R/model2netcdf.LINKAGES.R @@ -52,7 +52,7 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, output[[1]] <- linkages_env$ag.biomass[y, ] # Above Ground Biomass in kgC/m2 output[[2]] <- linkages_env$ag.biomass[y, ] # Total Live Biomass in kgC/m2 (no distinction from AGB in linkages) output[[3]] <- linkages_env$total.soil.carbon[y, ] # TotSoilCarb in kgC/m2 - output[[4]] <- c(linkages_env$ag.biomass[y, ], linkages_env$total.soil.carbon[y, ], linkages_env$leaf.litter[y, ], area[y, ]) # Carb Pools in kgC/m2 + output[[4]] <- c(linkages_env$ag.biomass[y, ], linkages_env$total.soil.carbon[y, ], linkages_env$leaf.litter[y, ], linkages_env$area[y, ]) # Carb Pools in kgC/m2 output[[5]] <- c("AGB", "Soil Organic Matter", "Leaf Litter", "LAI") # poolname output[[6]] <- linkages_env$ag.npp[y, ] # GWBI = NPP in linkages output[[7]] <- linkages_env$hetero.resp[y, ] # HeteroResp in kgC/m^2/s @@ -63,7 +63,7 @@ model2netcdf.LINKAGES <- function(outdir, sitelat, sitelon, start_date = NULL, output[[12]] <- linkages_env$f.comp[, y] output[[13]] <- linkages_env$area[y, ] #LAI output[[14]] <- linkages_env$water[y, ] #soil moisture - output[[15]] <- abvgroundwood.biomass[y,] #AbvGroundWood just wood no leaves + output[[15]] <- linkages_env$abvgroundwood.biomass[y,] #AbvGroundWood just wood no leaves output[[16]] <- seq_along(pft_names) # ******************** Declare netCDF variables ********************# From 18559a11e39a0bdb9894c35898ef838347a0e722 Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Mon, 17 Feb 2025 17:01:55 +0530 Subject: [PATCH 04/22] fix:write_restart for no visible bindings --- models/linkages/R/write_restart.LINKAGES.R | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/models/linkages/R/write_restart.LINKAGES.R b/models/linkages/R/write_restart.LINKAGES.R index 8e0b442048..41a4eee719 100644 --- a/models/linkages/R/write_restart.LINKAGES.R +++ b/models/linkages/R/write_restart.LINKAGES.R @@ -134,16 +134,21 @@ write_restart.LINKAGES <- function(outdir, runid, start.time, stop.time, } print(paste0("runid = ", runid)) + # Create a new enviroment + linkages_env <- new.env() # load output - load(outfile) + load(outfile, envir = linkages_env) - ntrees <- ntrees.kill[, ncol(ntrees.kill), 1] # number of trees + ntrees <- linkages_env$ntrees.kill[, ncol(linkages_env$ntrees.kill), 1] # number of trees if(sum(ntrees)==0) { #reloads spin up if theres nothing in the output file print('No survivors. Reusing spinup.') - load(file.path(outdir, runid,list.files(file.path(outdir, runid))[grep(list.files(file.path(outdir, runid)),pattern='linkages')][1])) - ntrees <- ntrees.kill[, ncol(ntrees.kill), 1] # number of trees + # new enviroment for spin up data + linkages_env_spinup <- new.env() + spinup_file <- file.path(outdir, runid,list.files(file.path(outdir, runid))[grep(list.files(file.path(outdir, runid)),pattern='linkages')][1]) + load(spinup_file, envir = linkages_env_spinup) + ntrees <- linkages_env_spinup$ntrees.kill[, ncol(linkages_env_spinup$ntrees.kill), 1] # number of trees } @@ -152,11 +157,11 @@ write_restart.LINKAGES <- function(outdir, runid, start.time, stop.time, tyl <- tyl C.mat <- C.mat - nogro <- as.vector(nogro.save[, ncol(nogro.save), 1]) ## no growth indicator + nogro <- as.vector(linkages_env$nogro.save[, ncol(linkages_env$nogro.save), 1]) ## no growth indicator ksprt <- matrix(0, 1, nspec) ## kill sprout indicator ## LOOK INTO THIS - iage <- as.vector(iage.save[, ncol(iage.save), 1]) # individual age + iage <- as.vector(linkages_env$iage.save[, ncol(linkages_env$iage.save), 1]) # individual age - dbh <- as.vector(dbh.save[, ncol(dbh.save), 1]) + dbh <- as.vector(linkages_env$dbh.save[, ncol(linkages_env$dbh.save), 1]) n.index <- c(rep(1, ntrees[1])) for (i in 2:length(settings$pfts)) { From 1ec783176bac9408724a504ebbdf1c33395e583c Mon Sep 17 00:00:00 2001 From: Harsh Agrawal Date: Mon, 17 Feb 2025 17:03:15 +0530 Subject: [PATCH 05/22] updated Rcheck_reference.log --- models/linkages/tests/Rcheck_reference.log | 32 +--------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/models/linkages/tests/Rcheck_reference.log b/models/linkages/tests/Rcheck_reference.log index 9f1e55a1c5..c2f70e1720 100644 --- a/models/linkages/tests/Rcheck_reference.log +++ b/models/linkages/tests/Rcheck_reference.log @@ -50,37 +50,7 @@ Suggests or Enhances not in mainstream repositories: * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK -* checking R code for possible problems ... NOTE -model2netcdf.LINKAGES: no visible binding for global variable - ‘ag.biomass’ -model2netcdf.LINKAGES: no visible binding for global variable - ‘total.soil.carbon’ -model2netcdf.LINKAGES: no visible binding for global variable - ‘leaf.litter’ -model2netcdf.LINKAGES: no visible binding for global variable ‘area’ -model2netcdf.LINKAGES: no visible binding for global variable ‘ag.npp’ -model2netcdf.LINKAGES: no visible binding for global variable - ‘hetero.resp’ -model2netcdf.LINKAGES: no visible binding for global variable ‘nee’ -model2netcdf.LINKAGES: no visible binding for global variable ‘et’ -model2netcdf.LINKAGES: no visible binding for global variable ‘agb.pft’ -model2netcdf.LINKAGES: no visible binding for global variable ‘f.comp’ -model2netcdf.LINKAGES: no visible binding for global variable ‘water’ -model2netcdf.LINKAGES: no visible binding for global variable - ‘abvgroundwood.biomass’ -write_restart.LINKAGES: no visible binding for global variable - ‘ntrees.kill’ -write_restart.LINKAGES: no visible binding for global variable - ‘nogro.save’ -write_restart.LINKAGES: no visible binding for global variable - ‘iage.save’ -write_restart.LINKAGES: no visible binding for global variable - ‘dbh.save’ -Undefined global functions or variables: - abvgroundwood.biomass ag.biomass ag.npp agb.pft area - db.close db.open db.query dbh.save et f.comp - hetero.resp iage.save leaf.litter nee nogro.save - ntrees.kill total.soil.carbon water +* checking R code for possible problems ... OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK From 2c574300e8bbeec2c2fcc94f8fc04610ee703139 Mon Sep 17 00:00:00 2001 From: David LeBauer Date: Mon, 17 Feb 2025 23:24:52 -0700 Subject: [PATCH 06/22] add Betsy as author of benchmarks! - also update my email - update package description --- modules/benchmark/DESCRIPTION | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/benchmark/DESCRIPTION b/modules/benchmark/DESCRIPTION index 71e9330b30..219d44dffb 100644 --- a/modules/benchmark/DESCRIPTION +++ b/modules/benchmark/DESCRIPTION @@ -4,19 +4,23 @@ Title: PEcAn Functions Used for Benchmarking Version: 1.7.3.9000 Authors@R: c(person("Mike", "Dietze", role = c("aut", "cre"), email = "dietze@bu.edu"), + person("Betsy", "Cowdery", role = c("aut"), + email = "emcowdery@gmail.com") person("David", "LeBauer", role = c("aut"), - email = "dlebauer@email.arizona.edu"), + email = "dlebauer@gmail.com"), person("Rob", "Kooper", role = c("aut"), email = "kooper@illinois.edu"), person("Toni", "Viskari", role = c("aut")), person("University of Illinois, NCSA", role = c("cph"))) -Author: Michael Dietze, David LeBauer, Rob Kooper, Toni Viskari +Author: Michael Dietze, Betsy Cowdery, David LeBauer, Rob Kooper, Toni Viskari Maintainer: Mike Dietze Description: The Predictive Ecosystem Carbon Analyzer (PEcAn) is a scientific workflow management tool that is designed to simplify the management of model parameterization, execution, and analysis. The goal of PEcAn is to streamline the interaction between data and models, and to improve the - efficacy of scientific investigation. + efficacy of scientific investigation. The PEcAn.benchmark package provides + utilities for comparing models and data, including a suite of statistical + metrics and plots. Imports: dplyr, ggplot2, From f70e56a0f80887f418039100d1bd5aa74ff4f9d5 Mon Sep 17 00:00:00 2001 From: David LeBauer Date: Tue, 18 Feb 2025 14:36:52 -0700 Subject: [PATCH 07/22] add missing ',' --- modules/benchmark/DESCRIPTION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/benchmark/DESCRIPTION b/modules/benchmark/DESCRIPTION index 219d44dffb..e5a312f0c1 100644 --- a/modules/benchmark/DESCRIPTION +++ b/modules/benchmark/DESCRIPTION @@ -5,7 +5,7 @@ Version: 1.7.3.9000 Authors@R: c(person("Mike", "Dietze", role = c("aut", "cre"), email = "dietze@bu.edu"), person("Betsy", "Cowdery", role = c("aut"), - email = "emcowdery@gmail.com") + email = "emcowdery@gmail.com"), person("David", "LeBauer", role = c("aut"), email = "dlebauer@gmail.com"), person("Rob", "Kooper", role = c("aut"), From b0f69765c95ee6edce0698a02ad4582e63ff7064 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Wed, 19 Feb 2025 20:53:55 -0700 Subject: [PATCH 08/22] Merge pull request #3444 from infotroph/tag-by-R-version Tag Docker images with R version as well as branch --- .github/workflows/docker-build-image.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-build-image.yml b/.github/workflows/docker-build-image.yml index 774dd2babb..d54bc74c0a 100644 --- a/.github/workflows/docker-build-image.yml +++ b/.github/workflows/docker-build-image.yml @@ -83,11 +83,13 @@ jobs: # generate Docker tags based on the following events/attributes tags: | type=schedule - type=ref,event=branch + type=ref,event=branch,enable=${{ inputs.r-version == '4.1' }} + type=ref,event=branch,suffix=-R${{ inputs.r-version }} type=ref,event=pr - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=semver,pattern={{major}} + type=semver,pattern={{version}},enable=${{ inputs.r-version == '4.1' }} + type=semver,pattern={{major}}.{{minor}},enable=${{ inputs.r-version == '4.1' }} + type=semver,pattern={{major}},enable=${{ inputs.r-version == '4.1' }} + type=semver,pattern={{version}},suffix=-R${{ inputs.r-version }} # setup docker build - name: Set up QEMU From 8e368db255ef6557089ae96d4c001e0767b1a0ed Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 11:00:18 -0800 Subject: [PATCH 09/22] update tag nomenclature from R{version} to develop-R{version} --- .github/workflows/book.yml | 2 +- .github/workflows/check.yml | 2 +- .github/workflows/download-met-data.yml | 2 +- .github/workflows/integration-test.yml | 2 +- .github/workflows/sipnet.yml | 2 +- .github/workflows/test.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 5d6ea77ae2..18b7b56f01 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -18,7 +18,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} container: - image: pecan/depends:R4.1 + image: pecan/depends:develop-R4.1 steps: # checkout source code diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 4e40e19ce5..5f155a4ccb 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -32,7 +32,7 @@ jobs: _R_CHECK_SYSTEM_CLOCK_: 0 container: - image: pecan/depends:R${{ inputs.R-version }} + image: pecan/depends:develop-R${{ inputs.R-version }} steps: # checkout source code diff --git a/.github/workflows/download-met-data.yml b/.github/workflows/download-met-data.yml index 1871176e0c..3d774d9de3 100644 --- a/.github/workflows/download-met-data.yml +++ b/.github/workflows/download-met-data.yml @@ -26,7 +26,7 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 container: - image: pecan/depends:R4.1 + image: pecan/depends:develop-R4.1 steps: # checkout source code diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6da48ba68c..6dc8c8d6fc 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -14,7 +14,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} container: - image: pecan/base:develop + image: pecan/base:develop-4.1 steps: - name: Checkout source code diff --git a/.github/workflows/sipnet.yml b/.github/workflows/sipnet.yml index 9700ed8527..8d47da5fb6 100644 --- a/.github/workflows/sipnet.yml +++ b/.github/workflows/sipnet.yml @@ -26,7 +26,7 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 container: - image: pecan/depends:R${{ inputs.R-version }} + image: pecan/depends:develop-R${{ inputs.R-version }} steps: # checkout source code diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc92869d6f..ae2743ce5e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -27,7 +27,7 @@ jobs: options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 container: - image: pecan/depends:R${{ inputs.R-version }} + image: pecan/depends:develop-R${{ inputs.R-version }} steps: # checkout source code From 399751a5095d0ef8dc7b2e7cf8bc11463e51ba27 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 11:01:52 -0800 Subject: [PATCH 10/22] add R 4.4 to weekly checks --- .github/workflows/ci-weekly.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-weekly.yml b/.github/workflows/ci-weekly.yml index 36bdebe695..f1fe59c3d6 100644 --- a/.github/workflows/ci-weekly.yml +++ b/.github/workflows/ci-weekly.yml @@ -14,6 +14,7 @@ jobs: matrix: R: - "4.3" + - "4.4" - "devel" uses: ./.github/workflows/test.yml with: @@ -26,6 +27,7 @@ jobs: matrix: R: - "4.3" + - "4.4" - "devel" uses: ./.github/workflows/check.yml with: @@ -39,6 +41,7 @@ jobs: matrix: R: - "4.3" + - "4.4" - "devel" uses: ./.github/workflows/sipnet.yml with: From 3384dd23875bb28eeb031246373318eb673b20fc Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 11:02:49 -0800 Subject: [PATCH 11/22] schedule builds of all tested R versions --- .github/workflows/docker.yml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b8427ff043..dbfa7ab7fc 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -22,7 +22,13 @@ on: - 4.3 - 4.4 - devel - + schedule: + # 1:30 AM UTC, different R version each day + - cron: '30 1 * * 1' # Rdevel + - cron: '30 1 * * 2' # R4.4 + - cron: '30 1 * * 3' # R4.3 + - cron: '30 1 * * 4' # R4.2 + - cron: '30 1 * * 5' # R4.1 jobs: # ---------------------------------------------------------------------- @@ -35,9 +41,20 @@ jobs: rversion: runs-on: ubuntu-latest steps: - - run: echo "null" - outputs: - R_VERSION: ${{ github.event.inputs.r_version || '4.1' }} + - if: github.event.schedule == '0 1 * * 1' + run: echo "R_VERSION=devel" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 2' + run: echo "R_VERSION=4.4" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 3' + run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 4' + run: echo "R_VERSION=4.2" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 5' + run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 3' + run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" + - if: github.event_name != 'schedule' + run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" # ---------------------------------------------------------------------- # depends image has all the dependencies installed From eb45cf5c978efb22d4a1a6ecb7f7af5474a07907 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 11:24:43 -0800 Subject: [PATCH 12/22] Update .github/workflows/integration-test.yml --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6dc8c8d6fc..6da48ba68c 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -14,7 +14,7 @@ jobs: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} container: - image: pecan/base:develop-4.1 + image: pecan/base:develop steps: - name: Checkout source code From 50c6ef84b73a3d4e6baab317f6939efb644f9032 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 11:52:35 -0800 Subject: [PATCH 13/22] typos --- .github/workflows/docker.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dbfa7ab7fc..838a9665c9 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -41,18 +41,16 @@ jobs: rversion: runs-on: ubuntu-latest steps: - - if: github.event.schedule == '0 1 * * 1' + - if: github.event.schedule == '30 1 * * 1' run: echo "R_VERSION=devel" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '0 1 * * 2' + - if: github.event.schedule == '30 1 * * 2' run: echo "R_VERSION=4.4" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '0 1 * * 3' + - if: github.event.schedule == '30 1 * * 3' run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '0 1 * * 4' + - if: github.event.schedule == '30 1 * * 4' run: echo "R_VERSION=4.2" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '0 1 * * 5' + - if: github.event.schedule == '30 1 * * 5' run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '0 1 * * 3' - run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" - if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" From 836b2184403bce5a5dc7040d48c67e71c475f496 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 12:28:54 -0800 Subject: [PATCH 14/22] job output != step output --- .github/workflows/docker.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 838a9665c9..c1ac836211 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -41,18 +41,22 @@ jobs: rversion: runs-on: ubuntu-latest steps: - - if: github.event.schedule == '30 1 * * 1' - run: echo "R_VERSION=devel" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 2' - run: echo "R_VERSION=4.4" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 3' - run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 4' - run: echo "R_VERSION=4.2" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 5' - run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" + - if: github.event.schedule == '0 1 * * 1' + run: export R_VERSION=devel + - if: github.event.schedule == '0 1 * * 2' + run: export R_VERSION=4.4 + - if: github.event.schedule == '0 1 * * 3' + run: export R_VERSION=4.3 + - if: github.event.schedule == '0 1 * * 4' + run: export R_VERSION=4.2 + - if: github.event.schedule == '0 1 * * 5' + run: export R_VERSION=4.1 - if: github.event_name != 'schedule' - run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" + run: export R_VERSION=${{ github.event.inputs.r_version || '4.1' }} + - id: out + run: echo "R_VERSION=${R_VERSION}" >> "$GITHUB_OUTPUT" + outputs: + R_VERSION: ${{ steps.out.outputs.R_VERSION }} # ---------------------------------------------------------------------- # depends image has all the dependencies installed From 10534281a15a6292646510f74acab33954664b21 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 12:35:12 -0800 Subject: [PATCH 15/22] half-hours again --- .github/workflows/docker.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index c1ac836211..d329ac2c22 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -41,15 +41,15 @@ jobs: rversion: runs-on: ubuntu-latest steps: - - if: github.event.schedule == '0 1 * * 1' + - if: github.event.schedule == '30 1 * * 1' run: export R_VERSION=devel - - if: github.event.schedule == '0 1 * * 2' + - if: github.event.schedule == '30 1 * * 2' run: export R_VERSION=4.4 - - if: github.event.schedule == '0 1 * * 3' + - if: github.event.schedule == '30 1 * * 3' run: export R_VERSION=4.3 - - if: github.event.schedule == '0 1 * * 4' + - if: github.event.schedule == '30 1 * * 4' run: export R_VERSION=4.2 - - if: github.event.schedule == '0 1 * * 5' + - if: github.event.schedule == '30 1 * * 5' run: export R_VERSION=4.1 - if: github.event_name != 'schedule' run: export R_VERSION=${{ github.event.inputs.r_version || '4.1' }} From 8c3a77c44d016fc9685e51ca9984aff4ab2bc978 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 14:20:15 -0800 Subject: [PATCH 16/22] need to set step output --- .github/workflows/docker.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d329ac2c22..baa464bb92 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -42,21 +42,20 @@ jobs: runs-on: ubuntu-latest steps: - if: github.event.schedule == '30 1 * * 1' - run: export R_VERSION=devel + run: echo "R_VERSION=devel" >> "$GITHUB_OUTPUT" - if: github.event.schedule == '30 1 * * 2' - run: export R_VERSION=4.4 + run: echo "R_VERSION=4.4" >> "$GITHUB_OUTPUT" - if: github.event.schedule == '30 1 * * 3' - run: export R_VERSION=4.3 + run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" - if: github.event.schedule == '30 1 * * 4' - run: export R_VERSION=4.2 + run: echo "R_VERSION=4.2" >> "$GITHUB_OUTPUT" - if: github.event.schedule == '30 1 * * 5' - run: export R_VERSION=4.1 + run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" - if: github.event_name != 'schedule' - run: export R_VERSION=${{ github.event.inputs.r_version || '4.1' }} - - id: out - run: echo "R_VERSION=${R_VERSION}" >> "$GITHUB_OUTPUT" + run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" outputs: - R_VERSION: ${{ steps.out.outputs.R_VERSION }} + R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} + # ---------------------------------------------------------------------- # depends image has all the dependencies installed From c1b169f920b99a249b8fd1f46e442dcf4ed76585 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:02:57 -0800 Subject: [PATCH 17/22] testing --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index baa464bb92..3fdef5364e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -55,7 +55,7 @@ jobs: run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" outputs: R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} - + TEST_CONST: 3 # ---------------------------------------------------------------------- # depends image has all the dependencies installed From 99ac7014163bd857043716d89a7631ca68d9b6cf Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:24:48 -0800 Subject: [PATCH 18/22] more testing --- .github/workflows/docker.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3fdef5364e..88fd815b10 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -53,7 +53,10 @@ jobs: run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" - if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" + - id: out + run: echo "out=${{ join(steps.*.outputs.R_VERSION, '') }}" >> "$GITHUB_OUTPUT" outputs: + TEST_OUTPUT: ${{ steps.out.outputs.out }} R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} TEST_CONST: 3 From 658452010e0dab41c1a9733ab61483016a9d52cb Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:34:34 -0800 Subject: [PATCH 19/22] flailing now. empty strings? --- .github/workflows/docker.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 88fd815b10..b61b114acd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -53,10 +53,16 @@ jobs: run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" - if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" + - id: addstr + run: echo "R_VER=RRR${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" - id: out run: echo "out=${{ join(steps.*.outputs.R_VERSION, '') }}" >> "$GITHUB_OUTPUT" + - id: out2 + run: echo "out=RRR${{ join(steps.*.outputs.R_VERSION, '') }}" >> "$GITHUB_OUTPUT" outputs: TEST_OUTPUT: ${{ steps.out.outputs.out }} + TEST_OUTPUT2: ${{ steps.out2.outputs.out }} + TEST_OUTPUT3: ${{ steps.addstr.outputs.R_VER }} R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} TEST_CONST: 3 From de350997b27b66c998760c9dcb09199188026be0 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:38:49 -0800 Subject: [PATCH 20/22] ids for all steps --- .github/workflows/docker.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index b61b114acd..fa1e42b7bf 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -41,17 +41,23 @@ jobs: rversion: runs-on: ubuntu-latest steps: - - if: github.event.schedule == '30 1 * * 1' + - id: mon + if: github.event.schedule == '30 1 * * 1' run: echo "R_VERSION=devel" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 2' + - id: tue + if: github.event.schedule == '30 1 * * 2' run: echo "R_VERSION=4.4" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 3' + - id: wed + if: github.event.schedule == '30 1 * * 3' run: echo "R_VERSION=4.3" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 4' + - id: thu + if: github.event.schedule == '30 1 * * 4' run: echo "R_VERSION=4.2" >> "$GITHUB_OUTPUT" - - if: github.event.schedule == '30 1 * * 5' + - id: fri + if: github.event.schedule == '30 1 * * 5' run: echo "R_VERSION=4.1" >> "$GITHUB_OUTPUT" - - if: github.event_name != 'schedule' + - id: default + if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" - id: addstr run: echo "R_VER=RRR${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" From c9d0d9f4f2aa4859181a54404a4fb06c7daf7314 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:42:26 -0800 Subject: [PATCH 21/22] looks like steps without id are not included in steps.* --- .github/workflows/docker.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index fa1e42b7bf..039262dd60 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -59,18 +59,8 @@ jobs: - id: default if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" - - id: addstr - run: echo "R_VER=RRR${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" - - id: out - run: echo "out=${{ join(steps.*.outputs.R_VERSION, '') }}" >> "$GITHUB_OUTPUT" - - id: out2 - run: echo "out=RRR${{ join(steps.*.outputs.R_VERSION, '') }}" >> "$GITHUB_OUTPUT" outputs: - TEST_OUTPUT: ${{ steps.out.outputs.out }} - TEST_OUTPUT2: ${{ steps.out2.outputs.out }} - TEST_OUTPUT3: ${{ steps.addstr.outputs.R_VER }} R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} - TEST_CONST: 3 # ---------------------------------------------------------------------- # depends image has all the dependencies installed From 85adb5e45d3bf26ff8683a56e2e7088e53703263 Mon Sep 17 00:00:00 2001 From: Chris Black Date: Thu, 20 Feb 2025 15:55:33 -0800 Subject: [PATCH 22/22] Cautionary note for future coders --- .github/workflows/docker.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 039262dd60..67061997c5 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -60,6 +60,8 @@ jobs: if: github.event_name != 'schedule' run: echo "R_VERSION=${{ github.event.inputs.r_version || '4.1' }}" >> "$GITHUB_OUTPUT" outputs: + # Note: "steps.*" seems to mean "all step ids", not "all steps" + # If seeing weird results here, check that all steps above have an id set. R_VERSION: ${{ join(steps.*.outputs.R_VERSION, '') }} # ----------------------------------------------------------------------