Add pyproject direct dependency lint#19857
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/19857
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 3 New Failures, 3 Unrelated Failures, 1 Unclassified FailureAs of commit 8de66e0 with merge base c8c04e4 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
9d8bf6f to
32f0571
Compare
|
For reference, this is a blocker for our pypi release https://github.com/pytorch/test-infra/actions/runs/26598544666/job/78375864483 |
32f0571 to
8de66e0
Compare
| f"file={args.pyproject},line={violation.line}," | ||
| "title=Direct URL dependency in pyproject.toml::" | ||
| f"{violation.section} contains '{violation.dependency}'. " | ||
| "PyPI rejects direct URL dependencies in published package " |
There was a problem hiding this comment.
is there a dry-run publish? If yes, it might be catch-all for these issues.
rascani
left a comment
There was a problem hiding this comment.
FYI @Erik-Lundell - we had to rollback the cmsis-nn package dep because direct git deps are blocked by pypi (even if they are optional). Is it possible to get a cmsis-nn pypi package published?
Summary
Add a lightweight lint job to the existing Lint workflow that rejects direct URL dependencies in pyproject.toml project metadata, such as
pkg @ git+https://.... PyPI rejects these when uploading wheels, even behind optional extras.Also remove the existing Cortex-M
cmsis_nn @ git+...optional dependency from main pyproject metadata. The backend-specific source/dev requirement remains in backends/cortex_m/requirements-cortex-m.txt.Test plan
bad @ git+https://example.com/repo.git@abcNote: committed with --no-verify because this local environment cannot initialize lintrunner due to missing lintrunner_adapters; the focused checks above passed.
Authored with Claude.