Skip to content

fix(cli): correct template-not-found hint to fenn list - #316

Open
rusetiq wants to merge 2 commits into
pyfenn:mainfrom
rusetiq:fix/312-incorrect-template-not-found-hint
Open

fix(cli): correct template-not-found hint to fenn list#316
rusetiq wants to merge 2 commits into
pyfenn:mainfrom
rusetiq:fix/312-incorrect-template-not-found-hint

Conversation

@rusetiq

@rusetiq rusetiq commented Aug 16, 2026

Copy link
Copy Markdown

Summary

Fixes #312.

When a user ran fenn pull <bad-name> ... for a template that does not exist, the CLI suggested fenn pull --list. That flag does not exist on the pull subcommand. The correct command for listing templates is fenn list.

Changes

  • fenn/cli/pull.py: point the template-not-found hint to fenn list.
  • tests/unit/cli/test_pull_command.py: add regression assertions for the corrected hint.
  • fenn/experimental/vision/normalize.py: replace 12 equivalent NumPy bound-method reductions (array.max() / array.min()) with np.max(array) / np.min(array). These mechanical substitutions resolve the ty diagnostics that caused the PR pipeline to fail; no normalization behavior is intentionally changed.

Scope

The PR is limited to 3 files with 17 additions and 13 deletions. Unrelated dashboard, template-test, normalization-validation, warning-handling, and lockfile changes have been removed.

Verification

  • pre-commit run --all-files: passed
  • Targeted CLI and normalization tests: 53 passed
  • Configured Nox unit session: 918 passed, 7 optional-dependency skips

Reproduction

Run fenn pull DOES_NOT_EXIST temp.

Expected: the response suggests fenn list.

Previously observed: the response suggested the nonexistent fenn pull --list command.

When a user ran `fenn pull <bad-name> ...` for a non-existent template,
the error pointed to `fenn pull --list`, a flag that does not exist on
the pull subcommand. Point to the real command, `fenn list`, instead.

Adds regression assertions to test_pull_template_not_found to lock in
the correct hint and prevent reintroducing the non-existent flag.
@rusetiq
rusetiq force-pushed the fix/312-incorrect-template-not-found-hint branch from 0eab867 to 714e347 Compare August 16, 2026 08:29
@ApusBerliozi

Copy link
Copy Markdown
Contributor

Hey @rusetiq! Thx 4 your work

Kindly check why pipeline fails

@rusetiq

rusetiq commented Aug 17, 2026

Copy link
Copy Markdown
Author

sure! give me a while, i'll work on it and commit

@rusetiq

rusetiq commented Aug 17, 2026

Copy link
Copy Markdown
Author

im pretty sure thatd fix it!
i changed five np calls in fenn/experimental/vision/normalize.py from instance methods like:
alpha_channel.max() to np.max(alpha_channel)
and similarly changed:
rgb_channels_float.max() to np.max(rgb_channels_float)

@rusetiq

rusetiq commented Aug 18, 2026

Copy link
Copy Markdown
Author

@ApusBerliozi fixed!

@ApusBerliozi

Copy link
Copy Markdown
Contributor

Hey @rusetiq! Thx

I think, there are way to more changes in files for such an error. I will comeback with full report once I have some free time

@rusetiq
rusetiq force-pushed the fix/312-incorrect-template-not-found-hint branch from 63dd422 to 57a1b00 Compare August 20, 2026 12:43
@rusetiq

rusetiq commented Aug 20, 2026

Copy link
Copy Markdown
Author

Thanks for flagging the scope issue. I audited and reduced the PR from 12 files (+709/-144) to 3 files (+17/-13).

Removed from this PR:

  • dashboard runner changes
  • template-test redesign
  • normalization behavior/edge-case changes
  • image-batch and Ruff cleanup
  • uv.lock regeneration

The branch now contains only the original CLI fix and regression assertions, plus the 12 mechanical ndarray.min/max to np.min/max substitutions required to clear the pipeline's ty diagnostics. Pre-commit passes, the targeted suite reports 53 passed, and the configured Nox unit session reports 918 passed with 7 optional-dependency skips.

Updated in commit 57a1b00.

@rusetiq

rusetiq commented Aug 21, 2026

Copy link
Copy Markdown
Author

@ApusBerliozi mind checking?

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.

Bug: Incorrect Error Response for Template Not found

2 participants