Contributing
The goal here is to make contributing to bocoel as painless 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 used PDM in this project for dependency management. To install all dependencies (including development dependencies) with pdm, run
pdm install -G:all
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:
ClassNameinCamelCase.CONSTANTSorENUM_VALUESinUPPER_SNAKE_CASE.- All others in
snake_case. - 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).
Formatting
Use autoflake, isort, black for consistent formatting.
Prior to commiting, please run the following commands:
autoflake -i $(find -iname "*.py" ! -path '*/.venv/*' ! -name __init__.py) --remove-all-unused-imports
isort . --profile black
black .