Development Setup
Development Setup
Prepare an editable scanner environment with pytest, Ruff, Black, pre-commit, and packaging tools.
python -m pip install -e ".[dev]"Category
Quick Command
create venv -> install dev tools -> enable hooksGoal
Install the active checkout with its dev dependency group. A runtime-only
pip install -e . does not install the quality tools used by this contributor
workflow.
Requirements
Requirements
Python 3.11+
pip and venv
Git
GNU Make
Docker
Manual Setup
python -m venv venv
# Windows PowerShell
venv\Scripts\Activate.ps1
# Linux or macOS
# source venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"Add the docs extra only when working with the repository's MkDocs source:
python -m pip install -e ".[dev,docs]".
Makefile Setup
make venv
make upgrade-pip
make install-dev
# Combined environment setup and Git-hook installation
make setupThe Make workflow expects the repository's conventional venv/ directory.
Pre-Commit Workflow
The scanner hook configuration runs Ruff fixes, Ruff formatting, Black,
trailing-whitespace cleanup, and final-newline correction. Ruff and Black use
their project policies from pyproject.toml.make pre-commit-install-hooks
make pre-commit-validate
make pre-commit-run-staged
make pre-commit-run
Verify the Environment
Before You Begin
- Python is supportedRequired
python --version reports a supported interpreter.
- Editable CLI resolvesRequired
path-header-scanner --help loads from the selected environment.
- Quality tools resolveRequired
pytest, Ruff, Black, and pre-commit run through python -m.
- Scanner safety remains explicitRequired
Use preview or --dry-run against temporary targets before validating --apply.
python --version
python -m pip show path-header-scanner
path-header-scanner --help
python -m pytest --version
python -m ruff --version
python -m black --version
python -m pre_commit --version