Skip to content

✨ Add positional arguments, verbose mode, and overwrite protection#13

Merged
dyollb merged 7 commits intomainfrom
features
Feb 6, 2026
Merged

✨ Add positional arguments, verbose mode, and overwrite protection#13
dyollb merged 7 commits intomainfrom
features

Conversation

@dyollb
Copy link
Copy Markdown
Owner

@dyollb dyollb commented Feb 6, 2026

What do these changes do?

New Features:

  • Positional/keyword-only arguments: Use Python's native *, syntax to control CLI argument patterns
  • Auto-create directories: create_dirs=True (default) automatically creates parent directories for output files
  • Verbose mode: Add verbose=True for --verbose/-v/-vv logging control with optional Rich formatting
  • Overwrite protection: overwrite parameter with three modes - always (default), error+--force, or interactive prompt

Breaking Changes:

  • Required Image/Transform parameters are now positional by default (was named)
  • Use *, before parameters to make them keyword-only: def process(*, input: sitk.Image)

Other Changes:

  • Switched to typer-slim for lighter weight installation
  • Added rich as optional dependency for enhanced logging
  • Added comprehensive examples

@dyollb dyollb changed the title ✨ add create dirs option ✨ Add positional arguments, verbose mode, and overwrite protection Feb 6, 2026
@dyollb dyollb merged commit 625f8f1 into main Feb 6, 2026
3 checks passed
@dyollb dyollb deleted the features branch February 6, 2026 17:43
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