Skip to content

Commit b884dc6

Browse files
JennyPngCopilot
andauthored
Add clear docs on updating Conda metadata in pyproject (#45635)
* explanation * toc * minor * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * split code block * add aka link --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent af6334e commit b884dc6

3 files changed

Lines changed: 31 additions & 4 deletions

File tree

doc/eng_sys_checks.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Skipping a check at build queue time](#skipping-a-check-at-build-queue-time)
66
- [Skipping entire sections of builds](#skipping-entire-sections-of-builds)
77
- [The pyproject.toml](#the-pyprojecttoml)
8+
- [Required Metadata](#required-metadata)
89
- [Coverage Enforcement](#coverage-enforcement)
910
- [Environment variables important to CI](#environment-variables-important-to-ci)
1011
- [Atomic Overrides](#atomic-overrides)
@@ -140,6 +141,28 @@ black = false
140141

141142
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.
142143

144+
### Required Metadata
145+
146+
Packages with a stable GA release must have a `[tool.azure-sdk-conda]` section in their `pyproject.toml`.
147+
- This section defines if the package is released individually to Conda, or grouped with other packages in one release bundle (see [conda-release.md](https://github.com/Azure/azure-sdk-for-python/blob/main/doc/dev/conda-release.md)).
148+
- The `[tool.azure-sdk-conda]` table **must** include an `in_bundle` key (boolean) indicating whether the package is part of a bundle. When `in_bundle = true`, a `bundle_name` key is also **required** so the conda tooling can map the package into the correct bundle.
149+
- The presence and correctness of these keys is enforced by the `verifywhl` CI check. Service teams are responsible for updating this metadata.
150+
151+
Here are examples:
152+
153+
```toml
154+
# Package is released to Conda individually
155+
[tool.azure-sdk-conda]
156+
in_bundle = false
157+
```
158+
159+
```toml
160+
# Package is released within the `azure-communication` bundle
161+
[tool.azure-sdk-conda]
162+
in_bundle = true
163+
bundle_name = "azure-communication"
164+
```
165+
143166
### Coverage Enforcement
144167

145168
This repository supports enforcement of an absolute coverage % per package. Set:

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,13 +127,14 @@ def verify_conda_section(
127127
config = parsed_pkg.get_conda_config()
128128
if not config:
129129
logger.error(
130-
f"Package {package_name} has a stable version on PyPI but is missing "
131-
"[tool.azure-sdk-conda] section in pyproject.toml. This section is required to "
132-
"specify if the package should be released individually or bundled to Conda."
130+
f"Package {package_name} has a stable version on PyPI but is missing required"
131+
"[tool.azure-sdk-conda] section in pyproject.toml. See https://aka.ms/azsdk/python/conda/pyproject for instructions."
133132
)
134133
return False
135134
elif "in_bundle" not in config:
136-
logger.error(f"[tool.azure-sdk-conda] section in pyproject.toml is missing required field `in_bundle`.")
135+
logger.error(
136+
f"[tool.azure-sdk-conda] section in pyproject.toml is missing required field `in_bundle`. See https://aka.ms/azsdk/python/conda/pyproject for instructions."
137+
)
137138
return False
138139
logger.info(f"Verified conda section for package {package_name}")
139140
return True

sdk/template/azure-template/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,6 @@ pylint = true
5050
black = true
5151
generate = false
5252
apistub = false
53+
54+
[tool.azure-sdk-conda]
55+
in_bundle = false

0 commit comments

Comments
 (0)