Skip to content

wrote calculate_velocity_metrics#100

Merged
cgmaiorano merged 20 commits into
mainfrom
96-task-write-trails-velocity-feature-functions-calculate_segment_velocity_metrics
Feb 12, 2026
Merged

wrote calculate_velocity_metrics#100
cgmaiorano merged 20 commits into
mainfrom
96-task-write-trails-velocity-feature-functions-calculate_segment_velocity_metrics

Conversation

@cgmaiorano
Copy link
Copy Markdown
Collaborator

#96 wrote function to calculate all velocity metrics on a per LineSegment basis. Calculates and assigns velocities, distance, mean_speed, speed_variance, and accelerations to the LineSegment class.

@cgmaiorano cgmaiorano linked an issue Jan 19, 2026 that may be closed by this pull request
5 tasks
@cgmaiorano
Copy link
Copy Markdown
Collaborator Author

cgmaiorano commented Jan 19, 2026

need to discuss how we are going to handle divide by 0

@Asanto32 take a peek at this function and lmk how you think this should be handled. The current implementation is based off https://github.com/theBasicScientist/trailsab-proc

@cgmaiorano
Copy link
Copy Markdown
Collaborator Author

Need to write unit tests

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.59%. Comparing base (da2c270) to head (45d50c7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
+ Coverage   98.57%   98.59%   +0.01%     
==========================================
  Files          19       19              
  Lines        1054     1067      +13     
==========================================
+ Hits         1039     1052      +13     
  Misses         15       15              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cgmaiorano
Copy link
Copy Markdown
Collaborator Author

have a raise error that there is a double time value and that shouldnt happen for divide by 0

@cgmaiorano cgmaiorano marked this pull request as ready for review February 10, 2026 18:32
Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

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

Take a look at tthe comments on the tests. Specifically the use of approx values

Comment thread src/graphomotor/core/models.py Outdated
Comment thread tests/unit/test_models.py Outdated
Comment thread tests/unit/test_models.py Outdated
Comment thread tests/unit/test_models.py Outdated
@cgmaiorano cgmaiorano requested a review from Asanto32 February 11, 2026 19:53
Copy link
Copy Markdown
Collaborator

@Asanto32 Asanto32 left a comment

Choose a reason for hiding this comment

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

lgtm, small comment about the var >0.0 assert

Comment thread tests/unit/test_models.py Outdated
@cgmaiorano cgmaiorano merged commit bb3af88 into main Feb 12, 2026
24 checks passed
@cgmaiorano cgmaiorano deleted the 96-task-write-trails-velocity-feature-functions-calculate_segment_velocity_metrics branch February 12, 2026 15:28
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.

Task: Write trails velocity feature functions: calculate_segment_velocity_metrics

2 participants