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
12 changes: 6 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: cffdrs
Title: Canadian Forest Fire Danger Rating System
Version: 1.9.0
Version: 1.9.2
Date: 2024-01-19
Authors@R: c(
person("Xianli", "Wang", email = "Xianli.Wang@nrcan-rncan.gc.ca", role = "aut"),
Expand All @@ -27,12 +27,12 @@ URL: https://github.com/cffdrs/cffdrs_r
BugReports:
https://github.com/cffdrs/cffdrs_r/issues/new/choose
Depends:
R (>= 3.5)
Imports:
sf,
terra,
data.table,
foreach,
R (>= 3.5),
sf,
terra
Imports:
doParallel,
geosphere,
methods,
Expand All @@ -42,4 +42,4 @@ Suggests:
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cffdrs 1.9.2

# version 1.9.0

---
Expand Down
6 changes: 3 additions & 3 deletions R/cffdrs-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#' major vegetation types in Canada.
#'
#' \tabular{ll}{ Package: \tab cffdrs\cr Type: \tab Package\cr Version: \tab
#' 1.8.16\cr Date: \tab 2020-05-26\cr License: \tab GPL-2\cr } This package
#' 1.9.2\cr Date: \tab 2025-07-09\cr License: \tab GPL-2\cr } This package
#' includes eleven functions. Seven functions, \code{\link{fwi}},
#' \code{\link{fwiRaster}}, \code{\link{hffmc}}, \code{\link{hffmcRaster}},
#' \code{\link{sdmc}}, \code{\link{gfmc}}, and
Expand All @@ -58,11 +58,10 @@
#'
#' @name cffdrs-package
#' @aliases cffdrs-package cffdrs
#' @docType package
#' @author Xianli Wang, Alan Cantin, Marc-André Parisien, Mike Wotton, Kerry
#' Anderson, Brett Moore, Tom Schiks, and Mike Flannigan
#'
#' Maintainer: Alan Cantin \email{Alan.Cantin@nrcan-rncan.gc.ca}
#' Maintainer: Brett Moore \email{Brett.Moore@nrcan-rncan.gc.ca}
#' @seealso \code{\link{fbp}}, \code{\link{fire_season}}, \code{\link{fwi}},
#' \code{\link{fwiRaster}}, \code{\link{gfmc}}, \code{\link{hffmc}},
#' \code{\link{hffmcRaster}}, \code{\link{lros}}, \code{\link{pros}},
Expand Down Expand Up @@ -198,6 +197,7 @@
#' # end date, and using overwintered DC
#' fwi_withFSwDC
#'
"_PACKAGE"
NULL


Expand Down
1 change: 1 addition & 0 deletions R/fbpRaster.r
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,7 @@
#' # The dataset is the standard test data for FBP system
#' # provided by Wotton et al (2009), and randomly assigned
#' # to a stack of raster layers
#' require(terra)
#' test_fbpRaster <- rast(
#' system.file("extdata", "test_fbpRaster.tif", package = "cffdrs")
#' )
Expand Down
1 change: 1 addition & 0 deletions R/gfmcRaster.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#' @export gfmcRaster
#'
#' @examples
#' require(terra)
#' set.seed(5123)
#' test_gfmc_r <- rast(
#' nrows = 25,
Expand Down
4 changes: 2 additions & 2 deletions man/cffdrs-package.Rd

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

1 change: 1 addition & 0 deletions man/fbpRaster.Rd

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

1 change: 1 addition & 0 deletions man/gfmcRaster.Rd

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

12 changes: 8 additions & 4 deletions tests/testthat/test_fbp.r
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,29 @@ test_that("fbp_10", {
return(actual)
})
})
## Returns NA and warns ad nauseum
test_that("fbp_11", {
fct_test_fbp("fbp_11",
expect_warning(
fct_test_fbp("fbp_11",
function(test_fbp) {
non_fuel <- copy(test_fbp)
non_fuel$FuelType <- "NF"
actual <- fbp(non_fuel, "All")
# HACK: for now change type here
actual$FD <- as.logical(actual$FD)
return(actual)
})
}),"NaNs produced")
})
## Returns NA and warns ad nauseum
test_that("fbp_12", {
fct_test_fbp("fbp_12",
expect_warning(
fct_test_fbp("fbp_12",
function(test_fbp) {
water <- copy(test_fbp)
water$FuelType <- "WA"
actual <- fbp(water, "All")
# HACK: for now change type here
actual$FD <- as.logical(actual$FD)
return(actual)
})
}),"NaNs produced")
})
Loading