Skip to content

Commit 70cf394

Browse files
committed
Merge branch 'main' into cutover-test-runs
2 parents 0c96ec3 + 674b7ff commit 70cf394

File tree

380 files changed

+52798
-42474
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

380 files changed

+52798
-42474
lines changed

doc/dev/sample_guide.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,17 @@ The given `START`/`END` keywords can be used in a [sphinx literalinclude][sphinx
5454
[Literalinclude example][literalinclude]
5555

5656
The rendered code snippets are sensitive to the indentation in the sample file. Sphinx will adjust the dedent accordingly to ensure the sample is captured accurately and not accidentally trimmed.
57-
You can preview how published reference documentation will look by running [tox][tox]: `tox run -e sphinx -c ../../../eng/tox/tox.ini --root <path to python package>`.
57+
You can preview how published reference documentation will look by running either
58+
- [tox][tox]: `tox run -e sphinx -c ../../../eng/tox/tox.ini --root <path to python package>`.
59+
- [azpysdk](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/tool_usage_guide.md): run `azpysdk sphinx .` in the package directory.
5860

5961
## Test run samples in CI live tests
6062
Per the [Python guidelines][snippet_guidelines], sample code and snippets should be test run in CI to ensure they remain functional. Samples should be run in the package's live test pipeline which is scheduled to run daily.
6163
To ensure samples do get tested as part of regular CI runs, add these [lines][live_tests] to the package's tests.yml.
6264

63-
You can test this CI step locally first, by utilizing [tox][tox] and running `tox run -e samples -c ../../../eng/tox/tox.ini --root <path to python package>`.
65+
You can test this CI step locally first with tox or azpysdk:
66+
- To use [tox][tox], run `tox run -e samples -c ../../../eng/tox/tox.ini --root <path to python package>`.
67+
- To use [azpysdk](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/tool_usage_guide.md), run `azpysdk samples .` in the package directory.
6468

6569
The `Test Samples` step in CI will rely on the resources provisioned and environment variables used for running the package's tests.
6670

doc/tool_usage_guide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ This repo is currently migrating all checks from a slower `tox`-based framework,
3030
|`import_all`| Installs the package w/ default dependencies, then attempts to `import *` from the base namespace. Ensures that all imports will resolve after a base install and import. | `azpysdk import_all .` |
3131
|`generate`| Regenerates the code. | `azpysdk generate .` |
3232
|`breaking`| Checks for breaking changes. | `azpysdk breaking .` |
33+
|`samples`| Runs the package's samples. | `azpysdk samples .` |
34+
|`optional`| Invokes 'optional' requirements for a given package. | `azpysdk optional .` |
3335
|`devtest`| Tests a package against dependencies installed from a dev index. | `azpysdk devtest .` |
3436

3537
## Common arguments

eng/common/scripts/Invoke-ToolDescriptionEvaluator.ps1

Lines changed: 0 additions & 112 deletions
This file was deleted.

eng/pipelines/templates/steps/run_breaking_changes.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ steps:
88
- task: PythonScript@0
99
displayName: 'Run Breaking Changes'
1010
inputs:
11-
scriptPath: 'scripts/devops_tasks/dispatch_tox.py'
11+
scriptPath: 'eng/scripts/dispatch_checks.py'
1212
arguments: >-
1313
"$(TargetingString)"
1414
--mark_arg="${{ parameters.TestMarkArgument }}"
1515
--service="${{ parameters.ServiceDirectory }}"
16-
--toxenv="breaking"
16+
--checks="breaking"
1717
--disable-compatibility-filter
1818
--disablecov
19-
env: ${{ parameters.EnvVars }}
19+
env:
20+
TOX_PIP_IMPL: "uv"
21+
VIRTUAL_ENV: ""
22+
PYTHONHOME: ""
2023
condition: and(succeededOrFailed(), ne(variables['Skip.BreakingChanges'],'true'))

eng/tools/azure-sdk-tools/azpysdk/main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
from .breaking import breaking
3737
from .mindependency import mindependency
3838
from .latestdependency import latestdependency
39+
from .samples import samples
3940
from .devtest import devtest
41+
from .optional import optional
4042

4143
from ci_tools.logging import configure_logging, logger
4244

@@ -104,7 +106,9 @@ def build_parser() -> argparse.ArgumentParser:
104106
breaking().register(subparsers, [common])
105107
mindependency().register(subparsers, [common])
106108
latestdependency().register(subparsers, [common])
109+
samples().register(subparsers, [common])
107110
devtest().register(subparsers, [common])
111+
optional().register(subparsers, [common])
108112

109113
return parser
110114

0 commit comments

Comments
 (0)