Development Setup
Development Setup
Create an isolated editable Reflow environment with tests, formatting, linting, packaging, and Git-hook tools.
python -m pip install -e ".[dev]"Category
Quick Command
create venv -> install dev tools -> enable hooksGoal
Use an environment whose reflow executable resolves to the active source
checkout. The dev dependency group is required for pytest, coverage, Ruff,
Black, pre-commit, packaging, and other contributor commands.
Requirements
Requirements
Python 3.14+
Git
pip and venv
GNU Make
Docker
GitHub CLI
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 you also need the
repository's MkDocs toolchain.
Makefile Setup
The Make workflow expects the conventional venv/ directory and invokes its
Python interpreter directly.make venv
make upgrade-pip
make install-dev
# Combined environment setup and Git-hook installation
make setup
Run make help-local to inspect the complete local command groups.
Pre-Commit Workflow
Reflow's hook configuration applies Ruff safe fixes, Black formatting,
trailing-whitespace cleanup, and final-newline correction. Ruff and Black use
the policies in pyproject.toml.# Install the Git hook and isolated hook environments
make pre-commit-install-hooks
# Validate .pre-commit-config.yaml
make pre-commit-validate
# Check files currently staged for commit
make pre-commit-run-staged
# Check every tracked repository file
make pre-commit-run
Verify the Environment
Before You Begin
- Python is supportedRequired
python --version reports Python 3.14 or newer.
- Editable Reflow resolvesRequired
reflow --help and python -m app --help load from the selected environment.
- Quality tools resolveRequired
pytest, Ruff, Black, and pre-commit run through python -m.
- No live credentials are requiredRequired
Ordinary development tests use mocks and temporary repositories.
python --version
python -m pip show git-reflow
reflow --help
python -m app --help
python -m pytest --version
python -m ruff --version
python -m black --version
python -m pre_commit --version