Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add target zone estimation functionality and step time tests #37

Merged
merged 14 commits into from
Oct 23, 2024

Conversation

Nissa9902
Copy link
Collaborator

@Nissa9902 Nissa9902 commented Oct 14, 2024

fixes issue #33

What Was Changed:

  • Implemented real-time streaming of step times and target zones from the backend.
  • Added functionality to estimate target zones based on step times received from the backend.
  • Updated unit tests to verify the correct behavior of step time calculation and target zone estimation.
  • Implemented a WebSocket connection to receive real-time step time and target zone data from the backend.
  • Updated useStepTime to manage the state of step times and target zones, allowing dynamic updates to the UI.

Why It Was Changed:
This change was essential for providing real-time feedback to users during step time calculations, enabling them to visualize target zones and step times dynamically.

How It Was Changed:

  • Created the target_zone_estimation.py module to handle the target zone estimation logic.
  • Updated existing tests in test_step_time.py to verify the accuracy of step time and target zone estimations.
  • Integrated Target Zone Logic with Frontend.
  • Improved the WebSocket connection logic to ensure reliable streaming of step times and target zones from the backend to the frontend.

@Nissa9902 Nissa9902 self-assigned this Oct 14, 2024
@Nissa9902 Nissa9902 added help wanted Extra attention is needed Under construction Issue is under construction and not ready for assignment labels Oct 14, 2024
Removed unnecessary Zone.Identifier files
Copy link
Collaborator

@colinseper colinseper left a comment

Choose a reason for hiding this comment

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

Some minor changes, but overall looks good for the code you have. Just need to implement the frontend connection.

Added a new section to display target zones (Left Foot, Right Foot, and Average Target Zone) in the Step Time interface.
Implemented WebSocket connection to receive real-time step times and target zones from the backend. Updated the state in "useStepTime" hook to reflect live data by parsing the incoming WebSocket message and updating step times and target zones accordingly. Added cleanup functionality to close the WebSocket connection when the component unmounts.
Added the handle_threshold() function to make the threshold more modular, allowing flexibility in setting it during the function call.
colinseper
colinseper previously approved these changes Oct 19, 2024
Copy link
Collaborator

@colinseper colinseper left a comment

Choose a reason for hiding this comment

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

Everything I asked for looks good!

backend/target_zone_estimation.py Outdated Show resolved Hide resolved
backend/target_zone_estimation.py Outdated Show resolved Hide resolved
backend/target_zone_estimation.py Outdated Show resolved Hide resolved
backend/target_zone_estimation.py Show resolved Hide resolved
backend/target_zone_estimation.py Outdated Show resolved Hide resolved
@Nissa9902 Nissa9902 removed the help wanted Extra attention is needed label Oct 20, 2024
@Nissa9902 Nissa9902 added enhancement New feature or request and removed Under construction Issue is under construction and not ready for assignment labels Oct 21, 2024
backend/target_zone_estimation.py Show resolved Hide resolved
frontend/src/App.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@git-voo git-voo left a comment

Choose a reason for hiding this comment

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

Good job Nissa, I made a few changes to fix linter errors, batch process forcedata and invoke the streaming function from main.

@git-voo git-voo merged commit 84f07e2 into main Oct 23, 2024
1 of 2 checks passed
@git-voo git-voo deleted the feature/step-time-target-zone-interface branch October 23, 2024 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants