Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Code for our swerve robot, using the 2023 wpilib

Notifications You must be signed in to change notification settings

SubZero-Robotics/swerve-2023

Repository files navigation

Team 5690 SubZero Robotics 2023 Swerve Robot

Table of contents

About

⚠️ TODO: Add about section

Getting started

Prerequisites

Install the following:

Making changes

Cloning the repo

  1. Install the GitHub VS Code extension
  2. Go to the GitHub tab and sign in using the account that has access to this repository
  3. Click Clone Repository and search for SubZero-Robotics/swerve-2023
  4. Clone it into a known folder that has no spaces in its path
  5. Open the repository in VS Code

Issues

GitHub issues are how we track which tasks need work along with who should be working on them. Pay attention to the issue number since this is how each one is uniquely identified. To create a new issue, visit the issues tab in the repository and click New issue. Give it a descriptive title and enough information in the comment area so that anyone working on the issue knows exactly what needs to be changed/fixed. Additionally, assignees (who is working on it) and labels (what type of issue is this) can be assigned on the right.

Branches

Branches are simply named pointers that point to a commit. Our main branch is called main, but we don't make changes to it directly. Instead, a new branch should be created before any code is modified. Click on the current branch in the bottom-left corner in VS Code and then click + Create new branch.... The following naming conventions should be followed:

For a feature branch (major change): feature-<issue number>-<a few words describing the change>

For a smaller, individual/small group branch: <first name>-<issue number>-<a few words describing the change>

Adding commits

After finishing a small change, such as modifying a method or adding a new file, a new commit should be made immediately. Go to the Source Control tab on the left side of VS Code and add the changed/added/deleted files from the Changes dropdown to Staging by clicking the +. Once the changes are staged, Type a descriptive commit message and then click the Commit button.

Pushing commits

Commiting only applies the new commit locally. So to make it available to others in the repo, it needs to be pushed to the remote (GitHub's servers in this case). Either click publish in the Source Control tab if the branch hasn't been pushed before or push it otherwise to send the new commit to the remote's branch (this will be called origin/<your branch's name>).

Pulling branches

If someone else has made their branch available on the remote, you might be wondering how other people can get those same commits into their local repo. This process is called pulling, and it involves downloading the remote's commits and merging them with the local branch's commits.

Sometimes, you might see a merge conflict appear which can happen if more than one person has worked on the same line in a file, thus making git unable to automatically merge them. To fix this, click on the conflicted file (denoted by a !) that opens the merge conflict editor. Once at the line(s) in question, either accept the incoming (one that exists on GitHub), the HEAD (the one that you have locally), or attempt to manually merge the two together by directly editing the line(s). Repeat this process for each line/file until all conflicts are resolved. Once done, stage the now-fixed files, create a new commit, and push.

Pull requests

Now that all of your changes have been made (and tested!), it's time to get them merged into the main branch. Either click the Create Pull Request button in the Source Control tab (inline with the SOURCE CONTROL text, fourth one from the left) or go to the Pull requests tab on GitHub, click New pull request, and set the compare branch to your branch. Fill in the template with a good title, a detailed description, a list of changes made, and the issue number before creating it. Assign a reviewer(s) on the right and label the PR accordingly.

The reviewer is responsible for looking over the PR, testing the changes themselves, and adding comments to the code changes if necessary. There are three possible actions a reviewer can take:

  • Approve (PR is good; required to merge and should be done by a mentor or team lead)
  • Disapprove (PR needs changes before it can be merged; please address the comments, click Resolve under each comment once fixed, then re-request a review)
  • Comment (simply add a comment(s) without approving or disapproving)

Contact

If you would like to contact the subzero robotics programmers, you can do so at [email protected]

To contact the team directly, you can find us on facebook or email us at [email protected]

Project Link: https://github.com/subzero-robotics/2022-commandRobot

About

Code for our swerve robot, using the 2023 wpilib

Resources

Stars

Watchers

Forks