From 7aae097882df8d54c07f81ae5330aad3673556f8 Mon Sep 17 00:00:00 2001 From: hsonne Date: Tue, 22 Jul 2025 10:28:05 +0200 Subject: [PATCH 1/4] Set non-development version number, load sf --- DESCRIPTION | 2 +- README.md | 4 ++-- vignettes/tutorial.Rmd | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 5cfd679b..b83892d0 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: kwb.rabimo Title: R Implementation of Water Balance Model Abimo -Version: 2.1.0.9000 +Version: 2.1.0 Authors@R: c( person("Hauke", "Sonnenberg", , "hauke.sonnenberg@kompetenz-wasser.de", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9134-2871")), diff --git a/README.md b/README.md index b68cb666..0b81e998 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ R-implementation of a simple water balance model for urban areas, within [BMBF](https://www.bmbf.de/EN/Home/home_node.html)-funded research project [AMAREX](https://amarex-projekt.de/en). -For our Tutorial, click [here](https://kwb-r.github.io/kwb.rabimo/dev/articles/tutorial.html) (see also Documentation below). +For our Tutorial, click [here](https://kwb-r.github.io/kwb.rabimo/articles/tutorial.html) (see also Documentation below). ## Installation @@ -76,7 +76,7 @@ kwb.rabimo::calculate_delta_w( ### R-package kwb.rabimo - Package Home: https://kwb-r.github.io/kwb.rabimo -- Tutorial: https://kwb-r.github.io/kwb.rabimo/dev/articles/tutorial.html +- Tutorial: https://kwb-r.github.io/kwb.rabimo/articles/tutorial.html ### Original software "Wasserhaushaltsmodell Berlin ABIMO 3.2" diff --git a/vignettes/tutorial.Rmd b/vignettes/tutorial.Rmd index 02c06f78..8980b3d5 100644 --- a/vignettes/tutorial.Rmd +++ b/vignettes/tutorial.Rmd @@ -128,6 +128,9 @@ we can plot the spatial distribution of a variable (e.g. the annual precipitation) in the form of a map: ```{r, fig.width = FIGURE_WIDTH} +# Load the sf package to allow for geo plotting +library(sf) + # Provide a subset of the data representing a zoom into the centre of Berlin berlin_zoom <- kwb.rabimo::crop_box(abimo_inputs$data, xoffset = 0.35, From b36de20619e5b78fea20a5a8a0191e9813003064 Mon Sep 17 00:00:00 2001 From: Hauke Sonnenberg Date: Wed, 23 Jul 2025 01:39:16 +0200 Subject: [PATCH 2/4] Aktualisieren von R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 40 ++++++++++++++---------------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index a5a5ce41..bcc4b136 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -23,7 +23,7 @@ jobs: matrix: config: - {os: macOS-latest, r: 'release'} - - {os: ubuntu-22.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-22.04, r: 'release'} - {os: windows-latest, r: 'devel'} - {os: windows-latest, r: 'oldrel'} - {os: windows-latest, r: 'release'} @@ -31,58 +31,54 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} R_REMOTES_NO_ERRORS_FROM_WARNINGS: true - RSPM: ${{ matrix.config.rspm }} steps: - - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@v2 + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup R + uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.config.r }} use-public-rspm: true - - uses: r-lib/actions/setup-pandoc@v2 + - name: Setup Pandoc + uses: r-lib/actions/setup-pandoc@v2 - name: Query dependencies + shell: Rscript {0} run: | install.packages('remotes') - saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2) - shell: Rscript {0} + deps <- remotes::dev_package_deps(dependencies = TRUE) + saveRDS(deps, "depends.Rds", version = 2) - name: Cache R packages if: runner.os != 'Windows' uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} - key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('depends.Rds') }} - restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3- + key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }} + restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}- - name: Install system dependencies on Linux if: runner.os == 'Linux' run: | sudo apt-get -y install cmake libssl-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libudunits2-dev - - name: Install system dependencies - if: runner.os == 'Linux (no, skip!)' - env: - RHUB_PLATFORM: linux-x86_64-ubuntu-gcc - run: | - Rscript -e "remotes::install_github('r-hub/sysreqs')" - sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))") - sudo -s eval "$sysreqs" - - name: Install dependencies + - name: Install R package dependencies + shell: Rscript {0} run: | remotes::install_deps(dependencies = TRUE) remotes::install_cran("rcmdcheck") - shell: Rscript {0} - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check") shell: Rscript {0} - + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check") + - name: Upload check results if: failure() uses: actions/upload-artifact@main with: name: ${{ runner.os }}-r${{ matrix.config.r }}-results - path: check + path: check \ No newline at end of file From 630b9fc9e8175ff1ebe63d2a817859ddbd1871a1 Mon Sep 17 00:00:00 2001 From: Hauke Sonnenberg Date: Wed, 23 Jul 2025 01:42:24 +0200 Subject: [PATCH 3/4] Aktualisieren von R-CMD-check.yaml --- .github/workflows/R-CMD-check.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index bcc4b136..cd17a335 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -64,7 +64,7 @@ jobs: - name: Install system dependencies on Linux if: runner.os == 'Linux' run: | - sudo apt-get -y install cmake libssl-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libudunits2-dev + sudo apt-get install -y libgdal-dev libudunits2-dev - name: Install R package dependencies shell: Rscript {0} From fb7918d66f3c38d11ad247a27b24917e08d8280d Mon Sep 17 00:00:00 2001 From: Hauke Sonnenberg Date: Wed, 23 Jul 2025 01:50:22 +0200 Subject: [PATCH 4/4] Try without library(sf) --- vignettes/tutorial.Rmd | 3 --- 1 file changed, 3 deletions(-) diff --git a/vignettes/tutorial.Rmd b/vignettes/tutorial.Rmd index 8980b3d5..02c06f78 100644 --- a/vignettes/tutorial.Rmd +++ b/vignettes/tutorial.Rmd @@ -128,9 +128,6 @@ we can plot the spatial distribution of a variable (e.g. the annual precipitation) in the form of a map: ```{r, fig.width = FIGURE_WIDTH} -# Load the sf package to allow for geo plotting -library(sf) - # Provide a subset of the data representing a zoom into the centre of Berlin berlin_zoom <- kwb.rabimo::crop_box(abimo_inputs$data, xoffset = 0.35,