Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/devel' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhsparks committed Jun 25, 2021
2 parents 28bdddb + 0f2d08e commit 8091ba8
Show file tree
Hide file tree
Showing 12 changed files with 176 additions and 219 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/tic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ jobs:
- { os: ubuntu-latest, r: "devel" }
- { os: ubuntu-latest, r: "release" }

timeout-minutes: 30

env:
# otherwise remotes::fun() errors cause the build to fail. Example: Unavailability of binaries
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand All @@ -44,9 +42,7 @@ jobs:
SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
# use GITHUB_TOKEN from GitHub to workaround rate limits in {remotes}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# Enable debug output from both parallelly and future
R_FUTURE_DEBUG: TRUE


steps:
- uses: actions/[email protected]

Expand Down Expand Up @@ -126,12 +122,3 @@ jobs:
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
- name: "[Stage] Before Deploy"
run: |
Rscript -e "tic::before_deploy()"
- name: "[Stage] Deploy"
run: Rscript -e "tic::deploy()"

- name: "[Stage] After Deploy"
run: Rscript -e "tic::after_deploy()"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ generate.rb
*.code-workspace
doc
Meta
/doc/
/Meta/
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-06-25.
Once it is accepted, delete this file and tag the release (commit 04dfc3d).
4 changes: 1 addition & 3 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.0.9000
Version: 3.1.1
Authors@R: c(person("Adam H.", "Sparks", role = c("aut", "cre"),
email = "[email protected]",
comment = c(ORCID = "0000-0002-0061-8359")),
Expand Down Expand Up @@ -80,8 +80,6 @@ Encoding: UTF-8
Language: en-US
NeedsCompilation: no
Repository: CRAN
LazyData: FALSE
LazyLoad: FALSE
ByteCompile: TRUE
VignetteBuilder: knitr
X-schema.org-applicationCategory: Tools
Expand Down
12 changes: 11 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# GSODR (development version)
# GSODR 3.1.1

## Bug fixes

* Fixes bug reported in [#84](https://github.com/ropensci/GSODR/issues/84) in the FRSHTT columns where the values were all reported as `NA` even if there were observed values.

* Fixes bug where NA values reported as 99.99, 999.9 or 9999.9 were not replaced with `NA`.

## Minor changes

* Examples are no longer wrapped in `\donttest{}` but use `@examplesIf interactive()` instead.

## Bug fixes

Expand Down
19 changes: 11 additions & 8 deletions R/process_csv.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

# Replace 9999.99 et al. with NA
for (col in names(DT)[names(DT) == "PRCP"]) {
set(DT, j = col, value = as.character(DT[[col]]))
set(DT,
i = which(DT[[col]] == 99.99),
j = col,
Expand All @@ -64,8 +65,9 @@
"GUST",
"SNDP",
"STP")]) {
set(DT, j = col, value = as.character(DT[[col]]))
set(DT,
i = which(DT[[col]] == 999.9),
i = which(DT[[col]] == "999.9"),
j = col,
value = NA)
}
Expand All @@ -76,6 +78,7 @@
"SLP",
"MAX",
"MIN")]) {
set(DT, j = col, value = as.character(DT[[col]]))
set(DT,
i = which(DT[[col]] == 9999.9),
j = col,
Expand Down Expand Up @@ -149,19 +152,19 @@
exp((17.625 * (TEMP)) / (243.04 + (TEMP)))),
1)]

# Split FRSHTT into separate columns -----------------------------------------
# Split FRSHTT into separate columns
DT[, I_FOG := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 1, 1)), 0)]
as.numeric(substr(DT$FRSHTT, 1, 1)), 0)]
DT[, I_RAIN_DRIZZLE := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 2, 2)), 0)]
as.numeric(substr(DT$FRSHTT, 2, 2)), 0)]
DT[, I_SNOW_ICE := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 3, 3)), 0)]
as.numeric(substr(DT$FRSHTT, 3, 3)), 0)]
DT[, I_HAIL := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 4, 4)), 0)]
as.numeric(substr(DT$FRSHTT, 4, 4)), 0)]
DT[, I_THUNDER := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 5, 5)), 0)]
as.numeric(substr(DT$FRSHTT, 5, 5)), 0)]
DT[, I_TORNADO_FUNNEL := fifelse(DT$FRSHTT != 0,
as.integer(substr(DT$FRSHTT, 6, 6)), 0)]
as.numeric(substr(DT$FRSHTT, 6, 6)), 0)]
DT[, FRSHTT := NULL]

# Join with internal isd-history for CTRY column -----------------------------
Expand Down
19 changes: 15 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.0",
"version": "3.1.1",
"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.0.4 (2021-02-15)",
"runtimePlatform": "R version 4.1.0 (2021-05-18)",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -72,6 +72,18 @@
},
"sameAs": "https://CRAN.R-project.org/package=dplyr"
},
{
"@type": "SoftwareApplication",
"identifier": "spelling",
"name": "spelling",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
"name": "Comprehensive R Archive Network (CRAN)",
"url": "https://cran.r-project.org"
},
"sameAs": "https://CRAN.R-project.org/package=spelling"
},
{
"@type": "SoftwareApplication",
"identifier": "ggplot2",
Expand Down Expand Up @@ -160,7 +172,6 @@
"@type": "SoftwareApplication",
"identifier": "roxygen2",
"name": "roxygen2",
"version": ">= 6.1.0",
"provider": {
"@id": "https://cran.r-project.org",
"@type": "Organization",
Expand Down Expand Up @@ -364,7 +375,7 @@
"relatedLink": ["https://docs.ropensci.org/GSODR/", "https://CRAN.R-project.org/package=GSODR"],
"developmentStatus": "https://www.repostatus.org/#active",
"funder": {},
"fileSize": "48722.758KB",
"fileSize": "3777.459KB",
"releaseNotes": "https://github.com/ropensci/GSODR/blob/master/NEWS.md",
"readme": "https://github.com/ropensci/GSODR/blob/main/README.md",
"review": {
Expand Down
33 changes: 10 additions & 23 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
# Test environments
## GSODR 3.1.1

- macOS, R version 4.0.4 (2021-02-15)
## Test environments
* GitHub Actions (ubuntu-latest): release, devel
* GitHub Actions (windows): release
* Github Actions (macOS): release
* Local macOS M1: release
* win-builder: devel

- win-builder, R Under development (unstable) (2021-03-19 r80100)

- win-builder, R version 4.0.4 (2021-02-15)

# R CMD check results

0 errors | 0 warnings | 1 note

## New features

* Diffs in the isd_history are now recorded in the `/data-raw/fetch_isd-history.md` file and shipped with GSODR as `isd_history.rda`, which can be viewed by using `load(system.file("extdata", "isd_diff.rda", package = "GSODR"))`.

* Update and improve documentation to reflect country name and ISO code columns.

* Include columns for COUNTRY_NAME (country name in English), ISO2C and ISO3C in the final output from `get_GSOD()` and `reformat_GSOD()`.

## Minor improvements

* Update NCEI data usage statement
## R CMD check results
0 ERRORs | 0 WARNINGs | 0 NOTES.

# Reverse dependencies

- No ERRORs or WARNINGs found
No ERRORs or WARNINGs found
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ ECCC
ESA's
ESACCI
Eskridge
FRSHTT
FTPing
Florian
GPKG
Expand Down
6 changes: 0 additions & 6 deletions tic.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
# installs dependencies, runs R CMD check, runs covr::codecov()
do_package_checks()

if (ci_on_ghactions() && ci_has_env("BUILD_PKGDOWN")) {
# creates pkgdown site and pushes to gh-pages branch
# only for the runner with the "BUILD_PKGDOWN" env var set
do_pkgdown()
}
Loading

0 comments on commit 8091ba8

Please sign in to comment.