Skip to content

fix: include config directory in hatch build#54

Open
zza-830 wants to merge 1 commit into
TruFoundation:mainfrom
zza-830:fix/config-build-include
Open

fix: include config directory in hatch build#54
zza-830 wants to merge 1 commit into
TruFoundation:mainfrom
zza-830:fix/config-build-include

Conversation

@zza-830

@zza-830 zza-830 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Problem

The config manifest files (builtin_commands.md, plugins.md) in trushell/config/ are not listed in the hatch build include list. Hatchling will include them implicitly only if they fall under packages = ["trushell"], but the explicit include list may override that on some hatchling versions, causing a broken PyPI install where the kernel can't find any manifests.

Closes #48

Fix

Add trushell/config/* to the include list in pyproject.toml:

# Before
include = ["README.md", "LICENSE", "trushell/sounds/"]

# After
include = ["README.md", "LICENSE", "trushell/sounds/*", "trushell/config/*"]

Summary by CodeRabbit

  • Chores
    • Updated build configuration to ensure all package files are properly included in distributions.

@AkshajSinghal

Copy link
Copy Markdown
Collaborator

The argv fix and test mock updates are nice bonuses, but let’s clear that merge conflict in cli.py first (likely clashing with the recent shell injection hardening). Also, can you quickly verify the built .whl actually contains the config/ folder? Just want to be 100% sure Hatchling isn’t being tricky.

Fix the conflict and confirm the wheel contents, and I’ll merge. Great work keeping the packaging tight!

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f5101234-2def-4e8f-9880-8a6c511fceec

📥 Commits

Reviewing files that changed from the base of the PR and between 34b2597 and 188bee5.

📒 Files selected for processing (1)
  • pyproject.toml
✅ Files skipped from review due to trivial changes (1)
  • pyproject.toml

📝 Walkthrough

Walkthrough

The [tool.hatch.build] include list in pyproject.toml is updated to add trushell/config/*, ensuring config manifest files are packaged in distributed builds alongside the existing README.md, LICENSE, and trushell/sounds/* entries.

Changes

Build Packaging Fix

Layer / File(s) Summary
Build packaging includes config directory
pyproject.toml
trushell/config/* is added to the Hatch build include list so config manifest files (builtin_commands.md, plugins.md) are included in PyPI distributions.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐇 A single line, a tiny fix,
The config files now join the mix!
No more lost manifests in the dist,
The package ships what can't be missed.
Hop hop, the build is now complete! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: adding the config directory to the hatch build's include list in pyproject.toml.
Linked Issues check ✅ Passed The PR successfully addresses issue #48 by adding trushell/config/* to the pyproject.toml include list, ensuring config manifest files are packaged in distributions.
Out of Scope Changes check ✅ Passed The changes are limited to modifying the pyproject.toml include list as required; no extraneous modifications are present in this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

The config manifest files (builtin_commands.md, plugins.md) in
trushell/config/ were not listed in the hatch build include list,
which could cause a broken PyPI install where the kernel can't find
any manifests.

Fix: add 'trushell/config/*' to the include list in pyproject.toml.

Verified: the built .whl contains both config files.

Closes TruFoundation#48
@zza-830 zza-830 force-pushed the fix/config-build-include branch from 34b2597 to 188bee5 Compare June 24, 2026 02:15
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.

Config directory trushell/config/ missing from hatch build include

2 participants