Skip to content

Commit

Permalink
update python config guide (Azure#11542)
Browse files Browse the repository at this point in the history
* update python config guide

* track1 and track2
  • Loading branch information
changlong-liu authored and mkarmark committed Jul 20, 2021
1 parent 9966b8b commit 50d68b5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 20 deletions.
35 changes: 18 additions & 17 deletions documentation/code-gen/configure-python-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,18 @@ python:
clear-output-folder: true
```
``` yaml $(python-mode) == 'update' && !$(track2)
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration
```
``` yaml $(python-mode) == 'create' && !$(track2)
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration
```
These settings apply only when `--track2` is specified on the command line.
``` yaml $(track2) // For track2: basic Python package information
Expand All @@ -132,20 +144,12 @@ no-namespace-folders: true
package-version: 0.1.0
```
``` yaml $(python-mode) == 'update'
// --------------- For track1 -----------------
python:
no-namespace-folders: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration
// --------------- For track2 -----------------
``` yaml $(python-mode) == 'update' && $(track2)
no-namespace-folders: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration/azure/mgmt/appconfiguration
```
``` yaml $(python-mode) == 'create'
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration
``` yaml $(python-mode) == 'create' && $(track2)
basic-setup-py: true
output-folder: $(python-sdks-folder)/appconfiguration/azure-mgmt-appconfiguration
```
Expand Down Expand Up @@ -180,7 +184,7 @@ batch:
- multiapiscript: true
```
``` yaml $(multiapiscript) // For track2
``` yaml $(multiapiscript) && $(track2) // For track2
output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/
clear-output-folder: false
perform-load: false
Expand All @@ -197,12 +201,9 @@ Then, the output folder and namespace should be configured for each of the tag.
These settings apply only when `--tag=package-2020-06-01-only --python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.
``` yaml $(tag) == 'package-2020-06-01-only'
``` yaml $(tag) == 'package-2020-06-01-only' && $(track2) // For track2
namespace: azure.mgmt.compute.v2020_06_01
output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01
python:
namespace: azure.mgmt.compute.v2020_06_01
output-folder: $(python-sdks-folder)/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_01
```
~~~

Expand Down Expand Up @@ -235,5 +236,5 @@ Track 2 is based on the latest AutoRest code generator

~~~
> autorest --reset
> autorest --python --track2 --use=@autorest/python@5.3.0 --python-sdks-folder=..\azure-sdk-for-python\sdk --multiapi --python-mode=update ..\azure-rest-api-specs\specification\appconfiguration\resource-manager\readme.md
> autorest --python --track2 --use=@autorest/python@5.4.1 --python-sdks-folder=..\azure-sdk-for-python\sdk --multiapi --python-mode=update ..\azure-rest-api-specs\specification\appconfiguration\resource-manager\readme.md
~~~
26 changes: 23 additions & 3 deletions documentation/samplefiles/readme.python.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,39 @@
These settings apply only when `--python` is specified on the command line.
Please also specify `--python-sdks-folder=<path to the root directory of your azure-sdk-for-python clone>`.

``` yaml $(python)
``` yaml $(python) && !$(track2)
python:
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: azure-mgmt-[[ServiceName]]
no-namespace-folders: true
package-version: 1.0.0b1
```
``` yaml $(python-mode) == 'update' && !$(track2)
python:
output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]]
```
``` yaml $(python-mode) == 'create' && !$(track2)
python:
basic-setup-py: true
output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]
```
``` yaml $(python) && $(track2)
azure-arm: true
license-header: MICROSOFT_MIT_NO_VERSION
package-name: azure-mgmt-[[ServiceName]]
no-namespace-folders: true
package-version: 1.0.0b1
```
``` yaml $(python-mode) == 'update'
no-namespace-folders: true
output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]/azure/mgmt/[[ServiceName]]
```
``` yaml $(python-mode) == 'create'
``` yaml $(python-mode) == 'create' && $(track2)
package-version: 1.0.0b1
basic-setup-py: true
output-folder: $(python-sdks-folder)/[[ServiceName]]/azure-mgmt-[[ServiceName]]
```

0 comments on commit 50d68b5

Please sign in to comment.