You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Different amounts of days for issues/PRs are not currently supported but there is a PR
44
-
# open for it: https://github.com/actions/stale/issues/214
45
-
days-before-stale: 60
46
-
days-before-close: 7
47
-
stale-issue-message: >
48
-
This issue has been automatically marked as stale because it has not had activity in the
49
-
last 60 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity
50
-
occurs. Thank you for your contributions.
51
-
close-issue-message: >
52
-
This issue has been automatically closed because it has not had activity in the
53
-
last 67 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved.
54
-
Thank you for your contributions.
55
-
stale-pr-message: >
56
-
This pull request has been automatically marked as stale because it has not had
57
-
activity in the last 60 days. It will be closed in 7 days if no further activity occurs. Please
58
-
feel free to give a status update now, ping for review, or re-open when it's ready.
59
-
Thank you for your contributions!
60
-
close-pr-message: >
61
-
This pull request has been automatically closed because it has not had
62
-
activity in the last 67 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
63
-
Thank you for your contributions!
64
-
stale-issue-label: 'stale'
65
-
exempt-issue-labels: 'pinned,good first issue,help wanted,triaged/resolved'
Copy file name to clipboardExpand all lines: AGENTS.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,14 +61,14 @@ Each extension is a **separate PyPI package** with its own `pyproject.toml`, `se
61
61
62
62
## Examples (integration test suite)
63
63
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/`.
65
65
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.
67
67
68
68
Quick reference:
69
69
```bash
70
-
cd examples && ./validate.sh state_store # Run a single example
71
-
cd examples && ./validate.sh conversation # Run another example
70
+
uv run pytest tests/integration/ # Run all examples (needs Dapr runtime)
71
+
uv run pytest tests/integration/test_state_store.py # Run a single example
72
72
```
73
73
74
74
## Python version support
@@ -108,8 +108,8 @@ uv run ruff check --fix && uv run ruff format
@@ -175,8 +175,8 @@ When completing any task on this project, work through this checklist. Not every
175
175
### Examples (integration tests)
176
176
177
177
-[ ] If you added a new user-facing feature or building block, add or update an example in `examples/`
178
-
-[ ]Ensure the example README has `<!-- STEP -->` blocks with `expected_stdout_lines` so it is validated in CI
179
-
-[ ] If you changed output format of existing functionality, update `expected_stdout_lines`in affected example READMEs
178
+
-[ ]Add a corresponding pytest integration test in `tests/integration/`
179
+
-[ ] If you changed output format of existing functionality, update expected output in the affected integration tests
180
180
-[ ] See `examples/AGENTS.md` for full details on writing examples
181
181
182
182
### Documentation
@@ -188,7 +188,7 @@ When completing any task on this project, work through this checklist. Not every
188
188
189
189
-[ ] Run `uv run ruff check --fix && uv run ruff format` — linting must be clean
190
190
-[ ] Run `uv run python -m unittest discover -v ./tests` — all unit tests must pass
191
-
-[ ] If you touched examples: `cd examples && ./validate.sh <example-name>` to validate locally
191
+
-[ ] If you touched examples: `uv run pytest tests/integration/test_<example-name>.py` to validate locally
192
192
-[ ] Commits must be signed off for DCO: `git commit -s`
193
193
194
194
## Important files
@@ -200,7 +200,7 @@ When completing any task on this project, work through this checklist. Not every
200
200
|`setup.py`| PyPI publish helper (handles dev version suffixing) |
201
201
|`ext/*/pyproject.toml`| Extension package metadata and dependencies |
202
202
|`dapr/version/version.py`| SDK version string |
203
-
|`examples/validate.sh`|Entry point for mechanical-markdown example validation|
203
+
|`tests/integration/`|Pytest-based integration tests that validate examples|
204
204
205
205
## Gotchas
206
206
@@ -209,6 +209,6 @@ When completing any task on this project, work through this checklist. Not every
209
209
-**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.
210
210
-**DCO signoff**: PRs will be blocked by the DCO bot if commits lack `Signed-off-by`. Always use `git commit -s`.
211
211
-**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.
212
-
-**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.
212
+
-**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.
213
213
-**Background processes in examples**: Examples that start background services (servers, subscribers) must include a cleanup step to stop them, or CI will hang.
214
214
-**Workflow is the most active area**: See `ext/dapr-ext-workflow/AGENTS.md` for workflow-specific architecture and constraints.
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.
0 commit comments