Skip to content

Add --version/-V CLI flag - #47

Merged
higagan merged 1 commit into
higagan:mainfrom
dyson-025:add-version-flag
Jul 31, 2026
Merged

Add --version/-V CLI flag#47
higagan merged 1 commit into
higagan:mainfrom
dyson-025:add-version-flag

Conversation

@dyson-025

Copy link
Copy Markdown
Contributor

Closes #38

Summary

  • Added support for --version and -V as eager CLI options.
  • Preserved the existing version subcommand.
  • Added a test to verify that --version prints the installed package version and exits successfully.

Testing

  • Ran pytest.
  • Ran ruff check ..
  • Verified modelfuzz --version, modelfuzz -V, and modelfuzz version.

Signed-off-by: Aditya Aryan <erenyeager200026@gmail.com>

@higagan higagan left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Verified locally — works exactly as intended.

  • modelfuzz --version and -V both print the version and exit 0; the existing version subcommand still works; a bare modelfuzz still shows usage.
  • is_eager=True on the callback option is the right call — the flag resolves before a subcommand is required.
  • ruff clean, 97 tests pass (including your new one).

Two tiny things for next time, neither blocking: the test could assert -V as well as --version, and the local from modelfuzz import __version__ inside the test is redundant since the module already imports it. Merging as-is.

@higagan
higagan merged commit 11c4067 into higagan:main Jul 31, 2026
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.

CLI: add a --version / -V flag

2 participants