Skip to content

Consolidate CLIs under a single dls-plc-tools Typer entry point - #1

Merged
LeeHudsonDLS merged 1 commit into
mainfrom
typer-cli-entrypoint
Jul 21, 2026
Merged

LeeHudsonDLS merged 1 commit into
mainfrom
typer-cli-entrypoint

Conversation

@LeeHudsonDLS

Copy link
Copy Markdown
Collaborator

Match the entry point to the package name with gui and read subcommands (so uvx dls-plc-tools gui <ip> works), per a colleague's suggestion. Replaces the separate dls-read-plc / dls-read-plc-gui scripts.

  • Add a Typer app in main.py; extract reusable cores run_gui() and read_plc() from the old argparse mains. Subcommands lazy-import their heavy deps (PySide6 / aphyt) so --version/--help stay fast.
  • Add typer to dependencies; collapse [project.scripts] to just dls-plc-tools.
  • Suppress a false-positive pyright error on QMetaObject.invokeMethod (PySide6 stubs type the slot name as bytes, but the runtime requires str).
  • Update README/CLAUDE.md to the new invocation.

Match the entry point to the package name with `gui` and `read` subcommands
(so `uvx dls-plc-tools gui <ip>` works), per a colleague's suggestion. Replaces
the separate `dls-read-plc` / `dls-read-plc-gui` scripts.

- Add a Typer app in __main__.py; extract reusable cores run_gui() and
  read_plc() from the old argparse mains. Subcommands lazy-import their heavy
  deps (PySide6 / aphyt) so --version/--help stay fast.
- Add typer to dependencies; collapse [project.scripts] to just dls-plc-tools.
- Suppress a false-positive pyright error on QMetaObject.invokeMethod (PySide6
  stubs type the slot name as bytes, but the runtime requires str).
- Update README/CLAUDE.md to the new invocation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@LeeHudsonDLS
LeeHudsonDLS merged commit e692531 into main Jul 21, 2026
9 checks passed
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