11# Development
22
3- The following is more information about how to develop this project. Note that development commands
4- require that ` make ` is installed on your local machine. If you're using Windows, you can install
5- ` make ` using [ Chocolatey] ( https://chocolatey.org/ ) or use WSL.
3+ The following is more information about how to develop this project.
4+
5+ ## Validation
6+
7+ Use Nox to run the representative local correctness checks:
8+
9+ ``` sh
10+ python -m pip install -r dev-requirements.txt
11+ nox -s ci
12+ ```
13+
14+ The ` ci ` session runs linting, strict type checks, core SDK and Azure Managed
15+ tests on Python 3.10, Azure Functions unit tests on Python 3.13, and Azure
16+ Functions end-to-end tests on Python 3.13. It intentionally runs one
17+ representative version rather than the complete CI matrix, keeping routine
18+ local validation fast. To use another supported version (3.10--3.14) for the
19+ core SDK and Azure Managed tests, pass it after ` -- ` :
20+
21+ ``` sh
22+ nox -s ci -- 3.14
23+ ```
24+
25+ Run the versioned test sessions directly when a change needs complete matrix
26+ coverage, for example ` nox -s core_tests ` or ` nox -s azuremanaged_tests ` .
27+ Nox fails rather than silently skipping a session when its required Python
28+ interpreter is unavailable.
29+
30+ Nox starts Azurite automatically for the core and Azure Functions tests. The
31+ Azure Managed tests start a disposable DTS emulator Docker container. Start
32+ Docker before running that session. Azure Functions end-to-end tests also
33+ require the Azure Functions Core Tools (` func ` ) on ` PATH ` . Azure Managed Nox
34+ runs use a disposable DTS emulator with an automatically assigned port, and
35+ Functions E2E uses a unique Durable Functions hub. Both can run alongside other
36+ local validation sessions.
37+
38+ CodeQL remains a GitHub-hosted security scan; it requires the CodeQL CLI and
39+ its query packs, so it is not included in the local ` ci ` session.
40+
41+ For iterative validation, use ` -R ` to reuse the session virtual environment.
42+ The local packages are editable in test sessions, so source changes are picked
43+ up without reinstalling. Pass file or directory paths after ` -- ` to lint and
44+ type-check sessions. Pytest-based sessions also accept test node IDs and pytest
45+ selectors such as ` -k ` . Nox forwards these arguments unchanged to the
46+ underlying tool, and multiple paths or selectors are supported.
47+
48+ For a focused change, run just the relevant session:
49+
50+ ``` sh
51+ nox -R -s lint -- durabletask/client.py tests/durabletask/test_client.py
52+ nox -R -s typecheck_core -- durabletask/client.py durabletask/extensions/history_export
53+ nox -R -s typecheck_functions -- azure-functions-durable/azure
54+ nox -R -s core_tests-3.10 -- tests/durabletask/test_client.py::test_get_grpc_channel_insecure
55+ nox -R -s azuremanaged_tests-3.10 -- tests/durabletask-azuremanaged/test_dts_orchestration_e2e.py
56+ nox -R -s functions_unit-3.13 -- tests/azure-functions-durable/test_client_compat.py
57+ nox -R -s functions_e2e -- -k " dtask_client"
58+ ```
59+
60+ > [ !NOTE]
61+ > The Azure Managed session still starts a fresh isolated DTS emulator for every
62+ > run, and Functions E2E starts a fresh Functions host. ` -R ` skips environment
63+ > provisioning, not these required runtime services.
664
765## Generating protobufs
866
67+ These commands require ` make ` . If you're using Windows, you can install ` make `
68+ using [ Chocolatey] ( https://chocolatey.org/ ) or use WSL.
69+
970``` sh
1071pip3 install -r dev-requirements.txt
1172make gen-proto
@@ -14,11 +75,3 @@ make gen-proto
1475This will download the ` orchestrator_service.proto ` from the ` microsoft/durabletask-protobuf ` repo
1576and compile it using ` grpcio-tools ` . The version of the source proto file that was downloaded can be
1677found in the file ` durabletask/internal/PROTO_SOURCE_COMMIT_HASH ` .
17-
18- ### Running tests
19-
20- Tests can be run using the following command from the project root.
21-
22- ``` sh
23- make test
24- ```
0 commit comments