dbs_annotator.utils.updater
Check GitHub Releases for newer versions of the app.
Design goals:
Silent on failure – a missing network connection, a GitHub outage, or a rate limit must never block startup or show an error dialog to the user.
At most one check per cooldown window (default 24 h) so repeated launches do not spam the GitHub API. The last-check timestamp is persisted with
QSettingsso it survives between sessions but never leaks PII.The HTTP fetch runs on a worker thread via
QThreadPool; the main-thread slot is only invoked if a strictly-newer version is found.The user can always trigger a check from a menu / button with
force=True(even when automatic checks are disabled in preferences).Among all published (non-draft) releases, only the highest version greater than the running build is considered (PEP 440 ordering, including alpha / beta / rc). GitHub’s
/releases/latestendpoint is not used because it omits pre-releases.
The release repository is hardcoded to the canonical upstream; change
DEFAULT_RELEASES_REPO if the project moves.
Module attributes
|
Owner/repo pair on GitHub whose releases advertise new builds. |
Classes
|
Metadata for a GitHub release that is newer than the running app. |
|
Orchestrates background update checks with a configurable cooldown. |