Skip to content
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
23 changes: 23 additions & 0 deletions doc/eng_sys_checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- [Skipping a check at build queue time](#skipping-a-check-at-build-queue-time)
- [Skipping entire sections of builds](#skipping-entire-sections-of-builds)
- [The pyproject.toml](#the-pyprojecttoml)
- [Required Metadata](#required-metadata)
- [Coverage Enforcement](#coverage-enforcement)
- [Environment variables important to CI](#environment-variables-important-to-ci)
- [Atomic Overrides](#atomic-overrides)
Expand Down Expand Up @@ -140,6 +141,28 @@ black = false

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.

### Required Metadata

Packages with a stable GA release must have a `[tool.azure-sdk-conda]` section in their `pyproject.toml`.
- 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)).
- 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.
- The presence and correctness of these keys is enforced by the `verifywhl` CI check. Service teams are responsible for updating this metadata.

Here are examples:

```toml
# Package is released to Conda individually
[tool.azure-sdk-conda]
in_bundle = false
```

```toml
# Package is released within the `azure-communication` bundle
[tool.azure-sdk-conda]
in_bundle = true
bundle_name = "azure-communication"
```

### Coverage Enforcement

This repository supports enforcement of an absolute coverage % per package. Set:
Expand Down
9 changes: 5 additions & 4 deletions eng/tools/azure-sdk-tools/azpysdk/verify_whl.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,14 @@ def verify_conda_section(
config = parsed_pkg.get_conda_config()
if not config:
logger.error(
f"Package {package_name} has a stable version on PyPI but is missing "
"[tool.azure-sdk-conda] section in pyproject.toml. This section is required to "
"specify if the package should be released individually or bundled to Conda."
f"Package {package_name} has a stable version on PyPI but is missing required"
"[tool.azure-sdk-conda] section in pyproject.toml. See https://aka.ms/azsdk/python/conda/pyproject for instructions."
)
return False
elif "in_bundle" not in config:
logger.error(f"[tool.azure-sdk-conda] section in pyproject.toml is missing required field `in_bundle`.")
logger.error(
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."
)
return False
logger.info(f"Verified conda section for package {package_name}")
return True
Expand Down
3 changes: 3 additions & 0 deletions sdk/template/azure-template/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ pylint = true
black = true
generate = false
apistub = false

[tool.azure-sdk-conda]
in_bundle = false
Loading