Contributing¶
Guidelines for contributing to Honey Duck.
Development Setup¶
# Clone and install
git clone https://github.com/CogappLabs/honey-duck.git
cd honey-duck
uv sync
# Run tests
uv run pytest
# Run linting
uv run ruff check .
uv run ruff format .
# Type checking
uv run ty check src/ cogapp_libs/
Pre-commit Hooks¶
The project uses lefthook for pre-commit hooks:
- ty - Type checking (Astral's Rust-based type checker)
- pytest - Run tests
- ruff - Linting and formatting
Hooks run automatically on commit.
Documentation¶
Build and preview docs locally:
# Install docs dependencies
uv sync --group docs
# Serve locally
uv run mkdocs serve
# Build static site
uv run mkdocs build
Adding New Assets¶
- Add asset function in appropriate
src/honey_duck/defs/<technology>/assets.pyfile - Import
STANDARD_HARVEST_DEPSfromhelpers.pyfor dependencies - Decorate with
@dg.asset(kinds={"polars"}, group_name="...", deps=...) - Inject resources:
paths: PathsResource,output_paths: OutputPathsResource - Add rich metadata via
context.add_output_metadata() - Add to
definitions.pyassets list
Code Style¶
- Follow Polars patterns for DataFrame code
- Use type hints everywhere
- Write docstrings in Google style
- Keep assets focused and single-purpose