Skip to content

Commit

Permalink
Remove raster, rgdal, sp packages from dependencies (#187)
Browse files Browse the repository at this point in the history
* removes packages rgdal, raster, sp
* replaced one line that was using raster 
* landscapemetrics changed to 2.0.0
* added macOS dependency, CI was failing
* added to changelog
  • Loading branch information
petrasovaa authored Nov 30, 2023
1 parent 9aabb09 commit ba7dd0b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 92 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:

- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: brew install gdal proj
run: brew install gdal proj fribidi

- uses: r-lib/actions/setup-renv@v2
- uses: r-lib/actions/setup-r-dependencies@v2
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ this repository.

- Fixed quarantine directions outputs in pops-multirun (@petrasovaa, #162).

### Removed

- Removed dependencies: packages rgdal, raster, sp

## [2.0.1] 2022-11-16

### Added
Expand Down
3 changes: 0 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ Imports:
MASS,
aws.s3,
Metrics,
raster,
methods
License: GPL-3 | file LICENSE
BugReports: https://github.com/ncsu-landscape-dynamics/rpops/issues
Expand All @@ -42,8 +41,6 @@ SystemRequirements:
GNU make
Suggests:
testthat,
rgdal,
sp,
rlist,
knitr,
rmarkdown,
Expand Down
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ importFrom(methods,is)
importFrom(parallel,detectCores)
importFrom(parallel,makeCluster)
importFrom(parallel,stopCluster)
importFrom(raster,calc)
importFrom(raster,cellStats)
importFrom(raster,extract)
importFrom(stats,cov)
importFrom(stats,median)
importFrom(stats,rnorm)
Expand Down
2 changes: 0 additions & 2 deletions R/configuration.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#'
#' @param config list of all data necessary used to set up c++ model
#'
#' @importFrom raster
#' cellStats calc extract
#' @importFrom terra app rast xres yres classify extract ext as.points ncol nrow
#' nlyr rowFromCell colFromCell values as.matrix rowFromCell colFromCell crs
#' rowColFromCell global vect
Expand Down
2 changes: 1 addition & 1 deletion R/pops_multirun.R
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ pops_multirun <- function(infected_file,
west_distance_to_quarantine <- data.frame(t(rep(NA, length(probability_runs[[1]]))))
}

which_median <- function(x) raster::which.min(abs(x - median(x)))
which_median <- function(x) which.min(abs(x - median(x)))

median_run_index <- which_median(infected_number[[ncol(infected_number)]])
min_run_index <- which.min(infected_number[[ncol(infected_number)]])
Expand Down
84 changes: 3 additions & 81 deletions renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -569,26 +569,6 @@
],
"Hash": "7e5e3cbd2a7bc07880c94e22348fb661"
},
"igraph": {
"Package": "igraph",
"Version": "1.4.3",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"Matrix",
"R",
"cpp11",
"grDevices",
"graphics",
"magrittr",
"methods",
"pkgconfig",
"rlang",
"stats",
"utils"
],
"Hash": "f7f74f5fbff27d52b1283ac512bc5430"
},
"isoband": {
"Package": "isoband",
"Version": "0.2.7",
Expand Down Expand Up @@ -660,7 +640,7 @@
},
"landscapemetrics": {
"Package": "landscapemetrics",
"Version": "1.5.6",
"Version": "2.0.0",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
Expand All @@ -670,12 +650,11 @@
"cli",
"ggplot2",
"methods",
"raster",
"sp",
"stats",
"terra",
"tibble"
],
"Hash": "6c43fba1dd83b549ef471a36599898de"
"Hash": "101466a15b865990cd6e376df3f439de"
},
"lattice": {
"Package": "lattice",
Expand Down Expand Up @@ -1005,20 +984,6 @@
],
"Hash": "5e3c5dc0b071b21fa128676560dbe94d"
},
"raster": {
"Package": "raster",
"Version": "3.6-20",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"Rcpp",
"methods",
"sp",
"terra"
],
"Hash": "ebebd9f0f203a129eb2da96470191b82"
},
"rcmdcheck": {
"Package": "rcmdcheck",
"Version": "1.4.0",
Expand Down Expand Up @@ -1085,22 +1050,6 @@
],
"Hash": "ae34cd56890607370665bee5bd17812f"
},
"rgdal": {
"Package": "rgdal",
"Version": "1.6-7",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"grDevices",
"graphics",
"methods",
"sp",
"stats",
"utils"
],
"Hash": "10b777236c9e7855bc9dea8e347e30b7"
},
"rlang": {
"Package": "rlang",
"Version": "1.1.1",
Expand Down Expand Up @@ -1205,23 +1154,6 @@
],
"Hash": "3f9796a8d0a0e8c6eb49a4b029359d1f"
},
"sp": {
"Package": "sp",
"Version": "1.6-1",
"Source": "Repository",
"Repository": "CRAN",
"Requirements": [
"R",
"grDevices",
"graphics",
"grid",
"lattice",
"methods",
"stats",
"utils"
],
"Hash": "ca27b2643e3593b7688244d035f2cd92"
},
"stringi": {
"Package": "stringi",
"Version": "1.7.12",
Expand Down Expand Up @@ -1354,16 +1286,6 @@
],
"Hash": "8548b44f79a35ba1791308b61e6012d7"
},
"timechange": {
"Package": "timechange",
"Version": "0.2.0",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "8548b44f79a35ba1791308b61e6012d7",
"Requirements": [
"cpp11"
]
},
"tinytex": {
"Package": "tinytex",
"Version": "0.45",
Expand Down
1 change: 0 additions & 1 deletion tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
library(testthat)
library(raster)
library(PoPS)

testthat::test_check("PoPS")

0 comments on commit ba7dd0b

Please sign in to comment.