feat: expose version to Python and add update checker (#28, #29) #45

Merged
forbes merged 1 commits from feat/update-checker into main 2026-02-08 21:36:42 +00:00
Owner

Summary

Implements issues #28 and #29 from the auto-update system plan.

Issue #28: Expose Kindred Create version to Python at build time

  • Added version.py.in CMake template that substitutes KINDRED_CREATE_VERSION at build time
  • Generated version.py is installed to Mod/Create/ alongside Init.py
  • Usage: from version import VERSION — returns e.g. "0.1.0"

Issue #29: Update checker — query Gitea API for latest release

  • Added update_checker.py with check_for_update() function
  • Queries /api/v1/repos/kindred/create/releases, filters out prereleases, drafts, and the rolling latest tag
  • Compares semver tuples to find if a newer version exists
  • Runs 10 seconds after startup via deferred QTimer (never blocks the UI)
  • Uses stdlib urllib.request only (no new dependencies)
  • Respects user preferences: CheckEnabled, CheckIntervalDays, SkippedVersion, LastCheckTimestamp
  • Logs results to Console — UI notification will come in issue #30

Files changed

File Change
src/Mod/Create/version.py.in New — CMake template
src/Mod/Create/update_checker.py New — checker module
src/Mod/Create/CMakeLists.txt Add configure_file + install entries
src/Mod/Create/InitGui.py Add deferred update check timer

Closes #28
Closes #29

## Summary Implements issues #28 and #29 from the auto-update system plan. ### Issue #28: Expose Kindred Create version to Python at build time - Added `version.py.in` CMake template that substitutes `KINDRED_CREATE_VERSION` at build time - Generated `version.py` is installed to `Mod/Create/` alongside Init.py - Usage: `from version import VERSION` — returns e.g. `"0.1.0"` ### Issue #29: Update checker — query Gitea API for latest release - Added `update_checker.py` with `check_for_update()` function - Queries `/api/v1/repos/kindred/create/releases`, filters out prereleases, drafts, and the rolling `latest` tag - Compares semver tuples to find if a newer version exists - Runs 10 seconds after startup via deferred QTimer (never blocks the UI) - Uses stdlib `urllib.request` only (no new dependencies) - Respects user preferences: CheckEnabled, CheckIntervalDays, SkippedVersion, LastCheckTimestamp - Logs results to Console — UI notification will come in issue #30 ### Files changed | File | Change | |------|--------| | `src/Mod/Create/version.py.in` | New — CMake template | | `src/Mod/Create/update_checker.py` | New — checker module | | `src/Mod/Create/CMakeLists.txt` | Add configure_file + install entries | | `src/Mod/Create/InitGui.py` | Add deferred update check timer | Closes #28 Closes #29
forbes added 1 commit 2026-02-08 19:11:24 +00:00
feat: expose version to Python and add update checker (#28, #29)
All checks were successful
Build and Test / build (pull_request) Successful in 1h11m28s
35302154ae
Issue #28: Add version.py.in CMake template that injects
KINDRED_CREATE_VERSION at build time, making the Kindred Create
version available to Python code via 'from version import VERSION'.

Issue #29: Add update_checker.py that queries the Gitea releases
API on startup (10s deferred) to check for newer versions. Uses
stdlib urllib only, 5s timeout, never blocks the UI. Respects
user preferences for check interval, enable/disable, and skipped
versions. Logs results to Console for now — UI notification will
follow in issue #30.

Closes #28
Closes #29
forbes merged commit da46073d68 into main 2026-02-08 21:36:42 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#45