fix protein turnover download zipfile - #220
Conversation
📝 WalkthroughWalkthroughThe plot download handler now accepts a ChangesPlot download handler input wiring
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/testthat/test-module-statmodel-server.R (1)
784-785: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssert the new reactive arguments, not only the count.
length(handler_args) == 9still passes ifturnover_ratiosandcondition_metadataare swapped or replaced. Pass distinct sentinel reactives and verify positions 8 and 9 (or capture named arguments) so this test covers the wiring this PR changes.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/testthat/test-module-statmodel-server.R` around lines 784 - 785, Strengthen the test around create_download_plot_handler by supplying distinct sentinel reactives for turnover_ratios and condition_metadata, then assert that handler_args positions 8 and 9 contain the corresponding reactives rather than only checking the argument count. Preserve the existing nine-argument assertion while verifying the changed wiring.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/testthat/test-module-statmodel-server.R`:
- Around line 784-785: Strengthen the test around create_download_plot_handler
by supplying distinct sentinel reactives for turnover_ratios and
condition_metadata, then assert that handler_args positions 8 and 9 contain the
corresponding reactives rather than only checking the argument count. Preserve
the existing nine-argument assertion while verifying the changed wiring.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6ff26d83-5726-4d58-9f1a-b42bc7c2e872
📒 Files selected for processing (3)
R/module-statmodel-server.RR/statmodel-server-visualization.Rtests/testthat/test-module-statmodel-server.R
Motivation and Context
Protein turnover plot downloads lacked the
turnover_ratiosreactive required by response-curve templates, causing zipfile download behavior to fail. The download handler now receives this reactive explicitly.Changes
turnover_ratiostocreate_download_plot_handler()as an optional reactive argument.turnover_ratiosfromstatmodelServerinto the download handler.reactive(NULL)default for compatibility.Unit Tests
test-module-statmodel-server.Rto verify the updated nine-argument handler initialization.Coding Guidelines