diff --git a/.github/workflows/scheduled-R-CMD-check.yaml b/.github/workflows/R-CMD-check-dev.yaml similarity index 95% rename from .github/workflows/scheduled-R-CMD-check.yaml rename to .github/workflows/R-CMD-check-dev.yaml index df6e05f..5fc6804 100644 --- a/.github/workflows/scheduled-R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check-dev.yaml @@ -1,11 +1,18 @@ # For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. # https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions on: - schedule: - - cron: "0 6 * * *" + push: + branches: + - dev + pull_request: + branches: + - dev + +name: R-CMD-check-dev jobs: - R-CMD-check: + R-CMD-check-dev: + runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) diff --git a/DESCRIPTION b/DESCRIPTION index bcbace0..b844861 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: intensegRid Type: Package Title: R Wrapper for the Carbon Intensity API -Version: 0.1.1 +Version: 0.1.2 Author: Kasia Kulma Maintainer: Kasia Kulma Description: Electricity is not made equal and it vary in its carbon footprint (or carbon intensity) @@ -13,7 +13,7 @@ Encoding: UTF-8 LazyData: TRUE URL: https://github.com/KKulma/intensegRid, https://kkulma.github.io/intensegRid/articles/intro-to-carbon-intensity.html BugReports: https://github.com/KKulma/intensegRid/issues -RoxygenNote: 7.1.1 +RoxygenNote: 7.2.1 Depends: R (>= 2.10) Imports: diff --git a/NAMESPACE b/NAMESPACE index bab11d2..c4911ea 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -9,4 +9,4 @@ export(get_postcode_ci) export(get_regional_ci) export(get_stats) importFrom(magrittr,"%>%") -importFrom(rlang,.data) +importFrom(purrr,map) diff --git a/R/intensity.R b/R/intensity.R index b112c7b..7d74b6b 100644 --- a/R/intensity.R +++ b/R/intensity.R @@ -6,6 +6,7 @@ #' @return a data.frame with 1/2-hourly carbon intensity data for specified time period #' @export #' @importFrom rlang .data +#' @importFrom purrr map #' #' @examples \dontrun{ #' get_british_ci() diff --git a/renv.lock b/renv.lock index 348b9cb..77ca825 100644 --- a/renv.lock +++ b/renv.lock @@ -1,6 +1,6 @@ { "R": { - "Version": "4.0.3", + "Version": "4.2.1", "Repositories": [ { "Name": "CRAN", @@ -11,17 +11,17 @@ "Packages": { "R6": { "Package": "R6", - "Version": "2.5.0", + "Version": "2.5.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "b203113193e70978a696b2809525649d" + "Hash": "470851b6d5d0ac559e9d01bb352b4021" }, "Rcpp": { "Package": "Rcpp", - "Version": "1.0.5", + "Version": "1.0.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "125dc7a0ed375eb68c0ce533b48d291f" + "Hash": "e9c08b94391e9f3f97355841229124f2" }, "askpass": { "Package": "askpass", @@ -39,101 +39,129 @@ }, "brio": { "Package": "brio", - "Version": "1.1.0", + "Version": "1.1.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "976cf154dfb043c012d87cddd8bca363" + }, + "bslib": { + "Package": "bslib", + "Version": "0.4.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "570a24963009b9cce0869a0463c83580" + "Hash": "be5ee090716ce1671be6cd5d7c34d091" + }, + "cachem": { + "Package": "cachem", + "Version": "1.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "648c5b3d71e6a37e3043617489a0a0e9" }, "callr": { "Package": "callr", - "Version": "3.7.0", + "Version": "3.7.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "461aa75a11ce2400245190ef5d3995df" + "Hash": "358689cac9fe93b1bb3a19088d2dbed8" }, "cli": { "Package": "cli", - "Version": "2.5.0", + "Version": "3.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "a94ba44cee3ea571e813721e64184172" + "Hash": "0d297d01734d2bcea40197bd4971a764" }, "cpp11": { "Package": "cpp11", - "Version": "0.2.4", + "Version": "0.4.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "ba66e5a750d39067d888aa7af797fed2" + "Hash": "ed588261931ee3be2c700d22e94a29ab" }, "crayon": { "Package": "crayon", - "Version": "1.3.4", + "Version": "1.5.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "0d57bc8e27b7ba9e45dba825ebc0de6b" + "Hash": "e8a1e41acf02548751f45c718d55aa6a" }, "crul": { "Package": "crul", - "Version": "1.1.0", + "Version": "1.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "345d571cc120a54c91ac952c6da4392e" + "Hash": "2408d291bf25a9a6c27d912bcfe6ce0c" }, "curl": { "Package": "curl", - "Version": "4.3", + "Version": "4.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "2b7d10581cc730804e9ed178c8374bd6" + "Hash": "0eb86baa62f06e8855258fa5a8048667" }, "desc": { "Package": "desc", - "Version": "1.3.0", + "Version": "1.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "b6963166f7f10b970af1006c462ce6cd" + "Hash": "6b9602c7ebbe87101a9c8edb6e8b6d21" }, "diffobj": { "Package": "diffobj", - "Version": "0.3.2", + "Version": "0.3.5", "Source": "Repository", "Repository": "CRAN", - "Hash": "16533929cf545f3c9b796780cccf5eff" + "Hash": "bcaa8b95f8d7d01a5dedfd959ce88ab8" }, "digest": { "Package": "digest", - "Version": "0.6.27", + "Version": "0.6.30", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "bf1cd206a5d170d132ef75c7537b9bdb" + }, + "downlit": { + "Package": "downlit", + "Version": "0.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "a0cbe758a531d054b537d16dff4d58a1" + "Hash": "79bf3f66590752ffbba20f8d2da94c7c" }, "dplyr": { "Package": "dplyr", - "Version": "1.0.2", + "Version": "1.0.10", "Source": "Repository", "Repository": "CRAN", - "Hash": "d0509913b27ea898189ee664b6030dc2" + "Hash": "539412282059f7f0c07295723d23f987" }, "ellipsis": { "Package": "ellipsis", - "Version": "0.3.1", + "Version": "0.3.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "fd2844b3a43ae2d27e70ece2df1b4e2a" + "Hash": "bb0eec2fe32e88d9e2836c2f73ea2077" }, "evaluate": { "Package": "evaluate", - "Version": "0.14", + "Version": "0.17", "Source": "Repository", "Repository": "CRAN", - "Hash": "ec8ca05cffcc70569eaaad8469d2a3a7" + "Hash": "9171b012a55a1ef53f1442b1d798a3b4" }, "fansi": { "Package": "fansi", - "Version": "0.4.1", + "Version": "1.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "7fce217eaaf8016e72065e85c73027b5" + "Hash": "83a8afdbe71839506baa9f90eebad7ec" + }, + "fastmap": { + "Package": "fastmap", + "Version": "1.1.0", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "77bd60a6157420d4ffa93b27cf6a58b8" }, "fauxpas": { "Package": "fauxpas", @@ -142,33 +170,40 @@ "Repository": "CRAN", "Hash": "4a92318a9d58a8e66b7d0689db3157b5" }, + "fs": { + "Package": "fs", + "Version": "1.5.2", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "7c89603d81793f0d5486d91ab1fc6f1d" + }, "generics": { "Package": "generics", - "Version": "0.1.0", + "Version": "0.1.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "4d243a9c10b00589889fe32314ffd902" + "Hash": "15e9634c0fcd294799e9b2e929ed1b86" }, "glue": { "Package": "glue", - "Version": "1.4.2", + "Version": "1.6.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "6efd734b14c6471cfe443345f3e35e29" + "Hash": "4f2596dfb05dac67b9dc558e5c6fba2e" }, "highr": { "Package": "highr", - "Version": "0.8", + "Version": "0.9", "Source": "Repository", "Repository": "CRAN", - "Hash": "4dc5bb88961e347a0f4d8aad597cbfac" + "Hash": "8eb36c8125038e648e5d111c0d7b2ed4" }, "htmltools": { "Package": "htmltools", - "Version": "0.5.1.1", + "Version": "0.5.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "af2c2531e55df5cf230c4b5444fc973c" + "Hash": "6496090a9e00f8354b811d1a2d47b566" }, "httpcode": { "Package": "httpcode", @@ -179,73 +214,80 @@ }, "httr": { "Package": "httr", - "Version": "1.4.2", + "Version": "1.4.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "a525aba14184fec243f9eaec62fbed43" + "Hash": "57557fac46471f0dbbf44705cc6a5c8c" + }, + "jquerylib": { + "Package": "jquerylib", + "Version": "0.1.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5aab57a3bd297eee1c1d862735972182" }, "jsonlite": { "Package": "jsonlite", - "Version": "1.7.2", + "Version": "1.8.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "98138e0994d41508c7a6b84a0600cfcb" + "Hash": "2e7ed071fd6bd047fe2366d3adf4fe46" }, "knitr": { "Package": "knitr", - "Version": "1.33", + "Version": "1.40", "Source": "Repository", "Repository": "CRAN", - "Hash": "0bc1b5da1b0eb07cd4b727e95e9ff0b8" + "Hash": "caea8b0f899a0b1738444b9bc47067e7" }, "lifecycle": { "Package": "lifecycle", - "Version": "1.0.0", + "Version": "1.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "3471fb65971f1a7b2d4ae7848cf2db8d" + "Hash": "001cecbeac1cff9301bdc3775ee46a86" }, "lubridate": { "Package": "lubridate", - "Version": "1.7.9.2", + "Version": "1.8.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "5b5b02f621d39a499def7923a5aee746" + "Hash": "2ff5eedb6ee38fb1b81205c73be1be5a" }, "magrittr": { "Package": "magrittr", - "Version": "2.0.1", + "Version": "2.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "41287f1ac7d28a92f0a286ed507928d3" + "Hash": "7ce2733a9826b3aeb1775d56fd305472" }, - "markdown": { - "Package": "markdown", - "Version": "1.1", + "memoise": { + "Package": "memoise", + "Version": "2.0.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "61e4a10781dd00d7d81dd06ca9b94e95" + "Hash": "e2817ccf4a065c5d9d7f2cfbe7c1d78c" }, "mime": { "Package": "mime", - "Version": "0.9", + "Version": "0.12", "Source": "Repository", "Repository": "CRAN", - "Hash": "e87a35ec73b157552814869f45a63aa3" + "Hash": "18e9c28c1d3ca1560ce30658b22ce104" }, "openssl": { "Package": "openssl", - "Version": "1.4.3", + "Version": "2.0.4", "Source": "Repository", "Repository": "CRAN", - "Hash": "a399e4773075fc2375b71f45fca186c4" + "Hash": "e86c5ffeb8474a9e03d75f5d2919683e" }, "pillar": { "Package": "pillar", - "Version": "1.4.7", + "Version": "1.8.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "3b3dd89b2ee115a8b54e93a34cd546b4" + "Hash": "f2316df30902c81729ae9de95ad5a608" }, "pkgconfig": { "Package": "pkgconfig", @@ -254,12 +296,19 @@ "Repository": "CRAN", "Hash": "01f28d4278f15c76cddbea05899c5d6f" }, + "pkgdown": { + "Package": "pkgdown", + "Version": "2.0.6", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "f958d0b2a5dabc5ffd414f062b1ffbe7" + }, "pkgload": { "Package": "pkgload", - "Version": "1.2.1", + "Version": "1.3.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "463642747f81879e6752485aefb831cf" + "Hash": "4b20f937a363c78a5730265c1925f54a" }, "praise": { "Package": "praise", @@ -270,24 +319,38 @@ }, "processx": { "Package": "processx", - "Version": "3.5.2", + "Version": "3.7.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "0cbca2bc4d16525d009c4dbba156b37c" + "Hash": "f91df0f5f31ffdf88bc0b624f5ebab0f" }, "ps": { "Package": "ps", - "Version": "1.5.0", + "Version": "1.7.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "ebaed51a03411fd5cfc1e12d9079b353" + "Hash": "8b93531308c01ad0e56d9eadcc0c4fcd" }, "purrr": { "Package": "purrr", - "Version": "0.3.4", + "Version": "0.3.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "54842a2443c76267152eface28d9e90a" + }, + "ragg": { + "Package": "ragg", + "Version": "1.2.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "97def703420c8ab10d8f0e6c72101e02" + "Hash": "a7b1a8b453c5385786cdfa75aba57483" + }, + "rappdirs": { + "Package": "rappdirs", + "Version": "0.3.3", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "5e3c5dc0b071b21fa128676560dbe94d" }, "rematch2": { "Package": "rematch2", @@ -305,45 +368,45 @@ }, "rlang": { "Package": "rlang", - "Version": "0.4.10", + "Version": "1.0.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "599df23c40a4fce9c7b4764f28c37857" + "Hash": "4ed1f8336c8d52c3e750adcdc57228a7" }, "rmarkdown": { "Package": "rmarkdown", - "Version": "2.7", + "Version": "2.17", "Source": "Repository", "Repository": "CRAN", - "Hash": "edbf4cb1aefae783fd8d3a008ae51943" + "Hash": "e97c8be593e010f93520e8215c0f9189" }, "rprojroot": { "Package": "rprojroot", - "Version": "2.0.2", + "Version": "2.0.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "249d8cd1e74a8f6a26194a91b47f21d1" + "Hash": "1de7ab598047a87bba48434ba35d497d" }, - "rstudioapi": { - "Package": "rstudioapi", - "Version": "0.13", + "sass": { + "Package": "sass", + "Version": "0.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "06c85365a03fdaf699966cc1d3cf53ea" + "Hash": "1b191143d7d3444d504277843f3a95fe" }, "stringi": { "Package": "stringi", - "Version": "1.5.3", + "Version": "1.7.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "a063ebea753c92910a4cca7b18bc1f05" + "Hash": "a68b980681bcbc84c7a67003fa796bfb" }, "stringr": { "Package": "stringr", - "Version": "1.4.0", + "Version": "1.4.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "0759e6b6c0957edb1311028a49a35e76" + "Hash": "a66ad12140cd34d4f9dfcc19e84fc2a5" }, "sys": { "Package": "sys", @@ -352,40 +415,54 @@ "Repository": "CRAN", "Hash": "b227d13e29222b4574486cfcbde077fa" }, + "systemfonts": { + "Package": "systemfonts", + "Version": "1.0.4", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "90b28393209827327de889f49935140a" + }, "testthat": { "Package": "testthat", - "Version": "3.0.2", + "Version": "3.1.5", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "6e3c4843f1ed0d3d90f35498671a001c" + }, + "textshaping": { + "Package": "textshaping", + "Version": "0.3.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "495e0434d9305716b6a87031570ce109" + "Hash": "1ab6223d3670fac7143202cb6a2d43d5" }, "tibble": { "Package": "tibble", - "Version": "3.0.4", + "Version": "3.1.8", "Source": "Repository", "Repository": "CRAN", - "Hash": "71dffd8544691c520dd8e41ed2d7e070" + "Hash": "56b6934ef0f8c68225949a8672fe1a8f" }, "tidyr": { "Package": "tidyr", - "Version": "1.1.2", + "Version": "1.2.1", "Source": "Repository", "Repository": "CRAN", - "Hash": "c40b2d5824d829190f4b825f4496dfae" + "Hash": "cdb403db0de33ccd1b6f53b83736efa8" }, "tidyselect": { "Package": "tidyselect", - "Version": "1.1.0", + "Version": "1.2.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "6ea435c354e8448819627cf686f66e0a" + "Hash": "79540e5fcd9e0435af547d885f184fd5" }, "tinytex": { "Package": "tinytex", - "Version": "0.27", + "Version": "0.42", "Source": "Repository", "Repository": "CRAN", - "Hash": "264b4a31d35bb6833566a7763356ab63" + "Hash": "7629c6c1540835d5248e6e7df265fa74" }, "triebeard": { "Package": "triebeard", @@ -403,38 +480,38 @@ }, "utf8": { "Package": "utf8", - "Version": "1.1.4", + "Version": "1.2.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "4a5081acfb7b81a572e4384a7aaf2af1" + "Hash": "c9c462b759a5cc844ae25b5942654d13" }, "vcr": { "Package": "vcr", - "Version": "0.6.0", + "Version": "1.0.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "ca3372b3b4e975473eb0db03bf4d464e" + "Hash": "ee587203109c71703c59e30d12c7f6ef" }, "vctrs": { "Package": "vctrs", - "Version": "0.3.5", + "Version": "0.4.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "d25c5bea636cf892edbfd64fc3d20c20" + "Hash": "0e3dfc070b2a8f0478fcdf86fb33355d" }, "waldo": { "Package": "waldo", - "Version": "0.2.5", + "Version": "0.4.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "20c45f1d511a3f730b7b469f4d11e104" + "Hash": "035fba89d0c86e2113120f93301b98ad" }, "webmockr": { "Package": "webmockr", - "Version": "0.8.0", + "Version": "0.8.2", "Source": "Repository", "Repository": "CRAN", - "Hash": "754886d5a40436ca6d1714222cf51a8f" + "Hash": "4cf63b93bb8990da8874ee1a15f508cc" }, "whisker": { "Package": "whisker", @@ -445,24 +522,31 @@ }, "withr": { "Package": "withr", - "Version": "2.4.2", + "Version": "2.5.0", "Source": "Repository", "Repository": "CRAN", - "Hash": "ad03909b44677f930fa156d47d7a3aeb" + "Hash": "c0e49a9760983e81e55cdd9be92e7182" }, "xfun": { "Package": "xfun", - "Version": "0.22", + "Version": "0.33", + "Source": "Repository", + "Repository": "CRAN", + "Hash": "1a666f915cd65072f4ccf5b2888d5d39" + }, + "xml2": { + "Package": "xml2", + "Version": "1.3.3", "Source": "Repository", "Repository": "CRAN", - "Hash": "eab2f8ba53809c321813e72ecbbd19ba" + "Hash": "40682ed6a969ea5abfd351eb67833adc" }, "yaml": { "Package": "yaml", - "Version": "2.2.1", + "Version": "2.3.6", "Source": "Repository", "Repository": "CRAN", - "Hash": "2826c5d9efb0a88f657c7a679c7106db" + "Hash": "9b570515751dcbae610f29885e025b41" } } } diff --git a/tests/testthat/test-other.R b/tests/testthat/test-other.R index 4cd309a..3ab0147 100644 --- a/tests/testthat/test-other.R +++ b/tests/testthat/test-other.R @@ -31,7 +31,6 @@ test_that("get_stats() works", { expect_equal(nrow(stats_block), time_blocks) expect_equal(ncol(stats_block), 6) - expect_error(get_stats(10, 20)) expect_error(get_stats(start, "2019-05-02")) expect_error(get_stats(start, end, block = 25)) expect_error(get_stats(start, end, block = 0.5))