chore: scope sdist to exclude eval datasets and dashboard node_modules#98
Merged
Conversation
The wheel target is scoped to src/forge, but the sdist target had no configuration, so hatchling swept the entire working tree -- pulling the LFS eval datasets (~112MB) and the eval dashboard's node_modules (~97MB, including Windows .exe/.node binaries) into the source distribution. Add a scoped [tool.hatch.build.targets.sdist] excluding both. The sdist drops from ~26MB to ~690KB; src/forge, tests, docs, the dashboard source, and the prebuilt results HTML are all retained. report.py rebuilds the dashboard via npm on demand, so the committed node_modules was never load-bearing; the eval datasets remain in the repo via LFS. Also refresh a stale .gitignore comment to the versioned eval-results naming (post #96).
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.
What
Scope the sdist build so it stops bundling non-source artifacts.
Why
The wheel target is scoped (
packages = ["src/forge"]→ clean 115 KB), but there was no[tool.hatch.build.targets.sdist]config. With no scoping, hatchling sweeps the whole working tree into the sdist:eval_results_v*.jsonl— LFS benchmark datasetstests/eval/dashboard/node_modules/— incl. Windows.exe/.nodebinariessrc/forge— the actual packageSo 96% of the file count and ~99.7% of the bytes were non-source artifacts — including platform binaries — in a Python library's PyPI source distribution. (
node_modulesis gitignored + untracked; hatchling's unscoped sdist sweep doesn't honor.gitignore, so it got vacuumed in anyway.)Fix
Add a scoped sdist target excluding the two offenders. Nothing load-bearing is lost:
report.pyrebuilds the dashboard vianpm install+npm run buildon demand, so the committednode_modules(Windows-only binaries) was never used by the report workflow.docs/results/dashboard.htmlstay in the sdist.Also refreshes a stale
.gitignorecomment to the versionedeval_results_v*.jsonlnaming (post #96).Verification
node_modulesandeval_results*.jsonl: 0 entries in the new sdist.src/forge(41 files), README/LICENSE/CHANGELOG/pyproject, dashboard source, results HTML: all present.twine check: PASSED on both wheel and sdist.