Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[doc] Configuration guidance for Python release #21831

Merged
merged 2 commits into from
Nov 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions doc/dev/get_unreleased_package_guide.md

This file was deleted.

Binary file added doc/dev/private_package/default_tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/dev/private_package/different_folders.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions doc/dev/private_package/get_private_package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Get Private Package

This guide is to help Python SDK users to get private package. Just follow the steps:

## 1. Confirm default tag

Make sure your target tag is defined in `readme.md` and **default tag is same with your target tag**. For example:

[azure-rest-api-specs/specification/network/resource-manager at main · Azure/azure-rest-api-specs (github.com)](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager#basic-information)

![](default_tag.png)

## 2.Configure `readme.python.md`

If there is no `Python multi-api` in `readme.python.md`(i.e. [datadog](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/datadog/resource-manager/readme.python.md)), skip this step.

If there is `Python multi-api` in `readme.python.md` (i.e. [network](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/network/resource-manager/readme.python.md#python-multi-api)), you need additional configuration: [Python Multiapi Configuration](python_multiapi_configuration.md)

## 3.Trigger pipeline

Submit a PR or draft PR to [Azure/azure-rest-api-specs](https://github.com/Azure/azure-rest-api-specs)

![](unreleased_package_guide_example1.png)

## 4.Get private package

Wait until pipelines finish, then there will be wheel and zip of the package. Just Click to download them.

![](unreleased_package_guide_example2.png)

If there is no link in the figure above, it may be folded. You can also find it in the `Checks`.

![img.png](unreleased_package_guide_example3.png)

# Note

## 1.private repo

In private repo [Azure/azure-rest-api-specs-pr](https://github.com/Azure/azure-rest-api-specs-pr), pipeline can be triggered **only when the target branch is `main`**

Binary file added doc/dev/private_package/one_folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/dev/private_package/python_config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions doc/dev/private_package/python_multiapi_configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This doc describes how to configure multi-api package for Python.

# Multi-Api Package

When `readme.python.md` has `Python multi-api`, the package is multi-api package.

# Configuration

When you want to release a new version for multi-api package, check the following steps:

## 1.target tag

Make sure the target tag is defined in `readme.md`. For example, you want to release new tag `package-2021-05-01` for `azure-mgmt-network`, it should be defined in [readme.md](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/network/resource-manager#tag-package-2021-05).

the target tag should only contain files from one folder:

![](one_folder.png)

If your tag contains files from different folders, you need to define some split tags. For example: `ApplicationInsights` has [Tag: package-2021-11-01](https://github.com/Azure/azure-rest-api-specs/tree/main/specification/applicationinsights/resource-manager#tag-package-2021-11-01), but it contains different folders. If you want to publish the package for the tag, you need to split it to different tags: [[applicationinsights\] python multiapi config by RAY-316 · Pull Request #16799 · Azure/azure-rest-api-specs (github.com)](https://github.com/Azure/azure-rest-api-specs/pull/16799/files)

![](different_folders.png)

![](split_tag.png)



## 2.Configure `readme.python.md`

Let us set `azure-mgmt-network` as example, if you want to release `package-2021-03-01`, you need to add the following definition in `readme.python.md`:

[Update readme.python.md by BigCat20196 · Pull Request #15818 · Azure/azure-rest-api-specs (github.com)](https://github.com/Azure/azure-rest-api-specs/pull/15818/files)

![](python_config.png)
Binary file added doc/dev/private_package/split_tag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.