Guide for contributing to Apte.
git clone https://github.com/renaudcepre/apte.git
cd apte
just setupThis installs dependencies and sets up pre-commit hooks.
just # Show available commands
just test # Run tests
just test-cov # Run tests with coverage
just lint # Format and lint code
just fullcheck # Lint + types + tests (CI equivalent)
just docs # Serve documentation locally
just clean # Remove cache filesApte uses pytest for its own test suite:
# All tests
just test
# Specific file
just test tests/core/test_session.py
# With coverage
just test-cov
# Coverage with HTML report
just test-cov-openjust lintUses:
- ruff format - Code formatting
- ruff check - Linting (pyflakes, pycodestyle, bugbear, etc.)
- mypy --strict - Type checking
Pre-commit hooks run automatically on git commit. To run manually:
pre-commit run --all-filesapte/
├── apte/ # Main package
│ ├── cli/ # Command-line interface
│ ├── core/ # Session, suite, runner, collector
│ ├── di/ # Dependency injection (Use, From, ForEach)
│ ├── entities/ # Data classes (TestResult, etc.)
│ ├── events/ # Event bus and hooks
│ ├── execution/ # Test execution engine
│ ├── filters/ # Test filtering (keywords, suites)
│ ├── fixtures/ # Built-in fixtures (caplog, mocker)
│ ├── reporting/ # Reporters (Rich, ASCII, CTRF, Web)
│ ├── tags/ # Tag filtering plugin
│ └── cache/ # Last-failed cache plugin
├── tests/ # Test suite (mirrors apte/ structure)
├── docs/ # MkDocs documentation
├── web/ # Web reporter UI (Vite + vanilla JS)
└── examples/ # Example project (yorkshire)
just docsOpens http://127.0.0.1:8000 with live reload.
Documentation source is in docs/ using MkDocs with Material theme.
uv run apte run examples.yorkshire.tests.session:session