Skip to content

Commit

Permalink
Updatee funs and lints
Browse files Browse the repository at this point in the history
  • Loading branch information
dieghernan committed Jan 5, 2025
1 parent 22144c7 commit 75f94d1
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 46 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,4 @@ importFrom(tidyr,fill)
importFrom(tidyr,pivot_longer)
importFrom(tidyr,pivot_wider)
importFrom(tidyr,replace_na)
importFrom(utils,packageVersion)
4 changes: 2 additions & 2 deletions R/geom_spatraster_rgb.R
Original file line number Diff line number Diff line change
Expand Up @@ -308,9 +308,9 @@ zlim_strecth <- function(x, zlim = NULL, stretch = NULL, max_col_value = 255) {
return(x)
}

if (!is.null(zlim) & length(zlim) >= 2) {
if (all(!is.null(zlim), length(zlim) >= 2)) {
zlim <- sort(zlim)[1:2]
x <- clamp(x, zlim[1], zlim[2], values = TRUE)
x <- terra::clamp(x, zlim[1], zlim[2], values = TRUE)
}

if (!is.null(stretch)) {
Expand Down
1 change: 1 addition & 0 deletions R/tidyterra-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#' @importFrom grDevices terrain.colors rgb col2rgb grey
#' @importFrom tibble as_tibble
#' @importFrom cli qty
#' @importFrom utils packageVersion
NULL

#' @export
Expand Down
39 changes: 23 additions & 16 deletions revdep/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Platform

|field |value |
|:--------|:------------------------------------------------------|
|version |R version 4.4.2 (2024-10-31) |
|os |Ubuntu 22.04.5 LTS |
|system |x86_64, linux-gnu |
|ui |X11 |
|language |(EN) |
|collate |C.UTF-8 |
|ctype |C.UTF-8 |
|tz |UTC |
|date |2024-12-13 |
|pandoc |3.1.11 @ /opt/hostedtoolcache/pandoc/3.1.11/x64/pandoc |
|field |value |
|:--------|:----------------------------------------|
|version |R version 4.4.2 (2024-10-31 ucrt) |
|os |Windows 11 x64 (build 26100) |
|system |x86_64, mingw32 |
|ui |RStudio |
|language |(EN) |
|collate |Spanish_Spain.utf8 |
|ctype |Spanish_Spain.utf8 |
|tz |Europe/Madrid |
|date |2025-01-05 |
|rstudio |2024.12.0+467 Kousa Dogwood (desktop) |
|pandoc |3.1.12.2 @ C:\PROGRA~1\Pandoc\pandoc.exe |

# Dependencies

Expand All @@ -37,7 +38,7 @@
|lifecycle |1.0.4 |1.0.4 | |
|magrittr |2.0.3 |2.0.3 | |
|munsell |0.5.1 |0.5.1 | |
|pillar |1.9.0 |1.9.0 | |
|pillar |1.10.0 |1.10.0 | |
|pkgconfig |2.0.3 |2.0.3 | |
|proxy |0.4-27 |0.4-27 | |
|purrr |1.0.2 |1.0.2 | |
Expand Down Expand Up @@ -65,7 +66,13 @@

## Failed to check (1)

|package |version |error |warning |note |
|:-------|:-------|:-----|:-------|:----|
|ebvcube |? | | | |
|package |version |error |warning |note |
|:--------------|:-------|:-----|:-------|:----|
|disaggregation |0.4.0 |1 | |1 |

## New problems (1)

|package |version |error |warning |note |
|:-------|:-------|:------|:-------|:----|
|[ebvcube](problems.md#ebvcube)|0.3.3 |__+1__ | |1 |

17 changes: 14 additions & 3 deletions revdep/cran.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
## revdepcheck results

We checked 23 reverse dependencies (0 from CRAN + 23 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
We checked 23 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
* We saw 1 new problems
* We failed to check 1 packages

Issues with CRAN packages are summarised below.

### New problems
(This reports the first line of each new failure)

* ebvcube
checking tests ...

### Failed to check

* disaggregation (NA)
41 changes: 17 additions & 24 deletions revdep/failures.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,26 @@
# ebvcube
# disaggregation

<details>

* Version:
* GitHub: https://github.com/dieghernan/tidyterra
* Source code: NA
* Number of recursive dependencies: 0

</details>

## Error before installation

### Devel

```
```
### CRAN

```
* Version: 0.4.0
* GitHub: NA
* Source code: https://github.com/cran/disaggregation
* Date/Publication: 2024-10-02 20:40:03 UTC
* Number of recursive dependencies: 100

Run `revdepcheck::revdep_details(, "disaggregation")` for more info

</details>

## In both

* R CMD check timed out


* checking installed package size ... NOTE
```
installed size is 13.4Mb
sub-directories of 1Mb or more:
libs 12.8Mb
```
```
47 changes: 46 additions & 1 deletion revdep/problems.md
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
*Wow, no problems at all. :)*
# ebvcube

<details>

* Version: 0.3.3
* GitHub: https://github.com/EBVcube/ebvcube
* Source code: https://github.com/cran/ebvcube
* Date/Publication: 2024-12-17 10:20:06 UTC
* Number of recursive dependencies: 121

Run `revdepcheck::revdep_details(, "ebvcube")` for more info

</details>

## Newly broken

* checking tests ...
```
Running 'testthat.R'
ERROR
Running the tests in 'tests/testthat.R' failed.
Last 13 lines of output:
> test_check("ebvcube")
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 225 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-analyse.R:22:3'): test ebv_analyse bb ──────────────────────────
Error in `ebv_i_check_ram(c(ncol, nrow), timestep, entity, prop@ebv_cube$type)`: Reading that data into memory will significantly slow down your PC. If you still want to go on, set ignore_RAM = TRUE.
Backtrace:
1. └─ebvcube::ebv_analyse(...) at test-analyse.R:22:3
2. └─ebvcube::ebv_read_bb(...)
3. └─ebvcube:::ebv_i_check_ram(c(ncol, nrow), timestep, entity, prop@ebv_cube$type)
[ FAIL 1 | WARN 0 | SKIP 0 | PASS 225 ]
Error: Test failures
Execution halted
```
## In both
* checking data for non-ASCII characters ... NOTE
```
Note: found 2 marked UTF-8 strings
```

0 comments on commit 75f94d1

Please sign in to comment.