Skip to content

Fix CLI output directory type - #182

Open
Vbitz wants to merge 1 commit into
BrainLesion:mainfrom
Vbitz:fix/cli-output-dir-type
Open

Fix CLI output directory type#182
Vbitz wants to merge 1 commit into
BrainLesion:mainfrom
Vbitz:fix/cli-output-dir-type

Conversation

@Vbitz

@Vbitz Vbitz commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Restore the CLI-facing output_dir annotation from str | Path to str. Typer 0.15 does not support union-typed command parameters and currently raises AssertionError: Typer Currently doesn't support Union types while constructing the command, including for preprocessor --help.

The function already converts the value with output_dir = Path(output_dir), so runtime path handling is unchanged.

Neurodesk confirmation

This investigation was started with OpenAI Codex CLI while debugging the NeuroContainers BrainLesion image, then confirmed by Neurodesk release CI:

Local validation

Tested from this branch under Python 3.10 with the project dependency set and Typer 0.15.4:

  • preprocessor --help
  • preprocessor --version

Both commands exit successfully.

@Vbitz
Vbitz marked this pull request as ready for review July 27, 2026 14:08
Copilot AI review requested due to automatic review settings July 27, 2026 14:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 fixes a Typer CLI compatibility issue by changing the output_dir command parameter annotation from str | Path to str, avoiding Typer 0.15’s unsupported Union-typed parameters while keeping runtime behavior unchanged (the value is still converted via Path(output_dir)).

Changes:

  • Update output_dir CLI parameter type annotation from str | Path to str to prevent Typer AssertionError during command construction (e.g., preprocessor --help).

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

@neuronflow
neuronflow requested a review from MarcelRosier July 27, 2026 17:39
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