From 0c6f8dc84ef1b99070db178efcfad9625ab7474d Mon Sep 17 00:00:00 2001 From: robinhasse Date: Mon, 5 Dec 2022 12:20:50 +0100 Subject: [PATCH] Explicit colours for buildings variables. --- .Rbuildignore | 1 + .buildlibrary | 2 +- .pre-commit-config.yaml | 2 +- .zenodo.json | 2 +- DESCRIPTION | 6 +++--- Makefile | 22 ++++++++++++++++++++++ README.md | 6 +++--- inst/extdata/plotstyle.csv | 10 ++++++++++ 8 files changed, 42 insertions(+), 9 deletions(-) create mode 100644 Makefile diff --git a/.Rbuildignore b/.Rbuildignore index 5daba60..14d4e07 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,3 +10,4 @@ ^.lintr$ ^tests/.lintr$ ^vignettes/.lintr$ +^Makefile$ diff --git a/.buildlibrary b/.buildlibrary index be27274..f7461c6 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,4 +1,4 @@ -ValidationKey: '26879684' +ValidationKey: '27063400' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7fd3cf2..9dfc157 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: '^tests/testthat/_snaps/.*$' repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-case-conflict - id: check-json diff --git a/.zenodo.json b/.zenodo.json index 8808bed..9ab01c1 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "mip: Comparison of multi-model runs", - "version": "0.139.1", + "version": "0.140.0", "description": "

Package contains generic functions to produce comparison\n plots of multi-model runs.<\/p>", "creators": [ { diff --git a/DESCRIPTION b/DESCRIPTION index 4df00b4..9d76204 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Type: Package Package: mip Title: Comparison of multi-model runs -Version: 0.139.1 -Date: 2022-11-28 +Version: 0.140.0 +Date: 2022-12-05 Authors@R: c( person("David", "Klein", , "dklein@pik-potsdam.de", role = c("aut", "cre")), person("Jan Philipp", "Dietrich", , "dietrich@pik-potsdam.de", role = "aut"), @@ -46,4 +46,4 @@ VignetteBuilder: knitr Encoding: UTF-8 LazyData: yes -RoxygenNote: 7.2.1 +RoxygenNote: 7.2.2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d915004 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.PHONY: help build check test lint format +.DEFAULT_GOAL = help + +help: ## Show this help. + @sed -e '/##/ !d' -e '/sed/ d' -e 's/^\([^ ]*\) *##\(.*\)/\1^\2/' \ + $(MAKEFILE_LIST) | column -ts '^' + +build: ## Build the package using lucode2::buildLibrary() + Rscript -e 'lucode2::buildLibrary()' + +check: ## Build documentation and vignettes, run testthat tests, + ## and check if code etiquette is followed using lucode2::check() + Rscript -e 'lucode2::check()' + +test: ## Run testthat tests + Rscript -e 'devtools::test(show_report = TRUE)' + +lint: ## Check if code etiquette is followed using lucode2::lint() + Rscript -e 'lucode2::lint()' + +format: ## Apply auto-formatting to changed files and lint afterwards + Rscript -e 'lucode2::autoFormat()' diff --git a/README.md b/README.md index 0ca6a6f..39f8c68 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Comparison of multi-model runs -R package **mip**, version **0.139.1** +R package **mip**, version **0.140.0** [![CRAN status](https://www.r-pkg.org/badges/version/mip)](https://cran.r-project.org/package=mip) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1158586.svg)](https://doi.org/10.5281/zenodo.1158586) [![R build status](https://github.com/pik-piam/mip/workflows/check/badge.svg)](https://github.com/pik-piam/mip/actions) [![codecov](https://codecov.io/gh/pik-piam/mip/branch/master/graph/badge.svg)](https://app.codecov.io/gh/pik-piam/mip) [![r-universe](https://pik-piam.r-universe.dev/badges/mip)](https://pik-piam.r-universe.dev/ui#builds) @@ -47,7 +47,7 @@ In case of questions / problems please contact David Klein . +Klein D, Dietrich J, Baumstark L, Humpenoeder F, Stevanovic M, Wirth S, Führlich P (2022). _mip: Comparison of multi-model runs_. doi:10.5281/zenodo.1158586 , R package version 0.140.0, . A BibTeX entry for LaTeX users is @@ -56,7 +56,7 @@ A BibTeX entry for LaTeX users is title = {mip: Comparison of multi-model runs}, author = {David Klein and Jan Philipp Dietrich and Lavinia Baumstark and Florian Humpenoeder and Miodrag Stevanovic and Stephen Wirth and Pascal Führlich}, year = {2022}, - note = {R package version 0.139.1}, + note = {R package version 0.140.0}, doi = {10.5281/zenodo.1158586}, url = {https://github.com/pik-piam/mip}, } diff --git a/inst/extdata/plotstyle.csv b/inst/extdata/plotstyle.csv index 9d7b863..036a35a 100644 --- a/inst/extdata/plotstyle.csv +++ b/inst/extdata/plotstyle.csv @@ -435,6 +435,16 @@ Final Energy|Residential and Commercial|Liquids;Liquids;#0000cc;; FE|Residential and Commercial|Liquids;Liquids;#0000cc;; Final Energy|Residential and Commercial|Other;Other;#7f7f7f;; FE|Residential and Commercial|Other;Other;#7f7f7f;; +non-Heating|Electricity|Conventional;non-heating Electricity;#ffb200;; +Heating|Solids;Solids;#191919;; +Heating|Liquids;Liquids;#0000cc;; +Heating|Gases;Gases;#999966;; +Heating|District Heating;District heating;#cc0000;; +Heating|Electricity|Resistance;Resistive electric heating;#f58231;; +Heating|Electricity|Heat pump;Heat pumps;#3cb44b;; +Heating|Hydrogen;Hydrogen;#66cccc;; +Electricity|Resistance;Resistive electric heating;#f58231;; +Electricity|Heat pump;Heat pumps;#3cb44b;; BAU_Nash;BAU Nash;#0c0c0c;; BAU_Nash_l;BAU Nash low;#0c0c0c;; BAU_Nash_m2;BAU Nash m2;#0c0c0c;;