First step in isolating the help texts module from the app itself (CRAFT-530).
Metadata
Current evaluation
Merged in canonical/charmcraft#537 via 9461839c, decoupling help generation from app data with an initialized Helper class.
Resolution: closed resolved
Reason: PR #537 was approved and merged, with implementation commit 369aead5. It removed hardcoded app details, moved help functions into a class, and added application-specific initialization.
Evaluated by: mr-cal-bot
No scores available.
Issue body
This includes:
- not having the general summary or app name anymore hardcoded in the module
- moved the functions at module level to be methods inside a class; this is for the system to be able to be "initiated" with the app specific information.
- those moved in functions are exactly the same, with some minor structural changes:
- `get_full_help` and `get_detailed_help` do not receive the "command groups"
- `get_usage_message` now formats `USAGE` passing also the `appname`
- `get_full_help` and `get_detailed_help` indents the "general summary" (as the app text doesn't need to be passed indented)
**Note** on initiating `Helper`: currently there's no guard on using it before calling its `init`, as I'm not 100% sure the form this will have when both this help texts module and the dispatcher will be in the craft-cli library, but for sure the final form will be more robust.
**Note 2**: the PR is too big, but most of it is just moving code around, and zillion changes in the texts because of two functions not receiving command groups anymore, and the need to init the helper before usage.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in canonical/charmcraft#537 via 9461839c, decoupling help generation from app data with an initialized Helper class. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged in #537 (commit 9461839c), decoupling help-text generation from app-specific data by adding Helper initialization and moving help functions into a class. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged CRAFT-530 to decouple help text generation from app-specific data, introducing Helper.init and moving help functions into the class. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged after two approvals and passing CI. Refactors the help texts module by moving functions to a class, removing hardcoded app names, and updating signatures to support initialization with app-specific data. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged refactoring that isolates the help texts module by converting functions to class methods, removing hardcoded app details, and updating signatures to support app-specific initialization. |
Update history
No update history recorded yet.
Related work
-
Related To:
canonical/charmcraft#540
(confidence 96%)
Follow-up PR continued the help-text isolation begun in #537.
Related issues
No related issues found above the similarity threshold.