Skip to content

Modularize CLI command handlers#23

Merged
Mjboothaus merged 1 commit into
mainfrom
refactor/cli-command-modules
Apr 18, 2026
Merged

Modularize CLI command handlers#23
Mjboothaus merged 1 commit into
mainfrom
refactor/cli-command-modules

Conversation

@Mjboothaus
Copy link
Copy Markdown
Contributor

Summary

  • split CLI execution logic into dedicated modules under src/pdealchemy/cli/commands/
    • pricing
    • conversion (notebook/spec bridge)
    • validation
    • explain
  • keep Typer command surface unchanged in src/pdealchemy/cli/app.py
  • preserve existing CLI output and error behaviour while reducing app.py complexity

Validation

  • uv run ruff check src/pdealchemy/cli/app.py src/pdealchemy/cli/commands/__init__.py src/pdealchemy/cli/commands/pricing.py src/pdealchemy/cli/commands/conversion.py src/pdealchemy/cli/commands/validation.py src/pdealchemy/cli/commands/explain.py
  • uv run ty check src
  • uv run pytest tests/test_cli.py tests/cli/test_notebook_to_toml.py tests/cli/test_spec_to_runtime_toml.py

Conversation: https://app.warp.dev/conversation/79aa7721-1947-44e5-840f-d20883bd8624
Plan: https://app.warp.dev/drive/notebook/eZQFltrUPlV50R8ZwHEybR

Co-Authored-By: Oz oz-agent@warp.dev

Co-Authored-By: Oz <oz-agent@warp.dev>
@semanticdiff-com
Copy link
Copy Markdown

semanticdiff-com Bot commented Apr 18, 2026

Review changes with  SemanticDiff

Changed Files
File Status
  src/pdealchemy/cli/app.py  37% smaller
  src/pdealchemy/cli/commands/__init__.py  0% smaller
  src/pdealchemy/cli/commands/conversion.py  0% smaller
  src/pdealchemy/cli/commands/explain.py  0% smaller
  src/pdealchemy/cli/commands/pricing.py  0% smaller
  src/pdealchemy/cli/commands/validation.py  0% smaller

@Mjboothaus Mjboothaus merged commit 8cbb6c1 into main Apr 18, 2026
0 of 3 checks passed
@Mjboothaus Mjboothaus deleted the refactor/cli-command-modules branch April 18, 2026 21:30
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