Contributing¶
Setup¶
git clone --recurse-submodules https://github.com/wzjoriv/python-lcms2.git
cd python-lcms2
pip install -e ".[dev]"
A C compiler is needed (MSVC on Windows, gcc or clang elsewhere). LittleCMS is vendored as a git submodule in
vendor/Little-CMS; python scripts/dev.py lcms2 update moves it to the newest release. After changing C
code in lcms2/_ext, rebuild with pip install -e . --no-build-isolation.
Developer commands¶
scripts/dev.py wraps the day-to-day tasks (python scripts/dev.py --help):
Command |
What it does |
|---|---|
|
Lint, tests and the docs build without warnings; non-zero when one fails. |
|
The test suite, quiet or with coverage. |
|
Builds the HTML docs into |
|
Type stubs with stubpy. |
|
Reads or changes |
|
Moves |
|
Regenerates |
Run dev.py check before opening a pull request, and add the full-tests label to run every OS and Python.
Conventions¶
Private modules start with
_; public names are listed in__all__.Public functions have NumPy-style docstrings with runnable examples.
C functions start their docstring with a
name(arg) -> Retline; every LittleCMS failure goes throughlcms2_raise.Tests mirror the package (
tests/core,tests/spaces, …).