Skip to content

Commit b6c024e

Browse files
Merge pull request #173 from everettsp/main
2 parents 5dda389 + fa09d13 commit b6c024e

7 files changed

Lines changed: 12 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: weathercan
22
Type: Package
33
Title: Download Weather Data from Environment and Climate Change Canada
4-
Version: 0.7.3.9000
4+
Version: 0.7.4
55
Authors@R: c(
66
person("Steffi", "LaZerte", email = "sel@steffilazerte.ca", role = c("aut","cre"), comment = c(ORCID = "0000-0002-7690-8360")),
77
person("Sam", "Albers", email = "sam.albers@gmail.com", role = c("ctb"), comment = c(ORCID = "0000-0002-9270-7884")),
@@ -12,7 +12,8 @@ Authors@R: c(
1212
person("Mark", "Ciechanowski", role = "ctb", comment = c(ORCID = "0000-0002-3732-5939")),
1313
person("Jeremy", "Selva", email = "jeremy1189.jjs@gmail.com", role = "ctb", comment = c(ORCID = "0000-0002-4498-2662")),
1414
person(c("Kelli", "F."), "Johnson", email = "kelli.johnson@noaa.gov", role = c("ctb"), comment = c(ORCID = "0000-0002-5149-451X")),
15-
person("Russ", "Allen", email = "mbr@historicip.com", role = c("ctb"))
15+
person("Russ", "Allen", email = "mbr@historicip.com", role = c("ctb")),
16+
person("Everett", "Snieder", email = "everett.snieder@gmail.com", role = c("ctb"), comment = c(ORCID = "0000-0003-4997-3404"))
1617
)
1718
Description: Provides means for downloading historical weather data from
1819
the Environment and Climate Change Canada website

NEWS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# weathercan 0.7.3.9000
1+
# weathercan 0.7.4
22
- Add `qual` from newly added Flags column to hourly data
33
- Remove vcr
4+
- Fix long Provincial names (#171)
45

56
# weathercan 0.7.3
67
- Switch stations inventory list to new location

R/stations.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,15 +280,15 @@ stations_dl_internal <- function(skip = NULL, verbose = FALSE, quiet = FALSE,
280280
"BRITISH COLUMBIA",
281281
"MANITOBA",
282282
"NEW BRUNSWICK",
283-
"NEWFOUNDLAND",
283+
"NEWFOUNDLAND AND LABRADOR",
284284
"NORTHWEST TERRITORIES",
285285
"NOVA SCOTIA",
286286
"NUNAVUT",
287287
"ONTARIO",
288288
"PRINCE EDWARD ISLAND",
289289
"QUEBEC",
290290
"SASKATCHEWAN",
291-
"YUKON TERRITORY"),
291+
"YUKON"),
292292
labels = c("AB", "BC", "MB", "NB", "NL", "NT",
293293
"NS", "NU", "ON", "PE", "QC", "SK",
294294
"YT")),

R/sysdata.rda

8 Bytes
Binary file not shown.

data-raw/data-index.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ province <- c("ALBERTA" = "AB",
66
"BRITISH COLUMBIA" = "BC",
77
"MANITOBA" = "MB",
88
"NEW BRUNSWICK" = "NB",
9-
"NEWFOUNDLAND" = "NL",
9+
"NEWFOUNDLAND AND LABRADOR" = "NL",
1010
"NORTHWEST TERRITORIES" = "NT",
1111
"NOVA SCOTIA" = "NS",
1212
"NUNAVUT" = "NU",
1313
"ONTARIO" = "ON",
1414
"PRINCE EDWARD ISLAND" = "PE",
1515
"QUEBEC" = "QC",
1616
"SASKATCHEWAN" = "SK",
17-
"YUKON TERRITORY" = "YT")
17+
"YUKON" = "YT")
1818

1919
m_names <- c("station_name" = "Station Name", "station_id" = "ID",
2020
"station_operator" = "Current Station Operator",

tests/testthat/test_03_station_dl.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test_that("stations_dl() errors appropriately", {
2222
skip_if_not_installed("lutz")
2323

2424
bkup <- getOption("weathercan.urls.stations")
25-
options(weathercan.urls.stations = "https://httpstat.us/404")
25+
options(weathercan.urls.stations = "https://httpbin.org/status/404")
2626
expect_error(stations_dl(), "Not Found (HTTP 404).", fixed = TRUE)
2727
options(weathercan.urls.stations = bkup)
2828
})

tests/testthat/test_08_normals.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ test_that("normals_html() correctly retrieves request 1971-2000", {
3838
# Proper error when 404
3939
test_that("normals_html() errors", {
4040
skip_on_cran()
41+
4142
memoise::forget(normals_html) # Reset cache so we can test a different url
4243
bkup <- getOption("weathercan.urls.normals")
43-
options(weathercan.urls.normals = "https://httpstat.us/404")
44+
options(weathercan.urls.normals = "https://httpbin.org/status/404")
4445
expect_error(normals_html(prov = "MB", station_id = 3471,
4546
climate_id = "5010480",
4647
normals_years = "1981-2010"),

0 commit comments

Comments
 (0)