Skip to content

Fix itk_infer command#78

Merged
MGAMZ merged 1 commit into
mainfrom
fix-itk-infer
Feb 7, 2026
Merged

Fix itk_infer command#78
MGAMZ merged 1 commit into
mainfrom
fix-itk-infer

Conversation

@MGAMZ
Copy link
Copy Markdown
Owner

@MGAMZ MGAMZ commented Feb 7, 2026

No description provided.

@MGAMZ MGAMZ added the bug Something isn't working label Feb 7, 2026
Copilot AI review requested due to automatic review settings February 7, 2026 07:42
@MGAMZ MGAMZ added the process itkit.process module label Feb 7, 2026
@MGAMZ MGAMZ merged commit c04a3aa into main Feb 7, 2026
12 checks passed
@MGAMZ MGAMZ deleted the fix-itk-infer branch February 7, 2026 07:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 package metadata to fix the published itk_infer console script so it points to an existing module, and bumps the project version accordingly.

Changes:

  • Bump project version from 4.0.0rc4 to 4.0.0rc5.
  • Update the itk_infer entry point to itkit.process.itk_infer:main.

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

Comment thread pyproject.toml
itkit-app = "itkit.gui.app:main"
itk_slicer = "SlicerITKIT.server.itkit_server:main"
itk_infer = "itkit.inference.itk_infer:main"
itk_infer = "itkit.process.itk_infer:main"
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

itk_infer now points to itkit.process.itk_infer:main, but that module imports zarr at import time (see itkit/process/itk_infer.py:12) while zarr is not listed in [project].dependencies or any optional extra. This will make the itk_infer command fail with ModuleNotFoundError for users who install the base package. Add zarr as an install dependency (or an extra that is clearly required for itk_infer) and/or change itk_infer to import zarr lazily only when --save-logits is used and emit a clear error if missing.

Copilot uses AI. Check for mistakes.
Comment thread pyproject.toml
itkit-app = "itkit.gui.app:main"
itk_slicer = "SlicerITKIT.server.itkit_server:main"
itk_infer = "itkit.inference.itk_infer:main"
itk_infer = "itkit.process.itk_infer:main"
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

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

There is comprehensive pytest coverage for other itkit.process.* CLI entry points (e.g., tests/itk_process/test_process_mains.py), but no test exercises the itk_infer entry point/module import. Since this PR changes the published script target, add at least a lightweight test that imports itkit.process.itk_infer and verifies main is reachable (skipping when optional deps like torch/zarr aren’t installed) to prevent regressions in the command wiring.

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@b1c5cae). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #78   +/-   ##
=======================================
  Coverage        ?   72.19%           
=======================================
  Files           ?      108           
  Lines           ?    12239           
  Branches        ?     1097           
=======================================
  Hits            ?     8836           
  Misses          ?     3147           
  Partials        ?      256           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Labels

bug Something isn't working process itkit.process module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants