From d1cb58415d6b6e7b34599c7f04c5408814766150 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 16 Oct 2024 12:20:15 +0200 Subject: [PATCH 1/5] move mr packages to Imports --- DESCRIPTION | 8 ++++---- R/madrat.R | 17 ++++++++++------- R/zzz.R | 6 ------ 3 files changed, 14 insertions(+), 17 deletions(-) delete mode 100644 R/zzz.R diff --git a/DESCRIPTION b/DESCRIPTION index 99f93a38..f9aed8fc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,12 +38,8 @@ Description: The mrremind packages contains data preprocessing for the License: LGPL-3 | file LICENSE URL: https://github.com/pik-piam/mrremind Depends: - edgeTransport (>= 1.5.5), - GDPuc (>= 1.3.0), madrat (>= 3.7.1), magclass (>= 6.16.1), - mrcommons (>= 1.44.12), - mrdrivers (>= 2.0.0), R (>= 2.10.0) Imports: assertr, @@ -52,10 +48,14 @@ Imports: countrycode, data.table, dplyr, + edgeTransport (>= 1.5.5), + GDPuc (>= 1.3.0), ggplot2, Hmisc, luscale, magrittr, + mrcommons (>= 1.44.12), + mrdrivers (>= 2.0.0), nnls, purrr, quitte (>= 0.3105.0), diff --git a/R/madrat.R b/R/madrat.R index 66c537ad..da4dac67 100644 --- a/R/madrat.R +++ b/R/madrat.R @@ -1,14 +1,17 @@ - -.onAttach <- function(libname, pkgname) { - madrat::madratAttach(pkgname) +.onLoad <- function(libname, pkgname) { + madrat::madratAttach(c(pkgname, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) + madrat::setConfig( + nolabels = c(madrat::getConfig("nolabels"), "REMIND", "VALIDATIONREMIND") + ) } -.onDetach <- function(libpath) { - madrat::madratDetach(libpath) + +.onUnload <- function(libpath) { + madrat::madratDetach(c(libpath, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) } # redirect standard messaging functions to vcat -cat <- function(...) vcat(1, ...) +cat <- function(...) vcat(1, ...) message <- function(...) vcat(1, ...) warning <- function(...) vcat(0, ...) -stop <- function(...) vcat(-1, ...) +stop <- function(...) vcat(-1, ...) diff --git a/R/zzz.R b/R/zzz.R deleted file mode 100644 index 7038624b..00000000 --- a/R/zzz.R +++ /dev/null @@ -1,6 +0,0 @@ -.onLoad <- function(libname, pkgname) { - madrat::setConfig( - nolabels = c(madrat::getConfig("nolabels"), "REMIND", "VALIDATIONREMIND"), - .cfgchecks = FALSE, .verbose = FALSE - ) -} From 88028594c7dc5849084e33cfe3a396dd0a4efef7 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 16 Oct 2024 13:55:00 +0200 Subject: [PATCH 2/5] increment version --- .buildlibrary | 10 ++-------- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- NAMESPACE | 4 ---- R/imports.R | 2 +- R/madrat.R | 3 ++- README.md | 6 +++--- 7 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index dd0d44a5..b5417ea1 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,15 +1,9 @@ -ValidationKey: '38795512' +ValidationKey: '386431720' AcceptedWarnings: -- 'Warning: package ''.*'' was built under R version' -- 'Warning: namespace ''.*'' is not available and has been replaced' -- 'Warning: multiple methods tables found for ‘direction’' -- 'Warning: multiple methods tables found for ‘gridDistance’' -- Imports includes .* non-default packages. - Invalid URL: .* AcceptedNotes: -- unable to verify current time - Imports includes .* non-default packages. -- installed size is +- All declared Imports should be used. AutocreateReadme: yes allowLinterWarnings: yes enforceVersionUpdate: yes diff --git a/CITATION.cff b/CITATION.cff index 791be7e6..d157e78b 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: 'mrremind: MadRat REMIND Input Data Package' -version: 0.193.9 -date-released: '2024-10-12' +version: 0.193.10 +date-released: '2024-10-16' abstract: The mrremind packages contains data preprocessing for the REMIND model. authors: - family-names: Baumstark diff --git a/DESCRIPTION b/DESCRIPTION index f9aed8fc..b332232c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrremind Title: MadRat REMIND Input Data Package -Version: 0.193.9 -Date: 2024-10-12 +Version: 0.193.10 +Date: 2024-10-16 Authors@R: c( person("Lavinia", "Baumstark", , "lavinia@pik-potsdam.de", role = c("aut", "cre")), person("Renato", "Rodrigues", role = "aut"), diff --git a/NAMESPACE b/NAMESPACE index 51c7da3a..6ec30e17 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -77,12 +77,8 @@ export(toolCubicFunctionDisaggregate) export(toolFillEU34Countries) export(toolSolarFunctionAggregate) export(tool_expand_tibble) -import(GDPuc) -import(edgeTransport) import(madrat) import(magclass) -import(mrcommons) -import(mrdrivers) importFrom(GDPuc,convertGDP) importFrom(assertr,assert) importFrom(assertr,in_set) diff --git a/R/imports.R b/R/imports.R index 82c34cbc..318c0d54 100644 --- a/R/imports.R +++ b/R/imports.R @@ -1,4 +1,4 @@ # Generated by lucode2: do not edit by hand -#' @import edgeTransport GDPuc madrat magclass mrcommons mrdrivers +#' @import madrat magclass NULL diff --git a/R/madrat.R b/R/madrat.R index da4dac67..0e95ef17 100644 --- a/R/madrat.R +++ b/R/madrat.R @@ -1,7 +1,8 @@ .onLoad <- function(libname, pkgname) { madrat::madratAttach(c(pkgname, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) madrat::setConfig( - nolabels = c(madrat::getConfig("nolabels"), "REMIND", "VALIDATIONREMIND") + nolabels = c("REMIND", "VALIDATIONREMIND"), + .cfgchecks = FALSE, .verbose = FALSE ) } diff --git a/README.md b/README.md index 3b5e7853..2e8fd3fb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.193.9** +R package **mrremind**, version **0.193.10** [![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Lavinia Baumstark . +Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R, Fuchs S, Mandaroux R, Koch J (2024). _mrremind: MadRat REMIND Input Data Package_. R package version 0.193.10, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrremind: MadRat REMIND Input Data Package}, author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke and Pascal Weigmann and Oliver Richters and Robin Hasse and Sophie Fuchs and Rahel Mandaroux and Johannes Koch}, year = {2024}, - note = {R package version 0.193.9}, + note = {R package version 0.193.10}, url = {https://github.com/pik-piam/mrremind}, } ``` From dbc112d1f99aa5c5275ebb2bba5c4e13c00e7f26 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Wed, 16 Oct 2024 17:57:24 +0200 Subject: [PATCH 3/5] move madrat and magclass to Imports --- DESCRIPTION | 4 ++-- R/madrat.R | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index b332232c..083ae9d9 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -38,8 +38,6 @@ Description: The mrremind packages contains data preprocessing for the License: LGPL-3 | file LICENSE URL: https://github.com/pik-piam/mrremind Depends: - madrat (>= 3.7.1), - magclass (>= 6.16.1), R (>= 2.10.0) Imports: assertr, @@ -53,6 +51,8 @@ Imports: ggplot2, Hmisc, luscale, + madrat (>= 3.7.1), + magclass (>= 6.16.1), magrittr, mrcommons (>= 1.44.12), mrdrivers (>= 2.0.0), diff --git a/R/madrat.R b/R/madrat.R index 0e95ef17..7aac83f6 100644 --- a/R/madrat.R +++ b/R/madrat.R @@ -1,5 +1,5 @@ .onLoad <- function(libname, pkgname) { - madrat::madratAttach(c(pkgname, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) + madrat::madratAttach(c(pkgname, "madrat", "magclass", "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) madrat::setConfig( nolabels = c("REMIND", "VALIDATIONREMIND"), .cfgchecks = FALSE, .verbose = FALSE @@ -8,7 +8,7 @@ .onUnload <- function(libpath) { - madrat::madratDetach(c(libpath, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) + madrat::madratDetach(c(libpath, "madrat", "magclass", "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) } # redirect standard messaging functions to vcat From 44815eba30160f2a1b0e58faf447ebfa7b3021f0 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Thu, 17 Oct 2024 12:24:14 +0200 Subject: [PATCH 4/5] remove madrat and magclass from attach --- R/madrat.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/madrat.R b/R/madrat.R index 7aac83f6..0e95ef17 100644 --- a/R/madrat.R +++ b/R/madrat.R @@ -1,5 +1,5 @@ .onLoad <- function(libname, pkgname) { - madrat::madratAttach(c(pkgname, "madrat", "magclass", "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) + madrat::madratAttach(c(pkgname, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) madrat::setConfig( nolabels = c("REMIND", "VALIDATIONREMIND"), .cfgchecks = FALSE, .verbose = FALSE @@ -8,7 +8,7 @@ .onUnload <- function(libpath) { - madrat::madratDetach(c(libpath, "madrat", "magclass", "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) + madrat::madratDetach(c(libpath, "edgeTransport", "GDPuc", "mrcommons", "mrdrivers")) } # redirect standard messaging functions to vcat From 3ae5ec17cb4c24108a0378845b8abdae7a03d970 Mon Sep 17 00:00:00 2001 From: Falk Benke Date: Thu, 17 Oct 2024 14:43:23 +0200 Subject: [PATCH 5/5] increment version --- .buildlibrary | 2 +- CITATION.cff | 4 ++-- DESCRIPTION | 4 ++-- README.md | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.buildlibrary b/.buildlibrary index b5417ea1..121bdb9a 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '386431720' +ValidationKey: '38825220' AcceptedWarnings: - Invalid URL: .* AcceptedNotes: diff --git a/CITATION.cff b/CITATION.cff index d157e78b..b846b619 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -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: 'mrremind: MadRat REMIND Input Data Package' -version: 0.193.10 -date-released: '2024-10-16' +version: 0.194.0 +date-released: '2024-10-17' abstract: The mrremind packages contains data preprocessing for the REMIND model. authors: - family-names: Baumstark diff --git a/DESCRIPTION b/DESCRIPTION index 083ae9d9..823ed99c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mrremind Title: MadRat REMIND Input Data Package -Version: 0.193.10 -Date: 2024-10-16 +Version: 0.194.0 +Date: 2024-10-17 Authors@R: c( person("Lavinia", "Baumstark", , "lavinia@pik-potsdam.de", role = c("aut", "cre")), person("Renato", "Rodrigues", role = "aut"), diff --git a/README.md b/README.md index 2e8fd3fb..e6beac73 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MadRat REMIND Input Data Package -R package **mrremind**, version **0.193.10** +R package **mrremind**, version **0.194.0** [![CRAN status](https://www.r-pkg.org/badges/version/mrremind)](https://cran.r-project.org/package=mrremind) [![R build status](https://github.com/pik-piam/mrremind/workflows/check/badge.svg)](https://github.com/pik-piam/mrremind/actions) [![codecov](https://codecov.io/gh/pik-piam/mrremind/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mrremind) [![r-universe](https://pik-piam.r-universe.dev/badges/mrremind)](https://pik-piam.r-universe.dev/builds) @@ -39,7 +39,7 @@ In case of questions / problems please contact Lavinia Baumstark . +Baumstark L, Rodrigues R, Levesque A, Oeser J, Bertram C, Mouratiadou I, Malik A, Schreyer F, Soergel B, Rottoli M, Mishra A, Dirnaichner A, Pehl M, Giannousakis A, Klein D, Strefler J, Feldhaus L, Brecha R, Rauner S, Dietrich J, Bi S, Benke F, Weigmann P, Richters O, Hasse R, Fuchs S, Mandaroux R, Koch J (2024). _mrremind: MadRat REMIND Input Data Package_. R package version 0.194.0, . A BibTeX entry for LaTeX users is @@ -48,7 +48,7 @@ A BibTeX entry for LaTeX users is title = {mrremind: MadRat REMIND Input Data Package}, author = {Lavinia Baumstark and Renato Rodrigues and Antoine Levesque and Julian Oeser and Christoph Bertram and Ioanna Mouratiadou and Aman Malik and Felix Schreyer and Bjoern Soergel and Marianna Rottoli and Abhijeet Mishra and Alois Dirnaichner and Michaja Pehl and Anastasis Giannousakis and David Klein and Jessica Strefler and Lukas Feldhaus and Regina Brecha and Sebastian Rauner and Jan Philipp Dietrich and Stephen Bi and Falk Benke and Pascal Weigmann and Oliver Richters and Robin Hasse and Sophie Fuchs and Rahel Mandaroux and Johannes Koch}, year = {2024}, - note = {R package version 0.193.10}, + note = {R package version 0.194.0}, url = {https://github.com/pik-piam/mrremind}, } ```