Skip to content

Commit

Permalink
v2.0.9 (#258)
Browse files Browse the repository at this point in the history
* Remove useshinyalert() to avoid warnings

* Update shinyalert required version

* Update version and news

* Update documentation

* Update documentation

* Specify CRAN note
  • Loading branch information
ranghetti authored Aug 27, 2022
1 parent 69270db commit 46a3d7c
Show file tree
Hide file tree
Showing 125 changed files with 5,296 additions and 25,167 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@
^\.github$
^doc$
^Meta$
^CRAN-SUBMISSION$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ inst/testdata/MODIStsp_2018-01-04\.json
libs/
_main\.Rmd
inst/ExtData/Previous/MODIStsp_Previous\.json
inst/ExtData/MODIStsp_ProdOpts\.RData$
inst/testdata/MODIStsp_2018-02-18\.json
inst/testdata/MODIStsp_Previous\.json
inst/ExtData/modis_sinusoidal_grid_world\.dbf
Expand Down
8 changes: 4 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: MODIStsp
Title: Find, Download and Process MODIS Land Products
Data
Type: Package
Version: 2.0.7
Version: 2.0.9
Authors@R: c(person("Lorenzo", "Busetto",
role = c("aut"),
comment = c(ORCID = '0000-0001-9634-6038')),
Expand Down Expand Up @@ -74,7 +74,7 @@ Suggests:
rgdal,
rmarkdown,
shiny,
shinyalert,
shinyalert (>= 3.0.0),
shinydashboard,
shinyFiles (>= 0.9.0),
shinyjs,
Expand All @@ -85,12 +85,12 @@ Suggests:
tidyr,
qpdf,
xtable
SystemRequirements:
SystemRequirements: GDAL (>= 2.1.2) with support for HDF4 format, PROJ (>= 4.9.1).
URL: https://github.com/ropensci/MODIStsp/, https://docs.ropensci.org/MODIStsp/
BugReports: https://github.com/ropensci/MODIStsp/issues
LazyData: true
VignetteBuilder: knitr
RoxygenNote: 7.1.2
RoxygenNote: 7.2.1
Roxygen: list(markdown = TRUE)
Encoding: UTF-8
Language: en-US
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ importFrom(sf,st_bbox)
importFrom(sf,st_coordinates)
importFrom(sf,st_crop)
importFrom(sf,st_crs)
importFrom(sf,st_drivers)
importFrom(sf,st_geometry)
importFrom(sf,st_read)
importFrom(sf,st_set_crs)
Expand Down
17 changes: 17 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# MODIStsp 2.0.9

## Minor changes
- Revise the authenticate type to `"any"` (default is `"basic"`) to reflect
changes on USGS authentication after the maintenance of the U.S. GOVERNMENT COMPUTER.
## Bug fixes
- Remove `useshinyalert()` to avoid warnings.


# MODIStsp 2.0.8

## Minor changes
- Reducing package size
- State that GDAL with support for HDF4 format is needed (in vignette and
package description), and exit gracefully if HDF4 is not supported.


# MODIStsp 2.0.7

## Minor changes
Expand Down
76 changes: 44 additions & 32 deletions R/MODIStsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,28 @@
#' # Note that this example (as well as the following ones) is run in single
#' # core to follow CRAN policies, by setting parallel = FALSE.
#' # Users can exploit multicore functionalities skipping to set this argument.
#'
#' # The following check is performed in order not to provide errors
#' # running the examples if HDF4 is not supported.
#' is_hdf4_supported <- "HDF4" %in% sf::st_drivers("raster")$name
#'
#' MODIStsp_get_prodlayers("M*D13A2")
#' MODIStsp(
#' gui = FALSE,
#' out_folder = "$tempdir",
#' selprod = "Vegetation_Indexes_16Days_1Km (M*D13A2)",
#' bandsel = c("EVI", "NDVI"),
#' quality_bandsel = "QA_usef",
#' indexes_bandsel = "SR",
#' user = "mstp_test" ,
#' password = "MSTP_test_01",
#' start_date = "2020.06.01",
#' end_date = "2020.06.15",
#' verbose = FALSE,
#' parallel = FALSE
#' )
#' if (is_hdf4_supported) {
#' MODIStsp(
#' gui = FALSE,
#' out_folder = "$tempdir",
#' selprod = "Vegetation_Indexes_16Days_1Km (M*D13A2)",
#' bandsel = c("EVI", "NDVI"),
#' quality_bandsel = "QA_usef",
#' indexes_bandsel = "SR",
#' user = "mstp_test" ,
#' password = "MSTP_test_01",
#' start_date = "2020.06.01",
#' end_date = "2020.06.15",
#' verbose = FALSE,
#' parallel = FALSE
#' )
#' }
#'
#'
#' #' # - Running the tool using the settings previously saved in a specific options file
Expand All @@ -189,7 +195,9 @@
#'
#' opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")
#'
#' MODIStsp(gui = FALSE, opts_file = opts_file, verbose = TRUE, parallel = FALSE)
#' if (is_hdf4_supported) {
#' MODIStsp(gui = FALSE, opts_file = opts_file, verbose = TRUE, parallel = FALSE)
#' }
#'
#'
#' # Running the tool using the settings previously saved in a specific option file
Expand All @@ -198,14 +206,16 @@
#'
#' opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")
#' spatial_file <- system.file("testdata/lakeshapes/garda_lake.shp", package = "MODIStsp")
#' MODIStsp(
#' gui = FALSE,
#' opts_file = opts_file,
#' spatmeth = "file",
#' spafile = spatial_file,
#' verbose = TRUE,
#' parallel = FALSE
#' )
#' if (is_hdf4_supported) {
#' MODIStsp(
#' gui = FALSE,
#' opts_file = opts_file,
#' spatmeth = "file",
#' spafile = spatial_file,
#' verbose = TRUE,
#' parallel = FALSE
#' )
#' }
#'
#'
#' # Running the tool using the settings previously saved in a
Expand All @@ -222,15 +232,17 @@
#' extent_list
#' opts_file <- system.file("testdata/test_MOD13A2.json", package = "MODIStsp")
#'
#' for (single_shape in extent_list) {
#' MODIStsp(
#' gui = FALSE,
#' opts_file = opts_file,
#' spatmeth = "file",
#' spafile = single_shape,
#' verbose = TRUE,
#' parallel = FALSE
#' )
#' if (is_hdf4_supported) {
#' for (single_shape in extent_list) {
#' MODIStsp(
#' gui = FALSE,
#' opts_file = opts_file,
#' spatmeth = "file",
#' spafile = single_shape,
#' verbose = TRUE,
#' parallel = FALSE
#' )
#' }
#' }
#'
#' # output files are placed in separate folders:
Expand Down
10 changes: 5 additions & 5 deletions R/MODIStsp_extract.R
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,12 @@
#' # __NOTE__ To avoid redownloading, here we copy some test data from MODIStsp
#' # installation folder to tempdir and use it to create a test time series.
#'
#' test_folder <- system.file("testdata/VI_16Days_500m_v6/NDVI",
#' package = "MODIStsp")
#' dir.create(file.path(tempdir(), "MODIStsp/VI_16Days_500m_v6/NDVI/"),
#' test_zip <- system.file("testdata/VI_16Days_500m_v6/NDVI.zip",
#' package = "MODIStsp")
#' dir.create(file.path(tempdir(), "MODIStsp/VI_16Days_500m_v6"),
#' showWarnings = FALSE, recursive = TRUE)
#' file.copy(list.files(test_folder, full.names = TRUE),
#' file.path(tempdir(), "MODIStsp/VI_16Days_500m_v6/NDVI/"))
#' utils::unzip(test_zip,
#' exdir = file.path(tempdir(), "MODIStsp/VI_16Days_500m_v6"))
#'
#' opts_file <- system.file("testdata/test_extract.json", package = "MODIStsp")
#' MODIStsp(opts_file = opts_file, gui = FALSE, verbose = FALSE)
Expand Down
8 changes: 7 additions & 1 deletion R/MODIStsp_process_bands.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' @author Lorenzo Busetto, phD (2014-2017)
#' @author Luigi Ranghetti, phD (2015) \email{luigi@@ranghetti.info}
#' @importFrom parallel detectCores
#' @importFrom sf gdal_utils gdal_subdatasets sf_extSoftVersion
#' @importFrom sf gdal_utils gdal_subdatasets sf_extSoftVersion st_drivers
#' @importFrom stats na.omit
#' @importFrom gdalUtilities gdal_translate gdalwarp gdalbuildvrt
#' @importFrom stringr str_sub
Expand Down Expand Up @@ -132,6 +132,12 @@ MODIStsp_process_bands <- function(out_folder_mod, modislist,

outfile_vrt <- tempfile(fileext = ".vrt", tmpdir = tmpdir)

# Exist if HDF4 is not supported
if (!"HDF4" %in% sf::st_drivers("raster")$name) {
stop("Your current GDAL environment does not support HDF4 file format.
Please recompile GDAL including HDF4 drivers.")
}

# workaround to avoid gdalbuildvrt bug in creation of vrt
# files for UInt32 data type -
# create tiff files from the original hdfs, and
Expand Down
1 change: 1 addition & 0 deletions R/check_proc_opts.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#' @param proc_opts data frame of parameters passed by `MODIStsp`
#' @return NULL - processing interrupted if any condition is not met
#' @importFrom assertthat is.dir see_if is.string is.number
#' @keywords internal
#'
check_proc_opts <- function(proc_opts) {

Expand Down
2 changes: 1 addition & 1 deletion R/load_prodopts.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ load_prodopts <- function() {
# prodopts_file <- file.path(prodopts_dir, "MODIStsp_ProdOpts.RData")
# # XML file describing MODIS products

xml_file <- system.file("ExtData", "MODIStsp_ProdOpts.xml",
xml_file <- system.file("ExtData", "MODIStsp_ProdOpts.xml.zip",
package = "MODIStsp")

if (file.exists(prodopts_file)) {
Expand Down
1 change: 0 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ knitr::opts_chunk$set(
```
[![](https://www.r-pkg.org/badges/version-ago/MODIStsp)](https://cran.r-project.org/package=MODIStsp)
[![](https://cranlogs.r-pkg.org/badges/MODIStsp?color=orange)](https://cran.r-project.org/package=MODIStsp)
[![Travis-CI Build Status](https://travis-ci.org/ropensci/MODIStsp.svg?branch=master)](https://travis-ci.org/ropensci/MODIStsp)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1972039.svg)](https://doi.org/10.5281/zenodo.1972039)
[![Coverage Status](https://img.shields.io/codecov/c/github/ropensci/MODIStsp/master.svg)](https://codecov.io/github/ropensci/MODIStsp?branch=master)
[![](https://badges.ropensci.org/184_status.svg)](https://github.com/ropensci/software-review/issues/184)
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

[![](https://www.r-pkg.org/badges/version-ago/MODIStsp)](https://cran.r-project.org/package=MODIStsp)
[![](https://cranlogs.r-pkg.org/badges/MODIStsp?color=orange)](https://cran.r-project.org/package=MODIStsp)
[![Travis-CI Build
Status](https://travis-ci.org/ropensci/MODIStsp.svg?branch=master)](https://travis-ci.org/ropensci/MODIStsp)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1972039.svg)](https://doi.org/10.5281/zenodo.1972039)
[![Coverage
Status](https://img.shields.io/codecov/c/github/ropensci/MODIStsp/master.svg)](https://codecov.io/github/ropensci/MODIStsp?branch=master)
Expand Down
69 changes: 69 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
MODIStsp 2.0.9
================

* Windows 11 on local install, R 4.2.1
* ArchLinux on local install, R 4.2.1
* win-builder (R-devel, R-release, R-oldrelease)

## R CMD check results

There were no ERRORs nor WARNINGs.

`check_win_oldrelease()` returns the following NOTE:
```
Possibly mis-spelled words in DESCRIPTION:
Busetto (40:5)
HDF (29:24)
MODIS (2:35, 25:10, 29:18, 30:60, 38:18)
Ranghetti (40:17)
mosaicking (26:43)
rasters (24:63)
reflectance (31:50, 32:65)
reprojecting (26:55)
resizing (26:72)
```
All these words are correctly spelled, and they do not contain package names
nor book titles, so they should not be quoted.


MODIStsp 2.0.8
================

* Windows 10 on local install, R 4.1.3
* ArchLinux on local install, R 4.1.3
* win-builder (R-devel, R-release, R-oldrelease)

## R CMD check results

There were no ERRORs, WARNINGs nor NOTEs.

This submission fixes the following CRAN NOTEs:
```
Version: 2.0.7
Check: installed package size
Result: NOTE
installed size is 5.1Mb
sub-directories of 1Mb or more:
ExtData 1.9Mb
app 1.3Mb
testdata 1.0Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-macos-arm64, r-devel-macos-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-oldrel-macos-x86_64
```
Package size was reduced using zip archives and resizing the logo.

Moreover, the following error appeared as additional donttest issue:
```
Error in gdal_utils("buildvrt", gdalfile, output.vrt, opts) :
gdal_utils buildvrt: an error occured
Calls: MODIStsp ... MODIStsp_process_bands -> <Anonymous> -> gdal_utils
Execution halted
```
This occurs when the local GDAL environment does not support HDF4 format,
which is required by the package.
This requirement was now explicitly assessed both in the package description
than in the vignette documentation.
If the user tries to run functions while HDF4 is not supported, the code
exits gracefully informing that "Your current GDAL environment does not support
HDF4 file format. Please recompile GDAL including HDF4 drivers.".


MODIStsp 2.0.7
================

Expand Down
10 changes: 5 additions & 5 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 46a3d7c

Please sign in to comment.