Contributing
Welcome to the tidydraws project! We’re excited that you’re interested in contributing. This document explains how to set up your development environment and contribute to this project.
One-Time Setup
Prerequisites
- Python 3.12 or higher
uvpackage manager
Fork and clone
git clone https://github.com/YOUR_USERNAME/tidydraws.git
cd tidydrawsInstall dependencies
uv sync --all-extrasThis installs all runtime and dev dependencies (pytest, ruff, mypy, great-docs, etc.) and optional plotting libraries.
Install pre-commit hooks (optional but recommended)
uv run pre-commit installStarting a New Session
Each time you start a new development session, sync your environment to pick up any dependency changes:
uv sync --all-extrasPre-commit hooks persist across sessions — no need to reinstall unless .pre-commit-config.yaml changes.
Common Dev Commands
Run tests:
uv run pytestLint code:
uv run ruff check .Type check:
uv run mypy .Documentation
We use Great Docs (which wraps Quarto) for the documentation site. A single great-docs.yml at the repo root controls the build: it wires up the API reference, the narrative tutorials under docs/user_guide/, and the worked examples under docs/examples/.
Building Documentation Locally
Build the site (output goes to the ephemeral
great-docs/_site/directory):uv run great-docs build # or: make docsPreview locally with live reload at http://localhost:3000:
uv run great-docs preview # or: make docs-previewSee what API symbols Great Docs can discover:
uv run great-docs scan --verbose
The great-docs/ directory is ephemeral — it is regenerated on every build and is git-ignored. Never edit files inside it directly; change great-docs.yml or the source .qmd files under docs/ instead. To clear it, run make cleandocs.
Agent skills for the docs
This repo ships the Great Docs Agent Skills under .agents/skills/ (great-docs, configure-site, write-user-guide, revise-docstrings, author-skills), pinned via skills-lock.json. AI coding agents working on the docs pick these up automatically; you do not need to install anything. To refresh them against upstream, run npx skills add https://posit-dev.github.io/great-docs/ from the repo root and commit the result.
Making Changes
Create a feature branch from
main:git checkout -b feature/your-feature-nameMake your changes following the project’s coding style and maintain compatibility.
Add tests for your changes where appropriate.
Run all checks before committing:
uv run pytest uv run ruff check . uv run mypy .Commit your changes with a descriptive message.
Push to your fork and create a pull request.
Pull Request Guidelines
- Reference relevant issues in your PR description
- Ensure all tests pass
- Add or update documentation as needed
- Keep changes focused and atomic