Repository navigation
wheel-included-skills: a tested build recipe and a wheel check (#31) - #34
Merged
Merged
Conversation
- skill.wheel: wheel_skills_snippet (hatch force-include of skills/ into <pkg>/_skills) and check_wheel_skills (every skills/ file in the wheel byte for byte, each SKILL.md once, the repository holding each skill once, no committed copy of the wheel folder; warns on a developer skill that ships). - CLI: skill check-wheel-skills <wheel>. - An end-to-end test builds a fixture wheel with hatchling, checks it, and finds its skills with find_package_skills. - skill-enable and the README document the method. Closes #31
- Expect only what a build ships: tracked files (git ls-files) when in a git tree, never .DS_Store or cache folders; walk linked folders as the build does. - Duplicates: only real skills/<name>/SKILL.md places (what gh skill discovers); skip environments and site-packages. - setuptools variant (package-dir subpackage), and wheel_skills_config as a dict to merge; the snippet derives the same settings. - audience read with yaml; the CLI reports an unreadable wheel cleanly; docs: build through the sdist, the sdist must include skills/.
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.
The
wheel-included-skillsplacement method (#8) as a tested recipe.skill.wheel.wheel_skills_config(package, backend='hatch'|'setuptools')returns thepyproject.tomlsettings as a dict to merge.wheel_skills_snippetreturns them as TOML text for a file that has no such table. hatch usesforce-includefromskillsto<pkg>/_skills. setuptools declares<pkg>._skillsas a subpackage whose directory isskills/.check_wheel_skills(wheel, repo_root), also on the CLI asskill check-wheel-skills <wheel>, checks that every trackedskills/<name>/file is in the wheel under<pkg>/_skills/<name>/, byte for byte. It also checks that eachSKILL.mdis in the wheel exactly once, that the repository holds each skill in oneskills/folder (the placesgh skilldiscovers), and that no copy of the wheel folder is committed. It warns when a developer skill ships to users.sys.path, wherefind_package_skills(used byskill install-from-package) finds<pkg>/_skills. Regression tests cover a git-ignored file, a Finder.DS_Store, a fixture folder named like a skill, a symlinkedskills/copy, a stale wheel, a committed wheel folder, and a missing wheel.skills/.Adversarial review: no blockers. The 4 majors are fixed in the second commit: OS litter and git-ignored files no longer cause false fails or passes, duplicates count only
skills/folders, and there is a setuptools variant. Most minors are fixed too: linked folders are walked,audienceis read with yaml, the CLI reports an unreadable wheel cleanly, the docs are corrected, and a mergeable config dict was added. One question stays open: whethergh skillfollows symlinks is unverified, so the recipe copies and never links.Local: ruff clean,
pytest264 passed.Closes #31