Skip to content

[cli][doc] Add benchmarks against bc and python + Add shell completion guide in user manual#204

Merged
forfudan merged 4 commits intodevfrom
cli
Apr 11, 2026
Merged

[cli][doc] Add benchmarks against bc and python + Add shell completion guide in user manual#204
forfudan merged 4 commits intodevfrom
cli

Conversation

@forfudan
Copy link
Copy Markdown
Owner

@forfudan forfudan commented Apr 11, 2026

This PR expands the CLI’s documentation and validation tooling by adding an end-to-end benchmark suite (vs bc and python3) and improving CLI file-mode test coverage using checked-in fixture files.

Changes:

  • Add benches/cli/bench_cli.sh and wire it into pixi run bench cli.
  • Expand tests/test_cli.sh file-mode coverage using new fixtures under tests/cli/test_data/.
  • Document shell completion setup and publish performance/benchmark guidance in the user manual, plans, and changelog.

Copy link
Copy Markdown

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 expands the CLI’s documentation and validation tooling by adding an end-to-end benchmark suite (vs bc and python3) and improving CLI file-mode test coverage using checked-in fixture files.

Changes:

  • Add benches/cli/bench_cli.sh and wire it into pixi run bench cli.
  • Expand tests/test_cli.sh file-mode coverage using new fixtures under tests/cli/test_data/.
  • Document shell completion setup and publish performance/benchmark guidance in the user manual, plans, and changelog.

Reviewed changes

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

Show a summary per file
File Description
tests/test_cli.sh Reworks file-mode tests to use committed fixture files instead of temp files; adds broader file-mode scenarios.
tests/cli/test_data/basic.dm Adds a baseline file-mode fixture (constants + arithmetic).
tests/cli/test_data/comments.txt Adds a fixture covering comments/blank lines/inline comments/whitespace handling.
tests/cli/test_data/edge_cases.dm Adds a fixture for zero/negative/unary minus/parentheses/power edge cases.
tests/cli/test_data/precision.dm Adds high-precision stress fixture (repeating decimals, cancellation, near-integer constants).
tests/cli/test_data/torture Adds complex-expression fixture to stress tokenizer/parser/evaluator paths.
pixi.toml Ensures CLI binary is built before running tests and testcli.
docs/user_manual_cli.md Adds “Shell Completions” section and a “Performance” section referencing the benchmark suite.
docs/plans/cli_calculator.md Marks performance validation and CLI documentation items as completed with references.
docs/changelog.md Documents shell completion docs and the new CLI benchmark suite.
benches/run_bench.sh Adds cli as a benchmark type and dispatches to the new shell benchmark script.
benches/cli/bench_cli.sh Introduces correctness + timing comparisons vs bc and python3 across multiple expressions/precisions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@forfudan forfudan merged commit d8865df into dev Apr 11, 2026
11 checks passed
@forfudan forfudan deleted the cli branch April 11, 2026 23:44
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