Development¶
Working on captain-hook itself. For using captain-hook in your project, see Installation.
Setup¶
NLP assets¶
Tests that exercise NLP signals need the spaCy English model and WordNet data:
uv run python -m spacy download en_core_web_sm
uv run python -c "import wn; wn.download('oewn:2025')"
This mirrors what CI provisions — see .github/workflows/ci.yml.
Tests¶
The example hooks in docs/examples/ carry inline tests too:
Docs¶
The docs are MkDocs (Material), published to Read the Docs. API reference pages are generated from docstrings at build time by docs/gen_ref_pages.py.
Build and smoke-test the wheel¶
uv build
uv venv --seed .wheel-smoke
uv pip install --python .wheel-smoke/bin/python dist/*.whl
.wheel-smoke/bin/capt-hook --help
Using a local checkout¶
From a consumer project, point uv run --project at your clone:
Or generate settings whose hook commands invoke your checkout instead of PyPI:
Releasing¶
Tag a version and push — .github/workflows/release-pypi.yml builds the sdist and wheel, publishes to PyPI via trusted publishing, and cuts a GitHub release:
The package version is set from the tag at build time; the version in pyproject.toml is never bumped by hand.