Development Workflow¶
Development process for Wiverno.
Steps¶
- Write code - Create features/fix bugs
- Test -
uv run pytest(>50% coverage required) - Format -
uv run ruff format . - Lint -
uv run ruff check . - Type check -
uv run mypy wiverno - Commit -
git commit(pre-commit hooks run) - Push -
git push - Pull request - Create PR on GitHub
Quick Commands¶
make test # Run tests
make format # Format code
make lint # Check code quality
make typecheck # Type checking
make check # All checks (format + lint + typecheck + test)
Pre-commit Flow¶
When you run git commit:
- Ruff linting
- Ruff formatting
- MyPy type checking
- Trailing whitespace removal
- EOF newline check
If any check fails, fix it and commit again.
Development Server¶
Auto-reload on code changes.
Testing During Development¶
# Run all tests
uv run pytest
# Run with verbose output
uv run pytest -v
# Run specific test
uv run pytest tests/unit/test_router.py::test_name
# Run and stop on first failure
uv run pytest -x
# Run only unit tests
uv run pytest -m unit
# Generate coverage report
uv run pytest --cov=wiverno --cov-report=html
Common Tasks¶
Adding a New Feature¶
- Create feature branch:
git checkout -b feature/name - Write code with tests
- Run checks:
make check - Commit:
git commit -m "feat: description" - Push and create PR
Fixing a Bug¶
- Create fix branch:
git checkout -b fix/name - Write failing test
- Fix code
- Run checks:
make check - Commit:
git commit -m "fix: description" - Push and create PR
Running All Checks¶
Runs:
- Format check
- Linting
- Type checking
- Tests (with coverage)
Next Steps¶
- Testing - Writing tests
- Code Style - Code standards
- Linting - Code quality
- Contributing - Contribution guidelines