Repository navigation
fix: include kernel-specification.yml in source distribution - #4179
Conversation
…hep#4178) tests/test_4056_cuda_compute_signature_consistency.py reads kernel-specification.yml from the repo root, but the file was not part of the sdist include list, so the test errored with FileNotFoundError when the suite ran against an unpacked source distribution (e.g. conda-forge). The tests/ directory already ships, so this adds the one data file it depends on. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR4179 |
ikrommyd
left a comment
There was a problem hiding this comment.
See my comment on the issue #4178 (comment). I think it's a little more messy and we should make it more consistent instead. Needs decision I'd say.
|
Got it. I went with the minimal fix since it unblocks the failing test from the |
ianna
left a comment
There was a problem hiding this comment.
@5U5H4NTH006 — Thank you for your contribution! Indeed we started testing against the “truth” which is the yaml description. Having tests that check against it is a good thing to do! We will need that for the further testing with hypothesis.
|
@all-contributors please add @5U5H4NTH006 for code |
|
I've put up a pull request to add @5U5H4NTH006! 🎉 |
Fixes #4178
tests/test_4056_cuda_compute_signature_consistency.pyreadskernel-specification.ymlfrom the repo root, but that file was not in thesdist
includelist inpyproject.toml, so it was absent from the sourcedistribution. As a result the test errored with
FileNotFoundErrorwhen thesuite was run against an unpacked sdist (e.g. conda-forge), even though it
passes in a git checkout where the file is present.
tests/already ships inthe sdist, so this just adds the one data file it depends on.
Verification
Built the sdist with
python -m build --sdist:tar tzf dist/*.tar.gz | grep kernel-specification.ymlreturnsnothing;
test_4056errors withFileNotFoundErrorwhen run from theunpacked sdist.
test_4056passes againstthe unpacked sdist.
Suggested follow-up (out of scope here)
This slipped through because no CI job runs the test suite against a built
sdist — the main test job runs
pytestagainst the git checkout (where thefile always exists), and
reusable-packaging-test.ymlbuilds the sdist but onlyruns
twine check. Adding a step that unpacks the built sdist and runs thetests against it would let the existing tests guard against any
missing-from-sdist data file in future, not just this one. Happy to open a
separate PR/issue for that if it's wanted.
AI assistance disclosure:
this change was prepared with the help of an AI
coding assistant (Claude). I reviewed, tested, and understand the change and
take responsibility for it.