Refactor Settings handling in soilgrids_ic_process()
Description
soilgrids_ic_process() in modules/data.land/R/IC_SOILGRID_Utilities.R currently uses ad-hoc logic to handle Settings vs MultiSettings inputs.
- it relies on checking element structure instead of proper type validation
- inconsistent with PEcAn conventions (doesn't use
is.Settings()/is.MultiSettings())
Proposed Refactor
- normalize settings using proper type checking
- extract site info from normalized settings
- use
PEcAn.settings::papply()for per-site IC generation
Tasks
- [ ] update settings normalization to use
is.Settings()/is.MultiSettings() - [ ] use
papply()for per-site IC generation - [ ] update function documentation
- [ ] update tests
Reference
See PEcAn XML Settings documentation for Settings/MultiSettings structure details.
Hi @divine7022, can I work on this issue? Could you assign it to me?
Hey @divine7022,
I’ve made the changes in the codebase, but I’m not seeing them reflected when I access the Pecan URL while running it via Docker. I tried to look in the pecan docs, but was unable to find anything related to this. Could you please clarify the recommended way to verify whether documentation or code changes are correctly applied in a Docker-based setup?
the link you opening seems to be to the web UI it's for running PEcAn workflows, so it won’t automatically reflect your code changes. I wouldn’t recommend you to go through the web portal, rather use notebook based demos to learn and get basic idea (demos)
but the easier way to test the function is through R or Rstudio,
1 ) checkout your branch locally
2 ) load module -- ( devtools::load_all("modules/data.land") )
3 ) run function -- ( soilgrids_ic_process(...) )
4 ) build document -- ( devtools::document("modules/data.land") )
5 ) run tests -- ( testthat::test_dir("modules/data.land/tests/testthat") )
hi @divine7022 , is this issue still available to work on ? I'd like to work on it.