feat: add a root --version CLI flag#214
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdded version display functionality to the pyicloud CLI application. A new Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Pylint (4.0.5)tests/test_cmdline.pypyicloud/cli/app.pyThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@MrJarnould - thanks for this update |
Co-authored-by: Tim Laing <11019084+timlaing@users.noreply.github.com>
* feat: add CLI support for Notes and Reminders * fix: repair Notes folder desired keys * fix: derive reminder list counts from membership * fix: speed up Notes sync and fix Reminders hashtag round-trips * docs: use installed icloud CLI in README examples * fix: address Notes and Reminders CLI review nits * Update permissions for autolabeler workflow Signed-off-by: Tim Laing <11019084+timlaing@users.noreply.github.com> * Fix formatting in autolabeler workflow by removing unnecessary blank line * feat: add a root --version CLI flag (#214) Co-authored-by: Tim Laing <11019084+timlaing@users.noreply.github.com> * fix: restore SMS and trusted-device 2FA auth flows (#210) * feat: handle Apple's HSA2 trusted-device prompts * Trim unrelated Notes PR scope * Address CodeRabbit review comments * Add docstrings for auth bridge PR scope * Harden bridge prover and persistence tests * Update protobuf requirement from <7,>=6.31.1 to >=6.31.1,<8 (#208) Updates the requirements on [protobuf](https://github.com/protocolbuffers/protobuf) to permit the latest version. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Commits](https://github.com/protocolbuffers/protobuf/commits) --- updated-dependencies: - dependency-name: protobuf dependency-version: 7.34.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump github/codeql-action from 4.34.1 to 4.35.1 (#209) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.34.1 to 4.35.1. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@3869755...c10b806) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.35.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * refactor: remove obsolete 2FA tests for trusted device and SMS flows --------- Signed-off-by: Tim Laing <11019084+timlaing@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Tim Laing <11019084+timlaing@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Proposed change
This PR adds a root-level
--versionflag to theicloudCLI.Running
icloud --versionnow prints the installedpyicloudpackage version and exits without requiring a subcommand. The implementation resolves the version from installed package metadata so the output matches the actual installed distribution rather than a hard-coded string.This keeps the change small and focused:
--versionpyicloudversion and exit earlyType of change
Example of code:
Additional information
uv run --no-sync python -m pytest tests/test_cmdline.py -quv run --no-sync ruff check pyicloud/cli/app.py tests/test_cmdline.pyuv run --no-sync python -m pyicloud.cmdline --version->2.4.2.dev11Checklist
If user exposed functionality or configuration variables are added/changed: