Skip to content

Commit

Permalink
Merge devel into main
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Oct 13, 2021
2 parents 8bdb245 + a51196c commit a8deef9
Show file tree
Hide file tree
Showing 27 changed files with 353 additions and 339 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/tic.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## tic GitHub Actions template: linux-macos-windows-deploy
## revision date: 2021-06-26
## revision date: 2021-06-27
on:
workflow_dispatch:
push:
Expand Down Expand Up @@ -76,6 +76,10 @@ jobs:
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-${{steps.date.outputs.date}}

- name: "[Stage] [Linux] Install required system libs"
if: runner.os == 'Linux'
run: sudo apt install libcurl4-openssl-dev libgit2-dev

# for some strange Windows reason this step and the next one need to be decoupled
- name: "[Stage] Prepare"
run: |
Expand Down
2 changes: 2 additions & 0 deletions CRAN-RELEASE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This package was submitted to CRAN on 2021-10-06.
Once it is accepted, delete this file and tag the release (commit d1cfe8f).
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: GSODR
Type: Package
Title: Global Surface Summary of the Day ('GSOD') Weather Data Client
Version: 3.1.2
Version: 3.1.4
Authors@R: c(person("Adam H.", "Sparks", role = c("aut", "cre"),
email = "adamhsparks@gmail.com",
comment = c(ORCID = "0000-0002-0061-8359")),
Expand Down Expand Up @@ -75,7 +75,7 @@ Suggests:
roxygen2,
testthat,
tidyr
RoxygenNote: 7.1.1.9001
RoxygenNote: 7.1.2
Encoding: UTF-8
Language: en-US
NeedsCompilation: no
Expand Down
13 changes: 13 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# GSODR 3.1.4

# GSODR 3.1.2.9000

## Minor changes

* Skip **ANY** and **ALL** tests on CRAN.
This fixes the "problems" with _GSODR_ failing on a Solaris instance when the server failed to respond.

* Update internal `isd-history` database.

* Use `\CRANpkg{}` in place of `\pkg{}` in documentation.

# GSODR 3.1.2

## Bug fixes
Expand Down
18 changes: 9 additions & 9 deletions R/get_GSOD.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,21 @@
#' @param country Optional. Specify a country for which to retrieve weather
#' data; full name, 2 or 3 letter \acronym{ISO} or 2 letter \acronym{FIPS} codes
#' can be used. All stations within the specified country will be returned.
#' @param max_missing Optional. The maximum number of days allowed to be missing
#' from a station's data before it is excluded from final file output.
#' @param max_missing Optional. The maximum number of days allowed to be
#' missing from a station's data before it is excluded from final file output.
#' @param agroclimatology Optional. Logical. Only clean data for stations
#' between latitudes 60 and -60 for agroclimatology work, defaults to `FALSE`.
#' Set to `TRUE` to include only stations within the confines of these
#' latitudes.
#'
#' @note \pkg{GSODR} attempts to validate year and station combination requests,
#' however, in certain cases the start and end date may encompass years where
#' no data is available. In these cases no data will be returned. It is
#' suggested that the user check the latest data availability for the station(s)
#' desired using \link{get_inventory} as this list is frequently updated by the
#' \acronym{NCEI} and is not shipped with \pkg{GSODR}.
#' @note \CRANpkg{GSODR} attempts to validate year and station combination
#' requests, however, in certain cases the start and end date may encompass
#' years where no data is available. In these cases no data will be returned.
#' It is suggested that the user check the latest data availability for the
#' station(s) desired using \link{get_inventory} as this list is frequently
#' updated by the \acronym{NCEI} and is not shipped with \CRANpkg{GSODR}.
#'
#' @note While \pkg{GSODR} does not distribute GSOD weather data, users of
#' @note While \CRANpkg{GSODR} does not distribute GSOD weather data, users of
#' the data should note the conditions that the U.S. \acronym{NCEI} places upon
#' the \acronym{GSOD} data.
#' \dQuote{The following data and products may have conditions placed on their
Expand Down
2 changes: 1 addition & 1 deletion R/get_inventory.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' an information header displaying the last update time with a data frame of
#' the inventory information for each station-year-month.
#'
#' @note While \pkg{GSODR} does not distribute GSOD weather data, users of
#' @note While \CRANpkg{GSODR} does not distribute GSOD weather data, users of
#' the data should note the conditions that the U.S. \acronym{NCEI} places upon
#' the \acronym{GSOD} data.
#' \dQuote{The following data and products may have conditions placed on their
Expand Down
10 changes: 5 additions & 5 deletions R/nearest_stations.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#' be returned.
#'
#' @note The \acronym{GSOD} data, which are downloaded and manipulated by
#' \pkg{GSODR} stipulate that the following notice should be given.
#' \CRANpkg{GSODR} stipulate that the following notice should be given.
#' \dQuote{The following data and products may have conditions placed on their
#' international commercial use. They can be used within the U.S. or for non-
#' commercial international activities without restriction. The non-U.S. data
Expand All @@ -27,10 +27,10 @@
#'
#' @return By default a class \code{\link[base]{character}}
#' \code{\link[base]{vector}} object of station identification numbers.
#' in order from nearest to farthest in increasing order. If \code{return_full}
#' is \code{TRUE}, a \code{\link[data.table]{data.table}} with full station
#' metadata including the distance from the user specified coordinates is
#' returned.
#' in order from nearest to farthest in increasing order. If
#' \code{return_full} is \code{TRUE}, a \code{\link[data.table]{data.table}}
#' with full station metadata including the distance from the user specified
#' coordinates is returned.
#' @author Adam H. Sparks, \email{adamhsparks@@gmail.com}
#' @export nearest_stations

Expand Down
6 changes: 3 additions & 3 deletions R/reformat_GSOD.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
#' \acronym{GSOD} files present this will lead to errors.
#'
#' For a complete list of the fields and description of the contents and units,
#' please refer to Appendix 1 in the \pkg{GSODR} vignette,
#' please refer to Appendix 1 in the \CRANpkg{GSODR} vignette,
#' \code{vignette("GSODR", package = "GSODR")}.
#'
#' @note While \pkg{GSODR} does not distribute \acronym{GSOD} weather data,
#' @note While \CRANpkg{GSODR} does not distribute \acronym{GSOD} weather data,
#' users of the data should note the conditions that the U.S. \acronym{NCEI}
#' places upon the \acronym{GSOD} data.
#' \dQuote{The following data and products may have conditions placed on their
Expand Down Expand Up @@ -78,7 +78,7 @@
#' tbar <- reformat_GSOD(dsn = tempdir())
#'
#' tbar
#'
#'
#'
#' @author Adam H. Sparks, \email{adamhsparks@@gmail.com}
#'
Expand Down
12 changes: 6 additions & 6 deletions R/update_station_list.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#' Download latest station list metadata and update internal database
#'
#' This function downloads the latest station list (isd-history.csv) from the
#' \acronym{NCEI} server and updates the data distributed with \pkg{GSODR} to
#' the latest stations available. These data provide unique identifiers,
#' \acronym{NCEI} server and updates the data distributed with \CRANpkg{GSODR}
#' to the latest stations available. These data provide unique identifiers,
#' country, state (if in U.S.) and when weather observations begin and end.
#'
#' Care should be taken when using this function if reproducibility is necessary
#' as different machines with the same version of \pkg{GSODR} can end up with
#' different versions of the 'isd_history.csv' file internally.
#' as different machines with the same version of \CRANpkg{GSODR} can end up
#' with different versions of the 'isd_history.csv' file internally.
#'
#' There is no need to use this unless you know that a station exists in the
#' isd_history.csv file that is not available in \pkg{GSODR's} self-contained
#' database.
#' isd_history.csv file that is not available in the self-contained
#' database distributed with \CRANpkg{GSODR}.
#'
#' To directly access these data, use: \cr
#' \code{load(system.file("extdata", "isd_history.rda", package = "GSODR"))}
Expand Down
8 changes: 4 additions & 4 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
"keywords": ["US-NCEI", "meteorological-data", "global-weather", "weather", "weather-data", "meteorology", "station-data", "surface-weather", "data-access", "US-NCDC", "r", "gsod", "ncdc", "weather-stations", "global-data", "ncei", "weather-information", "historical-weather", "historical-data", "daily-data", "daily-weather", "rstats", "r-package"],
"license": "https://spdx.org/licenses/MIT",
"title": "GSODR",
"version": "3.1.2",
"version": "3.1.3",
"name": "GSODR: Global Surface Summary of the Day ('GSOD') Weather Data Client",
"issueTracker": "https://github.com/ropensci/GSODR/issues",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
"url": "https://r-project.org"
},
"runtimePlatform": "R version 4.1.0 (2021-05-18)",
"runtimePlatform": "R version 4.1.1 (2021-08-10)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -283,7 +283,7 @@
"name": "utils"
}
],
"contIntegration": "https://codecov.io/gh/ropensci/GSODR",
"contIntegration": ["https://github.com/ropensci/GSODR/actions", "https://codecov.io/gh/ropensci/GSODR"],
"citation": [
{
"@type": "ScholarlyArticle",
Expand Down Expand Up @@ -375,7 +375,7 @@
"relatedLink": ["https://docs.ropensci.org/GSODR/", "https://CRAN.R-project.org/package=GSODR"],
"developmentStatus": "https://www.repostatus.org/#active",
"funder": {},
"fileSize": "3781.662KB",
"fileSize": "3784.378KB",
"releaseNotes": "https://github.com/ropensci/GSODR/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/GSODR/blob/main/README.md",
"review": {
Expand Down
22 changes: 22 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# GSODR 3.1.2

## Comments for the CRAN team

I realise that the last release was last week, however, I found a few more bugs in the code that could cause some surprises with `NA` values for end users, so I've elected to release a new patch release.

## Test environments
* GitHub Actions (ubuntu-latest): release, devel
* GitHub Actions (windows): release
* Github Actions (macOS): release
* Local macOS M1: release
* win-builder: devel

## R CMD check results
0 ERRORs | 0 WARNINGs | 0 NOTES.

## Reverse dependencies
We checked 1 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages

13 changes: 7 additions & 6 deletions data-raw/fetch_isd-history.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ The following checks are performed on the raw data file before inclusion in _GSO

## Set up workspace

```{r set_up_workspace, echo=TRUE, message=FALSE, output=FALSE, warning=FALSE}
if (!require("pacman")) {
install.packages("pacman", repos = "https://cran.rstudio.com/")
}
pacman::p_load("sessioninfo", "skimr", "countrycode", "data.table")
```{r load_libs, echo=TRUE, message=FALSE, output=FALSE, warning=FALSE}
library("sessioninfo")
library("skimr")
library("countrycode")
library("data.table")
```

## Download and clean data
Expand Down Expand Up @@ -123,7 +123,8 @@ setkeyv(new_isd_history, "STNID")[]
## Show changes from last release

```{r diff-codes}
install.packages("GSODR") # ensure we aren't using a locally installed dev version
# ensure we aren't using a locally installed dev version
install.packages("GSODR", repos = "https://cloud.r-project.org/")
load(system.file("extdata", "isd_history.rda", package = "GSODR"))
# select only the cols of interest
Expand Down
Loading

0 comments on commit a8deef9

Please sign in to comment.