Skip to content

feat: fix command line help and add diff subcommand#14

Merged
AKrantzPS merged 1 commit into
mainfrom
fix/command-line-documentation
Jun 30, 2026
Merged

feat: fix command line help and add diff subcommand#14
AKrantzPS merged 1 commit into
mainfrom
fix/command-line-documentation

Conversation

@AKrantzPS

Copy link
Copy Markdown
Collaborator

This pull request refactors the CLI for odsbox-diff to use explicit subcommands (diff, collect, config) and updates the documentation and tests to match. The new CLI structure is more standard and discoverable, while maintaining backward compatibility with the previous implicit diff mode. Documentation now clearly recommends and demonstrates the new subcommand-based usage.

CLI Refactor and Backward Compatibility:

  • Refactored the CLI entry point in diff.py to use explicit subcommands (diff, collect, config) with argparse subparsers, and updated help messages and dispatch logic for improved usability and discoverability. The implicit diff mode is still supported for backward compatibility. [1] [2] [3]

Documentation Updates:

  • Updated README.md and docs/usage.md to recommend and document the new subcommand-based CLI usage, replacing references to the old implicit mode and create-config with config, and clarifying backward compatibility. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14]

Testing Enhancements:

  • Added tests to verify the new CLI help output, subcommand parsing, error handling for unknown subcommands, and that the implicit diff mode still works as expected. [1] [2] [3]

Internal Code Improvements:

  • Introduced _build_root_parser and _build_diff_parser for clearer CLI argument parsing and separation of subcommand logic. [1] [2]

These changes make the CLI more user-friendly and maintainable while ensuring existing workflows are not broken.

@AKrantzPS AKrantzPS merged commit 3e26355 into main Jun 30, 2026
4 checks passed
@AKrantzPS AKrantzPS deleted the fix/command-line-documentation branch June 30, 2026 08:05
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