ci(python): fold the build task into test and check the stub - #3980
Open
ethanlin01x wants to merge 6 commits into
Open
ci(python): fold the build task into test and check the stub#3980ethanlin01x wants to merge 6 commits into
ethanlin01x wants to merge 6 commits into
Conversation
The build task compiled the wheel and threw it away: its dist/ never reached the artifact upload, which only runs under test. Building it in test instead keeps the same coverage on one runner and makes the wheel reach the upload it was always listed in. Closes apache#3977
The tracked stub had drifted from stub_gen output. Two docstrings were hand-edited to drop a rustdoc intra-doc link, which renders as noise in Python, so the link is now plain backticks at the source instead.
Nothing verified stub freshness, so the file could drift from the pyo3 source unnoticed. The check needs a built crate, so it sits in test next to the wheel build rather than in lint.
Running it from a subdirectory stripped the license header from the tracked stub: `stub.generate()` writes to the crate root, but the header was prepended through a path resolved against the current directory.
ethanlin01x
force-pushed
the
ci/python-stub-gate
branch
from
August 27, 2026 14:54
f4f1d71 to
39d50b7
Compare
ethanlin01x
marked this pull request as ready for review
August 27, 2026 14:57
Contributor
Author
|
|
Contributor
Author
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3980 +/- ##
============================================
+ Coverage 84.26% 84.62% +0.35%
Complexity 1398 1398
============================================
Files 1219 1221 +2
Lines 173644 175752 +2108
Branches 140742 142852 +2110
============================================
+ Hits 146317 148722 +2405
+ Misses 23369 23029 -340
- Partials 3958 4001 +43
🚀 New features to boost your workflow:
|
Contributor
|
LGTM |
Contributor
Author
|
I think the Go e2e failure is a flake, unrelated to this PR. |
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.
Which issue does this PR address?
Closes #3977
Rationale
Each task in
components.ymlbecomes its own job, sosdk-pythoncompiled the same crate twice per push. Foldingbuildintotestalso givesapache_iggy.pyisomewhere cheap to be checked, which it has never had.What changed?
buildis folded intotest.maturin build -o distruns there, ahead of the coverage build so pytest still gets the instrumented module.lintstays its own job.testnow checks thatapache_iggy.pyiis in sync: regenerate, normalise with ruff, diff. The stub had already drifted, so the first commit is the regeneration.stub_genis anchored onCARGO_MANIFEST_DIR. Running it from a subdirectory used to strip the license header off the tracked stub, which the README carried as a known bug. That TODO is gone.Local Execution
AI Usage
If AI tools were used, please answer: