Repository navigation
feat(igpsport): sync and verify selected cycling rider settings - #63
KirillSugonyakin wants to merge 6 commits into
Conversation
|
Thanks for this contribution! I like the additional profile fields—height, birth date, and sex—and the ability to select what gets synchronized with Before merging, I’d like to better understand the changes to HR and power-zone synchronization. The existing Could you clarify:
My preference would be to reuse the existing Would that approach work with your implementation? I’d like to avoid two commands producing different zone configurations from the same Intervals.icu settings without a clear reason. |
|
Reusing the existing conversion logic would work, and I agree it is the better default for this contribution. Field selection, additional profile fields, dry-run, and read-back verification do not require a separate zone-conversion policy. I have attached a sanitized research and validation summary, including the original rationale, primary sources, numerical comparisons, and the limits of the live evidence. To answer your questions:
I propose revising this PR to reuse the existing zone conversion and HR-mode behavior, with field selection, the extra profile fields, dry-run, and verification around it. Any changes to rounding, terminal-cap handling, or model-specific conversion can be discussed separately with focused examples, compatibility tests, and the relevant app/device evidence. The research note documents the rationale; it has not changed the current implementation yet. |
|
Thanks for the clarification. One point about the numerical comparison: iGPSPORT uses seven power zones, and the existing implementation already preserves the source’s six finite boundaries in that configuration, replacing the open-ended sentinel with the destination cap. Why is the power comparison based on five destination slots? Was a five-slot power table actually observed in a live API response, or is this only a synthetic scenario? Please distinguish the seven-zone power behavior from the five-zone HR behavior. To be clear about scope: I’m happy with adding height, sex, and birth date, and with field selection. However, I’m concerned that introducing different zone conversion, rounding, terminal-cap handling, model-name restrictions, or HR calculation-mode selection would regress the existing functionality. I don’t want those behavior changes included in this PR. As you proposed, please reuse the existing zone conversion and HR-mode behavior rather than introducing a separate policy. Please also include regression tests confirming that, for the same source and destination configuration, the new command produces the same power/HR zone boundaries and HR mode as the existing sync. Any proposed changes to those behaviors should be discussed separately with evidence of an actual problem in the current implementation. |
|
The five-slot power example was synthetic; the observed configuration had seven power slots and five HR slots. The revised command now reuses existing conversion, rounding, cap, and HR-mode behavior, with same-input regression tests. Research and description updated; all 335 tests pass in CI. Ready for another review. |
Summary
Add
sync-rider-settingsto transfer selected cycling profile values from Intervals.icu to iGPSPORT, with dry-run and explicit read-back verification. The revised command reuses the existingsync-zonesconversion and HR-mode behavior rather than introducing a second zone policy.Maintainer-requested revision
map_power_zones/map_hr_zones, threshold normalization, ties-to-even rounding, fixed power cap, and maximum-HR mode/table for selected HR-zone synchronization.zone_map.pyis unchanged from upstream.Retained workflow
Rideonly; select FTP, power zones, maximum/threshold/resting HR, HR zones, weight, height, birth date, and sex. Zone selections expand threshold dependencies.--fields,--dry-run,--show-values, and status JSON. Values require explicit--dry-run --show-values; normal/error output does not expose private values or raw API exceptions.sync-zonesand GUI parsing/conversion remain unchanged. No estimation, analysis, scoring, scheduling, or new runtime dependency.Verification
uv run --frozen pytest -q: 335 passed, Python 3.13.6dfab98: 411 passed, conflict-free merge.apply_intervals_settings, with independent literal expectations: seven power/five HR slots, custom labels/boundaries, fractional thresholds, half-watt rounding, differing fetched caps, inactive-table preservation, and non-HR selection.failed: 1, and private-error suppression.Research and evidence limits
Sanitized research and validation summary documents the original downstream strict policy and its limitations, and now explicitly distinguishes it from this revised upstream implementation.
Historical downstream API writes/read-back established persistence for the configuration exercised, including its strict policy. They do not prove that policy is superior or validate HR-mode behavior across apps/devices. The secondary-cadence device test in #62 is a different feature. This revision used offline synthetic fixtures and made no live account writes or packaged GUI builds.
The command needs a release before it appears in
intervalssync@latest. The separate #62 contribution shares the small timeout helper so each PR can be merged independently. No release tags or deployment changes are included.