Development Setup
Development Setup
Prepare an editable Doc Gen 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
Use an isolated environment whose doc-gen command loads the active checkout.
Install .[dev]; a runtime-only editable installation does not include pytest,
Ruff, Black, or pre-commit.
Requirements
Requirements
Python 3.9+
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]"Use python -m pip install -e ".[dev,docs]" only when working with the
repository's MkDocs source.
Makefile Setup
make venv
make upgrade-pip
make install-dev
# Combined environment setup and Git-hook installation
make setupThe Make workflow uses the Python interpreter under the conventional venv/
directory.
Pre-Commit Workflow
Doc Gen's hook configuration runs Ruff fixes, Ruff formatting, Black,
trailing-whitespace cleanup, and final-newline correction. Ruff and Black read
their project policy 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
doc-gen --help loads from the selected environment.
- Quality tools resolveRequired
pytest, Ruff, Black, and pre-commit run through python -m.
- Validation uses safe targetsRequired
Use temporary projects and dry-run before live generated-output checks.
python --version
python -m pip show doc-gen
doc-gen --help
python -m pytest --version
python -m ruff --version
python -m black --version
python -m pre_commit --version