Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 2.91 KB

CONTRIBUTING.md

File metadata and controls

102 lines (68 loc) · 2.91 KB

Contributing

Installation

# Create your own fork of the repository if required and replace whittle-org with your username
git clone git@github.com:whittle-org/whittle.git
cd whittle
pip install -e ".[dev]"  # Install what's here (the `.` part) and install the extra dev dependancies

Setup pre-commit to run on every commit

pre-commit install

Testing

pytest

Docstring Writing Guidelines

When adding or updating functions or classes, please ensure that each has a docstring that follows this format:

  • Summary: A brief description of what the function or class does.
  • args: List each argument with its name, and a short description of its purpose.
  • return: Describe the return value, including what it represents. Note: After adding or updating the docstring, ensure that the code passes the following command with no warnings:
mkdocs build --clean --strict

Conventional commits and Commitizen

We use commitizen to manage commits. This enforces conventional commits.

To make a commit, simply run:

cz commit

This will prompt you to enter a commit message and enforce conventional commit formatting.

If you do not use cz commit or make a commit with a conventional commit message, your PR will not pass CI.

Signing commits

Note: we recommend using SSH keys for signing commits for convenience (e.g., you can use the same key for commit signing and for authentication to GitHub).

  1. Add a SSH (or GPG) key as a signing key to you GitHub account.
  2. Configure git to use the key.

Note: if you don't configure commit signing globally, you will need to use git commit -s/cz commit -s to sign your commits.

Documentation

View locally

mkdocs --serve

Build and deploy to GitHub Pages. Make sure to specify the github tag you want to deploy.

mike deploy --push --update-aliases <TAG> "latest"