Skip to content

feat(cli): add --version option 🤖🤖🤖 - #563

Merged
jatinkrmalik merged 2 commits into
VocaHQ:mainfrom
AnayGarodia:feature/version-flag-555
Jul 25, 2026
Merged

feat(cli): add --version option 🤖🤖🤖#563
jatinkrmalik merged 2 commits into
VocaHQ:mainfrom
AnayGarodia:feature/version-flag-555

Conversation

@AnayGarodia

Copy link
Copy Markdown
Contributor

Description

Add a standard vocalinux --version option backed by the package's existing __version__ value. The parser now also uses a stable program name so help and version output remain consistent across Python versions.

Closes #555

Type of Change

  • ✨ New feature
  • ✅ Test update

Validation

  • PYTHONPATH=src python3 -m pytest tests/test_main_args_deps.py -q (25 passed)
  • python3 -m py_compile src/vocalinux/main.py tests/test_main_args_deps.py

Checklist

  • Code follows the existing project style
  • Tests cover the new behavior
  • Focused tests pass locally

Copilot AI review requested due to automatic review settings July 22, 2026 07:47

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added app Core Python application (src, packaging) tests Test suite changes labels Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.50%. Comparing base (fbcd28d) to head (b9d74dd).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #563      +/-   ##
==========================================
+ Coverage   84.83%   85.50%   +0.67%     
==========================================
  Files          33       33              
  Lines        5864     5866       +2     
  Branches      952      952              
==========================================
+ Hits         4975     5016      +41     
+ Misses        688      649      -39     
  Partials      201      201              
Files with missing lines Coverage Δ
src/vocalinux/main.py 91.55% <100.00%> (+0.07%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jatinkrmalik jatinkrmalik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There is a real gap on the full CLI path: main() still acquires the single-instance lock before parse_arguments(). With Vocalinux already running (the common tray case), vocalinux --version exits 1 with "Another instance is already running" and never prints the version. I reproduced that with a held flock on instance.lock.

Requested change

Please parse (or special-case --version) before acquire_lock, similar to how PR #568 by @webenefits handles --toggle / --start / --stop. A main()-level test with the lock held would lock this in.

Happy to approve once that ordering is fixed.

…on works while app is running

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@AnayGarodia

Copy link
Copy Markdown
Contributor Author

good catch, moved parse_arguments() before the lock so --version and --help work while the app is running. added a test that runs main() with the lock held and checks --version exits 0. full suite passes

@jatinkrmalik

Copy link
Copy Markdown
Member

Thanks for the follow-up fix. Moving arg parsing before the lock check makes sense. Looks good to merge.

@jatinkrmalik
jatinkrmalik merged commit eb16a34 into VocaHQ:main Jul 25, 2026
15 checks passed
@jatinkrmalik jatinkrmalik mentioned this pull request Jul 28, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Core Python application (src, packaging) tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] --version option missing

3 participants