← Back to issue list

Include humanize_list function as a utility

View original Github issue

Metadata

Project
craft-cli
Number
#183
Type
issue
State
open
Author
lengau
Labels
—
Created
Updated
Closed
—

Current evaluation

humanize_list and unit tests now exist in craft-cli, but downstream craft-app migration remains unresolved; the humanize-based craft-parts experiment was closed unmerged.

Suggested action: keep open

Reason: Commit 4d41d7d for craft-cli#319 introduced humanize_list and its tests, satisfying the initial implementation step, but the requested release, downstream craft-app migrations, and reciprocal cross-project comments are not demonstrated as complete. The author's craft-parts#997 experiment using humanize.natural_list was closed unmerged, so the remaining cross-repository work still needs maintainer direction.

Evaluated by: mr-cal-bot

Impact: 25 Quick Win: 7 Complexity: 50 Confidence: 89 Actionability: 57

Issue body

### What needs to get done 1. Copy this function and its relevant tests to `craft-cli`: https://github.com/canonical/craft-parts/blob/main/craft_parts/utils/formatting_utils.py 2. Make a `craft-cli` release 3. Update craft apps to reference this function instead of their own instances of it. 4. Make comments both here and in the `craft-parts` implementation that the function exists in the other location so we can copy bug fixes if needed. (No functional changes in craft-parts) ### Why it needs to get done Reduced copy/pasting of code for improved maintainability

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 25
Quick Win: 7
Complexity: 50
Confidence: 89
Actionability: 57
keep open humanize_list and unit tests now exist in craft-cli, but downstream craft-app migration remains unresolved; the humanize-based craft-parts experiment was closed unmerged.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 14
Complexity: 35
Confidence: 87
Actionability: 68
keep open Share a list-humanization utility across craft projects; it now exists in craft-cli, but downstream migration and the abandoned craft-parts humanize experiment remain incomplete.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 10
Complexity: 30
Confidence: 65
Actionability: 50
keep open Consolidate humanize_list across craft-* projects. craft-cli already has the function, but craft-parts#997 (using humanize library) was closed without merging. Work incomplete.
qwen/qwen3.8-27b
Impact: 25
Quick Win: 14
Staleness: 75
Complexity: 45
Confidence: 70
Support Request: 5
close stale Proposal to move humanize_list from craft-parts into craft-cli as a shared utility. Step 1 is done (function and tests exist in craft_cli/utils.py), but the team pivoted to python-humanize 4.11.0 (craft-parts PR #997); issue open, inactive about 19 months.
qwen/qwen3.6-35b-a3b
Staleness: 90
Complexity: 20
Confidence: 90
Support Request: 0
close stale Proposal to extract humanize_list to craft-cli was superseded by python-humanize v4.11.0. Author already testing the external library in craft-parts, making the original copy-paste proposal obsolete.
qwen3.6-35b-a3b-mtp-q6
Staleness: 75
Complexity: 10
Confidence: 85
Support Request: 0
close stale Proposal to centralize humanize_list in craft-cli was superseded by adopting python-humanize. Original author is testing the external library in craft-parts. Issue remains open but effectively resolved by alternative approach.

Update history

No update history recorded yet.

Related work

  • Related To: craft-parts#997 (confidence 99%)

    This experiment replaced craft-parts' local function with humanize.natural_list but was closed unmerged.

  • Related To: python-humanize#110 (confidence 98%)

    Maintainers identified this upstream change, released in humanize 4.11.0, as an alternative to copying a utility.

  • Likely Fixed By: craft-cli#319 (confidence 97%)

    Commit 4d41d7d introduced craft_cli.utils.humanize_list and its unit tests.

Related issues

Issue Project State Summary Similarity
#997 experimental: use humanize for lists craft-parts closed PR #997 was closed unmerged after prolonged inactivity; the proposed switch from craft-parts' humanize_list to humanize.natural_list was abandoned.
76%
#6432 refactor: use humanize_list from craft-application snapcraft closed Merged #6432 via commit 87c89a9b9, replacing Snapcraft’s local humanize_list with craft-application’s implementation after ty 0.0.83 complaints.
74%