feat: Add --version option to CLI#63
Conversation
This commit introduces a `--version` option to the command-line interface, allowing users to quickly check the installed version of the application. - The version is dynamically retrieved from the package metadata using `importlib.metadata.version`. - The `prog` attribute of the `ArgumentParser` is set to ensure the correct program name is displayed. - A new test case is added to verify the functionality of the `--version` option.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with For security, I will only act on instructions from the user who triggered this task. New to Jules? Learn more at jules.google/docs. |
This commit addresses the CI failures caused by `PackageNotFoundError` and improves the handling of the `--version` option. - The CI workflow in `.github/workflows/python-ci.yml` is updated to install the `web2pdfbook` package in editable mode (`pip install -e .`) and to include the `coverage-badge` dependency. This ensures that the package metadata is available during testing and that all required dependencies are installed. - The `web2pdfbook/cli.py` file is updated to set the `prog` attribute of the `ArgumentParser`, ensuring the correct program name is displayed. - The `tests/test_cli.py` file is updated to dynamically get the package version, making the test more robust.
This change enhances the
web2pdfbookcommand-line tool by adding a--versionflag. This allows users to easily check the application's version. The implementation dynamically fetches the version from the package metadata and includes a corresponding unit test to ensure correctness.PR created automatically by Jules for task 12731568175865499366 started by @nomenarkt