A quick draft of how I think Mehlville RC's Robot Code Repo's should be handled in the season
Important
This isn't officially official or anything (yet) so don't yell at me if I'm wrong
This Markdown File will go over how I believe Mehlville RC's GitHub Repos are managed at these key points in the season:
- Pre-Comp
- Comp
This does not necesarily reflect what will happen, but what I believe should happen. This will also include code recomendations for how things are named
Pre-Comp is the time before the competition we plan to do
Comp is defined as the actual Day/Days of the competition we plan to do
- Branches should be named with the prefixes:
f-for a fix without an issuei-##-for fix that has an issue (replace##with the issue number)d-xxxx-for a derivitive of a branch (replacexxxxwith the original branch name without the prefix)e-xxxx-for extending the functionality of a branch (replacexxxxwith the original branch name without the prefix)
- Additionally, branches should focus on one topic
- If the objective you are doing can be split up into multiple tasks, do that
- Ex: Make branches off of branches
f-elevator-->d-elevator-tuning,d-elevator-controls
- Ex: Make branches off of branches
Note
d-xxxx should be used for something that the main developer of a branch is working on, while e-xxxx should be used for something a different developer wants to add
- Branches should be named with the prefixes:
hf-for a one time hotfixhfr-for a reoccuring issued-xxxx-for a derivitive of a branch (replacexxxxwith the original branch name without the prefix)e-xxxx-for extending the functionality of a branch (replacexxxxwith the original branch name without the prefix)
- Branches should still focus on one topic
- Ex:
hfr-tuningis good, buthf-elevatoris not. Keep things separated and organized if possible
- Ex:
Note
d-xxxx should be used for something that the main developer of a branch is working on, while e-xxxx should be used for something a different developer wants to add
`
- Development should be under Standard Rules
- Restrict creations: Only allow users with bypass permission to create matching refs.
- Restrict updates: Only allow users with bypass permission to update matching refs.
- Restrict deletions: Only allow users with bypass permissions to delete matching refs.
- Require linear history: Prevent merge commits from being pushed to matching refs.
- Required approvals: The number of approving reviews that are required before a pull request can be merged.
- The number of approvals should be half the size of the dev team
- Block force pushes: Prevent users with push access from force pushing to refs
- Development should use less strict or no ruling
- GitHub Issues should be used to track issues/features we need to add
- Make sure to reference a development branch/PR in the issue
- PRs should always remain PR Drafts until tested and ready to ship
- Ideally you should create a PR Draft as soon as you start a branch
- GitHub Issues can be used to track issues/features, but are not required during Comp
- PRs should be made as full PRs and be made & merged when tested
- It is advised you make a PR Draft, but is not required
- If you do make an issue, make sure to reference a development branch/PR in the issue
All variables for the most part will follow camelCase conventions. If a variable is a Constant, it may be preceded by a k, which WILL affect the camelCase. If more context about the Constant is required, use a docstring. If a variable is a Physical Hardware Component, it has a m_snakeHead, which means that it will start with a leading letter, then an underscore which WILL NOT affect the camelCase. The m_snakeHead should be indicative of what it represents. m_ is often used for motors, p_ is often used for PID, and e_ is often used for encoders. If you are unsure of what you should choose, just go with m_ as your default. Any other variables that aren't physical hardware or constants will use camelCase.
All methods will follow camelCase conventions. There isn't any weird trickery with methods, just name them simply. Additionally, put a docstring describing functionality of the method
All classes will follow PascalCase. Again, no trickery, just name them simply and put a docstring if necesary.
// Class Hardware
// vvvvvvvvvvvvvv vvvvvvvvvvvv
private final DriveSubsystem m_robotDrive = new DriveSubsystem();
//...
// This is a Docstring
// vvvvvvvvvvvvvvvvvvv
/**
* Sets the swerve ModuleStates.
*
* @param desiredStates The desired SwerveModule states.
*/
// Method Variable
// vvvvvvvvvvvvvvv vvvvvvvvvvvvv
public void setModuleStates(SwerveModuleState[] desiredStates) {
//...
}
//...
// Constant
// vvvvvvvvvvvvvv
public static final int kShepherdCanId = 7;