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
* Add Check class to be used as common definition for a check
* add whl and import_all check entrypoints
* refactor to allow automatic venv isolation
* update readme
Co-authored-by: Laurent Mazuel <[email protected]>
Co-authored-by: Scott Beddall <[email protected]>
Copy file name to clipboardExpand all lines: eng/tools/azure-sdk-tools/README.md
+97-17Lines changed: 97 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,13 @@ This package is intended for usage in direct combination with the azure-sdk-for-
24
24
25
25
| Module | Description |
26
26
|---|---|
27
+
|`azpysdk`| CI check entrypoints and accompanying implementations. |
28
+
|`ci_tools`| Various azure-sdk-for-python specific build and test abstractions. Heavily used in CI functionality. |
27
29
|`devtools_testutils`| Primary location for test classes, pytest fixtures, and test-proxy integration. |
28
-
|`ci_tools`| Various azure-sdk-for-python specific build and test abstractions. |
29
30
|`packaging_tools`| Templated package generator for management packages. |
31
+
|`parsing`| Parse information _about_ python packages at rest on disk. Used to interrogate the monorepo to find relevant packages. |
30
32
|`pypi_tools`| Helper functionality build upon interactions with PyPI. |
33
+
|`scenario`| Functionality to do with installing packages constrained by environmental and input factors. Heavily used in `mindependency` and `latestdependency` CI checks. |
31
34
|`testutils`| Backwards compatible extension of test classes. |
32
35
33
36
**PLEASE NOTE.** For the "script" entrypoints provided by the package, all should either be run from somewhere **within** the azure-sdk-for-python repository. Barring that, an argument `--repo` should be provided that points to the repo root if a user must start the command from a different CWD.
@@ -37,33 +40,39 @@ This package is intended for usage in direct combination with the azure-sdk-for-
37
40
After installing azure-sdk-tools, package build functionality is available through `sdk_build`.
"""Register `my_check`. `my_check` does X and Y while doing Z.
192
+
193
+
This function will be used to add your command to the set of commands being shown through the `azpysdk` entrypoint.
194
+
"""
195
+
parents = parent_parsers or []
196
+
p = subparsers.add_parser("whl", parents=parents, help="Run the `my_check` check")
197
+
p.set_defaults(func=self.run)
198
+
# Add any additional arguments specific to your check here (do not re-add common handled by parents. See `main.py` build_parser to see the common parents provided to the checks)
- Once the new check has been created, register it in `azpysdk/main.py` on line 58. This will likely be automated by decorator in the near future but this is out how it should be done for now.
217
+
218
+
```python
219
+
# ...other registrations above
220
+
my_check().register(subparsers, [common])
221
+
```
222
+
223
+
- Your command will now be available through `azpysdk`
224
+
225
+
```bash
226
+
/>`azpysdk mycheck azure-storage*`
227
+
228
+
/>cd sdk/storage/azure-storage
229
+
sdk/storage/azure-storage/> azpysdk mycheck
230
+
```
231
+
152
232
## Relevant Environment Variables
153
233
154
234
This package honors a few different environment variables as far as logging, artifact placement, etc.
0 commit comments