-
Notifications
You must be signed in to change notification settings - Fork 10
add curation filtering on Shiny for network interpretation #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: devel
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughAdds a boolean Changes
Sequence Diagram(s)sequenceDiagram
participant UI as UI (checkbox)
participant Server as visualizeNetworkServer
participant Params as getInputParameters
participant Extract as extractSubnetwork
participant Indra as getSubnetworkFromIndra
participant Codegen as generate_network_code
UI->>Server: user toggles filterByCuration
Server->>Params: collect input params (includes filterByCuration)
Params-->>Server: params{filterByCuration}
Server->>Extract: call extractSubnetwork(params, filterByCuration)
Note right of Extract: filterByCuration forwarded\nas filter_by_curation
Extract->>Indra: getSubnetworkFromIndra(..., filter_by_curation=BOOL, api_key="")
Server->>Codegen: generate_network_code(params) (emits filter_by_curation=params$filterByCuration)
Codegen-->>Server: generated network construction code
Server-->>UI: render updated network
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
|
Failed to generate code suggestions for PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @R/module-visualize-network-server.R:
- Around line 616-618: The generated code now adds filter_by_curation but the
server runtime path forces api_key = "" creating a mismatch; update
generate_network_code to include api_key = "" when the server path forces it, or
better remove the forced api_key = "" in the server runtime so both
code-generation (generate_network_code) and server runtime rely on the same
default behavior; locate generate_network_code and the server runtime block that
sets api_key = "" and either add the same forced api_key parameter to
generate_network_code or eliminate the hard-coded api_key = "" in the server
path so both paths are consistent.
🧹 Nitpick comments (1)
R/module-visualize-network-server.R (1)
244-260: PreferisTRUE()to coercefilterByCurationinto a strict scalar boolean.Current code works, but
as.logical()can yieldNAif the input ever becomes a non-boolean string;isTRUE()safely normalizesNULL/FALSE/TRUEintoFALSE/TRUE.Proposed refactor
- filterByCuration <- if(is.null(input$filterByCuration)) { - FALSE # Default to FALSE if somehow NULL - } else { - as.logical(input$filterByCuration) - } + filterByCuration <- isTRUE(input$filterByCuration)
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
R/module-visualize-network-server.R
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
🔇 Additional comments (2)
R/module-visualize-network-server.R (2)
531-535: Propagation offilterByCurationintoextractSubnetwork()looks consistent.
286-303: This review comment is based on incorrect assumptions about parameter support. Bothfilter_by_curationandapi_keyare documented, supported parameters ingetSubnetworkFromIndra()and will not cause runtime errors. Passingapi_key = ""is equivalent to the function default, so no change is necessary.Likely an incorrect or invalid review comment.
| codes <- paste(codes, ",\n filter_by_curation = ", params$filterByCuration, "\n", sep = "") | ||
|
|
||
| codes <- paste(codes, ")\n\n", sep = "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated code now includes filter_by_curation, but runtime path also forces api_key = "" (mismatch).
If you keep api_key = "" in the server path, consider reflecting the same behavior in generate_network_code (or, preferably, remove the forced empty key in the server path so both paths rely on the same default behavior).
🤖 Prompt for AI Agents
In @R/module-visualize-network-server.R around lines 616 - 618, The generated
code now adds filter_by_curation but the server runtime path forces api_key = ""
creating a mismatch; update generate_network_code to include api_key = "" when
the server path forces it, or better remove the forced api_key = "" in the
server runtime so both code-generation (generate_network_code) and server
runtime rely on the same default behavior; locate generate_network_code and the
server runtime block that sets api_key = "" and either add the same forced
api_key parameter to generate_network_code or eliminate the hard-coded api_key =
"" in the server path so both paths are consistent.
Pending: Removal of API key
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.