CoMix data paths - #36
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Walkthrough
ChangesCoMix data configuration
🚥 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@analysis/process_comix.R`:
- Around line 21-23: Update the survey_pop population-file loading in the
analysis script to use inc2prev_path() instead of the hard-coded local inc2prev
clone path. Preserve the use_remote configuration so the helper selects the
remote source by default and the local clone only when explicitly requested,
allowing loading to succeed before main() when no local clone exists.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: cfd46c9e-29b0-4281-a9cc-1e7583b7f4be
📒 Files selected for processing (1)
analysis/process_comix.R
| # inc2prev populations: https://github.com/epiforecasts/inc2prev | ||
| # Read directly from GitHub by default; set use_remote <- FALSE to use a | ||
| # local clone in data-raw/inc2prev-main/ |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Use inc2prev_path() for survey_pop.
use_remote <- TRUE and the documentation promise remote loading by default. However, survey_pop at Line 50 still uses the hard-coded local path. The script therefore fails before main() runs when the local inc2prev clone is absent.
Route the population file through the new helper:
Proposed fix
-survey_pop <- read.csv("data-raw/inc2prev-main/data-processed/populations.csv") |>
+survey_pop <- read.csv(inc2prev_path("data-processed/populations.csv")) |>Also applies to: 35-44
🤖 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 `@analysis/process_comix.R` around lines 21 - 23, Update the survey_pop
population-file loading in the analysis script to use inc2prev_path() instead of
the hard-coded local inc2prev clone path. Preserve the use_remote configuration
so the helper selects the remote source by default and the local clone only when
explicitly requested, allowing loading to succeed before main() when no local
clone exists.
Summary by CodeRabbit
New Features
Documentation