Skip to content

Added a simple CLI using typer#113

Merged
MarcelRosier merged 8 commits intoBrainLesion:mainfrom
sarthakpati:cli
Mar 20, 2025
Merged

Added a simple CLI using typer#113
MarcelRosier merged 8 commits intoBrainLesion:mainfrom
sarthakpati:cli

Conversation

@sarthakpati
Copy link
Contributor

Fixes #112

@neuronflow neuronflow requested a review from MarcelRosier March 20, 2025 10:38
Copy link
Collaborator

@MarcelRosier MarcelRosier left a comment

Choose a reason for hiding this comment

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

Needs formatting, our bot sadly does not work for PRs from forks



def version_callback(value: bool):
__version__ = "0.0.0-dev" # this needs to be fixed
Copy link
Collaborator

Choose a reason for hiding this comment

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

should this be fixed before merging?

Copy link
Contributor Author

@sarthakpati sarthakpati Mar 20, 2025

Choose a reason for hiding this comment

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

I have no idea. How can someone get the current __version__ information from this package - perhaps we can use the same mechanism here?

If there is no such mechanism, then it should be part of a different PR.

Ref: https://stackoverflow.com/questions/458550/standard-way-to-embed-version-into-python-package

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think you can just use this:

from importlib.metadata import version
__version__ = version("brainles_preprocessing")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@sarthakpati
Copy link
Contributor Author

BTW, I think the linter workflow is broken, because I have done the black on my end:

(C:\Projects\preprocessing\venv) PS C:\Projects\preprocessing> black .
reformatted brainles_preprocessing\cli.py
reformatted brainles_preprocessing\preprocessor.py

All done! ✨ 🍰 ✨
2 files reformatted, 33 files left unchanged.

@MarcelRosier MarcelRosier self-requested a review March 20, 2025 21:18
@MarcelRosier
Copy link
Collaborator

Will investigate the linter job separately

@MarcelRosier MarcelRosier merged commit d1cba2f into BrainLesion:main Mar 20, 2025
3 of 4 checks passed
@sarthakpati sarthakpati deleted the cli branch March 21, 2025 00:12
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.

[FEATURE] A command line app would be useful

2 participants