Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.12 KB

File metadata and controls

49 lines (32 loc) · 1.12 KB

Contributing to Draccus

Thank you for your interest in contributing to Draccus!

Development Setup

This project uses uv for Python package management.

Installing Dependencies

# Install uv if you haven't already, other options: https://docs.astral.sh/uv/getting-started/installation/
pip install uv

Running Tests

We use pytest for testing:

# Run all tests
uv run pytest

# Run a specific test file
uv run pytest tests/test_base.py

Snapshot Testing with Syrupy

We use syrupy for testing CLI output.

When you first run tests that use snapshots, syrupy will create snapshot files in __snapshots__ directories. These files should be committed to the repository.

# Update snapshots when output intentionally changes
uv run pytest --snapshot-update

Code Style

We use black and ruff and a few other pre-commit hooks. You can run them like this:

# One time, to run on each commit
uvx pre-commit install

# As desired, by hand on all files
uvx pre-commit run --all-files