Skip to content

fix(ci): treat sdist VCS-ignore files as optional in distribution check - #27

Merged
QuiteYellow merged 1 commit into
mainfrom
fix/sdist-check-hgignore-optional
Aug 3, 2026
Merged

fix(ci): treat sdist VCS-ignore files as optional in distribution check#27
QuiteYellow merged 1 commit into
mainfrom
fix/sdist-check-hgignore-optional

Conversation

@QuiteYellow

Copy link
Copy Markdown
Owner

The Validate workflow's Package artifacts job started failing on main right after #21 merged:

Run python tools/check_distribution.py dist
distribution check failed
Error: Process completed with exit code 1.

Cause

check_sdist compared the sdist member list against an exact expected set that hardcoded .hgignore. hatchling bundles the VCS ignore files it finds, but which ones ship depends on the hatchling version — 1.31.0 (what CI resolved) ships only .gitignore in the sdist, while older releases also included .hgignore. #21 was validated against an older hatchling, so the exact-match check passed locally and failed in CI.

The wheel check was unaffected.

Fix

Split the sdist expectation into a required set (tracked sources + LICENSE, PKG-INFO, README.md, pyproject.toml, _version.py) and an optional set (.gitignore, .hgignore). The check now asserts required <= relative <= required | optional, so it passes whether hatchling emits one ignore file, both, or neither, while still catching any genuinely unexpected member.

Validation

  • python -m build + python tools/check_distribution.py distdistribution contents verified (hatchling 1.31.0, Python 3.14)
  • pytest -q52 passed

hatchling 1.31.0 ships only .gitignore in the sdist; older releases also
bundled .hgignore. check_sdist required an exact member set including
.hgignore, so the Validate workflow's package job failed on main once CI
resolved the newer hatchling.

Require the tracked source set plus the fixed metadata files, and accept
.gitignore/.hgignore as optional members either way.
@QuiteYellow

Copy link
Copy Markdown
Owner Author

@Jason-Morcos heads up: the Package artifacts job from #21 went red on main once CI resolved hatchling 1.31.0, which stopped shipping .hgignore in the sdist. #27 loosens the sdist check to tolerate that. Shouldn't affect #23#25.

@QuiteYellow
QuiteYellow merged commit 280939d into main Aug 3, 2026
8 checks passed
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.

1 participant