Skip to content

Automate weekly Garmin FIT device list sync with updater and tests - #4927

Merged
cagnulein merged 2 commits into
masterfrom
codex/add-automated-garmin-device-synchronization
Aug 13, 2026
Merged

Automate weekly Garmin FIT device list sync with updater and tests#4927
cagnulein merged 2 commits into
masterfrom
codex/add-automated-garmin-device-synchronization

Conversation

@cagnulein

Copy link
Copy Markdown
Owner

Motivation

  • Keep the Garmin FIT product selector in src/settings.qml up to date by importing new products from Garmin's generated fit_profile.hpp and avoid manual updates.
  • Provide a reproducible updater that preserves existing entries and excludes regional/variant noise to keep the selector manageable.

Description

  • Add a scheduled GitHub Actions workflow /.github/workflows/update-garmin-fit-devices.yml that runs weekly (and on demand) to test and run the updater, check for changes, and open or update a PR when updates are found.
  • Introduce scripts/update_garmin_fit_devices.py, a standalone updater that parses Garmin's fit_profile.hpp, determines eligible products, updates the ComboBox in src/settings.qml in-place, and emits a Markdown summary and GitHub Actions output flag.
  • Implement robust parsing, validation, and safeguards in the updater including duplicate checks, QML structure validation, preservation of existing entries, deterministic ordering by product number, and configurable catalog source via --catalog.
  • Add unit tests tests/test_update_garmin_fit_devices.py that cover catalog parsing, QML location and updates, idempotence, exclusion rules, CLI behavior, and edge cases.

Testing

  • The workflow runs python3 -m unittest tests/test_update_garmin_fit_devices.py as part of its steps; the tests exercise update_garmin_fit_devices.py functionality and CLI behavior and completed successfully in local CI validation.
  • The updater's main() is exercised by tests, including writing a temporary settings.qml and fit_profile.hpp and verifying the --github-output changed=true/false behavior, which passed.
  • Unit tests covering parsing, mapping consistency, exclusion rules, idempotence, and non-target QML regions were executed and succeeded.

Codex Task

@cagnulein
cagnulein merged commit 8029c63 into master Aug 13, 2026
4 of 16 checks passed
@cagnulein
cagnulein deleted the codex/add-automated-garmin-device-synchronization branch August 13, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant