Skip to content

CLI overhaul, again#115

Open
minsungc wants to merge 2 commits intomainfrom
mc-cli-error
Open

CLI overhaul, again#115
minsungc wants to merge 2 commits intomainfrom
mc-cli-error

Conversation

@minsungc
Copy link
Contributor

@minsungc minsungc commented Oct 3, 2025

This PR overhauls the CLI so that

  1. We now have default arguments. The default is writing a foo.lqp file to foo.bin and similarly so for directories. So now you can just do
lqp foo.lqp
  1. There's been some confusion on how --bin, --json, and --out interact with each other. Now we make this explicit by having a --format argument where BIN and JSON emitting is explicitly specified. --out has not changed in behavior.

@minsungc minsungc requested a review from Copilot October 3, 2025 14:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR overhauls the CLI interface for the LQP parser to provide clearer argument semantics and better default behavior. The main changes are replacing separate --bin/--json flags with a unified --format argument and adding default output paths so users can simply run lqp foo.lqp without additional arguments.

  • Replaces --bin, --json, and --out flags with --format and -o/--out for clearer argument handling
  • Adds default behavior where foo.lqp outputs to foo.bin (or foo.json with --format json)
  • Consolidates file and directory processing logic to use the new argument structure

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
python-tools/src/lqp/parser.py Refactored CLI argument parsing and processing functions to use new format/output structure
python-tools/README.md Updated documentation to reflect new CLI usage patterns and examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

else:
raise ValueError(f"Unsupported format: {format_type}")

def process_directory(lqp_directory, format_type, output_base, output_to_stdout, validate=True):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe i missed something, is output_base used? Maybe we should also support something like lqp -o output/folder input/folder?

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.

2 participants

Comments