Skip to content

Commit

Permalink
configuration adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
gilbertocamara committed Aug 26, 2023
1 parent fcce93c commit 4bb4da3
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 10 deletions.
2 changes: 1 addition & 1 deletion R/api_gdal.R
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
#' @noRd
#' @param file File to be created (with path)
#' @param base_file File to be copied from (with path)
#' @param param GDAL parameters
#' @param params GDAL parameters
#' @param quiet TRUE/FALSE
#' @returns Called for side effects
.gdal_translate <- function(file, base_file, params, quiet) {
Expand Down
60 changes: 60 additions & 0 deletions check_package_cran.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Prepare for CRAN ----

# Update dependencies in DESCRIPTION
attachment::att_amend_desc()

# Run tests and examples outside of CRAN
devtools::test()
devtools::run_examples(run_dontrun = TRUE)

# Check package as CRAN
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))

# Check content
# remotes::install_github("ThinkR-open/checkhelper")
#checkhelper::find_missing_tags()

# Check spelling
# usethis::use_spell_check()
spelling::spell_check_package()

# Check URL are correct
# remotes::install_github("r-lib/urlchecker")
urlchecker::url_check()
urlchecker::url_update()

# check on other distributions
# _rhub
devtools::check_rhub()
rhub::check_for_cran()
# _win devel
devtools::check_win_devel()
devtools::check_win_release()
# Check reverse dependencies
# remotes::install_github("r-lib/revdepcheck")
usethis::use_git_ignore("revdep/")
usethis::use_build_ignore("revdep/")

devtools::revdep()
library(revdepcheck)
# In another session
id <- rstudioapi::terminalExecute("Rscript -e 'revdepcheck::revdep_check(num_workers = 4)'")
rstudioapi::terminalKill(id)
# See outputs
revdep_details(revdep = "pkg")
revdep_summary() # table of results by package
revdep_report() # in revdep/
# Clean up when on CRAN
revdep_reset()

# Update NEWS
# Bump version manually and add list of changes

# Add comments for CRAN
usethis::use_cran_comments(open = rlang::is_interactive())

# Upgrade version number
usethis::use_version(which = c("patch", "minor", "major", "dev")[1])

# Verify you're ready for release, and release
devtools::release()
96 changes: 96 additions & 0 deletions inst/extdata/config_axelspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
sources:
AXELSPACE :
s3_class : ["stac_cube", "eo_cube", "raster_cube"]
service : "STAC"
url : "https://brazildatacube.dpi.inpe.br/stac/"
collections :
GRUS : &grus
bands :
PAN : &grus_pan
missing_value : 0
minimum_value : 1
maximum_value : 10000
scale_factor : 0.0001
offset_value : 0
resolution : 2.5
band_name : "Panchromatic"
data_type : "INT2S"
BLUE : &grus_blue
missing_value : 0
minimum_value : 1
maximum_value : 10000
scale_factor : 0.0001
offset_value : 0
resolution : 5
band_name : "Blue"
data_type : "INT2S"
GREEN :
<<: *grus_blue
band_name : "Green"
RED :
<<: *grus_blue
band_name : "Red"
RED-EDGE :
<<: *grus_blue
band_name : "Red Edge"
NIR :
<<: *grus_blue
band_name : "Near Infrared"
CLOUD : &bdc_awfi_cloud
bit_mask : false
band_name : "CMASK"
values :
0 : "No Data"
127 : "Clear Pixel"
255 : "Cloud"
interp_values : [0, 255]
resolution : 64
data_type : "INT1U"
satellite : "CBERS-4"
sensor : "WFI"
collection_name: "CB4-16D-2"
token_vars : ["BDC_ACCESS_KEY"]
open_data : true
open_data_token : true
metadata_search : "tile"
ext_tolerance: 0.01
grid_system : "BDC-Large V2"
CBERS-WFI-8D :
bands :
NDVI :
<<: *bdc_awfi_ndvi
band_name : "NDVI"
EVI :
<<: *bdc_awfi_ndvi
band_name : "EVI"
B13 :
<<: *bdc_awfi_b13
missing_value : -9999
minimum_value : 0
maximum_value : 10000
scale_factor : 0.0001
offset_value : 0
resolution : 64
band_name : "BAND13"
data_type : "INT2S"
B14 :
<<: *bdc_awfi_b13
band_name : "BAND14"
B15 :
<<: *bdc_awfi_b13
band_name : "BAND15"
B16 :
<<: *bdc_awfi_b13
band_name : "BAND16"
CLOUD :
<<: *bdc_awfi_cloud
band_name : "CMASK"
satellite : "CBERS-4-4A"
sensor : "WFI"
collection_name: "CBERS-WFI_64_8D_LCF-1"
token_vars : ["BDC_ACCESS_KEY"]
open_data : true
open_data_token : true
metadata_search : "tile"
ext_tolerance: 0.01
grid_system : "BDC-Large V2"
9 changes: 0 additions & 9 deletions inst/extdata/config_internals.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
# Internal configuration parameters - relevant only to sits developers
# s3 classes known to sits
sits_s3_classes : ["sits", "patterns", "predicted", "sits_model",
"raster_cube", "probs_cube",
"uncertainty_cube", "class_cube",
"stac_cube", "bdc_cube", "aws_cube",
"usgs_cube", "deafrica_cube"]

# s3 classes resulting from classification and post-classification
sits_s3_classes_proc : ["probs_cube","uncertainty_cube", "class_cube", "variance_cube"]

# bands resulting from classification and post-classification
sits_results_bands : ["probs", "bayes", "uncert", "entropy",
Expand Down

0 comments on commit 4bb4da3

Please sign in to comment.