Contributing#
The goal here is to make contributing to bocoel
as painless as possible.
Feel free to reach out and I’ll try to respond as soon as possible!
Development installation#
First, clone and navigate into the project:
git clone https://github.com/rentruewang/bocoel
cd bocoel/
Alternatively, use ssh:
git clone git@github.com:rentruewang/bocoel
cd bocoel/
I’m using poetry in this project for dependency management.
To install all dependencies (including development dependencies) with poetry
, run
poetry install
Alternatively, use of pip
is also allowed (although might be less robust due to lack of version solving)
pip install -e .
Both commands perform an editable installation.
Recommended development style#
Python code style#
The code style in the project closely follows the recommended standard of python:
Class imports are non-qualified (
from module.path import ClassName
), and do not use unqualified function names (however, upper case functions acting as classes are treated as classes, lower case classes are treated as functions).All other imports are qualified.
TODO:
Formatting#
Use autoflake
, isort
, black
for consistent formatting.
Prior to committing, please run the following commands:
autoflake -i $(find -iname "*.py" ! -path '*/.venv/*' ! -name __init__.py) --remove-all-unused-imports
isort . --profile black
black .
Typing#
Be sure to run mypy
prior to submitting! There can be issue with mypy
not finding libraries. The command I use for checking is
mypy . --disable-error-code=import-untyped --disable-error-code=import-not-found
Commit message#
Add an emoji that best describes this commit a the start of the commit message. This helps makes the project look good on GitHub.