-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fireexposuR: Compute and Visualize Wildfire Exposure #659
Comments
Thanks for submitting to rOpenSci, our editors and @ropensci-review-bot will reply soon. Type |
🚀 Editor check started 👋 |
Checks for fireexposuR (v1.0.0)git hash: aacfb397
(Checks marked with 👀 may be optionally addressed.) Package License: GPL (>= 3) 1. Package DependenciesDetails of Package Dependency Usage (click to open)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table. basec (27), exp (19), sum (11), cbind (9), data.frame (9), as.data.frame (8), paste (6), ifelse (5), by (4), levels (4), matrix (4), ncol (4), all (3), factor (3), labels (3), rep (3), seq (3), class (2), match (2), names (2), round (2), unique (2), as.factor (1), for (1), if (1), length (1), max (1), mean (1), missing (1), outer (1), plot (1), rbind (1), scale (1), table (1) magrittr%>% (95) dplyrmutate (43), count (4), case_when (1), summarise (1) ggplot2element_blank (9), ggplot (7), aes (6), element_text (5), coord_sf (4), geom_col (3), labs (3), element_rect (2), expansion (2), scale_fill_manual (2), geom_bar (1), geom_hline (1), geom_vline (1), scale_x_discrete (1), scale_y_continuous (1), theme (1) terraclassify (7), crop (6), focal (4), mask (4), project (4), vect (4), extract (3), res (3), rescale (3), spatSample (2), as.polygons (1), buffer (1), crs (1), merge (1), perim (1) tidyterrageom_spatraster_rgb (6), geom_spatvector (3), rename (2), filter (1), geom_spatraster (1), scale_fill_whitebox_c (1), whitebox.colors (1) fireexposuRexposure (7), direxp (2), adjustexp (1), extractexp (1), mapexpclass (1), mapexpcont (1), multidirexp (1) gridunit (12) statswindow (6), df (4) geospheredestPoint (8) maptilesget_credit (3), get_tiles (3) utilsdata (6) ggspatialannotation_scale (4) graphicstitle (4) tidyrpivot_wider (2), pivot_longer (1) grDevicespalette (2) MultiscaleDTMannulus_window (2) NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately. 2. Statistical PropertiesThis package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing. Details of statistical properties (click to open)
The package has:
Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the The final measure (
2a. Network visualisationClick to see the interactive network visualisation of calls between objects in package 3.
|
id | name | conclusion | sha | run_number | date |
---|---|---|---|---|---|
11037129203 | pkgcheck | success | aacfb3 | 7 | 2024-09-25 |
11037129172 | R-CMD-check.yaml | success | aacfb3 | 7 | 2024-09-25 |
3b. goodpractice
results
R CMD check
with rcmdcheck
rcmdcheck found no errors, warnings, or notes
Test coverage with covr
Package coverage: 93.87
Cyclocomplexity with cyclocomp
The following function have cyclocomplexity >= 15:
function | cyclocomplexity |
---|---|
extractexp | 17 |
Static code analyses with lintr
lintr found the following 10 potential issues:
message | number of times |
---|---|
Avoid 1:length(...) expressions, use seq_len. | 1 |
Avoid library() and require() calls in packages | 3 |
Lines should not be more than 80 characters. This line is 83 characters. | 4 |
Lines should not be more than 80 characters. This line is 84 characters. | 1 |
Lines should not be more than 80 characters. This line is 85 characters. | 1 |
4. Other Checks
Details of other checks (click to open)
✖️ The following function name is duplicated in other packages:
-
exposure
from mds, mlxR, netdiffuseR, RsSimulx
Package Versions
package | version |
---|---|
pkgstats | 0.1.6.17 |
pkgcheck | 0.1.2.58 |
Editor-in-Chief Instructions:
This package is in top shape and may be passed on to a handling editor
@ropensci-review-bot check package |
Thanks, about to send the query. |
🚀 Editor check started 👋 |
Checks for fireexposuR (v1.0.0)git hash: aacfb397
(Checks marked with 👀 may be optionally addressed.) Package License: GPL (>= 3) 1. Package DependenciesDetails of Package Dependency Usage (click to open)
The table below tallies all function calls to all packages ('ncalls'), both internal (r-base + recommended, along with the package itself), and external (imported and suggested packages). 'NA' values indicate packages to which no identified calls to R functions could be found. Note that these results are generated by an automated code-tagging system which may not be entirely accurate.
Click below for tallies of functions used in each package. Locations of each call within this package may be generated locally by running 's <- pkgstats::pkgstats(<path/to/repo>)', and examining the 'external_calls' table. basec (27), exp (19), sum (11), cbind (9), data.frame (9), as.data.frame (8), paste (6), ifelse (5), by (4), levels (4), matrix (4), ncol (4), all (3), factor (3), labels (3), rep (3), seq (3), class (2), match (2), names (2), round (2), unique (2), as.factor (1), for (1), if (1), length (1), max (1), mean (1), missing (1), outer (1), plot (1), rbind (1), scale (1), table (1) magrittr%>% (95) dplyrmutate (43), count (4), case_when (1), summarise (1) ggplot2element_blank (9), ggplot (7), aes (6), element_text (5), coord_sf (4), geom_col (3), labs (3), element_rect (2), expansion (2), scale_fill_manual (2), geom_bar (1), geom_hline (1), geom_vline (1), scale_x_discrete (1), scale_y_continuous (1), theme (1) terraclassify (7), crop (6), focal (4), mask (4), project (4), vect (4), extract (3), res (3), rescale (3), spatSample (2), as.polygons (1), buffer (1), crs (1), merge (1), perim (1) tidyterrageom_spatraster_rgb (6), geom_spatvector (3), rename (2), filter (1), geom_spatraster (1), scale_fill_whitebox_c (1), whitebox.colors (1) fireexposuRexposure (7), direxp (2), adjustexp (1), extractexp (1), mapexpclass (1), mapexpcont (1), multidirexp (1) gridunit (12) statswindow (6), df (4) geospheredestPoint (8) maptilesget_credit (3), get_tiles (3) utilsdata (6) ggspatialannotation_scale (4) graphicstitle (4) tidyrpivot_wider (2), pivot_longer (1) grDevicespalette (2) MultiscaleDTMannulus_window (2) NOTE: Some imported packages appear to have no associated function calls; please ensure with author that these 'Imports' are listed appropriately. 2. Statistical PropertiesThis package features some noteworthy statistical properties which may need to be clarified by a handling editor prior to progressing. Details of statistical properties (click to open)
The package has:
Statistical properties of package structure as distributional percentiles in relation to all current CRAN packages
All parameters are explained as tooltips in the locally-rendered HTML version of this report generated by the The final measure (
2a. Network visualisationClick to see the interactive network visualisation of calls between objects in package 3.
|
id | name | conclusion | sha | run_number | date |
---|---|---|---|---|---|
11037129203 | pkgcheck | success | aacfb3 | 7 | 2024-09-25 |
11037129172 | R-CMD-check.yaml | success | aacfb3 | 7 | 2024-09-25 |
3b. goodpractice
results
R CMD check
with rcmdcheck
rcmdcheck found no errors, warnings, or notes
Test coverage with covr
Package coverage: 93.87
Cyclocomplexity with cyclocomp
The following function have cyclocomplexity >= 15:
function | cyclocomplexity |
---|---|
extractexp | 17 |
Static code analyses with lintr
lintr found the following 10 potential issues:
message | number of times |
---|---|
Avoid 1:length(...) expressions, use seq_len. | 1 |
Avoid library() and require() calls in packages | 3 |
Lines should not be more than 80 characters. This line is 83 characters. | 4 |
Lines should not be more than 80 characters. This line is 84 characters. | 1 |
Lines should not be more than 80 characters. This line is 85 characters. | 1 |
4. Other Checks
Details of other checks (click to open)
✖️ The following function name is duplicated in other packages:
-
exposure
from mds, mlxR, netdiffuseR, RsSimulx
Package Versions
package | version |
---|---|
pkgstats | 0.1.6.17 |
pkgcheck | 0.1.2.58 |
Editor-in-Chief Instructions:
This package is in top shape and may be passed on to a handling editor
Hi @heyairf, local checks indicate that you may not be properly ignoring the codemeta.json file in .Rbuildignore. Can you check on that for me, please? |
Hi @adamhsparks , I think that is now fixed? Edit: Nevermind. Standby. |
Thank you! I am still learning a lot about R and github. |
@ropensci-review-bot assign @maurolepore as reviewer |
Can't assign reviewer because there is no editor assigned for this submission yet |
@ropensci-review-bot assign @maurolepore as editor |
Assigned! @maurolepore is now the editor |
Hi @heyairf, thanks a lot for your submission. It's my pleasure to be the handling editor. Semantic tags for my commentsTo help you track my comments I'll tag them with "ml" and a numbered sequence, e.g. ml01, ml02, and so on. Comments following bullets are for you to consider -- you may or may not respond to them. Comments following check-boxes are requests for some action -- please respond. Reviewers
Editor checksI'll post my checks in a few days. I already explored the package and looks in good shape. I appreciate your kindness in sharing your work with the rOpenSci community, and your willingness to learn a bit more about R package development. In that spirit I'll share a number of suggestions to make the reviews as smooth as possible. |
Hi @maurolepore,
|
Hi @heyairf sorry for the delay. I'm close to finishing polishing the notes from my checks. I expect to finish it by Wed-Thu at the latest. |
Dear @heyairf, Once again, thank for sharing your great work with the rOpenSci community. Here are my checks and comments (based on the editor's template). Remember the items in bullets are just for your consideration, and the check-boxes require some action (sometimes just an explanation). The more items you can address before review the better. It will reduce the chance that reviewers will pick up in these relatively uninteresting structural issues and free them to focus on the more interesting aspects of the package. Please feel free to ask for clarifications or help. If I don't hear from you before, I'll touch base in a couple of weeks. Editor checks:
Editor commentsDocumentation
It sounds hard but all you need to do is to run
This allows "for an assessment of functionality and scope without installing the package", which should help the reviewers and users.
More importantly, it would be nice to use references to "exposure" consistently in the names of the functions. Right now I see three ways to refer to exposure:
Consider using a prefix rather than the alternatives. That way users can type the prefix and see all related functions thanks to auto-complete. Also "We strongly recommend See Function and argument naming at https://devdevguide.netlify.app/pkg_building.html#function-and-argument-naming
Fit and overlap
TestsThe tests could improve in a number of ways. I don't have first-had experience testing specifically spatial data so I'll try to find a reviewer who has (thanks for being proactive in https://discuss.ropensci.org/t/s4-data-for-testthat-and-examples/4007/5). For now I'll share some feedback that applies to tests in general.
These two test-files are the slowest:
If you trully can't make tests run faster, then you may move them to a dedicated folder e.g. tests/testthat/slow and run those tests less frequently than every other test -- with References: https://testthat.r-lib.org/reference/test_dir.html and https://testthat.r-lib.org/reference/test_path.html
Here are the verbose functions and the output I see clutering the test-report:
See https://ropensci.org/blog/2024/02/06/verbosity-control-packages/
Specifially, I see this code-chunk multiple times: # test data ====================================================================
set.seed(0)
e <- c(45,55,495,505) * 10000
r <- terra::rast(resolution = 100, extent = terra::ext(e))
terra::values(r) <- sample(c(0,1), terra::ncell(r), replace = TRUE)
r <- terra::sieve(r, threshold = 50, directions = 4)
haz <- terra::sieve(r, threshold = 500, directions = 4)
Here is one example from the package: expect_error(direxp(2, pt))
test_that("mapexpclass() input checks and function messages work", {
expect_condition(mapexplass(2, "loc", aoicrs)) # stopifnot() L67
expect_condition(mapexpclass(expvals, "loc", aoicrs)) # stopifnot() L69
expect_condition(mapexpclass(exp, "loc", 2)) # stopifnot() L71
expect_condition(mapexpclass(exp, "loc", aoibig)) # stopifnot() L73
expect_condition(mapexpclass(exp, "blah", aoicrs)) # matchargs() L75
expect_condition()
})
The code chunk below shows that Option 1: # https://github.com/heyairf/fireexposuR/blob/main/tests/testthat/test-multidirexp.R
test_that("multidirexp() returns object with correct class", {
expect_s3_class(multidirexp(exp, pts, plot = T), "ggplot")
expect_s3_class(multidirexp(exp, pts), "data.frame")
})
test_that("summexp() input checks work", {
expect_condition(summexp(2)) #exp: right class
expect_condition(summexp(exp, 2)) #aoi: right class
expect_condition(summexp(exp, aoi, "blah")) # classify: match arg
}) Project management
# The fireexposuR directory is quite large, so cloning is relatively slow
➜ git du -hd 1 fireexposuR
240K fireexposuR/.Rproj.user
80K fireexposuR/R
20K fireexposuR/inst
76M fireexposuR/.git
16K fireexposuR/vignettes
24K fireexposuR/.github
736K fireexposuR/man
48K fireexposuR/tests
77M fireexposuR
# Almost all that "weight" comes from the .git/ directory alone
➜ git du -hd 1 fireexposuR/.git
4.0K fireexposuR/.git/branches
75M fireexposuR/.git/objects
32K fireexposuR/.git/logs
8.0K fireexposuR/.git/info
28K fireexposuR/.git/refs
64K fireexposuR/.git/hooks
76M fireexposuR/.git
|
Hi @maurolepore, Thank you so much for such detailed feedback! I will work on addressing these comments over the next few days and ask for further clarification if I need to. I very much appreciate all the resources you've included. |
Hi @maurolepore, I have attempted to addressed your feedback within my package! My replies to each of your comments are below. I expect that some may need to be addressed further, please let me know. ml01
ml02
ml03
ml04/ml08
ml05
ml06
ml07
ml08
ml09/ml10
ml11
ml12
ml13
ml14
|
@ropensci-review-bot check package |
Thanks, about to send the query. |
@heyairf thanks so much for your effort and your quick response. Great work. I'll start reaching out to potential reviewers.
Also ...
Warning (test-fire_exp_extract_vis.R:43:3): fire_exp_extract_vis() runs when input conditions are met
Use of .data in tidyselect expressions was deprecated in tidyselect 1.2.0.
i Please use `"class"` instead of `.data$class` The problem is in R/fire_exp_extract_vis.R#L137. You can fix using use tidyr::drop_na("class")
|
Sorry @maurolepore and @heyairf , the check package service is currently not working. It'll be back online in about 12 hours, at which time I'll make sure that request gets processed. Thanks |
@ronnyhdez thanks so much for the update and your flexibility. @heyairf I hope the last few comments help you decide which strategy is best to ensure you can capitalize on the feedback you got while also ensuring Ronny's work remains relevant and smooth. Let me know if anything is unclear or you need some other help. |
📆 @ronnyhdez you have 2 days left before the due date for your review (2024-11-18). |
Package ReviewHi @heyairf and @maurolepore! Thanks for the chance to review this package! Here are my suggestions. @heyairf if there is something that is not clear, please let me know. This is my first review, so I'm also learning about the process 😃 Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Estimated hours spent reviewing: 8
Review CommentsGeneral commentsIt would be helpful to clarify how coordinate reference systems are handled Also, it would be helpful to indicate the geographical scope of the implemented While references to scientific publications provide valuable methodological I would suggest adding a CITATION file (see rOpenSci guidelines The checkpoiints above state that there should be a 'contribution guidelines'. Specific thoughtsHere I have some comments/suggestions to specific sections of the package: README
It's great to have references to published papers in a package. Nonetheless, the I suggest including brief explanations of the methods directly in the README,
This is also related to the previous comment. The scientific publication would Think about a potential user of your package. They need to analyze wildfire So, I wouldn't redirect them to a scientific paper as the first step. Make the Think of the README as an abstract: it should concisely present the package's VignettesThe package already have vignettes which is great to document and explain
Some examples of this arrangement are dplyr communityscale vignetteI liked this vignette because it already have the primary functionality and About the code snippets, I suggest using complete names for the objects and
I would change it the following way:
That way, it would be easier (less cognitive load) for a new user to If there is a need to explain further something on this 'Get started' page, I Further explanations on the science behind would be in 'Articles' vignettes. Finally, I think the package's visualization examples would be even more FunctionsIn general, there are several functions on which the documentation starts with
I suggest using the details section to include the reference to a paper if There are some functions which have fixed values in their bodies. I'm wondering
|
@ronnyhdez thanks so much for your thoughtful review! Next stepsWe won't use your input for a few weeks, until @heyairf has had the chance to address both reviews (and I'm still searching for the second reviewer). Then I'll contact you again for a final approval unless there is something else that needs to be addressed. |
@ropensci-review-bot submit review #659 (comment) time 8 |
Logged review for ronnyhdez (hours: 8) |
@maelle unfortunately I'm still seeking the second reviewer. It seems to become harder and harder that as we approach the end of the year. I'm about to ask for help in the editors channel. @heyairf I'm really sorry for the delay. It's not super common but occasionally it does happen that it takes quite some effort. |
Thank you for the continuous updates! |
@ropensci-review-bot assign @huizezhang-sherry as reviewer |
@huizezhang-sherry added to the reviewers list. Review due date is 2024-12-21. Thanks @huizezhang-sherry for accepting to review! Please refer to our reviewer guide. rOpenSci’s community is our best asset. We aim for reviews to be open, non-adversarial, and focused on improving software quality. Be respectful and kind! See our reviewers guide and code of conduct for more. |
@huizezhang-sherry: If you haven't done so, please fill this form for us to update our reviewers records. |
@heyairf we now have the second and last reviewer! Thanks for your patience. (BTW the bot posted a mistaken message requesting your response. I deleted it but if you still see it in your inbox please ignore it.) |
📆 @huizezhang-sherry you have 2 days left before the due date for your review (2024-12-21). |
Package ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
DocumentationThe package includes all the following forms of documentation:
Functionality
Estimated hours spent reviewing: 3.5
Review Comments
|
@huizezhang-sherry thanks so much for your review! |
@ropensci-review-bot submit review #659 (comment) time 3.5 |
Logged review for huizezhang-sherry (hours: 3.5) |
@heyairf you can now go ahead and incorporate both reviews. Thank you for being patient 🙏 https://devdevguide.netlify.app/softwarereview_author#the-review-process
|
Hello @maurolepore , and reviewers! |
Absolutely, the end of the year is inconvenient for everyone |
@heyairf: please post your response with Here's the author guide for response. https://devguide.ropensci.org/authors-guide.html |
@heyairf please don't stress about the bot's reminder ;-) |
Submitting Author Name: Air Forbes
Submitting Author Github Handle: @heyairf
Repository: https://github.com/heyairf/fireexposuR
Version submitted: 1.0.0
Submission type: Standard
Editor: @maurolepore
Reviewers: @ronnyhdez, @huizezhang-sherry
Archive: TBD
Version accepted: TBD
Language: en
Scope
Please indicate which category or categories from our package fit policies this package falls under: (Please check an appropriate box below. If you are unsure, we suggest you make a pre-submission inquiry.):
Explain how and why the package falls under these categories (briefly, 1-2 sentences):
This package was developed to share methodologies from existing research by modifying/expanding existing functions. The functions automate and standardize assessments to increase access and quality assurance in the calculation for interested users.
Users interested in wildfire risk assessments including but not limited to researchers, consultants, planners, land use decision makers.
There are no other R packages that fill this role.
n/a
#652
pkgcheck
items which your package is unable to pass.all pkgcheck's are currently passing
Technical checks
Confirm each of the following by checking the box.
This package:
Publication options
Do you intend for this package to go on CRAN?
Do you intend for this package to go on Bioconductor?
Do you wish to submit an Applications Article about your package to Methods in Ecology and Evolution? If so:
MEE Options
Code of conduct
The text was updated successfully, but these errors were encountered: