fix(skills): package skills in build#433
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b0fe993198
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| MIME_TYPE = "text/html;profile=mcp-app" | ||
|
|
||
| _SKILLS_DIR = Path(__file__).parent.parent.parent / "skills" | ||
| _SKILLS_DIR = Path(__file__).parent / "skills" |
There was a problem hiding this comment.
Keep a source-tree fallback for skills directory
Resolve _SKILLS_DIR from both install layouts, because this hardcoded path only works after packaging. In a normal source checkout (and many editable/dev runs), the repository has skills/ at the project root but no src/prefab_ui/skills, so list_guides() returns an empty list and get_guide("prefab-ui") raises ValueError. This regresses local development and repo test runs that rely on guides being discoverable.
Useful? React with 👍 / 👎.
Right now, when you build a wheel/sdist, the skills directory is not included in the resulting build, making generative.py fail (along with tests run on the build). This commit adds Hatch instructions to include the static files in the skills directory in builds and updates the Python code in generative.py to point at the synthetic location in the package. This issue surfaced in NixOS/nixpkgs while trying to package the project and finding that without adding Hatch instructions, builds and tests would fail: NixOS/nixpkgs#510123. Signed-off-by: squat <lserven@gmail.com>
b0fe993 to
5860b2f
Compare
Right now, when you build a wheel/sdist, the skills directory is not
included in the resulting build, making generative.py fail (along with
tests run on the build). This commit adds Hatch instructions to
include the static files in the skills directory in builds and updates
the Python code in generative.py to point at the synthetic location in
the package.
This issue surfaced in NixOS/nixpkgs while trying to package the project
and finding that without adding Hatch instructions, builds and tests
would fail: NixOS/nixpkgs#510123.
Signed-off-by: squat lserven@gmail.com