Contributing to pypaginate
Thank you for your interest in contributing. This guide covers everything you need to get started – from setting up your environment to submitting a pull request.
Quick Links
Guide |
Description |
|---|---|
Environment setup with uv |
|
Coding standards and hard limits |
|
Test categories, running tests, coverage |
|
Hexagonal architecture and layer rules |
Ways to Contribute
Report Bugs
Open an issue with:
A clear description of the problem
Steps to reproduce
Expected vs actual behavior
Python version and pypaginate version
Suggest Features
Open an issue with:
Description of the feature and its use case
Example code showing the desired API
How it fits into the existing architecture
Submit Code
Fork the repository
Create a feature branch:
git checkout -b feature/your-feature-nameMake changes following our code style
Run quality checks:
uv run ruff format . && uv run ruff check --fix . && uv run mypy src/ && uv run pytestCommit using Conventional Commits
Push and open a pull request
Prerequisites
Python 3.11+ (3.14 recommended)
uv – fast Python package manager
Git with conventional commit tooling
curl -LsSf https://astral.sh/uv/install.sh | sh
Quick Setup
git clone https://github.com/YOUR_USERNAME/pypaginate.git
cd pypaginate
git remote add upstream https://github.com/CybLow/paginate.git
uv sync --all-extras --dev
uv run pytest tests/ --ignore=tests/perf -q
Development Workflow
Create a branch from
main:git checkout main && git pull origin main git checkout -b feature/your-feature-name
Make changes – keep functions <=15 lines, files <=250 lines (code only), add type hints
Run quality checks before every commit:
uv run ruff format . && uv run ruff check --fix . && uv run mypy src/ && uv run pytest
Commit atomically – one logical change per commit:
git commit -m "feat(search): add weighted field scoring"
Push and create PR:
git push -u origin feature/your-feature-name
Commit Message Convention
We follow Conventional Commits:
<type>(<scope>): <subject>
Type |
Purpose |
Example |
|---|---|---|
|
New feature |
|
|
Bug fix |
|
|
Documentation |
|
|
Code restructuring |
|
|
Test changes |
|
|
Performance |
|
|
Maintenance |
|
|
Formatting |
|
Rules:
Imperative mood: “add” not “added” or “adds”
Lowercase first letter, no period at end
Max 50 characters for the subject line
Pull Request Checklist
Code follows project code style
All quality checks pass
New code has tests
Type hints on all public APIs
Documentation updated if applicable
Commit messages follow convention
Code of Conduct
Be respectful and inclusive. We follow the Contributor Covenant Code of Conduct.
Getting Help
Questions – Open a GitHub Discussion
Bugs – Open a GitHub Issue