Skip to content

Commit 509b69f

Browse files
authored
Merge pull request #121 from dklein-pik/master
Bugfix: move definition of variable outside the if-clause
2 parents 197021b + 35c41c4 commit 509b69f

File tree

7 files changed

+13
-12
lines changed

7 files changed

+13
-12
lines changed

.buildlibrary

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ValidationKey: '4402640'
1+
ValidationKey: '4433039'
22
AcceptedWarnings:
33
- 'Warning: package ''.*'' was built under R version'
44
- 'Warning: namespace ''.*'' is not available and has been replaced'
@@ -7,3 +7,4 @@ AcceptedNotes: unable to verify current time
77
AutocreateReadme: yes
88
allowLinterWarnings: yes
99
enforceVersionUpdate: no
10+
skipCoverage: no

.github/workflows/check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ jobs:
6363
shell: Rscript {0}
6464
run: |
6565
nonDummyTests <- setdiff(list.files("./tests/testthat/"), c("test-dummy.R", "_snaps"))
66-
if(length(nonDummyTests) > 0) covr::codecov(quiet = FALSE)
66+
if(length(nonDummyTests) > 0 && !lucode2:::loadBuildLibraryConfig()[["skipCoverage"]]) covr::codecov(quiet = FALSE)
6767
env:
6868
NOT_CRAN: "true"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exclude: '^tests/testthat/_snaps/.*$'
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
6+
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
77
hooks:
88
- id: check-case-conflict
99
- id: check-json
@@ -15,7 +15,7 @@ repos:
1515
- id: mixed-line-ending
1616

1717
- repo: https://github.com/lorenzwalthert/precommit
18-
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
18+
rev: 3b70240796cdccbe1474b0176560281aaded97e6 # frozen: v0.4.3.9003
1919
hooks:
2020
- id: parsable-R
2121
- id: deps-in-desc

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ cff-version: 1.2.0
22
message: If you use this software, please cite it using the metadata from this file.
33
type: software
44
title: 'modelstats: Run Analysis Tools'
5-
version: 0.22.0
6-
date-released: '2024-10-16'
5+
version: 0.22.1
6+
date-released: '2024-12-02'
77
abstract: A collection of tools to analyze model runs.
88
authors:
99
- family-names: Giannousakis

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: modelstats
22
Type: Package
33
Title: Run Analysis Tools
4-
Version: 0.22.0
5-
Date: 2024-10-16
4+
Version: 0.22.1
5+
Date: 2024-12-02
66
Authors@R: c(
77
person("Anastasis", "Giannousakis", email = "giannou@pik-potsdam.de", role = c("aut","cre")),
88
person("Oliver", "Richters", role = "aut")

R/modeltests.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,9 @@ evaluateRuns <- function(model, mydir, compScen, email, mattermostToken, gitdir,
315315
! rownames(gRS) %in% basename(cfg$results_folder)) %>% # but not the current run
316316
rownames()
317317
if (length(sameRuns) > 0) {
318+
lastRun <- max(sameRuns[sameRuns < basename(cfg$results_folder)])
318319
# compare runtime for converged run only (skip if not_converged)
319320
if(grsi[, "Conv"] %in% c("converged", "converged (had INFES)")) {
320-
lastRun <- max(sameRuns[sameRuns < basename(cfg$results_folder)])
321321
currentRunTime <- as.numeric(.readRuntime("."), units = "hours")
322322
lastRunTime <- as.numeric(.readRuntime(paste0("../", lastRun)), units = "hours")
323323
if (length(currentRunTime) > 0 && length(lastRunTime) > 0 && currentRunTime > (1.25 * lastRunTime)) {

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Run Analysis Tools
22

3-
R package **modelstats**, version **0.22.0**
3+
R package **modelstats**, version **0.22.1**
44

55
[![CRAN status](https://www.r-pkg.org/badges/version/modelstats)](https://cran.r-project.org/package=modelstats) [![R build status](https://github.com/pik-piam/modelstats/workflows/check/badge.svg)](https://github.com/pik-piam/modelstats/actions) [![codecov](https://codecov.io/gh/pik-piam/modelstats/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/modelstats) [![r-universe](https://pik-piam.r-universe.dev/badges/modelstats)](https://pik-piam.r-universe.dev/builds)
66

@@ -47,7 +47,7 @@ In case of questions / problems please contact Anastasis Giannousakis <giannou@p
4747

4848
To cite package **modelstats** in publications use:
4949

50-
Giannousakis A, Richters O (2024). _modelstats: Run Analysis Tools_. R package version 0.22.0, <https://github.com/pik-piam/modelstats>.
50+
Giannousakis A, Richters O (2024). _modelstats: Run Analysis Tools_. R package version 0.22.1, <https://github.com/pik-piam/modelstats>.
5151

5252
A BibTeX entry for LaTeX users is
5353

@@ -56,7 +56,7 @@ A BibTeX entry for LaTeX users is
5656
title = {modelstats: Run Analysis Tools},
5757
author = {Anastasis Giannousakis and Oliver Richters},
5858
year = {2024},
59-
note = {R package version 0.22.0},
59+
note = {R package version 0.22.1},
6060
url = {https://github.com/pik-piam/modelstats},
6161
}
6262
```

0 commit comments

Comments
 (0)