Skip to content

feat: --version flag and upgrade check#2

Merged
Champion2005 merged 5 commits intomainfrom
feat/version-check
Mar 5, 2026
Merged

feat: --version flag and upgrade check#2
Champion2005 merged 5 commits intomainfrom
feat/version-check

Conversation

@Champion2005
Copy link
Copy Markdown
Owner

Summary

Add --version flag and automatic upgrade-available warning on all CLI invocations.

Changes

  • src/netbox_data_puller/version_check.py — New module: PyPI version check with 7-day cache, silent failure, NBPULL_NO_UPDATE_CHECK opt-out
  • src/netbox_data_puller/cli.py@app.callback with --version eager flag + atexit-based upgrade warning
  • pyproject.toml — Added packaging>=24.0 as explicit dependency
  • tests/test_version_check.py — 9 unit tests for version check module
  • tests/test_cli.py — 4 new tests for --version flag and upgrade registration
  • CHANGELOG.md + docs/commands.md — Documentation updates

Requirements

  • R1: --version flag ✅
  • R2: Upgrade warning on all invocations ✅
  • R3: 7-day cached PyPI check ✅
  • R4: Silent failure ✅
  • R5: Rich console to stderr ✅
  • R6: NBPULL_NO_UPDATE_CHECK opt-out ✅
  • R7: mypy --strict + ruff
  • R8: Full test coverage (13 new tests) ✅

@Champion2005 Champion2005 merged commit 8932d3e into main Mar 5, 2026
3 of 4 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.

1 participant