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
Copy file name to clipboardExpand all lines: doc/eng_sys_checks.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,8 @@ Starting with [this pr](https://github.com/Azure/azure-sdk-for-python/pull/28345
118
118
119
119
We default to **enabling** most of our checks like `pylint`, `mypy`, etc. Due to that, most `pyproject.toml` settings will likely be **disabling** checks.
120
120
121
+
There is also an additional setting to turn on strict sphinx validation, for docstring validation.
122
+
121
123
Here's an example:
122
124
123
125
```toml
@@ -130,6 +132,7 @@ verifytypes = false
130
132
pyright = false
131
133
pylint = false
132
134
black = false
135
+
strict_sphinx = false
133
136
```
134
137
135
138
If a package does not yet have a `pyproject.toml`, creating one with just the section `[tool.azure-sdk-build]` will do no harm to the release of the package in question.
@@ -195,9 +198,20 @@ Analyze job in both nightly CI and pull request validation pipeline runs a set o
195
198
196
199
1. Go to root of the package.
197
200
2. Execute following command: `tox run -e pylint -c ../../../eng/tox/tox.ini --root .`
198
-
201
+
199
202
Note that the `pylint` environment is configured to run against the **earliest supported python version**. This means that users **must** have `python 3.7` installed on their machine to run this check locally.
200
203
204
+
### Sphinx and docstring checker
205
+
206
+
[`Sphinx`](https://www.sphinx-doc.org/en/master/) is the preferred documentation builder for Python libraries. The documentation is always built and attached to each PR builds. Sphinx can be configured to
207
+
fail if docstring are invalid, helping to ensure the resulting documentation will be of high quality. Following are the steps to run `sphinx` locally for a specific package with strict docstring checking:
208
+
209
+
1. Go to root of the package.
210
+
2. Make sure the `pyproject.toml` file contains `strict_sphinx = true`
211
+
3. Execute following command: `tox run -e sphinx -c ../../../eng/tox/tox.ini --root .`
212
+
213
+
Note: While as of now the default value is `False`, it will become `True` by mid 2024.
214
+
201
215
### Bandit
202
216
203
217
`Bandit` is static security analysis tool. This check is triggered for all Azure SDK package as part of analyze job. Following are the steps to `Bandit` tool locally for a specific package.
0 commit comments