17
17
- [ Running unit tests] ( #running-unit-tests )
18
18
- [ Running E2E tests] ( #running-e2e-tests )
19
19
- [ Code style] ( #code-style )
20
- - [ Adding new azd environment variables] ( #adding-new-azd-environment-variables )
21
- - [ Adding new UI strings] ( #adding-new-ui-strings )
20
+ - [ Adding new features] ( #adding-new-features )
21
+ - [ Adding new azd environment variables] ( #adding-new-azd-environment-variables )
22
+ - [ Adding new UI strings] ( #adding-new-ui-strings )
22
23
23
24
## Submitting a Pull Request (PR)
24
25
@@ -62,10 +63,18 @@ Run the tests:
62
63
python -m pytest
63
64
```
64
65
65
- Check the coverage report to make sure your changes are covered.
66
+ If test snapshots need updating (and the changes are expected), you can update them by running:
66
67
67
68
``` shell
68
- python -m pytest --cov
69
+ python -m pytest --snapshot-update
70
+ ```
71
+
72
+ Once tests are passing, generate a coverage report to make sure your changes are covered:
73
+
74
+ ``` shell
75
+ pytest --cov --cov-report=xml && \
76
+ diff-cover coverage.xml --format html:coverage_report.html && \
77
+ open coverage_report.html
69
78
```
70
79
71
80
## Running E2E tests
@@ -118,7 +127,15 @@ python -m black <path-to-file>
118
127
119
128
If you followed the steps above to install the pre-commit hooks, then you can just wait for those hooks to run ` ruff ` and ` black ` for you.
120
129
121
- ## Adding new azd environment variables
130
+ ## Adding new features
131
+
132
+ We recommend using GitHub Copilot Agent mode when adding new features,
133
+ as this project includes [ .github/copilot-instructions.md] ( .github/copilot-instructions.md ) file
134
+ that instructs Copilot on how to generate code for common code changes.
135
+
136
+ If you are not using Copilot Agent mode, consult both that file and suggestions below.
137
+
138
+ ### Adding new azd environment variables
122
139
123
140
When adding new azd environment variables, please remember to update:
124
141
@@ -128,7 +145,7 @@ When adding new azd environment variables, please remember to update:
128
145
1 . [ ADO pipeline] ( .azdo/pipelines/azure-dev.yml ) .
129
146
1 . [ Github workflows] ( .github/workflows/azure-dev.yml )
130
147
131
- ## Adding new UI strings
148
+ ### Adding new UI strings
132
149
133
150
When adding new UI strings, please remember to update all translations.
134
151
For any translations that you generate with an AI tool,
0 commit comments