|
| 1 | +# Copilot Instructions for durabletask-python |
| 2 | + |
| 3 | +## Project Overview |
| 4 | + |
| 5 | +This is the Durable Task Python SDK, providing a client and worker for |
| 6 | +building durable orchestrations. The repo contains two packages: |
| 7 | + |
| 8 | +- `durabletask` — core SDK (in `durabletask/`) |
| 9 | +- `durabletask.azuremanaged` — Azure Durable Task Scheduler provider (in `durabletask-azuremanaged/`) |
| 10 | + |
| 11 | +## Language and Style |
| 12 | + |
| 13 | +- Python 3.10+ is required. |
| 14 | +- Use type hints for all public API signatures. |
| 15 | +- Follow PEP 8 conventions. |
| 16 | +- Use `autopep8` for Python formatting. |
| 17 | + |
| 18 | +## Python Linting |
| 19 | + |
| 20 | +This repository uses [flake8](https://flake8.pycqa.org/) for Python |
| 21 | +linting. Run it after making changes to verify there are no issues: |
| 22 | + |
| 23 | +```bash |
| 24 | +flake8 path/to/changed/file.py |
| 25 | +``` |
| 26 | + |
| 27 | +## Markdown Style |
| 28 | + |
| 29 | +Use GitHub-style callouts for notes, warnings, and tips in Markdown files: |
| 30 | + |
| 31 | +```markdown |
| 32 | +> [!NOTE] |
| 33 | +> This is a note. |
| 34 | +
|
| 35 | +> [!WARNING] |
| 36 | +> This is a warning. |
| 37 | +
|
| 38 | +> [!TIP] |
| 39 | +> This is a tip. |
| 40 | +``` |
| 41 | + |
| 42 | +Do **not** use bold-text callouts like `**NOTE:**` or `> **Note:**`. |
| 43 | + |
| 44 | +When providing shell commands in Markdown, include both Bash and |
| 45 | +PowerShell examples if the syntax differs between them. Common cases |
| 46 | +include multiline commands (Bash uses `\` for line continuation while |
| 47 | +PowerShell uses a backtick `` ` ``), environment variable syntax, and |
| 48 | +path separators. If a command is identical in both shells, a single |
| 49 | +example is sufficient. |
| 50 | + |
| 51 | +## Markdown Linting |
| 52 | + |
| 53 | +This repository uses [pymarkdownlnt](https://pypi.org/project/pymarkdownlnt/) |
| 54 | +for linting Markdown files. Configuration is in `.pymarkdown.json` at the |
| 55 | +repository root. |
| 56 | + |
| 57 | +To lint a single file: |
| 58 | + |
| 59 | +```bash |
| 60 | +pymarkdown -c .pymarkdown.json scan path/to/file.md |
| 61 | +``` |
| 62 | + |
| 63 | +To lint all Markdown files in the repository: |
| 64 | + |
| 65 | +```bash |
| 66 | +pymarkdown -c .pymarkdown.json scan **/*.md |
| 67 | +``` |
| 68 | + |
| 69 | +Install the linter via the dev dependencies: |
| 70 | + |
| 71 | +```bash |
| 72 | +pip install -r dev-requirements.txt |
| 73 | +``` |
| 74 | + |
| 75 | +## Building and Testing |
| 76 | + |
| 77 | +Install the packages locally in editable mode: |
| 78 | + |
| 79 | +```bash |
| 80 | +pip install -e . -e ./durabletask-azuremanaged |
| 81 | +``` |
| 82 | + |
| 83 | +Run tests with pytest: |
| 84 | + |
| 85 | +```bash |
| 86 | +pytest |
| 87 | +``` |
| 88 | + |
| 89 | +## Project Structure |
| 90 | + |
| 91 | +- `durabletask/` — core SDK source |
| 92 | +- `durabletask-azuremanaged/` — Azure managed provider source |
| 93 | +- `examples/` — example orchestrations (see `examples/README.md`) |
| 94 | +- `tests/` — test suite |
| 95 | +- `dev-requirements.txt` — development dependencies |
0 commit comments