Skip to content
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

Created pest_host_table_list_creator helper function #195

Closed
wants to merge 0 commits into from

Conversation

cyborginhas
Copy link
Contributor

Updated associated extdata pest host tables to have additional columns: susceptiblity_mean, susceptibility_sd, mortality_rate_mean, mortality_rate_sd

Updated pest_host_table_wrong_columns check & error message & list scripts to include additional information needed to confirm that the pest_host_table includes the correct columns: hosts, susceptiblity_mean, susceptibility_sd, mortality_rate_mean, mortality_rate_sd, mortality_time_lag

Added competency_table_wrong_columns check (and associated code to error messages and lists scripts)

Added config$pest_host_table_list to calibrate, validate, pops_multirun, pops, and validate scripts.

Fixed competency typo in competency_table_list_creator function and associated extdata competency tables.

Updated all instances called pest_host_table$mortality_rate to pest_host_table$mortality_rate_mean

Note: Changed one value (from 2 to 1) in the infected file 2x2 test layers that were throwing an error for "Using multiple hosts with uncertainty works as expected" infected_tanoak.tif and infected_tanoak_wsd.tif. One of the expect_gte() tests consistently failed because previously mentioned rasters had a value of 2, but data$host_pools[[2]]$infected[[1]][[1]] predicted 1.

@cyborginhas
Copy link
Contributor Author

Will address lintr issues, and create a new pull request.

@cyborginhas cyborginhas closed this Feb 9, 2024
@cyborginhas cyborginhas reopened this Feb 9, 2024
@ChrisJones687 ChrisJones687 self-requested a review February 9, 2024 16:57
Copy link
Member

@ChrisJones687 ChrisJones687 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall it looks great just needs a few changes.

@@ -10,7 +10,6 @@ detailed_file_exists_error <- function(file_name) {
frequency_error <-
"Output frequency must be either 'week', 'month', 'day', 'year', 'time_step', or 'every_n_steps'"
raster_type_error <-
"file is not one of '.grd', '.tif', '.img', or '.vrt'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this shouldn't have been removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in latest commit

R/RcppExports.R Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file shouldn't have changed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file also shouldn't have changed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see the changes here online. did anything change in the data?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how it changed: Note: Changed one value (from 2 to 1) in the infected file 2x2 test layers that were throwing an error for "Using multiple hosts with uncertainty works as expected" infected_tanoak.tif and infected_tanoak_wsd.tif. One of the expect_gte() tests consistently failed because previously mentioned rasters had a value of 2, but data$host_pools[[2]]$infected[[1]][[1]] predicted 1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as other .tif file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how it changed: Note: Changed one value (from 2 to 1) in the infected file 2x2 test layers that were throwing an error for "Using multiple hosts with uncertainty works as expected" infected_tanoak.tif and infected_tanoak_wsd.tif. One of the expect_gte() tests consistently failed because previously mentioned rasters had a value of 2, but data$host_pools[[2]]$infected[[1]][[1]] predicted 1.

R/checks.R Outdated
@@ -383,7 +396,7 @@ multihost_checks <-
names(outs) <- failed_check_list
return(outs)
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like it is misalligned shouldn't have the tab there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed in latest commit

Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (b70235a) 84.27% compared to head (897f8d7) 84.63%.

❗ Current head 897f8d7 differs from pull request most recent head 4bdcd5c. Consider uploading reports for the commit 4bdcd5c to get more accurate results

Files Patch % Lines
R/checks.R 70.83% 7 Missing ⚠️
R/helpers.R 88.46% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #195      +/-   ##
==========================================
+ Coverage   84.27%   84.63%   +0.35%     
==========================================
  Files          59       59              
  Lines        6170     6209      +39     
==========================================
+ Hits         5200     5255      +55     
+ Misses        970      954      -16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants