Skip to content

203 bug checking version#215

Merged
frey-perez merged 7 commits into
mainfrom
203-bug-checking-version
Jun 12, 2025
Merged

203 bug checking version#215
frey-perez merged 7 commits into
mainfrom
203-bug-checking-version

Conversation

@frey-perez
Copy link
Copy Markdown
Collaborator

@frey-perez frey-perez commented Jun 9, 2025

This addresses issue #203. The way the cli is currently set up it does not allow for the version flag to be given without also providing an input argument. The changes made were as follows:

  1. Version option(-V, --version) now has a callback argument version_check.
  2. version_check will run before the other options, print the version to the console, and then exit.

A version check can now be done without running the rest of the pipeline or providing an input argument.

@frey-perez frey-perez linked an issue Jun 9, 2025 that may be closed by this pull request
@frey-perez frey-perez marked this pull request as draft June 9, 2025 15:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 9, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.54%. Comparing base (91587a6) to head (3895c6b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
+ Coverage   96.34%   96.54%   +0.20%     
==========================================
  Files          15       15              
  Lines        1012     1013       +1     
==========================================
+ Hits          975      978       +3     
+ Misses         37       35       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@frey-perez frey-perez marked this pull request as ready for review June 9, 2025 18:54
Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

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

Looks good to me, and it seems to be working.

Want to add a quick unit test? Something like this maybe?

def test_main_version(
    create_typer_cli_runner: testing.CliRunner,
) -> None:
    """Test cli version output."""
    result = create_typer_cli_runner.invoke(cli.app, ["--version"])

    assert result.exit_code == 0
    assert "Wristpy version" in result.output

@frey-perez frey-perez requested a review from Asanto32 June 10, 2025 18:42
Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

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

LGTM

@frey-perez frey-perez merged commit 5a4e51c into main Jun 12, 2025
26 checks passed
@frey-perez frey-perez deleted the 203-bug-checking-version branch June 12, 2025 14:53
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.

Bug: Checking wristpy version requires an INPUT_PATH

2 participants