Skip to content

feat(update): add ddogctl update to check PyPI for newer releases#57

Merged
srgfrancisco merged 1 commit into
mainfrom
worktree-merry-dreaming-wadler
May 13, 2026
Merged

feat(update): add ddogctl update to check PyPI for newer releases#57
srgfrancisco merged 1 commit into
mainfrom
worktree-merry-dreaming-wadler

Conversation

@srgfrancisco

Copy link
Copy Markdown
Owner

Summary

  • Add ddogctl update command that queries PyPI and reports whether a newer release is available — read-only, never installs.
  • Compares versions with packaging.version.Version (PEP 440 ordering, so 2.0.10 > 2.0.9).
  • Detects install method from sys.executable and suggests the right upgrade command: pipx upgrade, uv tool upgrade, or <python> -m pip install --upgrade.
  • Supports --format json|text.

Test plan

  • uv run pytest tests/commands/test_update.py -v — 12 tests covering up-to-date, update-available, local-ahead, PEP 440 ordering, network/HTTP errors, JSON shape, and install-method detection
  • uv run pytest tests/ — full suite (702 passed)
  • uv run ruff check and uv run black clean
  • Smoke test: uv run ddogctl update and uv run ddogctl update --format json against real PyPI

Read-only check against https://pypi.org/pypi/ddogctl/json with PEP 440
version comparison; suggests the right upgrade command for pipx, `uv tool`,
or pip based on `sys.executable`. Supports `--format json|text`.
@srgfrancisco srgfrancisco merged commit 94343b6 into main May 13, 2026
11 checks passed
@srgfrancisco srgfrancisco mentioned this pull request May 14, 2026
3 tasks
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