Skip to content

Convert NikeAMoments to artifact_processor (structured moments table)#895

Merged
abrignoni merged 1 commit into
mainfrom
convert-nike-moments
Jun 22, 2026
Merged

Convert NikeAMoments to artifact_processor (structured moments table)#895
abrignoni merged 1 commit into
mainfrom
convert-nike-moments

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

Summary

NikeAMoments was old-style. It rendered a redundant activities table plus a custom interactive JS timeline of per-run moments. The activities table is already covered (more richly) by the existing Nike - Activities artifact, and the JS timeline can't render in LAVA — so the moment data was effectively unqueryable.

This converts it to a single @artifact_processor that emits Nike - Activity Moments: one row per activity_moment (Activity ID, Timestamp, Moment Type, Value, Description).

Changes

  • Removed ArtifactHtmlReport + the interactive timeline JS (add_timeline/add_timeline_script).
  • Dropped the redundant runs table (covered by Nike - Activities).
  • New Nike - Activity Moments table surfaces moment data that was previously only visible inside the JS widget.
  • Description reproduces the original timeline labels (Run paused/resumed, Split KM/Mile, GPS signal lost/found).
  • More complete than the original: unknown moment types are kept with a blank description instead of being silently dropped.
  • Aware UTC datetimes via a per-file _ms_to_utc; helpers/style match NikeActivities.py.

Validation

  • ast.parse OK; 0 old-style refs (ArtifactHtmlReport/report./add_timeline/tsv/timeline).
  • Reserved-word audit: header set creates a SQLite table cleanly.
  • pylint (CI config): 10.00/10.
  • PluginLoader loads cleanly (total 538).
  • Functional smoke test on a synthetic fixture: all 7 moment-type branches produce the correct descriptions; unknown type preserved.

NikeAMoments was old-style and showed a redundant activities table plus a
custom interactive JS timeline of per-run moments. The activities table is
already covered (more richly) by the 'Nike - Activities' artifact, and the
JS timeline can't render in LAVA, so the moment data was effectively
unqueryable.

Convert to a single @artifact_processor that emits 'Nike - Activity Moments':
one row per activity_moment (Activity ID, Timestamp, Moment Type, Value,
Description). The human-readable Description reproduces the original timeline
labels (Run paused/resumed, Split KM/Mile, GPS signal lost/found); unknown
moment types are now kept with a blank description instead of being dropped.
@abrignoni abrignoni merged commit ea9dacf into main Jun 22, 2026
2 checks passed
@abrignoni abrignoni deleted the convert-nike-moments branch June 22, 2026 19:45
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