Skip to content

ENH: Specify Python 3.11 for nightly health / remote runner#83

Merged
aylward merged 5 commits into
Project-MONAI:mainfrom
aylward:Nightly
Jul 9, 2026
Merged

ENH: Specify Python 3.11 for nightly health / remote runner#83
aylward merged 5 commits into
Project-MONAI:mainfrom
aylward:Nightly

Conversation

@aylward

@aylward aylward commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Also, small tweak to data/readme.md

Summary by CodeRabbit

  • Bug Fixes

    • Improved USD conversion handling for integer-valued short/ushort data types, including more consistent type mapping for unexpected inputs.
  • Documentation

    • Reworked the main data README into a clearer “Datasets” directory index with download guidance and notes.
    • Updated dataset documentation (including DirLab-4DCT format wording) and refreshed multiple dataset source links in tests/tutorial materials.
  • Chores

    • Updated CI nightly GPU Windows venv creation to explicitly use Python 3.11.
    • Adjusted editor ignore rules in version control (.cursor and .vscode, while keeping .vscode/settings.json unignored).

Copilot AI review requested due to automatic review settings July 9, 2026 15:27
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 65f60982-95cc-45bf-b21b-8f9682cc7dca

📥 Commits

Reviewing files that changed from the base of the PR and between 4fd8d4f and 0a9216c.

📒 Files selected for processing (1)
  • data/README.md
✅ Files skipped from review due to trivial changes (1)
  • data/README.md

Walkthrough

This PR updates workflow and ignore settings, rewrites dataset documentation, changes USD type fallback handling, and refreshes dataset references in supporting docs.

Changes

Repository docs and runtime updates

Layer / File(s) Summary
Workflow and ignore rules
.github/workflows/nightly-health.yml, .gitignore
The nightly health workflow pins its Windows virtual environment to Python 3.11, and repository ignore rules add .cursor plus .vscode/* while keeping .vscode/settings.json tracked.
Data README and dataset notes
data/README.md, data/DirLab-4DCT/README.md
The top-level data README becomes a dataset index with automatic-download notes and citation/disk-space guidance, and the DirLab-4DCT README updates its dataset format wording.
USD integer fallback handling
src/physiotwin4d/vtk_to_usd/usd_utils.py
The USD conversion helpers change short and ushort handling so both array conversion and SDF type mapping resolve through integer fallbacks, and the generic float-array fallback is removed.
Dataset source links
tests/README.md, tutorials/tutorial_01_heart_gated_ct_to_usd.py
The tests README and tutorial dataset references now point to the SlicerHeart/SlicerHeart repository.

Estimated code review effort: 2 (Simple) | ~15 minutes

🚥 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 matches the main workflow change by calling out the Python 3.11 nightly health update, though it is broader than the actual diff.
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

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.

Copilot AI 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.

Pull request overview

This PR updates the nightly “health” GitHub Actions workflow to explicitly create its virtual environment using Python 3.11 (needed for the physicsnemo extra on the Windows GPU runner), and refreshes the top-level data/README.md content describing available datasets and how to obtain them.

Changes:

  • Pin venv creation in nightly-health.yml to Python 3.11 via the Windows py launcher.
  • Add editor/IDE directories (.cursor, .vscode) to .gitignore.
  • Rewrite/expand data/README.md dataset overview and download instructions.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 9 comments.

File Description
data/README.md Expanded dataset documentation and download guidance.
.gitignore Ignores additional local editor directories.
.github/workflows/nightly-health.yml Creates the workflow venv explicitly with Python 3.11.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated

@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: 4

🧹 Nitpick comments (1)
.github/workflows/nightly-health.yml (1)

57-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Inconsistent venv creation approach between workflows.

The nightly-health workflow uses py -3.11 -m venv while test-slow.yml (lines 23-29) uses & "C:\Program Files\Python311\python.exe" -m venv. Both work on Windows runners with Python 3.11 installed, but the inconsistency could cause confusion. Consider aligning both workflows to the same approach for maintainability.

🤖 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 @.github/workflows/nightly-health.yml around lines 57 - 62, The venv setup is
inconsistent between the workflow files, so align the nightly-health job’s venv
creation in the create-venv step with the same Windows Python 3.11 invocation
used by the other workflow, or update both to a single standard approach. Keep
the existing Python 3.11 requirement in the nightly-health workflow and make the
command style match the corresponding venv setup used in test-slow.yml for
easier maintenance.
🤖 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 @.gitignore:
- Around line 16-17: The .vscode ignore rule is too broad and prevents the
documented settings file from being tracked. Update the ignore pattern in
.gitignore so the repository can still commit .vscode/settings.json while
continuing to ignore other local VS Code files; adjust the .gitignore entry for
.vscode accordingly without affecting the .cursor rule.

In `@data/README.md`:
- Around line 7-13: The fenced blocks in this README are missing language tags,
which triggers markdownlint MD040. Update the affected fences in the data
listing sections to include an appropriate language such as text so the blocks
remain lint-clean; apply the same fix to all matching fenced examples in this
file, not just the one shown here.
- Around line 177-199: The KCL dataset setup instructions are incomplete because
the README only mentions average_mesh.vtk and one example mesh, while
DownloadKCLHeartModelData requires the full input_meshes set. Update the dataset
layout section to explicitly list input_meshes/01.vtk through
input_meshes/20.vtk alongside average_mesh.vtk, and make sure the manual
download steps and required files match what DownloadKCLHeartModelData expects.
- Around line 17-29: Update the download-method summary in the README to match
the behavior in download_data.py and DataDownloadTools: Slicer-Heart-CT is not
the only auto-downloadable dataset, since KCL-Heart-Model and CHOP-Valve4D are
also routed through the download helpers. Revise the affected summary section
and the matching table so the dataset download status accurately reflects which
entries are automatically downloaded versus manually provided/preprocessed,
keeping the wording consistent with the download_data.py logic.

---

Nitpick comments:
In @.github/workflows/nightly-health.yml:
- Around line 57-62: The venv setup is inconsistent between the workflow files,
so align the nightly-health job’s venv creation in the create-venv step with the
same Windows Python 3.11 invocation used by the other workflow, or update both
to a single standard approach. Keep the existing Python 3.11 requirement in the
nightly-health workflow and make the command style match the corresponding venv
setup used in test-slow.yml for easier maintenance.
🪄 Autofix (Beta)

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

Run ID: e1dc8460-02cb-4e3b-9f1d-05fe738fb1c8

📥 Commits

Reviewing files that changed from the base of the PR and between 4ef53ac and c2c2c13.

📒 Files selected for processing (3)
  • .github/workflows/nightly-health.yml
  • .gitignore
  • data/README.md

Comment thread .gitignore Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 16:00

Copilot AI 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.

Pull request overview

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 16:23

Copilot AI 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.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Comment thread data/README.md Outdated
Comment thread data/README.md Outdated
Copilot AI review requested due to automatic review settings July 9, 2026 17:10

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

🧹 Nitpick comments (1)
src/physiotwin4d/vtk_to_usd/usd_utils.py (1)

166-169: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Consider routing USHORT through the unsigned path for semantic consistency.

DataType.USHORT (unsigned 16-bit) is now converted to signed int32/Vt.IntArray, while DataType.UINT/DataType.ULONG (unsigned 32/64-bit) are converted to uint32/Vt.UIntArray. Although int32 can hold all uint16 values without data loss, this inconsistency means unsigned short primvars will have a signed SDF type (IntArray vs UIntArray), which could confuse downstream consumers expecting unsigned semantics.

If USHORT is rare in practice, this is low priority, but aligning it with the UINT/ULONG branch (or at minimum documenting the choice) would improve clarity.

🤖 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/vtk_to_usd/usd_utils.py` around lines 166 - 169, The
`usd_utils.py` type-mapping branch currently routes `DataType.USHORT` through
the signed `int32`/`Vt.IntArray` path, which is inconsistent with the unsigned
handling used for `DataType.UINT` and `DataType.ULONG`. Update the conversion
logic in the array-to-USD helper so `USHORT` follows the unsigned semantic path
(or explicitly document why it must remain signed), keeping the mapping behavior
aligned with the surrounding `DataType` branches and `Vt.*Array` choices.
🤖 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 `@src/physiotwin4d/vtk_to_usd/usd_utils.py`:
- Around line 166-169: The `usd_utils.py` type-mapping branch currently routes
`DataType.USHORT` through the signed `int32`/`Vt.IntArray` path, which is
inconsistent with the unsigned handling used for `DataType.UINT` and
`DataType.ULONG`. Update the conversion logic in the array-to-USD helper so
`USHORT` follows the unsigned semantic path (or explicitly document why it must
remain signed), keeping the mapping behavior aligned with the surrounding
`DataType` branches and `Vt.*Array` choices.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 6e3d379d-fcb4-4aec-93b3-786f9ecf53cb

📥 Commits

Reviewing files that changed from the base of the PR and between c2c2c13 and 4fd8d4f.

📒 Files selected for processing (6)
  • .gitignore
  • data/DirLab-4DCT/README.md
  • data/README.md
  • src/physiotwin4d/vtk_to_usd/usd_utils.py
  • tests/README.md
  • tutorials/tutorial_01_heart_gated_ct_to_usd.py
✅ Files skipped from review due to trivial changes (4)
  • data/DirLab-4DCT/README.md
  • .gitignore
  • tutorials/tutorial_01_heart_gated_ct_to_usd.py
  • tests/README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • data/README.md

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Comment thread data/README.md Outdated
Comment on lines +1 to +3
# PhysioTwin4D Data Directory

This directory holds the example datasets used by PhysioTwin4D's tutorials,
experiments, and tests. Each subdirectory is one dataset and has its own
`README.md` with the download URL(s), directory layout, data sizes, and the
exact `physiotwin4d-download-data` command for that dataset. This file is
just the map — see the subdirectory README before downloading anything.
This directory contains sample datasets used for experiments, testing, and development of the PhysioTwin4D library. Each subdirectory contains a specific medical imaging dataset.
Comment thread data/README.md Outdated
Comment on lines +38 to +42
## Slicer-Heart-CT AUTO-DOWNLOAD

### Description

4D cardiac CT dataset with temporal gating showing complete cardiac cycle motion. Pediatric cardiac CT with truncal valve visualization.
Copilot AI review requested due to automatic review settings July 9, 2026 19:31

Copilot AI 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.

Pull request overview

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Comment thread src/physiotwin4d/vtk_to_usd/usd_utils.py
Comment thread src/physiotwin4d/vtk_to_usd/usd_utils.py
@aylward aylward merged commit 10bb0fc into Project-MONAI:main Jul 9, 2026
10 checks passed
@aylward aylward deleted the Nightly branch July 9, 2026 20:05
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.

2 participants