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 Pre-Commit Hooks #42

Merged
merged 5 commits into from
Jun 4, 2024
Merged

Add Pre-Commit Hooks #42

merged 5 commits into from
Jun 4, 2024

Conversation

hello-amal
Copy link
Collaborator

@hello-amal hello-amal commented May 21, 2024

Description

This PR adds pre-commit hooks to the stretch_web_teleop repository. Once installed locally (pre-commit install), these hooks will automatically run before you create a commit. They will verify that you aren't committing anything that shouldn't (e.g., large files, executables without a shebang, code with misspellings), and will auto-format your code.

The main files that are changed are:

  • .pre-commit-config.yaml
  • README.md
  • .github/pull_request_template.md
  • .github/workflows/pre-commit.yaml

All other changes are re-formattings that the pre-commit hook automatically did.

Testing procedure

  • Check that pre-commit hooks pass on this branch: Pull the code, run pre-commit run --all-files, and verify they all pass.
  • Check that pre-commit hooks run automatically upon a PR: verify that the pre-commit hooks run on this PR.
  • Check the entire web app (although in theory only the formatting changed, it is important to test that every aspect of the web interface still works, just to be safe): Run ./launch_interface.sh
    • Test Camera Feeds: Verify all camera feeds are live.
    • Test Remote Actuation:
      • Test all buttons in the "Base" tab, verify they move the robot appropriately.
      • Test all buttons in the "Wrist & Gripper" tab, verify they move the robot appropriately.
      • Test all buttons in the "Arm & Lift" tab, verify they move the robot appropriately.
      • Check Predictive Display under the overhead camera view, verify it works. Uncheck it.
      • Try speed Slowest and Fastest, verify both work.
      • Try Step-Actions, verify it works by clicking any of the buttons above.
      • Try Click-Click, verify it works by clicking any of the buttons above.
    • Test Quick Actions:
      • Try all the options for the head camera to "Look at," verify they all work
      • Have the head camera Follow Gripper, verify it works. Uncheck it.
      • Add the "Realsense" Camera View with buttons, toggle on Depth Sensing, verify it works.
      • Verify that Center Wrist and Stow Wrist work.
    • Test Runstop: Press the run-stop button, verify it works. Press it again to disable it.
    • Test Customization:
      • Add the Realsense view, verify it works.
      • Add a joystick, verify it works.
      • Add a button grid, verify it works.
      • Overlay a button pad on top of a camera view, verify that works.
      • Add a "Panel", select a space for the panel, and verify all other panels resize appropriately.
    • Test Additional Features:
      • Load map, navigate to a goal in the map, verify that it works.
      • Save a movement in movement recorder, then play it back, verify it works.
    • Test Disconnects: Manually turn off/on the robot's Wifi, verify that the operator is still able to access the interface and control the robot after reconnecting.

Before opening a pull request

From the top-level of this repository, run:

  • pre-commit run --all-files

To merge

  • Squash & Merge

Copy link
Collaborator

@hello-binit hello-binit left a comment

Choose a reason for hiding this comment

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

Looks good!

@hello-amal hello-amal merged commit 776d9b3 into master Jun 4, 2024
1 check passed
@hello-amal hello-amal deleted the amaln/pre_commit branch June 4, 2024 20:33
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