Skip to content

Route matching#82

Merged
niklasvm merged 6 commits intomasterfrom
route-matching
Aug 9, 2025
Merged

Route matching#82
niklasvm merged 6 commits intomasterfrom
route-matching

Conversation

@niklasvm
Copy link
Owner

@niklasvm niklasvm commented Aug 9, 2025

No description provided.

@niklasvm niklasvm requested a review from Copilot August 9, 2025 13:43
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances activity analysis by integrating visual activity data into the naming process. The main purpose is to include activity stream charts (speed, heart rate, altitude, cadence) as visual context for LLM-based activity naming, while also updating to a stable LLM model version.

  • Adds stream data visualization with PNG chart generation for activities
  • Updates LLM model from experimental version to stable "gemini-2.5-pro"
  • Integrates binary chart data into the naming prompt workflow

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tasks/post_event.py Updates LLM model to stable version
src/tasks/etl/single_activity_etl.py Adds activity stream data extraction and chart generation
src/tasks/etl/naming_strategies/v2/prompt_v2.j2 Updates prompt template to reference attached chart image
src/tasks/etl/naming_strategies/v2/naming_strategy_v2.py Integrates binary chart data into prompt generation
src/tasks/etl/naming_strategies/base.py Removes debug file writing
src/tasks/etl/naming_strategies/agent.py Handles binary content in prompt processing
src/tasks/etl/naming_etl.py Includes stream_data in activity processing
src/scripts/explore_streams.py New exploration script for stream data analysis
src/scripts/explore_location_2.py New exploration script for route similarity analysis
src/database/models.py Adds stream_data column to Activity model
src/database/migrations/versions/85ab3d6b2278_add_stream_data_column_to_activity.py Database migration for new column
pyproject.toml Adds visualization and ML dependencies
Comments suppressed due to low confidence (1)

binary_data = f.read()

os.remove(filename)

Copy link

Copilot AI Aug 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Writing and then immediately reading the image file creates unnecessary I/O overhead. Consider using fig.to_image() method to get binary data directly without temporary file creation.

Suggested change
binary_data = fig.to_image(format="png", scale=2, width=width, height=height)

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@niklasvm niklasvm merged commit a539fee into master Aug 9, 2025
1 check failed
@niklasvm niklasvm deleted the route-matching branch August 9, 2025 13:47
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.

2 participants