Skip to content

refactor(formatters): remove unused Granite32/33 processor classes#1337

Merged
planetf1 merged 4 commits into
generative-computing:mainfrom
planetf1:worktree-issue-1304
Jun 24, 2026
Merged

refactor(formatters): remove unused Granite32/33 processor classes#1337
planetf1 merged 4 commits into
generative-computing:mainfrom
planetf1:worktree-issue-1304

Conversation

@planetf1

@planetf1 planetf1 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Deletes the entire mellea/formatters/granite/granite3/ subtree (15 files) — Granite32InputProcessor, Granite32OutputProcessor, Granite32ChatCompletion, Granite33InputProcessor, Granite33OutputProcessor, Granite33ChatCompletion, and all their supporting classes
  • Removes the six re-exported symbols from mellea/formatters/granite/__init__.py
  • Deletes the five test files that covered only this dead code; rescues TestNltkCheck (covers base.optional.nltk_check) into a new test/formatters/granite/base/test_base_optional.py
  • Removes stale mellea.formatters.granite.granite3.* entries and the six Granite32/33 symbols from the parent mellea.formatters.granite block in docs/metrics/coverage-current.json

These classes were carried over from granite-common (#571) but were never wired into any backend or session routing. Mellea operates at the action/context level via intrinsic processors; the chat-message-level Granite3x pipeline was never used.

mellea-contribs: no references found.

Note: test_granite33_output.py was missing from the issue body but also existed and is removed here.

Follow-up: mellea/formatters/granite/base/util.py:51 find_substring_in_text now has no non-test callers in mellea/ (its only consumers were in the deleted granite3/output.py). Tracked separately.

Out of scope: mellea.backends.huggingface.granite_formatters.granite3.* entries in coverage-current.json are pre-existing stale phantom paths (the directory never existed) and are left for a separate cleanup.

Test plan

  • uv run pytest test/formatters/ -m "not qualitative" — 100 passed, 2 skipped
  • uv run ruff check . and uv run ruff format --check . — clean
  • Grep confirms zero remaining references to Granite3[23] or granite3/ submodules in mellea/, cli/, or test/
  • No references found in mellea-contribs
  • coverage-current.json has zero Granite32*/Granite33* entries under mellea.formatters.* paths

Closes #1304.

@github-actions github-actions Bot added the enhancement New feature or request label Jun 24, 2026
planetf1 added 4 commits June 24, 2026 15:21
…enerative-computing#1304)

The Granite32InputProcessor, Granite32OutputProcessor, Granite32ChatCompletion,
Granite33InputProcessor, Granite33OutputProcessor, and Granite33ChatCompletion
classes were carried over from granite-common (generative-computing#571) but never wired into any
backend or session routing. Mellea operates at the action/context level via
intrinsic processors; the chat-message-level Granite3x pipeline was never used.

Deletes the entire mellea/formatters/granite/granite3/ subtree (15 files),
removes the six re-exported symbols from the top-level granite/__init__.py,
and deletes the five test files that covered only this dead code. The
nltk_check tests (base.optional) from the shared test file are rescued into
test/formatters/granite/base/test_base_optional.py before deletion.

Domain owner sign-off: frreiss confirmed removal in issue generative-computing#1304.
Closes generative-computing#1304.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
Removes the 15 mellea.formatters.granite.granite3* module entries that
no longer exist after the previous commit deleted the granite3/ subtree.
Updates total_symbols and coverage_percentage accordingly.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
The previous commit pruned the granite3/* submodule keys but missed the
parent mellea.formatters.granite block, which still listed all six removed
symbols. This commit removes them and updates the symbol count (2035→2029)
and coverage percentage (15.38→15.43%) accordingly.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
…anite3 removal

The only non-test consumers of find_substring_in_text lived in
granite3/output.py, which was deleted in the previous commits.
Remove the function and its dedicated test file; drop the now-unused
re import from base/util.py.

Assisted-by: Claude Code
Signed-off-by: Nigel Jones <jonesn@uk.ibm.com>
@planetf1
planetf1 force-pushed the worktree-issue-1304 branch from 6a0ac2f to 0130f3c Compare June 24, 2026 14:23
@planetf1
planetf1 marked this pull request as ready for review June 24, 2026 14:28
@planetf1
planetf1 requested review from a team as code owners June 24, 2026 14:28
@planetf1
planetf1 enabled auto-merge June 24, 2026 14:34
@planetf1
planetf1 added this pull request to the merge queue Jun 24, 2026
Merged via the queue into generative-computing:main with commit cc62c8e Jun 24, 2026
9 checks passed
@planetf1
planetf1 deleted the worktree-issue-1304 branch June 24, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused Granite32/33 formatter processors from public API

2 participants