Resolve open TODOs and add missing documentation and tests#1306
Conversation
updated can_* columns in CSV and regenerated .rda via Rscript data-raw/metadata_nca_parameters.R
Gero1999
left a comment
There was a problem hiding this comment.
Nice work on this PR! Just to be very nitpicky:
Merge conflict risk: The T/F → TRUE/FALSE CSV rewrite touches every row, which will conflict with PRs #1245 that also modify this file to fix a bug found. Might be worthy be a bit careful while merging and making sure what was fixed there still remains here
Issue: This is my bad. The identical(can_exc, "T") was indeed always FALSE (logical vs string comparison), but the resulting behavior was actually correct. The can_excretion column indicates whether a parameter can be computed from excretion data — it's used for parameter matrix defaults, not for UI location. Only TYPE == "Urine" parameters (RCAMINT, FREXINT) are actually configurable in the Excretion tab.
Changing to isTRUE(can_exc) makes the condition work as written, but what was written was wrong — it now shows "Additional Analysis > Excretion" for ~30 standard parameters (CMAX, TMAX, etc.) that aren't available there. See the images below. To fix perhaps just remove the can_exc variable and simplify the condition to just if (type == "Urine").
Let me know if there are questions. Once you are done feel free to bump the package version. Overall good job! :)
|
Hi Gerardo! Thanks for the feedback! I've addressed the concerns you had, it should run properly now. Attached are the screenshots that show that the "Additional Analysis > Excretion" is now limited to just these 5 params.
I also merged main and preserved the show_in_matrix_selection column from #1245 before re-applying the T/F → TRUE/FALSE fix. |
Gero1999
left a comment
There was a problem hiding this comment.
Good job, LGTM!
Only thing would be to update the PR description for the later change made. But the solution itself is wonderful 😉
AngelaManginelli
left a comment
There was a problem hiding this comment.
I checked whether the "definition of done" was correctly implemented and did not fine any inconsistency. Thanks!


Issue
Closes #1299
Description
Resolves open TODOs, adds missing documentation and tests, fixes typos, and standardizes metadata CSV values across the codebase.
Task 1: Add documentation to
units_table.Runits_table_ui().Task 2: Resolve TODO in
flexible_violinboxplot.R@paramdescriptions forxvars,colorvars, andvarvalstofilter.Task 3: Add tests for
R/utils-plots.Rtests/testthat/test-utils-plots.Rwith 9 tests covering.handle_tooltips()anderror_plot().Task 4: Standardize
T/FtoTRUE/FALSEin metadata CSVcan_*columns indata-raw/metadata_nca_parameters.csvand regenerated.rda.parameter_selection.R:462whereidentical(can_exc, "T")was comparing a logical to a string (alwaysFALSE). Changed toisTRUE(can_exc). Refer to the issue comment.Task 5: Fix typo "miliseconds" → "milliseconds"
inst/shiny/www/index.js.Task 6: Fix typo "infering" → "inferring"
Definition of Done
units_table.Rhas proper roxygen documentation for UI functionflexible_violinboxplot.Rresolved — parameters documented, comment removedtest-utils-plots.Rcreated with tests for.handle_tooltips()anderror_plot()metadata_nca_parameters.csvusesTRUE/FALSEincan_*columns,.rdaregeneratedindex.jsHow to test
NCA > Parameter SelectionContributor checklist
.scsschange was done, rundata-raw/compile_css.Rdata-raw/test_suggests_hidden.RNotes to reviewer
Anything that the reviewer should know before tacking the pull request?
parameter_selection.R:462usedidentical(can_exc, "T")which always returnedFALSEbecauseread.csv()converts unquotedTto logicalTRUE. Changed toisTRUE(can_exc). See issue comment for details.