Fix/do conversions run input typo#3929
Fix/do conversions run input typo#3929shreyannandanwar wants to merge 4 commits intoPecanProject:developfrom
Conversation
…, remove seedling_mortality hardcode
t(0 # the commit.
settings$run$input (singular) was used on one line each in do_conversions.R, workflow.bm.R, workflow.pda.R and soil_process.R while all surrounding code and the settings schema use run$inputs. No assignment to run$input was found anywhere in the codebase. Schema in base/settings/ only defines <inputs> (plural). This was a consistent copy-paste typo, not an intentional field. Fixes: - base/workflow/R/do_conversions.R:31 - scripts/workflow.bm.R:103 - scripts/workflow.pda.R:66 - modules/data.land/R/soil_process.R:65-68
S1DDHEY
left a comment
There was a problem hiding this comment.
@shreyannandanwar The changes in run.meta.analysis.R appear to include unrelated work that doesn’t match the PR description.
I'd suggest cleaning up the branch (e.g., drop unrelated commits or cherry-pick only the relevant ones) and update the PR accordingly.
Yeligay8
left a comment
There was a problem hiding this comment.
In the check (check_modules, 4.4) / check section:
I recommend to open the R file where the function is defined:
meta_analysis_standalone <- function(...) {
Above the function, you should have something like:
#' @param prior_n ...
#' @param prior_cv ...
#' @param tauA ...
#' @param tauB ...
#' @param gamma_tau ...
Update documentation to match function. If these arguments exist in function, ADD missing params:
#' @param prior_n Description here
#' @param prior_cv Description here
#' @param tauA Description here
#' @param tauB Description here
If gamma_tau doesn't exist in function, REMOVE it:
DELETE this line:
#' @param gamma_tau ...
then run this:
devtools::document()
then re-run checks locally
devtools::check()
OR same as CI:
make -j1 check_modules
Yeligay8
left a comment
There was a problem hiding this comment.
In , check (check_base, 4.2) / check section, to fix check error (Error = repo changed during CI and Cause = .Rd not synced with .R):
I recommend to run locally, then commit the changes:
Install if needed
install.packages("roxygen2")
Regenerate documentation
roxygen2::roxygenise()
Then commit the updated files:
git add modules/meta.analysis/man/meta_analysis_standalone.Rd
git commit -m "Update Rd docs to match function arguments"
git push
|
@Yeligay8 Thanks for jumping in here! But in this case the underlying problem here isn't the out-of-sync Roxygen docs, it's the presence of edits from a different PR -- fixing a typo in do_conversions should not touch the meta-analysis code at all, and we can't merge this until that's fixed. (As a smaller matter I recommend everyone follow the PEcAn developer guide and use @shreyannandanwar please do whatever combination of git operations you prefer (likely one or more of cherry-pick, rebase, or revert) to make this branch contain all the typo fixes from commit ecfa103 (do_conversions, soil_process, workflow.bm, and workflow.pda) but without adding .Rapp.history. Commits c82d851, 3a72d67, and 603fae2 should be removed. |
|
plzzz checkout -> #3932 I apologies for the noise on the previous PR. I accidentally included unrelated commits (c82d851, 3a72d67, 603fae2) and a stray .Rapp.history file that should never have been tracked. I've cleaned this up by cherry-picking only the intended fix (ecfa103) onto a fresh branch. This PR now contains exactly 1 commit touching exactly 4 files nothing more. Thank u @infotroph |
|
Closing because superseded by #3932 |
|
@shreyannandanwar Instead of opening a new PR, you could rewrite the commit history here using |
Fix a consistent copy-paste typo:
settings$run$input(singular) →settings$run$inputs(plural) across 4 files.Evidence
1. Usage count in codebase
run$input(singular): fewer occurrences, never assigned anywhererun$inputs(plural): way more if compared within do_conversions.R alonerun$inputfound across base/, modules/, scripts/2. Settings schema confirms
inputs(plural) is canonicalbase/settings/R/update.settings.Rreferences<inputs>always plural, never singularbase/settings/contains zero occurrences of a literal<input>tag as a child of<run>run$input(singular) has no corresponding schema definition — it would silently return NULL at runtime3. check.all.settings.R confirms the canonical field name
base/settings/R/check.all.settings.Rvalidates the settings object and only referencesrun$inputs(plural) throughoutrun$inputfieldrun$inputwere intentional, it would appear in settings validation — it does not4. Official PEcAn XML documentation uses
<inputs>exclusivelybook_source/03_topical_pages/03_pecan_xml.Rmddocuments the<run>block and its children<inputs>tag (plural) is the only form shown in all examples and explanations in that section<input>child under<run>anywhere in the XML guide5. No documentation anywhere defines
run$inputas intentionalrun$inputas a documented or intentional field nameConclusion
The schema, the validator, the XML documentation, and the overwhelming majority of code all agree: the canonical field is
run$inputs. The singularrun$inputusages are inconsistent legacy copy-paste typos that would silently return NULL at runtime, causing inputs to bemisrouted or skipped without any error or warning.
Files changed
Risk
Low — mechanical typo fix, no logic changed.
The field run$input was never assigned anywhere in the codebase, so correcting these references to run$inputs restores intended behavior.
Review Time Estimate
Types of changes
Checklist: