Thank you for your interest in contributing! This guide helps you get started with our development workflow.
We use uv for dependency management and make to automate common tasks.
- Development: We exclusively use uv for its speed and deterministic resolution.
uv.lockis our source of truth. - End-Users: We maintain strict compatibility with
pipand standard wheel installation. No features or build steps should depend onuvbeing present in a user's environment.
Do not run complex pytest or ruff commands manually. Use these standard targets:
make setup: Bootstrap the entire environment.make test: Run the standard test suite.make qa: Full Quality Assurance (lint + type-check + coverage).make fix: Automatically resolve style and lint issues.make hooks: Run pre-commit checks on staged files.
We strictly enforce code quality. Please run these commands before submitting a PR:
- Full QA: Runs linting, formatting check, and coverage.
make qa
- Quick QA: Runs linting and fast tests (skips slow coverage).
make qa-quick
We use ruff and mypy.
- Auto-fix Style:
make fix
- Lint Check:
make lint
- Type Checking:
make type-check
Install pre-commit hooks to catch issues automatically:
make install-hooksTo run hooks manually on staged files:
make hooksTo run hooks on all files:
make hooks-allGoal: Maintain a clean, atomic history and avoid broken builds.
Always run make hooks (or make qa-quick) before running git commit.
- Workflow:
make fix→make hooks→git add .→git commit.
Avoid "massive" commits that fix 5 different things. Commit logically related changes together. This makes reverts and reviews significantly easier.
Avoid triggering CI pipelines for every minor local change. Push to remote only when the feature or fix is stable and ready for a PR review.
Run almost all tests with:
make test- Themes: If adding a theme, registered it in
src/styledconsole/core/theme.py. - Examples: Add a script in
examples/demos/if your feature is visual. - Documentation: Update
docs/USER_GUIDE.mdif you change public APIs.
We strictly follow Conventional Commits. This allows for automated versioning and changelog generation.
Format: <type>(<scope>): <description>
feat: A new feature (e.g.,feat(frame): add gradient support)fix: A bug fix (e.g.,fix(emoji): correct width calculation)docs: Documentation changes (e.g.,docs: update user guide)refactor: Code change that neither fixes a bug nor adds a featuretest: Adding missing tests or correcting existing testschore: Maintenance tasks (deps, tools, etc.)
Example:
feat(icons): add rocket icon with ascii fallback
docs: update CHANGELOG for v0.9.7 release