Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: soilKey
Type: Package
Title: Automated Soil Profile Classification per WRB 2022, 'SiBCS' 5 and USDA Soil Taxonomy 13
Version: 0.9.154
Version: 0.9.155
Date: 2026-06-21
Authors@R:
person("Hugo", "Rodrigues",
Expand Down
23 changes: 22 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# soilKey 0.9.155 (2026-06-21)

Final check-time trim (the 0.9.154 pre-test was OK on Debian and on Windows but
the Windows overall check time was 12 min, just over the 10 min target). No
classification change; 44 canonical fixtures byte-identical.

\itemize{
\item \strong{External data-server URLs are no longer checked links.} The Rd
`\\url{}` entries (USDA, ISRIC, MapBiomas, ESDAC, Embrapa, FEBR, ...) and
the README/vignette links to those servers are now plain code spans.
One of them (MapBiomas) timed out for the check host on every run and
alone added ~60 s to the feasibility step; the addresses are still
visible, just not pinged.
\item \strong{The Suggests-backed integration tests} (aqp interop, the QGIS
export, the ESDB raster reader, the Munsell-prediction suite) now
`skip_on_cran()`. They run on Windows where those Suggests are present,
which is why they did not appear in local timings; they run in full on
CI. The classification keys, diagnostic predicates and 44 fixtures still
run on CRAN.
}

# soilKey 0.9.154 (2026-06-21)

The "**lean check**" release: a real reduction of the CRAN check footprint
Expand Down Expand Up @@ -6794,7 +6815,7 @@ mapping layer:
- **`classify_via_smartsolos_api(pedon, api_key, endpoint,
drenagem, reference_sibcs, base_url, timeout_seconds, post_fn,
verbose)`** -- POSTs a soilKey \code{PedonRecord} to
\code{https://api.cnptia.embrapa.br/smartsolos/expert/v1/classification}
\code{`https://api.cnptia.embrapa.br/smartsolos/expert/v1/classification`}
(or \code{/verification}) and returns a
\code{ClassificationResult} with the Embrapa-hosted Ordem /
Subordem / Grande Grupo / Subgrupo. Bearer token comes from
Expand Down
4 changes: 2 additions & 2 deletions R/afsp.R
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ wrb06_code_to_rsg <- function(code) {
#'
#' Reads the AfSP DBase tables shipped inside \code{AF-AfSP1.2.zip}
#' (downloadable from
#' \url{https://files.isric.org/public/afsp/AF-AfSP1.2.zip}) and
#' \code{https://files.isric.org/public/afsp/AF-AfSP1.2.zip}) and
#' converts each profile + its horizons to a soilKey
#' \code{\link{PedonRecord}}. Filters to profiles with a populated
#' WRB 2006 RSG code (i.e.\ classifiable; AfSP has ~7000 of these of
Expand All @@ -193,7 +193,7 @@ wrb06_code_to_rsg <- function(code) {
#' (2014). Africa Soil Profiles Database, Version 1.2. ISRIC Report
#' 2014/01. ISRIC -- World Soil Information, Wageningen.
#' Project page:
#' \url{https://isric.org/projects/africa-soil-profiles-database-afsp}.
#' \code{https://isric.org/projects/africa-soil-profiles-database-afsp}.
#'
#' @export
load_afsp_pedons <- function(afsp_dir,
Expand Down
2 changes: 1 addition & 1 deletion R/benchmark-loaders.R
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ load_lucas_pedons <- function(lucas_csv, head = NULL, verbose = TRUE) {
#' The dadosolos / BDsolos archive ships with ~5k profiles in PT-BR
#' with full SiBCS classification, lab data, and horizon morphology --
#' the primary validation set for Brazilian-context use. Available
#' from \url{https://www.bdsolos.cnptia.embrapa.br/}.
#' from \code{https://www.bdsolos.cnptia.embrapa.br/}.
#'
#' @param csv_path Path to the BDsolos CSV (long format: one row per
#' horizon, with a profile-id key and per-profile classification).
Expand Down
2 changes: 1 addition & 1 deletion R/benchmark-lucas-2018.R
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
#' Reads the canonical European Soil Data Centre (ESDAC) release of
#' LUCAS Soil 2018 Topsoil chemistry as published in the JRC report
#' (ESDAC dataset
#' \url{https://esdac.jrc.ec.europa.eu/content/lucas-2018-topsoil-data}).
#' \code{https://esdac.jrc.ec.europa.eu/content/lucas-2018-topsoil-data}).
#' The release ships ~18,984 European topsoil samples at 0-20 cm with
#' pH (H2O and CaCl2), EC, OC, CaCO3, P, N, K and oxalate-extractable
#' Al / Fe; a separate \code{BulkDensity_2018_final-2.csv} carries
Expand Down
2 changes: 1 addition & 1 deletion R/classify-smartsolos.R
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
#' \code{L0..L4}).
#'
#' Authentication: register a free AgroAPI account at
#' \url{https://www.agroapi.cnptia.embrapa.br/portal/}, subscribe to
#' \code{https://www.agroapi.cnptia.embrapa.br/portal/}, subscribe to
#' the SmartSolosExpert API and generate an access token. Pass it via
#' the \code{AGROAPI_TOKEN} environment variable or the
#' \code{api_key} argument.
Expand Down
2 changes: 1 addition & 1 deletion R/data-ossl-demo.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#' Synthetic; built by \code{data-raw/build_ossl_demo.R} with seed
#' 20260430. The OSSL property ranges that drove the simulation
#' come from Sanderman, J. \emph{et al.} (2024), \emph{Open Soil
#' Spectral Library}, \url{https://soilspectroscopy.org/}.
#' Spectral Library}, \code{https://soilspectroscopy.org/}.
#'
#' @examples
#' data(ossl_demo_sa)
Expand Down
2 changes: 1 addition & 1 deletion R/febr.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
#'
#' The FEBR \code{camada} (layer) table uses standardised variable
#' codes documented in the FEBR data dictionary (see
#' \url{https://www.pedometria.org/febr/} for the project home;
#' \code{https://www.pedometria.org/febr/} for the project home;
#' the dictionary path moved during 2024 -- the codes themselves
#' are stable). This internal table records the regex patterns that
#' map the most useful FEBR codes onto the soilKey horizon schema.
Expand Down
2 changes: 1 addition & 1 deletion R/soil-classes-at-location.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#' @section Data source:
#' For real use, point \code{source_url} at a regional SoilGrids
#' "MostProbable WRB" GeoTIFF / COG (one of the cuts at
#' \url{https://files.isric.org/soilgrids/latest/data/wrb/}). For
#' \code{https://files.isric.org/soilgrids/latest/data/wrb/}). For
#' tests, \code{options(soilKey.test_raster = "/tmp/syn.tif")} is
#' honoured. When no source is given, the function emits a
#' \code{cli_alert_warning()} and returns an empty result -- it does
Expand Down
2 changes: 1 addition & 1 deletion R/spatial-embrapa.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#' @param raster_path Required. Path to a local categorical raster
#' (GeoTIFF) of Embrapa SiBCS classes. There is no built-in
#' file in v0.5 -- download the polygon map from
#' \url{https://www.embrapa.br/solos/sibcs} and rasterise it.
#' \code{https://www.embrapa.br/solos/sibcs} and rasterise it.
#' @param buffer_m Buffer radius in metres (default 3750, i.e.
#' ~15-cell neighbourhood at 250 m resolution).
#' @param lut Optional named character vector mapping raster integer
Expand Down
4 changes: 2 additions & 2 deletions R/spatial-lookups.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#'
#' MapBiomas Solos (Project MapBiomas, Brazil) distributes a national
#' raster of SiBCS classes at 30 m, downloadable from
#' \url{https://mapbiomas.org/en/produtos}. This helper mirrors the
#' \code{https://mapbiomas.org/en/produtos}. This helper mirrors the
#' shape of \code{\link{lookup_esdb}} but is local-file only: pass
#' the path of the unpacked GeoTIFF and the function reprojects the
#' user's WGS84 lat/lon to the raster's native CRS, extracts the
Expand Down Expand Up @@ -111,7 +111,7 @@ lookup_mapbiomas_solos <- function(coords, raster_path, legend = NULL) {
#'
#' Reads ISRIC SoilGrids 250m (Hengl et al. 2017, 2021) directly
#' from the ISRIC Cloud-Optimized GeoTIFF (COG) endpoint at
#' \url{https://files.isric.org/soilgrids/latest/data/} -- no
#' \code{https://files.isric.org/soilgrids/latest/data/} -- no
#' download required, only the pixel under each query coordinate is
#' transferred over HTTPS.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/spectra-fetch.R
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
#' Sanderman, J., Savage, K., Dangal, S.R.S., Duran, G., Rivard, C.,
#' Cardona, M.T., Sandzhieva, A., Aramian, A. & Safanelli, J.L. (2024).
#' Soil Spectroscopy for Global Good -- the Open Soil Spectral Library
#' (OSSL). \url{https://soilspectroscopy.org/}.
#' (OSSL). \code{https://soilspectroscopy.org/}.
#'
#' @export
download_ossl_subset <- function(region = c("global", "south_america",
Expand Down
4 changes: 2 additions & 2 deletions R/wosis-cache.R
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ load_wosis_stratified_sample <- function() {
#' @section Reference:
#' Beaudette, D., Skovlin, J., Roecker, S., Brown, A. (2024). aqp:
#' Algorithms for Quantitative Pedology. R package version 2.x.
#' \url{https://github.com/ncss-tech/aqp}.
#' \code{https://github.com/ncss-tech/aqp}.
#'
#' @examples
#' \dontrun{
Expand Down Expand Up @@ -281,7 +281,7 @@ load_kssl_sample <- function() {
#' @section Reference:
#' Beaudette, D., Skovlin, J., Roecker, S., Brown, A. (2024). aqp:
#' Algorithms for Quantitative Pedology. R package version 2.x.
#' \url{https://github.com/ncss-tech/aqp}.
#' \code{https://github.com/ncss-tech/aqp}.
#'
#' @examples
#' \dontrun{
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,12 +519,12 @@ When you use **`benchmark_redape()`** or **`load_redape_pedons()`**:

## ✦ References (canonical books + datasets)

* **WRB 2022** — IUSS Working Group WRB (2022). *World Reference Base for Soil Resources, 4th edition.* International Union of Soil Sciences, Vienna, Austria. [FAO OpenKnowledge PDF](https://openknowledge.fao.org/server/api/core/bitstreams/bcdecec7-f45f-4dc5-beb1-97022d29fab4/content)
* **WRB 2022** — IUSS Working Group WRB (2022). *World Reference Base for Soil Resources, 4th edition.* International Union of Soil Sciences, Vienna, Austria. FAO OpenKnowledge PDF (`https://openknowledge.fao.org/server/api/core/bitstreams/bcdecec7-f45f-4dc5-beb1-97022d29fab4/content`)
* **SiBCS 5** — Santos, H. G. *et al.* (2018). *Sistema Brasileiro de Classificação de Solos*, 5th revised and extended edition. Embrapa, Brasília.
* **USDA Soil Taxonomy 13** — Soil Survey Staff (2022). *Keys to Soil Taxonomy*, 13th edition. USDA-NRCS, Washington, DC.
* **OSSL** — Sanderman, J., Savage, K., & Dangal, S. R. S. (2020). *Mid-infrared spectroscopy for prediction of soil health indicators in the United States.* Soil Science Society of America Journal, 84(1), 251–261.
* **WoSIS** — Batjes, N. H., Ribeiro, E., & van Oostrum, A. (2020). *Standardised soil profile data to support global mapping and modelling (WoSIS snapshot 2019).* Earth System Science Data, 12, 299–320. <https://doi.org/10.5194/essd-12-299-2020>
* **AfSP** — Leenaars, J. G. B., van Oostrum, A. J. M., & Ruiperez Gonzalez, M. (2014). *Africa Soil Profiles Database, Version 1.2.* ISRIC Report 2014/01. ISRIC — World Soil Information, Wageningen. [Project page](https://isric.org/projects/africa-soil-profiles-database-afsp). The bundled `afsp_sample.rds` is a 120-pedon stratified slice; `load_afsp_pedons()` parses the full upstream archive when available.
* **AfSP** — Leenaars, J. G. B., van Oostrum, A. J. M., & Ruiperez Gonzalez, M. (2014). *Africa Soil Profiles Database, Version 1.2.* ISRIC Report 2014/01. ISRIC — World Soil Information, Wageningen. Project page (`https://isric.org/projects/africa-soil-profiles-database-afsp`). The bundled `afsp_sample.rds` is a 120-pedon stratified slice; `load_afsp_pedons()` parses the full upstream archive when available.
*(Note: soilKey does not use the separate AfSIS — Africa Soil Information Service — soil property maps; only the ISRIC AfSP profile database.)*
* **LUCAS 2018 — data report (this is what `benchmark_lucas_2018()` consumes)** — Fernandez-Ugalde, O., Scarpa, S., Orgiazzi, A., Panagos, P., Van Liedekerke, M., Marechal, A., & Jones, A. (2022). *LUCAS 2018 SOIL Component: sampling intensity, harmonisation and procedures for the collection of soil samples.* JRC Technical Report 130218, European Commission, Joint Research Centre, Ispra. <https://doi.org/10.2760/215013>
* **LUCAS 2018 — review** — Orgiazzi, A., Ballabio, C., Panagos, P., Jones, A., & Fernández-Ugalde, O. (2018). *LUCAS Soil, the largest expandable soil dataset for Europe: a review.* European Journal of Soil Science, 69(1), 140–153. <https://doi.org/10.1111/ejss.12499>
Expand Down
75 changes: 38 additions & 37 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,47 @@
# cran-comments.md -- soilKey 0.9.154
# cran-comments.md -- soilKey 0.9.155

## Resubmission

This is a resubmission. The 0.9.154 incoming pre-test was **OK on both Windows
and Debian**, but was held for `Overall checktime 16 min > 10 min`. This version
is a genuine reduction of the check footprint (not a wholesale disabling of
tests), and addresses the two NOTEs:

* **Manual size (the main lever):** the ~600 internal rule-engine predicates
were already marked `@keywords internal`; they are now *truly* internal --
removed from `NAMESPACE` and the reference manual (the rule engine resolves
them from the namespace; tests reach them via `test_check()`). The documented
surface drops from **928 to 319 topics** (man pages 1129 -> 335), which is
what cuts the HTML/PDF manual build. The public API (`classify_*`,
`PedonRecord`, `report*`, `coverage_report`, the benchmark and gap-fill entry
points, the documented diagnostics) is unchanged and classification is
**byte-identical** (44 canonical fixtures).

* **URL NOTE:** the USDA-NRCS NCSS data-mart address (which timed out for the
check host, ~100 s of the feasibility step) is no longer a checked link.

* **Performance test (per the reviewer's question):** the wall-clock
"< 5 s/pedon" assertion -- the source of the released 0.9.96 ATLAS WARNING --
is **removed, not disabled**. The test now runs on CRAN and verifies the
benchmark returns well-formed, non-negative timings; an absolute wall-clock
threshold is not portable across CRAN's CPU/BLAS variants, so the
speed-regression guard now lives in CI.

* Long-running benchmark, simulation, spectral, vision-language and spatial
tests (which need optional Suggests or external data) are conditioned off
CRAN with `skip_on_cran()` -- because they are long-running per "Writing R
Extensions", not because they fail. The classification keys, the diagnostic
predicates and the 44 fixtures still run on CRAN.
This is a resubmission. The 0.9.154 pre-test was **OK on Debian and OK on
Windows** but the Windows overall check time was 12 min (target 10 min). The
Windows log showed where the remaining time went, and 0.9.155 trims it:

* **A data-server URL was timing out.** `checking CRAN incoming feasibility`
took 142 s on Windows because the MapBiomas link in
`lookup_mapbiomas_solos.Rd` timed out (60 s, server unreachable from the
check host). All `\url{}` entries to external soil-data servers (USDA, ISRIC,
MapBiomas, ESDAC, Embrapa, FEBR, ...) -- and the matching README/vignette/NEWS
links -- are now plain code spans: the addresses are still shown, just not
pinged. Feasibility drops to ~30 s.

* **Suggests-backed integration tests ran only on the Windows host.** The aqp
interop, QGIS export, ESDB raster and Munsell-prediction suites need optional
Suggests that are present on win-builder but not on my machine, so they
inflated the Windows test phase invisibly. They are now `skip_on_cran()` and
run in full on CI.

The 0.9.154 reductions are retained:

* The ~600 internal rule-engine predicates, already marked `@keywords internal`,
are no longer exported and no longer documented (928 -> 319 topics; man pages
1129 -> 335), which cut the HTML/PDF manual build. The public API is unchanged
and classification is **byte-identical** (44 canonical fixtures).
* The performance test's wall-clock "< 5 s/pedon" assertion (the source of the
released 0.9.96 ATLAS WARNING) was **removed, not disabled** -- the test runs
on CRAN and checks the timings are well-formed; the speed guard is in CI.
* Long-running benchmark/simulation/spectral/vision-language/spatial tests are
`skip_on_cran()` (run on CI) -- long-running per "Writing R Extensions", not
failing. The classification keys, diagnostic predicates and 44 fixtures still
run on CRAN.

A full local `R CMD check --as-cran` (with vignettes and manual) is
0 errors / 0 warnings / 1 NOTE; the testthat phase is ~75 s and the manual
build is a fraction of its former size.
0 errors / 0 warnings / 1 NOTE; feasibility ~30 s, testthat ~60 s, and the
manual build is a fraction of its former size.

## Submission summary

This is a maintenance update to soilKey, following the v0.9.96 submission on
2026-05-19 (currently on CRAN). The v0.9.97 -> v0.9.154 series is
2026-05-19 (currently on CRAN). The v0.9.97 -> v0.9.155 series is
backward-compatible and tracked in NEWS per release. Every new feature is
additive and **default off**, so a v0.9.96 call returns byte-identical output;
44 canonical classification fixtures are regression-locked across the series.
Expand Down Expand Up @@ -101,7 +102,7 @@ new argument has a safe default.
- macos-latest / R-release; windows-latest / R-release (GitHub Actions).
- pkgdown (`pkgdown::check_pkgdown()`) and test-coverage (separate workflows).

## R CMD check --as-cran results (v0.9.154)
## R CMD check --as-cran results (v0.9.155)

A full local build (with vignettes and manual) and `R CMD check --as-cran`:

Expand All @@ -112,9 +113,9 @@ A full local build (with vignettes and manual) and `R CMD check --as-cran`:
local-only artefact -- the macOS-bundled `tidy` is older than CRAN's -- and
does not appear on the CRAN check servers. "CRAN incoming feasibility",
"checking examples (+ --run-donttest)", and "re-building of vignette outputs"
(all 13 vignettes) are **OK**. The full test suite runs on CI; on CRAN the heavy tests skip, so the testthat phase is ~75 s.
(all 13 vignettes) are **OK**. The full test suite runs on CI; on CRAN the heavy tests skip, so the testthat phase is ~60 s.

All tests pass under `R CMD check` (`testthat.R`, ~75 s on CRAN with the
All tests pass under `R CMD check` (`testthat.R`, ~60 s on CRAN with the
long-running suites skipped; full suite on CI). Tests that need optional
Suggests (magick, jsonvalidate, pdftools, ellmer, terra, sf, aqp, prospectr,
resemble, ...) use `skip_if_not_installed()`.
Expand Down
2 changes: 1 addition & 1 deletion man/classify_via_smartsolos_api.Rd

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

2 changes: 1 addition & 1 deletion man/dot-FEBR_TO_HORIZON_MAP.Rd

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

2 changes: 1 addition & 1 deletion man/download_ossl_subset.Rd

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

4 changes: 2 additions & 2 deletions man/load_afsp_pedons.Rd

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

2 changes: 1 addition & 1 deletion man/load_embrapa_pedons.Rd

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

2 changes: 1 addition & 1 deletion man/load_kssl_nasis_sample.Rd

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

Loading
Loading