Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #127 from nuest/master
Browse files Browse the repository at this point in the history
Release fixes after manual inspection
  • Loading branch information
nuest authored Apr 13, 2019
2 parents bf02aee + f23b50c commit 8900f95
Show file tree
Hide file tree
Showing 68 changed files with 678 additions and 1,833 deletions.
48 changes: 31 additions & 17 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
Package: sos4R
Type: Package
Title: An R Client for the OGC Sensor Observation Service
Title: Client for OGC Sensor Observation Services
Version: 0.3.0
Authors@R: c(person(given = "Daniel", family = "Nuest", role = c("cre", "aut"),
email = "daniel.nuest@uni-muenster.de", comment = c(ORCID = "0000-0002-0024-5046")),
person("Edzer", "Pebesma", role = "ctb", comment = c(ORCID = "0000-0001-8049-7069")),
person("Ben", "Graeler", role = "ctb", comment = c(ORCID = "0000-0001-5443-4304")),
person("Benjamin", "Pross", role = "ctb"),
person("Eike Hinderk", "Juerrens", role = "ctb"))
Author: Daniel Nuest [cre, aut] (<https://orcid.org/0000-0002-0024-5046>),
Edzer Pebesma [ctb] (<https://orcid.org/0000-0001-8049-7069>),
Ben Graeler [ctb] (<https://orcid.org/0000-0001-5443-4304>),
Benjamin Pross [ctb],
Eike Hinderk Juerrens [ctb]
Maintainer: Daniel Nuest <daniel.nuest@uni-muenster.de>
Date: 2019-04-13
Authors@R:
c(person(given = "Daniel",
family = "Nuest",
role = c("cre", "aut"),
email = "daniel.nuest@uni-muenster.de",
comment = c(ORCID = "0000-0002-0024-5046")),
person(given = "Edzer",
family = "Pebesma",
role = "ctb",
comment = c(ORCID = "0000-0001-8049-7069")),
person(given = "Ben",
family = "Graeler",
role = "ctb",
comment = c(ORCID = "0000-0001-5443-4304")),
person(given = "Benjamin",
family = "Pross",
role = "ctb"),
person(given = "Eike Hinderk",
family = "Juerrens",
role = "ctb"),
person(given = "52°North Initiative for Geospatial Open Source Software GmbH",
email = "info@52north.org",
role = "cph"))
Depends: R (>= 3.4.0)
Imports:
httr,
Expand All @@ -22,6 +34,7 @@ Imports:
stringr,
xml2,
Suggests:
readr,
spacetime,
gstat,
maps,
Expand All @@ -34,10 +47,11 @@ Suggests:
rgdal,
knitr,
rmarkdown
Description: A client for Sensor Observation Services (SOS) as
specified by the Open Geospatial Consortium (OGC). The package allows
users to retrieve metadata from SOS web services and to
interactively create requests for near real-time observation
Description: A client for Sensor Observation Services (SOS, see
<https://www.opengeospatial.org/standards/sos>) as specified by the
Open Geospatial Consortium (OGC). With the package users can
retrieve (meta)data from SOS instances and interactively
create requests for near real-time observation
data based on the available sensors, phenomena, observations etc.
using thematic, temporal, and spatial filtering.
License: GPL-2
Expand Down
16 changes: 14 additions & 2 deletions DEV-README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ Add tests.

A new release shall be uploaded to CRAN after testing and under the following procedure:

- Install the current version of the package from source
- Run the [tests](#tests) locally and resolve all problems
- Run a check locally, e.g. `devtools::check(document = FALSE)` and fix errors, warnings, and notes
- Update NEWS file based on latest commits
- Update NEWS file based on latest commits, add missing changes/updates/notable things
- Update the `Date` field in the `DESCRIPTION` file to match the release date
- Create a PR from `dev` to `master` and check the CI status, fix all problems
- https://travis-ci.org/52North/sos4R
- https://ci.appveyor.com/project/52North/sos4r
Expand All @@ -253,9 +255,19 @@ A new release shall be uploaded to CRAN after testing and under the following pr
- (optional) `rhub::check(email = <...>)` for running checks on different operating systems
- Regenerate the website with `pkgdown::build_site()` and re-knit `README.Rmd`, commit changes
- Push changes to `dev` branch
- Create a git tag with the version number using the letter `v` followed by the version number (see above, must match `DESCRIPTION`), e.g. `v1.2.3`, and push it to the main repository
- Read and follow http://cran.r-project.org/web/packages/policies.html and http://r-pkgs.had.co.nz/release.html#release-check again, make necessary changes
- Merge the PR
- Update your local `master` to upstream's `master` branch
-_ Do the actual release_ with `devtools::release()` (which will ask you again if you did many of the steps before)
- Wait for the good news, check where the package is in the queue with `foghorn::cran_incoming(pkg = "sos4R")`
- When available on CRAN:
- Create a git tag with the version number using the letter `v` followed by the version number (see above, must match `DESCRIPTION`), e.g. `v1.2.3`, and push it to the main repository
- Create a release on GitHub based on the new tag, named just as the version tag
- Checkout the `dev` branch
- Merge `upstream/master`
- Update the version in `DESCRIPTION` to a new development version, e.g. from `0.3.0` to `0.4.0.9000`
- Email on 52N mailing list(s) (coordinate with 52N staff)
- Tweet

You can then do the actual release with

Expand Down
17 changes: 6 additions & 11 deletions R/SOS-methods-parsing.R
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,13 @@ setMethod(f = "parseFile",
}
)

#
# parse commma seperated values ----
#
parseCSV <- function(obj, verbose = FALSE) {
if (verbose) cat("[parseCSV] Processing CSV...\n")
if (verbose) cat("[parseCSV] Parsing CSV...\n")

if (inherits(x = obj, what = "data.frame")) {
if (verbose) cat("[parseCSV] Already a data.frame, returning object\n")
return(obj)
}

.lines <- strsplit(x = obj, split = "\n")[[1]]
.data <- do.call(what = "strsplit", args = list(.lines, split = ","))
Expand All @@ -506,11 +508,6 @@ parseCSV <- function(obj, verbose = FALSE) {
.rows <- length(.data)
if (verbose) cat("[parseCSV] Got", .rows, "lines of data.\n")

if (.rows == 1) {
warnings(paste("Received just one line of data: ", .data, "\n"))
return(.data[[1]])
}

.df <- NULL
for (.r in seq(2,.rows)) {
if (verbose) cat("[parseCSV] Processing row in CSV:", .data[[.r]], "\n")
Expand All @@ -524,8 +521,6 @@ parseCSV <- function(obj, verbose = FALSE) {
names(.df) <- .names[[i]]
.row.df <- cbind(.row.df, .df)
}
# print(paste("row", .r))
# print(.row.df)

if (is.null(.df))
.df <- .row.df
Expand Down
25 changes: 17 additions & 8 deletions R/SOS-methods-util.R
Original file line number Diff line number Diff line change
Expand Up @@ -380,15 +380,24 @@ setMethod(f = "sosGetCRS",
definition = function(obj, verbose = FALSE) {
if (verbose) cat("[sosGetCRS] from '", obj, "'\n", sep = "")

# get the position of EPSG code
.split <- strsplit(as.character(obj), split = ":")
.idx <- which(toupper(.split[[1]]) == "EPSG")
if (length(.idx) == 0) {
# possibly versioned, try one index higher?
warning(paste("Could not create CRS from the given object:", obj))
return(NULL)
.epsg <- NA
# URN
if (grepl(pattern = "urn:ogc", x = obj)) {
.epsg <- sub(pattern = "(.*)epsg:[0-9]*(:?)",
replacement = "",
x = tolower(obj))[[1]]
}
# URL
if (grepl(pattern = "opengis.net", x = obj)) {
.epsg <- sub(pattern = "(.*)epsg/[0-9]*(/?)",
replacement = "",
x = tolower(obj))[[1]]
}

if (is.na(.epsg)) {
warning("Could not create CRS from string ", obj)
return(NA)
}
.epsg <- .split[[1]][[length(.split[[1]])]]

.initString <- paste("+init=epsg", .epsg, sep = ":")

Expand Down
9 changes: 8 additions & 1 deletion R/SOS-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -1514,10 +1514,17 @@ setMethod(f = "checkRequest",
xml <- xml2::read_xml(text)
return(xml)
}
else if (contentType == "application/xml") {
else if (contentType == "application/xml" || contentType == "text/xml") {
xml <- httr::content(x = response, encoding = sosDefaultCharacterEncoding)
return(xml)
}
else if (contentType == "text/csv") {
if (!requireNamespace("readr", quietly = TRUE))
stop("package readr required to handle text/csv format, please install")

tibble <- httr::content(x = response, encoding = sosDefaultCharacterEncoding)
return(tibble)
}

stop("Unsupported content type in response")
}
21 changes: 20 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,29 @@

## R CMD check results

No notes.
No errors.
No warnings.

1 NOTE:

* checking CRAN incoming feasibility ... NOTE
Maintainer: 'Daniel Nuest <daniel.nuest@uni-muenster.de>'

New submission

Package was archived on CRAN

Possibly mis-spelled words in DESCRIPTION:
Geospatial (36:31)
OGC (3:67, 36:54)

CRAN repository db overrides:
X-CRAN-Comment: Archived on 2018-06-17 as check problems were not
corrected despite reminders.

## Other

The package was "archived on 2018-06-17 as check problems were not corrected despite reminders."
Issues could now finally be resolved with a complete overhaul of implementation (switching from XML to xml2) and we kindly request re-publication on CRAN.

Comments during manual inspection were handled with this resubmission.
14 changes: 3 additions & 11 deletions demo/00Index
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
ades demo script for SOS with French groundwater level data
airquality spatial analysis demo for air quality SOS by ifgi and EEA
austria demo script for SOSs by Research Studios Austria
coastlab demo script for SOSs by Helmholtz-Zentrum Geesthacht
co-ops [under construction] demo script for SOSs by the NOAA Center for Operational Oceanographic Products and Services focussing on non-O&M response formats and filtering
ioos demo script for SOS by Integrated Ocean Observing System
marinemeta demo script for SOS by Marine Metadata Interoperability Initiative
oceanwatch demo script for SOS by NOAA/SWFSC/ERD
pegel demo script for water gauge data in Germany by Pegelonline
southesk plotting and data consilidation demo for SOSs from South Esk Testbed by CSIRO
eo2heaven health-related and air quality SOS for the state of Saxony, Germany, and Durban, South Africa by TU Dresden
co-ops SOSs by the NOAA Center for Operational Oceanographic Products and Services focussing on non-O&M response formats and filtering
ioos SOS by Integrated Ocean Observing System
pegel Water gauge data in Germany by Pegelonline
20 changes: 0 additions & 20 deletions demo/ades.R

This file was deleted.

Loading

0 comments on commit 8900f95

Please sign in to comment.