Skip to content

update verifywhl to check that one of homepage/repository exists#43188

Merged
swathipil merged 4 commits intoAzure:mainfrom
swathipil:swathipil/verifywhl-project-urls
Oct 3, 2025
Merged

update verifywhl to check that one of homepage/repository exists#43188
swathipil merged 4 commits intoAzure:mainfrom
swathipil:swathipil/verifywhl-project-urls

Conversation

@swathipil
Copy link
Copy Markdown
Member

@swathipil swathipil commented Sep 30, 2025

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

@swathipil swathipil changed the title update verifywhl check to alias homepage/repository and validate project urls update verifywhl to check that one of homepage/repository exists Oct 3, 2025
Copy link
Copy Markdown
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty solid to me. Can you please pull these changes into verify_whl that Jenny transitioned? Not merged yet nm.

@swathipil swathipil marked this pull request as ready for review October 3, 2025 21:27
Copilot AI review requested due to automatic review settings October 3, 2025 21:27
@swathipil swathipil enabled auto-merge (squash) October 3, 2025 21:27
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py
Comment thread eng/tools/azure-sdk-tools/ci_tools/parsing/parse_functions.py
Comment thread eng/tools/azure-sdk-tools/tests/test_metadata_verification.py
Copy link
Copy Markdown
Member

@scbedd scbedd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me!

@swathipil swathipil merged commit f837589 into Azure:main Oct 3, 2025
22 checks passed
@swathipil swathipil deleted the swathipil/verifywhl-project-urls branch October 3, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants