ENH: Fix directory structure for CHOP-Valve data#92
Conversation
|
Warning Review limit reached
Next review available in: 33 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughCHOP-Valve4D release archives are now extracted directly into the base dataset directory. Verification checks for CT artifacts and Alterra or TPV25 valve meshes now inspect that same directory. ChangesCHOP-Valve4D dataset layout
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/physiotwin4d/data_download_tools.py (1)
247-251: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winFlattened directory paths break data verification and mesh extraction.
Passing
data_dirdirectly to_CHOPValve4DSubdirIsPopulatedcauses it to look for marker files (likeRVOT28-Dias.nii.gzor*.vtk) in the root dataset directory rather than the appropriate subdirectories.
- If the zip archives extract flat into
data_dir,AlterraandTPV25meshes will overwrite each other, and downloading one will cause the other to be skipped (sinceany(target_dir.glob("*.vtk"))matches both).- If the zip archives natively contain subdirectories (e.g.,
CT/), extracting todata_diravoids double-folders, but the population check will fail because it looks fordata_dir / "RVOT28-Dias.nii.gz"instead ofdata_dir / "CT" / "RVOT28-Dias.nii.gz". This causesVerifyCHOPValve4DDatato always fail and triggers re-downloads on every run.Restore the subdirectory paths for the checks to correctly isolate the assets:
src/physiotwin4d/data_download_tools.py#L247-L251: Passdata_dir / subdir_nameto_CHOPValve4DSubdirIsPopulatedinstead oftarget_dir. If you are extracting todata_dirto avoid double-folders, you can keeptarget_dir = data_dirfor the_DownloadAndExtractZipcall.src/physiotwin4d/data_download_tools.py#L307-L311: Append the respective subdirectory names by passingdata_dir / "CT",data_dir / "Alterra", anddata_dir / "TPV25"to_CHOPValve4DSubdirIsPopulated.🤖 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 `@src/physiotwin4d/data_download_tools.py` around lines 247 - 251, The population check in the download loop must use each asset’s subdirectory rather than the root data directory. In src/physiotwin4d/data_download_tools.py lines 247-251, pass data_dir / subdir_name to _CHOPValve4DSubdirIsPopulated while preserving target_dir for extraction; in lines 307-311, pass data_dir / "CT", data_dir / "Alterra", and data_dir / "TPV25" to the corresponding _CHOPValve4DSubdirIsPopulated calls.
🤖 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.
Outside diff comments:
In `@src/physiotwin4d/data_download_tools.py`:
- Around line 247-251: The population check in the download loop must use each
asset’s subdirectory rather than the root data directory. In
src/physiotwin4d/data_download_tools.py lines 247-251, pass data_dir /
subdir_name to _CHOPValve4DSubdirIsPopulated while preserving target_dir for
extraction; in lines 307-311, pass data_dir / "CT", data_dir / "Alterra", and
data_dir / "TPV25" to the corresponding _CHOPValve4DSubdirIsPopulated calls.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: d02e7b02-a6d8-4bcb-acd7-9dd0caecd711
📒 Files selected for processing (1)
src/physiotwin4d/data_download_tools.py
Summary by CodeRabbit