Development Guide¶
Welcome to Wiverno development documentation!
Quick Start¶
- Fork: https://github.com/Sayrrexe/Wiverno
- Clone:
git clone https://github.com/YOUR_USERNAME/Wiverno.git - Setup:
uv pip install -e ".[dev]" - Pre-commit:
pre-commit install - Branch:
git checkout -b feature/name - Develop:
make checkto verify code - Commit:
git commit -m "feat: description" - PR: Push and create pull request
Main Sections¶
Getting Started
- Contributing - How to contribute
- Setup - Development environment
Code Quality
- Code Style - Naming, organization, docstrings
- Type Hints - Type annotation rules
- Linting - Ruff, MyPy, pre-commit
Testing & Performance
- Testing - Running tests, fixtures, examples
- Benchmarks - Performance testing, profiling, optimization
Understanding Wiverno
- Architecture - How Wiverno works
- Project Structure - File organization
- Workflow - Development process
Common Commands¶
make test # Run tests
make format # Format code
make lint # Check code quality
make typecheck # Type check
make check # All checks
make docs-serve # Serve documentation
wiverno run dev # Dev server with auto-reload
Requirements¶
- Python 3.12+
- All functions must have type hints
- Tests for new code
- Code formatted and linted
- Coverage > 50%
Tools¶
- Ruff - Linter and formatter
- MyPy - Type checker (strict mode)
- Pytest - Testing framework
- Pre-commit - Automated checks
- uv - Package manager
- Make - Task automation
Project Layout¶
wiverno/ Main package
├── core/ Requests, router, server
├── templating/ Template engine
├── views/ View classes
├── dev/ Dev tools
├── main.py WSGI app
└── cli.py CLI interface
tests/ Test suite
├── unit/ Unit tests
├── integration/ Integration tests
└── benchmark/ Performance tests
docs/ Documentation
├── api/ API reference
├── dev/ Developer docs
└── guide/ User guides
PR Checklist¶
- Tests pass:
uv run pytest - Coverage > 50%
- Code formatted:
uv run ruff format . - No lint errors:
uv run ruff check . - Types checked:
uv run mypy wiverno - Tests added for new code
- Commit messages clear
Get Help¶
- GitHub Issues - Report bugs
- GitHub Discussions - Ask questions
Next Steps¶
- Contributing - Detailed guidelines
- Architecture - How Wiverno works
- Testing - Writing tests