Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,15 @@ Install all packages in editable mode with dev dependencies:
uv sync --all-packages --group dev
```

To run `tests/examples/` or `tests/integration/`, sync the `tests` group instead. It
includes everything in `dev` plus the dependencies those suites need — notably
`langchain-ollama`, which `examples/langgraph-checkpointer` imports. This is what CI
installs for both of those jobs:

```bash
uv sync --all-packages --group tests
```

## Running tests

Tests use Python's built-in `unittest` framework with `coverage`. The vendored durabletask tests use `pytest`.
Expand All @@ -120,16 +129,16 @@ uv run ruff check --fix && uv run ruff format
# Run type checking
uv run mypy

# Run output-based example tests (requires Dapr runtime)
# Run output-based example tests (requires Dapr runtime and the `tests` group)
uv run pytest tests/examples/

# Run programmatic integration tests (requires Dapr runtime)
# Run programmatic integration tests (requires Dapr runtime and the `tests` group)
uv run pytest tests/integration/
```

## Code style and linting

**Formatter/Linter**: Ruff (v0.14.1)
**Formatter/Linter**: Ruff (v0.15.19)

Key rules:
- **Line length**: 100 characters (E501 is currently ignored, but respect the 100-char target)
Expand Down Expand Up @@ -224,7 +233,7 @@ When completing any task on this project, work through this checklist. Not every
- **Do not bump `grpcio-tools` like a normal dev dependency**: its pin must stay the version that generated the committed files under `dapr/proto/` — regenerating with a newer one raises the minimum `grpcio`/`protobuf` that SDK users can install, while leaving it alone is always safe. Dependabot is configured to ignore it; the comment in `.github/dependabot.yml` lists when a bump is justified and the 3-step recipe (pin + regen + floors, in one PR, enforced by `tests/test_proto_gencode_floor.py`).
- **Bundled extensions**: live under `dapr/ext/<name>/`, opted in via extras (`dapr[fastapi]`, etc.). The legacy `dapr-ext-*` and `flask-dapr` distributions are no longer published; legacy installs must be uninstalled before upgrading or `import dapr` will emit a `FutureWarning`.
- **DCO signoff**: PRs will be blocked by the DCO bot if commits lack `Signed-off-by`. Always use `git commit -s`.
- **Ruff version pinned**: `pyproject.toml` pins `ruff==0.14.1` in `[dependency-groups].dev`. Use `uv sync --all-packages --group dev` to get the exact version.
- **Ruff version pinned**: `pyproject.toml` pins `ruff==0.15.19` in `[dependency-groups].dev`. Use `uv sync --all-packages --group dev` to get the exact version.
- **Examples are tested by output matching**: Changing output format (log messages, print statements) can break `tests/examples/`. Always check expected output there when modifying user-visible output.
- **Background processes in examples**: Examples that start background services (servers, subscribers) must include a cleanup step to stop them, or CI will hang.
- **Workflow is the most active area**: See `dapr/ext/workflow/AGENTS.md` for workflow-specific architecture and constraints.