fix: include config directory in hatch build#54
Conversation
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. Closes TruFoundation#48
The test_run_help_prints_docstring_for_known_command test was failing because the fake kernel lacked a _import_module method, causing the module import to fail silently and fall through to the error message. Add a working _fake_import_module that uses importlib to resolve the module path, allowing run_help to read and print the docstring.
The function referenced a bare name that was never imported or defined, causing a NameError crash on every invocation. Fix: move before the conditional block so it is always defined when reached by the comparison at the end of the function. Closes TruFoundation#40
|
The Fix the conflict and confirm the wheel contents, and I’ll merge. Great work keeping the packaging tight! |
Take upstream's improved version that only lowercases the command name (first argument) while preserving case of subsequent arguments (e.g. filenames), instead of lowercasing the entire command string.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughConfig manifest files are added to the Hatch build packaging to ensure distribution completeness. Test fixtures are updated with module import infrastructure to support verifying command documentation retrieval. ChangesConfig Directory Distribution and Test Infrastructure
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Problem
The config manifest files (
builtin_commands.md,plugins.md) intrushell/config/are not listed in the hatch buildincludelist. Hatchling will include them implicitly only if they fall underpackages = ["trushell"], but the explicitincludelist 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 theincludelist inpyproject.toml:Summary by CodeRabbit