Skip to content

Commit 7316b0e

Browse files
sehervsicoyle
andauthored
Remove Mechanical Markdown from examples/ validation (#977)
* Remove Mechanical Markdown Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address Copilot comments Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address Copilot comments (2) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Make Langgraph test runnable in local without API keys Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address Copilot comments (3) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Run ruff format Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Run redis-cli flushdb from container Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Add missing test_invoke_http.py Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address Copilot comments (4) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Editable install for examples/ validation Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Add timeout to cmd in test_langgraph_checkpointer.py Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address Copilot comments (4) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Remove all subprocess(shell=True) calls Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address PR feedback Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Use static crypto keys Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Add missing -- separators Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Add missing -- separators to examples/ READMEs Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Address PR comments (2) Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Update validate_examples.yaml Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> * Run python3 in test_grpc_proxying.py Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> --------- Signed-off-by: Sergio Herrera <627709+seherv@users.noreply.github.com> Signed-off-by: seherv <627709+seherv@users.noreply.github.com> Co-authored-by: Sam <sam@diagrid.io>
1 parent 13e1e07 commit 7316b0e

46 files changed

Lines changed: 1254 additions & 223 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/validate_examples.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ jobs:
103103
nohup ollama serve &
104104
sleep 10
105105
ollama pull llama3.2:latest
106-
- name: Check Examples
106+
- name: Check examples
107107
run: |
108-
tox -e examples
108+
tox -e integration

AGENTS.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,14 @@ Each extension is a **separate PyPI package** with its own `setup.cfg`, `setup.p
6161

6262
## Examples (integration test suite)
6363

64-
The `examples/` directory serves as both user-facing documentation and the project's integration test suite. Examples are validated in CI using [mechanical-markdown](https://pypi.org/project/mechanical-markdown/), which executes bash code blocks from README files and asserts expected output.
64+
The `examples/` directory serves as both user-facing documentation and the project's integration test suite. Examples are validated by pytest-based integration tests in `tests/integration/`.
6565

66-
**See `examples/AGENTS.md`** for the full guide on example structure, validation, mechanical-markdown STEP blocks, and how to add new examples.
66+
**See `examples/AGENTS.md`** for the full guide on example structure and how to add new examples.
6767

6868
Quick reference:
6969
```bash
70-
tox -e examples # Run all examples (needs Dapr runtime)
71-
tox -e example-component -- state_store # Run a single example
72-
cd examples && ./validate.sh state_store # Run directly
70+
tox -e integration # Run all examples (needs Dapr runtime)
71+
tox -e integration -- test_state_store.py # Run a single example
7372
```
7473

7574
## Python version support
@@ -107,8 +106,8 @@ tox -e ruff
107106
# Run type checking
108107
tox -e type
109108

110-
# Validate examples (requires Dapr runtime)
111-
tox -e examples
109+
# Run integration tests / validate examples (requires Dapr runtime)
110+
tox -e integration
112111
```
113112

114113
To run tests directly without tox:
@@ -190,9 +189,8 @@ When completing any task on this project, work through this checklist. Not every
190189
### Examples (integration tests)
191190

192191
- [ ] If you added a new user-facing feature or building block, add or update an example in `examples/`
193-
- [ ] Ensure the example README has `<!-- STEP -->` blocks with `expected_stdout_lines` so it is validated in CI
194-
- [ ] If you added a new example, register it in `tox.ini` under `[testenv:examples]`
195-
- [ ] If you changed output format of existing functionality, update `expected_stdout_lines` in affected example READMEs
192+
- [ ] Add a corresponding pytest integration test in `tests/integration/`
193+
- [ ] If you changed output format of existing functionality, update expected output in the affected integration tests
196194
- [ ] See `examples/AGENTS.md` for full details on writing examples
197195

198196
### Documentation
@@ -204,7 +202,7 @@ When completing any task on this project, work through this checklist. Not every
204202

205203
- [ ] Run `tox -e ruff` — linting must be clean
206204
- [ ] Run `tox -e py311` (or your Python version) — all unit tests must pass
207-
- [ ] If you touched examples: `tox -e example-component -- <example-name>` to validate locally
205+
- [ ] If you touched examples: `tox -e integration -- test_<example-name>.py` to validate locally
208206
- [ ] Commits must be signed off for DCO: `git commit -s`
209207

210208
## Important files
@@ -219,7 +217,7 @@ When completing any task on this project, work through this checklist. Not every
219217
| `dev-requirements.txt` | Development/test dependencies |
220218
| `dapr/version/__init__.py` | SDK version string |
221219
| `ext/*/setup.cfg` | Extension package metadata and dependencies |
222-
| `examples/validate.sh` | Entry point for mechanical-markdown example validation |
220+
| `tests/integration/` | Pytest-based integration tests that validate examples |
223221

224222
## Gotchas
225223

@@ -228,6 +226,6 @@ When completing any task on this project, work through this checklist. Not every
228226
- **Extension independence**: Each extension is a separate PyPI package. Core SDK changes should not break extensions; extension changes should not require core SDK changes unless intentional.
229227
- **DCO signoff**: PRs will be blocked by the DCO bot if commits lack `Signed-off-by`. Always use `git commit -s`.
230228
- **Ruff version pinned**: Dev requirements pin `ruff === 0.14.1`. Use this exact version to match CI.
231-
- **Examples are integration tests**: Changing output format (log messages, print statements) can break example validation. Always check `expected_stdout_lines` in example READMEs when modifying user-visible output.
229+
- **Examples are integration tests**: Changing output format (log messages, print statements) can break integration tests. Always check expected output in `tests/integration/` when modifying user-visible output.
232230
- **Background processes in examples**: Examples that start background services (servers, subscribers) must include a cleanup step to stop them, or CI will hang.
233231
- **Workflow is the most active area**: See `ext/dapr-ext-workflow/AGENTS.md` for workflow-specific architecture and constraints.

CLAUDE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
11
@AGENTS.md
2+
3+
Use pathlib instead of os.path.
4+
Use httpx instead of urllib.
5+
subprocess(`shell=True`) is used only when it makes the code more readable. Use either shlex or args lists.
6+
subprocess calls should have a reasonable timeout.
7+
Use modern Python (3.10+) features.
8+
Make all code strongly typed.
9+
Keep conditional nesting to a minimum, and use guard clauses when possible.
10+
Aim for medium "visual complexity": use intermediate variables to store results of nested/complex function calls, but don't create a new variable for everything.
11+
Avoid comments unless there is a gotcha, a complex algorithm or anything an experienced code reviewer needs to be aware of. Focus on making better Google-style docstrings instead.
12+
13+
The user is not always right. Be skeptical and do not blindly comply if something doesn't make sense.
14+
Code should be cross-platform and production ready.

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,19 +121,17 @@ tox -e py311
121121
tox -e type
122122
```
123123

124-
8. Run examples
124+
8. Run integration tests (validates the examples)
125125

126126
```bash
127-
tox -e examples
127+
tox -e integration
128128
```
129129

130-
[Dapr Mechanical Markdown](https://github.com/dapr/mechanical-markdown) is used to test the examples.
131-
132130
If you need to run the examples against a pre-released version of the runtime, you can use the following command:
133131
- Get your daprd runtime binary from [here](https://github.com/dapr/dapr/releases) for your platform.
134132
- Copy the binary to your dapr home folder at $HOME/.dapr/bin/daprd.
135133
Or using dapr cli directly: `dapr init --runtime-version <release version>`
136-
- Now you can run the example with `tox -e examples`.
134+
- Now you can run the examples with `tox -e integration`.
137135

138136

139137
## Documentation

examples/AGENTS.md

Lines changed: 17 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,22 @@
11
# AGENTS.md — Dapr Python SDK Examples
22

3-
The `examples/` directory serves as both **user-facing documentation** and the project's **integration test suite**. Each example is a self-contained application validated automatically in CI using [mechanical-markdown](https://pypi.org/project/mechanical-markdown/), which executes bash code blocks embedded in README files and asserts expected output.
3+
The `examples/` directory serves as both **user-facing documentation** and the project's **integration test suite**. Each example is a self-contained application validated by pytest-based integration tests in `tests/integration/`.
44

55
## How validation works
66

7-
1. `examples/validate.sh` is the entry point — it `cd`s into an example directory and runs `mm.py -l README.md`
8-
2. `mm.py` (mechanical-markdown) parses `<!-- STEP -->` HTML comment blocks in the README
9-
3. Each STEP block wraps a fenced bash code block that gets executed
10-
4. stdout/stderr is captured and checked against `expected_stdout_lines` / `expected_stderr_lines`
11-
5. Validation fails if any expected output line is missing
7+
1. Each example has a corresponding test file in `tests/integration/` (e.g., `test_state_store.py`)
8+
2. Tests use a `DaprRunner` helper (defined in `conftest.py`) that wraps `dapr run` commands
9+
3. `DaprRunner.run()` executes a command and captures stdout; `DaprRunner.start()`/`stop()` manage background services
10+
4. Tests assert that expected output lines appear in the captured output
1211

1312
Run examples locally (requires a running Dapr runtime via `dapr init`):
1413

1514
```bash
1615
# All examples
17-
tox -e examples
16+
tox -e integration
1817

1918
# Single example
20-
tox -e example-component -- state_store
21-
22-
# Or directly
23-
cd examples && ./validate.sh state_store
19+
tox -e integration -- test_state_store.py
2420
```
2521

2622
In CI (`validate_examples.yaml`), examples run on all supported Python versions (3.10-3.14) on Ubuntu with a full Dapr runtime including Docker, Redis, and (for LLM examples) Ollama.
@@ -31,7 +27,7 @@ Each example follows this pattern:
3127

3228
```
3329
examples/<example-name>/
34-
├── README.md # Documentation + mechanical-markdown STEP blocks (REQUIRED)
30+
├── README.md # Documentation (REQUIRED)
3531
├── *.py # Python application files
3632
├── requirements.txt # Dependencies (optional — many examples rely on the installed SDK)
3733
├── components/ # Dapr component YAML configs (if needed)
@@ -46,53 +42,6 @@ Common Python file naming conventions:
4642
- Client/caller side: `*-caller.py`, `publisher.py`, `*_client.py`
4743
- Standalone: `state_store.py`, `crypto.py`, etc.
4844

49-
## Mechanical-markdown STEP block format
50-
51-
STEP blocks are HTML comments wrapping fenced bash code in the README:
52-
53-
````markdown
54-
<!-- STEP
55-
name: Run the example
56-
expected_stdout_lines:
57-
- '== APP == Got state: value'
58-
- '== APP == State deleted'
59-
background: false
60-
sleep: 5
61-
timeout_seconds: 30
62-
output_match_mode: substring
63-
match_order: none
64-
-->
65-
66-
```bash
67-
dapr run --app-id myapp --resources-path ./components/ python3 example.py
68-
```
69-
70-
<!-- END_STEP -->
71-
````
72-
73-
### STEP block attributes
74-
75-
| Attribute | Description |
76-
|-----------|-------------|
77-
| `name` | Descriptive name for the step |
78-
| `expected_stdout_lines` | List of strings that must appear in stdout |
79-
| `expected_stderr_lines` | List of strings that must appear in stderr |
80-
| `background` | `true` to run in background (for long-running services) |
81-
| `sleep` | Seconds to wait after starting before moving to the next step |
82-
| `timeout_seconds` | Max seconds before the step is killed |
83-
| `output_match_mode` | `substring` for partial matching (default is exact) |
84-
| `match_order` | `none` if output lines can appear in any order |
85-
86-
### Tips for writing STEP blocks
87-
88-
- Use `background: true` with `sleep:` for services that need to stay running (servers, subscribers)
89-
- Use `timeout_seconds:` to prevent CI hangs on broken examples
90-
- Use `output_match_mode: substring` when output contains timestamps or dynamic content
91-
- Use `match_order: none` when multiple concurrent operations produce unpredictable ordering
92-
- Always include a cleanup step (e.g., `dapr stop --app-id ...`) when using background processes
93-
- Make `expected_stdout_lines` specific enough to validate correctness, but not so brittle they break on cosmetic changes
94-
- Dapr prefixes app output with `== APP ==` — use this in expected lines
95-
9645
## Dapr component YAML format
9746

9847
Components in `components/` directories follow the standard Dapr resource format:
@@ -182,69 +131,18 @@ The `workflow` example includes: `simple.py`, `task_chaining.py`, `fan_out_fan_i
182131
1. Create a directory under `examples/` with a descriptive kebab-case name
183132
2. Add Python source files and a `requirements.txt` referencing the needed SDK packages
184133
3. Add Dapr component YAMLs in a `components/` subdirectory if the example uses state, pubsub, etc.
185-
4. Write a `README.md` with:
186-
- Introduction explaining what the example demonstrates
187-
- Pre-requisites section (Dapr CLI, Python 3.10+, any special tools)
188-
- Install instructions (`pip3 install dapr dapr-ext-grpc` etc.)
189-
- Running instructions with `<!-- STEP -->` blocks wrapping `dapr run` commands
190-
- Expected output section
191-
- Cleanup step to stop background processes
192-
5. Register the example in `tox.ini` under `[testenv:examples]` commands:
193-
```
194-
./validate.sh your-example-name
195-
```
196-
6. Test locally: `cd examples && ./validate.sh your-example-name`
197-
198-
## Common README template
199-
200-
```markdown
201-
# Dapr [Building Block] Example
202-
203-
This example demonstrates how to use the Dapr [building block] API with the Python SDK.
204-
205-
## Pre-requisites
206-
207-
- [Dapr CLI and initialized environment](https://docs.dapr.io/getting-started)
208-
- Python 3.10+
209-
210-
## Install Dapr python-SDK
211-
212-
\`\`\`bash
213-
pip3 install dapr dapr-ext-grpc
214-
\`\`\`
215-
216-
## Run the example
217-
218-
<!-- STEP
219-
name: Run example
220-
expected_stdout_lines:
221-
- '== APP == Expected output here'
222-
timeout_seconds: 30
223-
-->
224-
225-
\`\`\`bash
226-
dapr run --app-id myapp --resources-path ./components/ python3 example.py
227-
\`\`\`
228-
229-
<!-- END_STEP -->
230-
231-
## Cleanup
232-
233-
<!-- STEP
234-
name: Cleanup
235-
-->
236-
237-
\`\`\`bash
238-
dapr stop --app-id myapp
239-
\`\`\`
240-
241-
<!-- END_STEP -->
242-
```
134+
4. Write a `README.md` with introduction, pre-requisites, install instructions, and running instructions
135+
5. Add a corresponding test in `tests/integration/test_<example_name>.py`:
136+
- Use the `@pytest.mark.example_dir('<example-name>')` marker to set the working directory
137+
- Use `dapr.run()` for scripts that exit on their own, `dapr.start()`/`dapr.stop()` for long-running services
138+
- Assert expected output lines appear in the captured output
139+
6. Test locally: `tox -e integration -- test_<example_name>.py`
243140

244141
## Gotchas
245142

246-
- **Output format changes break CI**: If you modify print statements or log output in SDK code, check whether any example's `expected_stdout_lines` depend on that output.
247-
- **Background processes must be cleaned up**: Missing cleanup steps cause CI to hang.
143+
- **Output format changes break tests**: If you modify print statements or log output in SDK code, check whether any integration test's expected lines depend on that output.
144+
- **Background processes must be cleaned up**: The `DaprRunner` fixture handles cleanup on teardown, but tests should still call `dapr.stop()` to capture output.
248145
- **Dapr prefixes output**: Application stdout appears as `== APP == <line>` when run via `dapr run`.
249146
- **Redis is available in CI**: The CI environment has Redis running on `localhost:6379` — most component YAMLs use this.
250147
- **Some examples need special setup**: `crypto` generates keys, `configuration` seeds Redis, `conversation` needs LLM config — check individual READMEs.
148+
- **Infinite-loop example scripts**: Some example scripts (e.g., `invoke-caller.py`) have `while True` loops for demo purposes. Integration tests must either bypass these with HTTP API calls or use `dapr.run(until=...)` for early termination.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MIIJQQIBADANBgkqhkiG9w0BAQEFAASCCSswggknAgEAAoICAQDNPVTQbkKW4eja
3+
oCDnsacryzQF/Q4vAMfl7oMjtVm9QHM/k5AJqPDJQhjollQsRzJ5g8FkPdSUnlio
4+
C+yd+3lSmKx2j5LC6F5YIkzFJOjVU5rQwAxJkbpVhoXF2t4b5UXrbZxgoU/tjnAc
5+
FIIPCALbbm02HSb2SZQYPMgDGI+wZ11HI2AyAqAftfCrdmT8PkW0+XmPRz3auSWm
6+
5o0I4v7chx7T1LN6Y7xAXd+3sE7CWhWR5cGpabxAZ2Zz5u48vdBhF/5hh6R+Ebov
7+
jXW6i5ZpU5DEk6z3aU1fbciCZqIkIFHD8rErwMJasnZhNys/4U5R1xM86IVwI1Eb
8+
fa3AnbtE3Vj66TUSwTWM664xoxuNCvK2/v33Mbwg2AM9a8Nd9n6dNIdQ3Ryh1gtF
9+
SK7yyA95E53mHt6l47m6/qt5dXehngBK79vlE0gkJCxLuzf35UgTsrEBl601dXp5
10+
SQHkjRFnToDzNTeiWzlzLcBu50lDyPMXtBkjop6mSKrtFsb4puXEd/WVgNlcfSZe
11+
TK0ASmCuXdBia8kdVUlDizYEWtz5T+E4r3OmWiflx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43+
alxH7FjJ80VAG2fJVvZqCFZGQ7RErgJ4B4tVVt6FMD/VObrk4q7Ki0Q6Uqy+1MVN
44+
NJy1osaBQ0BLz9NK3Vg9cgfhHZN/56sx4rHhA0Uiu9XyHtrtKCtHQIwD9BmI5bGd
45+
+UrRWN3dPsgtV2yLttMKFN39O7GJxt6NkJZt0IFMjCRffsq3N1zt5d538Ku3k5U0
46+
dQKCAQBT5ZpGpuGeG2RI4lzF2iejApZ8Qa7YmTGem7M2T062wlhgyBNogKXxbrl/
47+
TyvpB5gXSkcCMmdD8727WJNUnnX7EWk+zzqBF1mn6KGoar23YDHLuMKxv6NEF8kI
48+
D4l92SpMJNWkQaoOLKwNz8x8bJ8uYutLLJlDjnUpbdMbUgnw8Nkcflfr3nAKZd5e
49+
BJ46tSNjMV9KyQd5b+pietirVyS3afJaPJNE6Uu8VIPbbxApAW3dfIQznIwgx62E
50+
bWBtDNguJzLLv4zJ+XhcOEIdgAaNBUsT+owfF0ok6EEBzIl51pSo7w4Nh5PkMw4d
51+
VfTYN1T7nfugAi8VqPcL/5ZKQzIz
52+
-----END PRIVATE KEY-----
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
s��s��ƿkU>A@{0��ZJ�l��CQ�

examples/demo_actor/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ expected_stdout_lines:
9999
```bash
100100
# Run actor client
101101
cd demo_actor
102-
dapr run --app-id demo-client python3 demo_actor_client.py
102+
dapr run --app-id demo-client -- python3 demo_actor_client.py
103103
```
104104

105105
Expected output:

examples/demo_actor/demo_actor/demo_actor_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ async def main():
2929
# non-remoting actor invocation
3030
print('call actor method via proxy.invoke_method()', flush=True)
3131
rtn_bytes = await proxy.invoke_method('GetMyData')
32-
print(rtn_bytes, flush=True)
32+
print(rtn_bytes.decode(), flush=True)
3333
# RPC style using python duck-typing
3434
print('call actor method using rpc style', flush=True)
3535
rtn_obj = await proxy.GetMyData()

examples/distributed_lock/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ timeout_seconds: 5
4040
-->
4141

4242
```bash
43-
dapr run --app-id=locksapp --app-protocol grpc --resources-path components/ python3 lock.py
43+
dapr run --app-id=locksapp --app-protocol grpc --resources-path components/ -- python3 lock.py
4444
```
4545
<!-- END_STEP -->
4646

0 commit comments

Comments
 (0)