Skip to content

Prototype cli#218

Merged
cookpa merged 5 commits into
ANTsX:masterfrom
arnaudbore:prototype_cli
Jun 3, 2026
Merged

Prototype cli#218
cookpa merged 5 commits into
ANTsX:masterfrom
arnaudbore:prototype_cli

Conversation

@arnaudbore

@arnaudbore arnaudbore commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Here is a prototype of a cli: antsMouseBrainExtraction

Even tho I've been told @cookpa would take care of it, I took few minutes to give it a try. Sorry not sorry I guess 😅

#217

@ntustison

Copy link
Copy Markdown
Member

Hey, thanks for this @arnaudbore . I'll defer to @cookpa to provide any feedback on this since it's a bit out of my wheelhouse.

@arnaudbore

Copy link
Copy Markdown
Contributor Author

Hey @cookpa !
Any update on this side ?

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 introduces a first prototype command-line interface for running ANTsPyNet’s mouse_brain_extraction utility via an installed console script, along with a unit test that verifies the CLI wiring (read → extract → write).

Changes:

  • Add antspynet.cli.mouse_brain_extraction implementing an argparse-based CLI wrapper around antspynet.mouse_brain_extraction.
  • Register a console script entry point in pyproject.toml.
  • Add a lightweight unit test that patches I/O/model calls to validate argument routing.

Reviewed changes

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

File Description
antspynet/cli/mouse_brain_extraction.py New CLI implementation (parser, run wrapper, main entry).
antspynet/cli/__init__.py Introduces cli package and re-exports main.
pyproject.toml Adds a console script entry point for the new CLI.
tests/test_mouse_cli.py Adds a unit test validating CLI → mouse_brain_extraction call routing.

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

Comment thread pyproject.toml Outdated
Comment thread antspynet/cli/mouse_brain_extraction.py
Comment thread antspynet/cli/mouse_brain_extraction.py
Comment thread antspynet/cli/__init__.py Outdated
@arnaudbore

Copy link
Copy Markdown
Contributor Author

@cookpa it should be ready 👍

@cookpa

cookpa commented May 19, 2026

Copy link
Copy Markdown
Member

Thanks, I will start the tests. They take a while because of data downloads

@arnaudbore arnaudbore changed the title [WIP] Test prototype cli Prototype cli May 19, 2026
@arnaudbore arnaudbore requested a review from cookpa May 20, 2026 13:49
@arnaudbore

Copy link
Copy Markdown
Contributor Author

@cookpa Ready ?

@cookpa

cookpa commented May 28, 2026

Copy link
Copy Markdown
Member

I think it's almost there but there's a couple of detail comments above

@arnaudbore

Copy link
Copy Markdown
Contributor Author

I think it's almost there but there's a couple of detail comments above

Tell me what you want me to fix please:

  • The exit error issue ?

  • The extra command line: ants_mouse_brain_extraction ?

Comment thread antspynet/cli/mouse_brain_extraction.py
Comment thread pyproject.toml Outdated
@cookpa

cookpa commented May 28, 2026

Copy link
Copy Markdown
Member

Sorry, my fault I did not submit the review where I wrote the comments

@arnaudbore

Copy link
Copy Markdown
Contributor Author

Done ! 👍

@cookpa

cookpa commented Jun 3, 2026

Copy link
Copy Markdown
Member

Test failure on Python 3.11 looks to be an infrastructure problem, works on 3.13 so I'm calling this good. Thanks @arnaudbore

@cookpa cookpa merged commit 937aeb3 into ANTsX:master Jun 3, 2026
2 of 3 checks passed
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.

4 participants