Skip to content

Commit

Permalink
clean up for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
dramanica committed Nov 3, 2023
1 parent 7b5ea65 commit 858c716
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 18 deletions.
6 changes: 4 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: tidysdm
Title: Species Distribution Models with tidymodels
Title: Species Distribution Models with Tidymodels
Version: 0.9.1.9001
Authors@R: c(
person("Michela", "Leonardi", role = "aut"),
Expand Down Expand Up @@ -52,10 +52,12 @@ Suggests:
ranger,
readr,
rmarkdown,
spelling,
stacks,
testthat (>= 3.0.0),
tidyterra,
xgboost
xgboost,
V8
VignetteBuilder: knitr
Config/testthat/edition: 3
LazyData: true
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# `tidysdm` 0.9.2

* Clean up for CRAN

# `tidysdm` 0.9.1

* Add a `spatial_recipe` class. This is a BREAKING change that makes previously
Expand Down
10 changes: 4 additions & 6 deletions R/sample_pseudoabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@
#' of semantics) points from a raster given a set of presences.
#' The locations returned as the center points of the sampled cells, which can
#' not overlap with the presences. The following methods are implemented:
#' {/itemize:
#' /item: 'random': pseudo-absences/background randomly sampled from the region covered by the
#' * 'random': pseudo-absences/background randomly sampled from the region covered by the
#' raster (i.e. not NAs).
#' /item: 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer
#' * 'dist_min': pseudo-absences/background randomly sampled from the region excluding a buffer
#' of 'dist_min' from presences (distances in 'm' for lonlat rasters, and in map
#' units for projected rasters).
#' /item: 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers
#' * 'dist_max': pseudo-absences/background randomly sampled from the unioned buffers
#' of 'dist_max' from presences (distances in 'm' for lonlat rasters, and in map
#' units for projected rasters). Using the union of buffers means that areas that
#' are in multiple buffers are not oversampled. This is also referred to as "thickening".
#' /item: 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences
#' * 'dist_disc': pseudo-absences/background randomly sampled from the unioned discs around presences
#' with the two values of 'dist_disc' defining the minimum and maximum distance from
#' presences.
#' }
#' @param data An [`sf::sf`] data frame, or a data frame with coordinate variables.
#' These can be defined in `coords`, unless they have standard names
#' (see details below).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- badges: start -->
[![R-CMD-check](https://github.com/EvolEcolGroup/tidysdm/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/EvolEcolGroup/tidysdm/actions/workflows/R-CMD-check.yaml)
[![codecov](https://codecov.io/gh/EvolEcolGroup/tidysdm/branch/main/graph/badge.svg?token=KLOzxJoLBO)](https://codecov.io/gh/EvolEcolGroup/tidysdm)
[![codecov](https://codecov.io/gh/EvolEcolGroup/tidysdm/branch/main/graph/badge.svg?token=KLOzxJoLBO)](https://app.codecov.io/gh/EvolEcolGroup/tidysdm)
<!-- badges: end -->

The goal of `tidysdm` is to implement Species Distribution Models using the
Expand Down
27 changes: 27 additions & 0 deletions data-raw/helper_functions/submitting_to_cran.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# to this in the dev branch to make sure that all the fundamental issues have been resolved
# run the spell checking
usethis::use_spell_check(lang = "en-GB")

# check the links
urlchecker::url_check()

# enhanced local checks
devtools::check(remote = TRUE, manual = TRUE)

source("./data-raw/helper_functions/check_returns_in_documentation.R")

# now create a cran_submission branch for the final remote tests

# TO DO MANUALLY: update cran-comments.md accordingly
# update version number
# update news

# first check with rhub
tidysdm_checks <- rhub::check_for_cran()

# check on macos and windows via devtools
devtools::check_mac_release()
devtools::check_win_devel()

# TO DO MANUALLY: if everything passes, edit the cran-comments.md to explain any notes
devtools::release()
11 changes: 7 additions & 4 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
BCI
CMD
DALEX
Ecol
GAMs
GBIF
Expand All @@ -13,6 +14,7 @@ Lacerta
MaxEnt
Maxent
Maxnet
POSIXlt
Prepping
Randin
SDM
Expand All @@ -32,10 +34,10 @@ cellsize
center
codecov
color
colorized
colors
com
coords
crossvalidating
crossvalidation
crs
cutoff
Expand All @@ -47,21 +49,21 @@ fn
fp
gam
gams
gbm
ggplot
ggplots
glm
glmnet
iter
jan
jlx
kap
lacerta
lh
lonlat
lqpht
lubridate
magrittr
manpage
mars
maxent
maxnet
mtry
Expand All @@ -72,7 +74,6 @@ palaeo
palaeoclimate
palaeoclimatic
palaeodata
pastclim
pred
prepping
prob
Expand All @@ -85,8 +86,10 @@ rsplit
schreiberi
sdm
spatialsample
stackexchange
stackoverflow
stat
svm
thres
tibble
tibbles
Expand Down
10 changes: 5 additions & 5 deletions man/sample_pseudoabs.Rd

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

3 changes: 3 additions & 0 deletions tests/spelling.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
if(requireNamespace('spelling', quietly = TRUE))
spelling::spell_check_test(vignettes = TRUE, error = FALSE,
skip_on_cran = TRUE)

0 comments on commit 858c716

Please sign in to comment.