diff --git a/doc/eng_sys_checks.md b/doc/eng_sys_checks.md index 2c852817e3dc..2d21c062ee29 100644 --- a/doc/eng_sys_checks.md +++ b/doc/eng_sys_checks.md @@ -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) @@ -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: diff --git a/eng/tools/azure-sdk-tools/azpysdk/verify_whl.py b/eng/tools/azure-sdk-tools/azpysdk/verify_whl.py index 005d0493790e..e328ad8a8f08 100644 --- a/eng/tools/azure-sdk-tools/azpysdk/verify_whl.py +++ b/eng/tools/azure-sdk-tools/azpysdk/verify_whl.py @@ -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 diff --git a/sdk/template/azure-template/pyproject.toml b/sdk/template/azure-template/pyproject.toml index c86003ed32b3..74a5f10037ff 100644 --- a/sdk/template/azure-template/pyproject.toml +++ b/sdk/template/azure-template/pyproject.toml @@ -50,3 +50,6 @@ pylint = true black = true generate = false apistub = false + +[tool.azure-sdk-conda] +in_bundle = false