How to: Commit - GideonJagen/Plando GitHub Wiki
Commit messages
As inspired by Chris Beams, we will be using a commit message style that follows the following rules:
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
Pre-commit hooks
As inspired by m1yag1 and LJ MIRANDA we will use a Black and Flake8 pre-commit structure to ensure that code style is consistent.
How do I make sure that it runs?
- First start by installing
pre-commit
,black
andflake8
usingpip install
, or if you like:pip install -r requirements.txt
- Once you have the requirements installed, run
pre-commit install
in the project root. This will install pre-commit hooks, as specified in the.pre-commit-config.yaml
.
Once all this is done, you can either run the pre-commits manually using pre-commit run --all-files
in the project root.
Otherwise both black
and flake8
should be run when performing a commit.