Skip to content

Development Guide

Welcome to Wiverno development documentation!

Quick Start

  1. Fork: https://github.com/Sayrrexe/Wiverno
  2. Clone: git clone https://github.com/YOUR_USERNAME/Wiverno.git
  3. Setup: uv pip install -e ".[dev]"
  4. Pre-commit: pre-commit install
  5. Branch: git checkout -b feature/name
  6. Develop: make check to verify code
  7. Commit: git commit -m "feat: description"
  8. PR: Push and create pull request

Main Sections

Getting Started

Code Quality

Testing & Performance

  • Testing - Running tests, fixtures, examples
  • Benchmarks - Performance testing, profiling, optimization

Understanding Wiverno

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

Next Steps