Skip to content

Commit

Permalink
Version 1.3.5 (#322)
Browse files Browse the repository at this point in the history
##  Minor changes
- Automatic tests were reorganised and improved after GDAL changes.

## Documentation
- Document **`sen2r`** installation over Ubuntu Focal.
  • Loading branch information
ranghetti authored Jun 1, 2020
1 parent 8823ccc commit 7922a00
Show file tree
Hide file tree
Showing 140 changed files with 2,278 additions and 1,538 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ addons:
- sourceline: 'ppa:opencpu/jq'
- sourceline: 'ppa:ubuntugis/ubuntugis-unstable'
packages:
- libgdal-dev
- libproj-dev
- libudunits2-dev
- libv8-dev
- libprotobuf-dev
Expand All @@ -20,11 +18,16 @@ addons:
- valgrind
- libjq-dev
- python-numpy
- python-gdal
- aria2
- netcdf-bin
- gdal-bin
- python-gdal
- libproj-dev
- libgdal-dev

before_install:
- Rscript -e 'install.packages("remotes")'
- Rscript -e 'remotes::install_github("r-spatial/lwgeom", ref = "467dc314a0bda011e806a8b56c8dcc153f63527c")'

r:
- release
Expand All @@ -41,7 +44,7 @@ before_script:

script:
- R CMD build .
- travis_wait 120 R CMD check *tar.gz
- travis_wait 50 R CMD check *tar.gz

env:
global:
Expand All @@ -54,4 +57,3 @@ notifications:
email:
on_success: change
on_failure: change

2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: sen2r
Type: Package
Title: Find, Download and Process Sentinel-2 Data
Version: 1.3.4.9003
Version: 1.3.5
Authors@R: c(person("Luigi", "Ranghetti",
email = "[email protected]",
role = c("aut", "cre"),
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,19 @@ FROM rocker/geospatial:latest
LABEL maintainer="Luigi Ranghetti <[email protected]>"

# Install external dependencies
RUN apt-get update && apt-get install -y \
RUN apt update && apt install -y \
gdal-bin \
python-gdal \
aria2 \
libpython-dev \
libnode-dev && \
apt-get autoremove -y && \
libpython2-dev && \
apt autoremove -y && \
rm -rf /var/lib/apt/lists/*

# Install the package
RUN R -e "remotes::install_github('ranghetti/sen2r', ref = 'master', dependencies = TRUE)"

# Create the user's files and settings, set runtime dependencies
RUN sudo -u rstudio mkdir /home/rstudio/.sen2r && \
sudo -u rstudio R -e 'sen2r::load_binpaths(c("python", "aria2", "gdal"))' && \
sudo -u rstudio R -e 'sen2r::load_binpaths(c("aria2", "gdal"))' && \
sudo -u rstudio mkdir /home/rstudio/sen2cor && \
sudo -u rstudio mkdir /home/rstudio/sen2cor/sen2cor_255 && \
sudo -u rstudio R -e 'sen2r::install_sen2cor("/home/rstudio/sen2cor/sen2cor_255", version = "2.5.5")' && \
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ importFrom(sf,st_convex_hull)
importFrom(sf,st_coordinates)
importFrom(sf,st_crs)
importFrom(sf,st_difference)
importFrom(sf,st_drivers)
importFrom(sf,st_geometry)
importFrom(sf,st_geometry_type)
importFrom(sf,st_intersection)
Expand Down
21 changes: 20 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# Version 1.3.5

## Major changes
- GDAL is no longer a mandatory external dependency, being used only to smooth/bufferise cloud masks (and optionally to compute spectral indices, RGB images and thumbnails).
- "Graphical" packages needed to run the GUI (**`leaflet`**, **`leafpm`**, **`mapedit`**, **`shiny`**, **`shinyFiles`**, **`shinydashboard`**, **`shinyjs`**, **`shinyWidgets`**) are now suggested dependencies. In the case they are missing and the user tries to run the GUI, an error is returned with the command for installing them.

## Minor changes
- Edit the GUI in order to disable selectors when dependencies required to run them are not available.
- Automatic tests were reorganised and improved after GDAL changes.

## Documentation
- Document **`sen2r`** installation over Ubuntu Focal.
- Update documentation according to GDAL changes.

## Bug fixes
- Fix Travis-**`lwgeom`** incompatibilities (#319)
- Fix #310 and #311


# Version 1.3.4

## New functions
Expand Down Expand Up @@ -180,7 +199,7 @@ Here above the related changes:
<br/>
## **sen2r** CRAN release
_________________________
**`sen2r`** was accepted on CRAN (2017-10-21, version 1.1.0).
**`sen2r`** was accepted on CRAN (2019-10-21, version 1.1.0).
From now, it is possible to install [the CRAN version](https://CRAN.R-project.org/package=sen2r) with the following command:
```r
install.packages("sen2r")
Expand Down
2 changes: 1 addition & 1 deletion R/check_gdal.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ check_gdal <- function(abort = TRUE, gdal_path = NULL, force = FALSE, full_scan
" (see the documentation at ",
"https://sen2r.ranghetti.info/articles/installation#on-linux-systems ",
"to see how to install the required dependency ",
"based on your Linux distribution.",
"based on your Linux distribution."
)}
)
return(invisible(FALSE))
Expand Down
37 changes: 22 additions & 15 deletions R/check_sen2r_deps.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,23 @@ check_sen2r_deps <- function() {
addResourcePath <- shiny::addResourcePath
br <- shiny::br
code <- shiny::code
column <- shiny::column
conditionalPanel <- shiny::conditionalPanel
disable <- shinyjs::disable
disabled <- shinyjs::disabled
div <- shiny::div
em <- shiny::em
enable <- shinyjs::enable
extendShinyjs <- shinyjs::extendShinyjs
fluidPage <- shiny::fluidPage
fluidRow <- shiny::fluidRow
getVolumes <- shinyFiles::getVolumes
h3 <- shiny::h3
helpText <- shiny::helpText
hide <- shinyjs::hide
hr <- shiny::hr
HTML <- shiny::HTML
html <- shinyjs::html
htmlOutput <- shiny::htmlOutput
icon <- shiny::icon
modalButton <- shiny::modalButton
Expand All @@ -55,35 +65,32 @@ check_sen2r_deps <- function() {
observeEvent <- shiny::observeEvent
outputOptions <- shiny::outputOptions
p <- shiny::p
reactive <- shiny::reactive
parseDirPath <- shinyFiles::parseDirPath
parseFilePaths <- shinyFiles::parseFilePaths
radioButtons <- shiny::radioButtons
reactive <- shiny::reactive
reactiveFileReader <- shiny::reactiveFileReader
reactivePoll <- shiny::reactivePoll
reactiveValues <- shiny::reactiveValues
removeModal <- shiny::removeModal
renderText <- shiny::renderText
renderUI <- shiny::renderUI
runApp <- shiny::runApp
shinyApp <- shiny::shinyApp
shinyDirButton <- shinyFiles::shinyDirButton
shinyDirChoose <- shinyFiles::shinyDirChoose
shinyFileChoose <- shinyFiles::shinyFileChoose
shinyFilesButton <- shinyFiles::shinyFilesButton
showModal <- shiny::showModal
span <- shiny::span
stopApp <- shiny::stopApp
strong <- shiny::strong
textInput <- shiny::textInput
textOutput <- shiny::textOutput
uiOutput <- shiny::uiOutput
verbatimTextOutput <- shiny::verbatimTextOutput
hide <- shinyjs::hide
html <- shinyjs::html
updateTextInput <- shiny::updateTextInput
useShinyjs <- shinyjs::useShinyjs
extendShinyjs <- shinyjs::extendShinyjs
disabled <- shinyjs::disabled
disable <- shinyjs::disable
enable <- shinyjs::enable
getVolumes <- shinyFiles::getVolumes
parseDirPath <- shinyFiles::parseDirPath
parseFilePaths <- shinyFiles::parseFilePaths
shinyDirButton <- shinyFiles::shinyDirButton
shinyDirChoose <- shinyFiles::shinyDirChoose
shinyFileChoose <- shinyFiles::shinyFileChoose
shinyFilesButton <- shinyFiles::shinyFilesButton
verbatimTextOutput <- shiny::verbatimTextOutput

# get server volumes
volumes <- c(
Expand Down
2 changes: 1 addition & 1 deletion R/create_indices_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ create_indices_db <- function(xslt_path = NA,
force = FALSE) {

# to avoid NOTE on check
. <- n_index <- name <- longname <- s2_formula <- type <- checked <- link <- NULL
. <- n_index <- name <- longname <- s2_formula <- type <- checked <- link <- a <- NULL

# check if indices.json already exists, and if the version is updated
# we assume that a new version of indices.json is created at every new ackage update
Expand Down
2 changes: 1 addition & 1 deletion R/gdalwarp_grid.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @param tmpdir (optional) Path where intermediate files (.prj) will be created.
#' Default is a temporary directory.
#' @return NULL (the function is called for its side effects)
#' @importFrom sf st_as_sfc st_bbox st_transform
#' @importFrom sf st_as_sfc st_bbox st_transform st_drivers
#' @author Luigi Ranghetti, phD (2019) \email{luigi@@ranghetti.info}
#' @references L. Ranghetti, M. Boschetti, F. Nutini, L. Busetto (2020).
#' "sen2r": An R toolbox for automatically downloading and preprocessing
Expand Down
22 changes: 17 additions & 5 deletions R/helpers_extent.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,21 @@ load_extent_bbox <- function() {
# Define internal functions as aliases of shiny* - leaflet* ones,
# so to avoid using "shiny::" every time
actionButton <- shiny::actionButton
column <- shiny::column
div <- shiny::div
fluidRow <- shiny::fluidRow
htmlOutput <- shiny::htmlOutput
icon <- shiny::icon
leafletOutput <- leaflet::leafletOutput
modalButton <- shiny::modalButton
modalDialog <- shiny::modalDialog
numericInput <- shiny::numericInput
p <- shiny::p
span <- shiny::span
strong <- shiny::strong
tagList <- shiny::tagList
textInput <- shiny::textInput
leafletOutput <- leaflet::leafletOutput


modalDialog(
title = "Specify a bounding box",
Expand Down Expand Up @@ -106,13 +111,17 @@ load_extent_vectfile <- function() {
# so to avoid using "shiny::" every time
actionButton <- shiny::actionButton
div <- shiny::div
em <- shiny::em
helpText <- shiny::helpText
icon <- shiny::icon
leafletOutput <- leaflet::leafletOutput
modalButton <- shiny::modalButton
modalDialog <- shiny::modalDialog
tagList <- shiny::tagList
p <- shiny::p
shinyFilesButton <- shinyFiles::shinyFilesButton
leafletOutput <- leaflet::leafletOutput

strong <- shiny::strong
tagList <- shiny::tagList

modalDialog(
title = "Select vector file",
size = "m",
Expand Down Expand Up @@ -148,11 +157,14 @@ load_extent_draw <- function(extent_ns_name) {
# Define internal functions as aliases of shiny* - leaflet* ones,
# so to avoid using "shiny::" every time
actionButton <- shiny::actionButton
editModUI <- mapedit::editModUI
em <- shiny::em
helpText <- shiny::helpText
icon <- shiny::icon
modalButton <- shiny::modalButton
modalDialog <- shiny::modalDialog
strong <- shiny::strong
tagList <- shiny::tagList
editModUI <- mapedit::editModUI

modalDialog(
title = "Draw the extent",
Expand Down
2 changes: 1 addition & 1 deletion R/s2_dop.R
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,4 @@ s2_dop <- function(s2_orbits = 1:143,
)
}

}
}
Loading

0 comments on commit 7922a00

Please sign in to comment.