This page covers how to set up a local development environment for Dapper. For contribution guidelines, see Contributing.
- Python 3.9+
- uv package manager
-
Clone the repository:
git clone https://github.com/jnsquire/dapper.git cd dapper -
Install uv (if not already installed):
# On macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows powershell -c "irm https://astral.sh/uv/install.sh | iex" # Or using pip pip install uv
-
Install dependencies using uv:
uv sync
This will create a virtual environment and install all dependencies from
pyproject.toml.
uv automatically manages the virtual environment. You can verify the active Python:
uv run python --versionUsing uv (recommended):
# Run all tests
uv run pytest
# Run a specific test file
uv run pytest tests/test_debugger_core.py
# Run with coverage
uv run pytest --cov=dapperRun these checks before submitting changes:
# Lint
uv run ruff check .
# Format (and verify no further edits are needed)
uv run ruff format
# Local CI emulation
Several new helper commands are available to exercise our GitHub Actions
workflows locally using [nektos/act](https://github.com/nektos/act):
```sh
uv run act-test # run just the `Tests` job
uv run act-ci # run the entire CI workflow (all jobs)These wrappers simply invoke the act binary; you’ll need to install that
on your machine (Docker is required). Running the smoke-check step followed
by the full suite via act replicates the sequence that previously triggered
leaked state bugs.
uv run pyright dapper tests
Optional auto-fix for lint findings:
```bash
uv run ruff check . --fix
There are a couple of useful build-related commands:
# Build distribution packages (regular PEP 517 backend invocation)
uv build
# Build the Cython frame‑eval extension only
uv run build-dev
# Build and then install the project in editable mode
# with the ``dev`` and ``frame-eval`` extras:
uv run build-dev -- --install
# or equivalently
uv run install-dev(If you just want a production build of the extension,
uv run build-prod still works as before.)
When run with --install the helper will perform the same
pip install -e .[dev,frame-eval] step that you used previously, saving
you the extra manual command.
dapper/
├── dapper/ # Main package
│ ├── __init__.py
│ ├── debugger.py # Core debugger implementation
│ ├── server.py # DAP server
│ ├── protocol.py # DAP protocol handling
│ └── ...
├── tests/ # Test suite
│ ├── test_debugger_*.py # Split test files
│ └── ...
├── pyproject.toml # Project configuration
├── uv.lock # uv lock file
└── README.md
These are current, informal policies the team follows during development.
- API stability: Don't worry about backward compatibility of internal interfaces when making changes — there are no outside users right now. This means it's acceptable to change function/method signatures, rename internal helpers, or move responsibilities between modules without maintaining deprecated shims. Still aim to keep changes well-documented in commit messages and update tests accordingly.
If uv is not available, you can still work with the project using traditional Python tools:
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On macOS/Linux
# .venv\Scripts\activate # On Windows
# Install dependencies
pip install -e .
pip install pytest pytest-asyncio pytest-covIf you encounter permission issues with uv on Windows, try running your terminal as Administrator or use:
uv run --python-preference system pytest