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:

  1. Separate subject from body with a blank line
  2. Limit the subject line to 50 characters
  3. Capitalize the subject line
  4. Do not end the subject line with a period
  5. Use the imperative mood in the subject line
  6. Wrap the body at 72 characters
  7. 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?

  1. First start by installing pre-commit, black and flake8 using pip install, or if you like: pip install -r requirements.txt
  2. 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.