Thanks for taking the time to contribute to the repo! Here are some rules that define our repo structure. Following these rules will save you and others a lot of pain!
master
- Represents current working state of the repo
develop
- Used for integration of features and individual contrbutions
feature/feature-name
- Use this for general (long-term) features that multiple people will touch (i.e
feature/graphslam
)
- Use this for general (long-term) features that multiple people will touch (i.e
user/your-gh-username/<contribution-name>
- Use this for small bug fixes and individual contributions (i.e
user/johncena/quick-encoder-fix
)
- Use this for small bug fixes and individual contributions (i.e
For all temporary branches:
- Open PR to
develop
or respectivefeature
branch, NOTmaster
Designed to try to avoid the Bike Shed Effect
- Create new
user/your-name
branch from:feature
branch that you're working on (optional, create newfeature
branch if adding to new feature)develop
if quick fix or individual contribution
- Develop base algo logic (no formatting, comments, and fluff, is necessary)
- Open PR on Github merging to
feature
branch ordevelop
- Add screenshots/results on the PR for proof that your algo works as expected (test results, accuracy, pictures of plots)
- Request algo review on Github from admins
- Make changes to improve code quality/readability
- Request final review on GH
- Squash all commits into one with commit with a useful commit message
- Merge on GH
After integration testing, a PR is made from develop
to master
with unit testing and integration testing results in PR. Once approved, the master
branch will be updated to the latest develop
We have pre-commit hooks to help you adhere to basic coding standards.
- Install pre-commit
pip install pre-commit
- In the repo root directory, install the pre-commit hook
pre-commit install
- Make changes
- On
git commit
, precommit will tell you if you violated some coding standards, if so fix, stage, and recommit
NOTE: if you are committing quickly and want to skip the pre-commit check do
git commit --no-verify
. Avoid doing this often, otherwise you'll go through a lot of pain later!
Try to adhere to Google Python Style Guide
TLDR:
- use type hinting for every function and class variable
- to simplify all the fluff style standards, use black autoformatter
Similar to python except Google C++ Style Guide
TLDR:
- to simplify all the fluff style standards, use clang-format autoformatter
To ensure feedback from code reviews are actionable and clear, we follow these standards: https://conventionalcomments.org/
- lunabot_PACKAGE
- include
- lunabot_PACKAGE
- *.h header files
- scripts
- Python ROS Node executables (use *.py extensions please!)
- src
- lunabot_PACKAGE (python package for larger library-like code)
- python package with source .py files
- can be imported by executables in "scripts"
- *.cpp source files
- setup.py
- package.xml
- CMakelists.txt
- General
- Follow ROS Naming Conventions: http://wiki.ros.org/ROS/Patterns/Conventions