Skip to content

CoMix data paths - #36

Open
lukeburton02 wants to merge 2 commits into
mainfrom
comix-data-paths
Open

CoMix data paths#36
lukeburton02 wants to merge 2 commits into
mainfrom
comix-data-paths

Conversation

@lukeburton02

@lukeburton02 lukeburton02 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features

    • Added support for switching between remote and local inc2prev data sources.
    • Added automatic path resolution for required inc2prev files.
  • Documentation

    • Documented the CoMix and inc2prev data sources, required local files, and planned remote-data improvements.

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 53c185a2-5b9c-48c8-8ddc-166fe14a50ec

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

analysis/process_comix.R documents the CoMix and inc2prev sources. It adds use_remote and inc2prev_path() to select a GitHub raw URL or a local repository path.

Changes

CoMix data configuration

Layer / File(s) Summary
Data source documentation and path resolution
analysis/process_comix.R
The script documents required CoMix and inc2prev files, local storage, and the planned socialmixr::get_survey() replacement. The use_remote flag and inc2prev_path() helper select remote or local inc2prev paths.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarises the changes to CoMix and inc2prev data path handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch comix-data-paths

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between bdc885e and ff5d062.

📒 Files selected for processing (1)
  • analysis/process_comix.R

Comment thread analysis/process_comix.R
Comment on lines +21 to +23
# 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/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant