Skip to content

Commit

Permalink
Merge pull request #121 from dklein-pik/master
Browse files Browse the repository at this point in the history
Bugfix: move definition of variable outside the if-clause
  • Loading branch information
dklein-pik authored Dec 2, 2024
2 parents 197021b + 35c41c4 commit 509b69f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .buildlibrary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ValidationKey: '4402640'
ValidationKey: '4433039'
AcceptedWarnings:
- 'Warning: package ''.*'' was built under R version'
- 'Warning: namespace ''.*'' is not available and has been replaced'
Expand All @@ -7,3 +7,4 @@ AcceptedNotes: unable to verify current time
AutocreateReadme: yes
allowLinterWarnings: yes
enforceVersionUpdate: no
skipCoverage: no
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ jobs:
shell: Rscript {0}
run: |
nonDummyTests <- setdiff(list.files("./tests/testthat/"), c("test-dummy.R", "_snaps"))
if(length(nonDummyTests) > 0) covr::codecov(quiet = FALSE)
if(length(nonDummyTests) > 0 && !lucode2:::loadBuildLibraryConfig()[["skipCoverage"]]) covr::codecov(quiet = FALSE)
env:
NOT_CRAN: "true"
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exclude: '^tests/testthat/_snaps/.*$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # frozen: v4.6.0
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-case-conflict
- id: check-json
Expand All @@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/lorenzwalthert/precommit
rev: bae853d82da476eee0e0a57960ee6b741a3b3fb7 # frozen: v0.4.3
rev: 3b70240796cdccbe1474b0176560281aaded97e6 # frozen: v0.4.3.9003
hooks:
- id: parsable-R
- id: deps-in-desc
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using the metadata from this file.
type: software
title: 'modelstats: Run Analysis Tools'
version: 0.22.0
date-released: '2024-10-16'
version: 0.22.1
date-released: '2024-12-02'
abstract: A collection of tools to analyze model runs.
authors:
- family-names: Giannousakis
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: modelstats
Type: Package
Title: Run Analysis Tools
Version: 0.22.0
Date: 2024-10-16
Version: 0.22.1
Date: 2024-12-02
Authors@R: c(
person("Anastasis", "Giannousakis", email = "[email protected]", role = c("aut","cre")),
person("Oliver", "Richters", role = "aut")
Expand Down
2 changes: 1 addition & 1 deletion R/modeltests.R
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,9 @@ evaluateRuns <- function(model, mydir, compScen, email, mattermostToken, gitdir,
! rownames(gRS) %in% basename(cfg$results_folder)) %>% # but not the current run
rownames()
if (length(sameRuns) > 0) {
lastRun <- max(sameRuns[sameRuns < basename(cfg$results_folder)])
# compare runtime for converged run only (skip if not_converged)
if(grsi[, "Conv"] %in% c("converged", "converged (had INFES)")) {
lastRun <- max(sameRuns[sameRuns < basename(cfg$results_folder)])
currentRunTime <- as.numeric(.readRuntime("."), units = "hours")
lastRunTime <- as.numeric(.readRuntime(paste0("../", lastRun)), units = "hours")
if (length(currentRunTime) > 0 && length(lastRunTime) > 0 && currentRunTime > (1.25 * lastRunTime)) {
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run Analysis Tools

R package **modelstats**, version **0.22.0**
R package **modelstats**, version **0.22.1**

[![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)

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

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

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

A BibTeX entry for LaTeX users is

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

0 comments on commit 509b69f

Please sign in to comment.