Convert GarminResponse, GarminJson, GarminGcmJsonActivities to LAVA @artifact_processor by abrignoni · Pull Request #775 · abrignoni/ALEAPP · GitHub
Skip to content

Convert GarminResponse, GarminJson, GarminGcmJsonActivities to LAVA @artifact_processor - #775

Merged
abrignoni merged 1 commit into
mainfrom
lava-batch-33
Jun 20, 2026
Merged

abrignoni merged 1 commit into
mainfrom
lava-batch-33

Conversation

@abrignoni

Copy link
Copy Markdown
Owner

The three Garmin JSON-cache 'viewer' artifacts. Originally each rendered a 'View' button + an embedded HTML JSON panel (add_json_to_artifact) — both HTML-report-only. For LAVA the actual JSON string is the data, so the button column now holds the pretty-printed JSON itself.

  • GarminResponse — response_cache; lastUpdate raw → aware UTC datetime; Response column = the cached JSON (pretty-printed) instead of a button.
  • GarminJson — json table; saved_timestamp raw → aware UTC datetime; json column = the cached value (pretty-printed).
  • GarminGcmJsonActivities — json_activities table; saved_timestamp raw → aware UTC datetime; json column = the cached value (pretty-printed); empty [] rows yield ''.

Added a shared _pretty_json helper with a guarded parse (malformed JSON returns the raw string instead of crashing, which the original did not handle). Dropped add_json_to_artifact/filter_by_date/the buttons; the JSON cells are no longer html_escape=False, so content is safely escaped in the HTML report.

Verified: byte-compile, decorated 4-arg signatures, return 3-tuples, output_types valid, _pretty_json guard tested, loader builds (407 plugins), pylint clean.

@abrignoni
abrignoni merged commit d818a8d into main Jun 20, 2026
1 check passed
@abrignoni
abrignoni deleted the lava-batch-33 branch June 20, 2026 16:35
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