update verifywhl to check that one of homepage/repository exists#43188
Merged
swathipil merged 4 commits intoAzure:mainfrom Oct 3, 2025
Merged
update verifywhl to check that one of homepage/repository exists#43188swathipil merged 4 commits intoAzure:mainfrom
swathipil merged 4 commits intoAzure:mainfrom
Conversation
scbedd
approved these changes
Oct 3, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds metadata verification changes to allow either homepage or repository URL to satisfy requirements, updates tests accordingly, and adjusts URL normalization logic to parse project URLs directly.
- Adds fallback to pick up legacy sdist (zip) artifacts when wheel not found and introduces homepage/repository presence rule.
- Refactors URL normalization by inlining logic and removing helper; updates tests and scenarios to reflect new validation rules.
- Modifies invalid scenario to remove both homepage/repository equivalents (now using 'source') to trigger new failure condition.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| eng/tox/verify_whl.py | Adds compatibility logic requiring at least one of homepage or repository and filters those keys from prior-version comparison. |
| eng/tools/azure-sdk-tools/tests/test_metadata_verification.py | Updates parametrization and assertions for new homepage/repository rule; renames test function. |
| eng/tools/azure-sdk-tools/tests/integration/scenarios/pyproject_metadata/pyproject.toml | Removes homepage entry to rely solely on repository. |
| eng/tools/azure-sdk-tools/tests/integration/scenarios/pyproject_invalid_metadata/pyproject.toml | Alters authors and replaces repository with source to create invalid metadata case. |
| eng/tools/azure-sdk-tools/devtools_testutils/helpers.py | Adds blank lines (formatting only). |
| eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py | Replaces helper-based project URL extraction with inline parsing logic and drops project_urls field emission. |
Comments suppressed due to low confidence (2)
eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py:1
- The previous implementation recognized additional synonyms (e.g. 'website') for homepage; the new logic drops 'website', causing potential loss of homepage detection for packages using that common label. Reintroduce 'website' to both synonym lists: add 'website' to the lists at lines 168 and 175.
import os
eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py:1
- The prior code populated metadata["project_urls"] but this refactor omits that key entirely; existing prior-version wheels that included 'project_urls' will now appear incompatible during metadata comparison, generating false failures. Either restore metadata["project_urls"] assignment or explicitly exclude 'project_urls' from compatibility checks to avoid unintended regressions.
import os
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In the generated pyproject.toml, the repo url is linked under "repository". This is inconsistent with the metadata from packages generated with setup.py, which link the url under "Homepage". More details here: microsoft/typespec#8617
Checking that the current version metadata includes at least one of repository or homepage so that this isn't flagged.
cc/ @catalinaperalta