Open dagousket opened 1 year ago
We provided modifications in the branch '91-blocked-client'. Let us know if this is fine.
Hi @balglave , we have triggered a pull request for your branch to test your modifications on the CI. The CI fails to pass and hence prevents the merge of your edits. We suggest you check locally your version with devtools::check()
to fix test failures prior to merging.
[test] As dev, I'd like to know how to improve the test coverage of the package so that all the critical steps of the model are thoroughly tested
Blocked
Some tests would require additional variables and datasets that are not included in the test data. Would it be possible to provide test data for the following objects ?
fm_load_data()
withtime_step == "Quarter"
, we would need theall_year
variablefm_build_domain_mesh_spde()
withcreate_mesh == "from_data"
, we would need thestudy_domain_sf
datasetfm_shape_sci_data_st()
withscientific_observation == "Density"
, we would need theSci.obs_spp
datasetDecision
⚠ Given the number of untested parameters, we suggest that we implement as many as possible after solving the other problems raised during the recettage meeting.
More information about what we have to test
By testing each parameter and keeping the other at test values :
✅ : this parameter is now tested
🟢 : ok to run with this parameter so we can add unit tests
🟠 : need rework on the function to test so you have to rework the code before testing
🔴 : need additional data so you have to send us data
fm_load_data()
time_step == "Quarter"
🔴 missingall_year
variablefitted_data=="presabs"
🟠 needs toy_com_i
as inputfm_build_domain_mesh_spde()
create_mesh == "from_data"
🔴 missingstudy_domain_sf
datasetfm_shape_sci_data_st()
scientific_observation == "Density"
🔴 missingSci.obs_spp
datasetfm_shape_vms_logbook_data_st()
fm_fit_model()
T %in% str_detect(names(obj$par),"rho_"
🟠obj$par
is inner functioncompute_sd
✅fm_build_data_params_map()
"cov_fb"=if(is.null(xfb_x)){as.matrix(rep(1,nrow(cov_x_com)))}else{xfb_x}
🟢"cov_fb_mesh"=if(is.null(xfb_x)){as.matrix(rep(1,mesh$n))}else{xfb_x}
🟢"cov_fb_pred"=if(is.null(xfb_x)){as.matrix(rep(1,nrow(cov_x_pred)))}else{xfb_x}
🟢data_source == 2
🟠 innerif
condition onVersion
variable, set to""
by defaultdata_source == 3
✅biomass_temporal == 0
✅is.null(xfb_x) & samp_process==1
(covariate effects) 🟢EM == "fix_b"
(linkeage of density and sampling intensity) ✅sampling_temporal == 1
(autoregressive process) ✅T %in% str_detect(Random,"psiinput_x")
✅ (conditionned bysampling_temporal
)T %in% str_detect(Random,"par_b")
✅ (conditionned byEM
)samp_process == 1
✅data_source == 1 & ref_data == "sci"
✅lf_link == 1
(precense-absence framework) ✅fm_generate_graphs()
nrow(time.step_df) > 1
✅samp_process == 1
✅Client - Validation
[ ] The test coverage of the package has increased
[ ] The missing test coverage detected in issue #66 and #70 are now included in the test
Dev - Tech
[x] Pin the chunks of code without test coverage yet
[x] report potential missing data/info to achieve test in these steps
[ ] add test where needed