Skip to content

Fix --help crash, remove debug print, and recommend isolated install#36

Open
Zelray wants to merge 2 commits into
jbarrow:mainfrom
Zelray:fix/help-and-install-docs
Open

Fix --help crash, remove debug print, and recommend isolated install#36
Zelray wants to merge 2 commits into
jbarrow:mainfrom
Zelray:fix/help-and-install-docs

Conversation

@Zelray

@Zelray Zelray commented Jun 17, 2026

Copy link
Copy Markdown

First off — thank you for building this. I switched from a $99/month SaaS to commonforms and it does the same job for free, so this PR is a small thank-you in the form of three tiny fixes I hit while getting set up.

What

  1. Fix commonforms --help crash — an unescaped % in the --fast argparse help string (...50% speedup...) made argparse treat it as a format specifier and dump the raw argument dict into the terminal instead of showing help. Escaped it to 50%% so --help is just help again.
  2. Remove a leftover debug print()print(f"**{args.confidence=}") in __main__.py echoed **args.confidence=0.3 to stdout on every run. Quietly retired.
  3. Docs: recommend an isolated install — README now leads with uv tool install commonforms / pipx install commonforms so new users don't install into their active (e.g. conda base) environment by accident.

Why

  • The --help dict-dump was a surprise easter egg, but probably not the one you intended — it's the first thing a curious new user runs.
  • The debug line added a little noise to every invocation.
  • On Models should not be bundled with the package by default #3 I'll be honest: I learned the hard way and pip install'd this straight into my conda base. Because the dependency set is large and pins recent majors (transformers, pillow, torch, rfdetr, ultralytics), it upgraded shared packages in place and disturbed some unrelated tooling. An isolated-install nudge up top would have saved me, and likely the next person too.

All three are small and self-contained — happy to split them into separate PRs if you'd prefer to review them independently.

Thanks again for putting this out there for free. It genuinely replaced a paid tool for me, and it was a pleasure to give a little back.

Zelray added 2 commits June 16, 2026 22:38
Escape the percent in the --fast help string (50% -> 50%%) so argparse stops treating it as a format specifier and dumping the raw argument dict on 'commonforms --help'. Also remove a stray debug print that echoed args.confidence to stdout on every invocation.
Lead the Installation section with uv tool install / pipx, which create a dedicated env and expose only the commonforms command. The dependency set (transformers, torch, rfdetr, ultralytics) is large and pins recent versions, so a plain pip install into a shared env can upgrade numpy/pillow/transformers in place and break other tooling. Keep uv pip / pip documented for in-project library use, with a caution about the active environment.
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.

1 participant