Skip to content

feat(cli): fzd accepts --input_path/--input_variables like the other commands#69

Open
yannrichet-asnr wants to merge 1 commit into
mainfrom
feat/fzd-input-flag-aliases
Open

feat(cli): fzd accepts --input_path/--input_variables like the other commands#69
yannrichet-asnr wants to merge 1 commit into
mainfrom
feat/fzd-input-flag-aliases

Conversation

@yannrichet-asnr

Copy link
Copy Markdown
Member

Why

fzd (and fz design) named their input flags --input_dir / --input_vars, while fzi/fzc/fzr use --input_path / --input_variables. The divergence is a recurring trip-up for agents and users (and had to be documented as a "quirk").

Change

Add the fzi/fzc/fzr names as aliases (same dest) on both fzd entry points:

  • --input_path--input_dir
  • --input_variables / --variables--input_vars

The original --input_dir / --input_vars and -i / -v are unchanged — purely additive.

fzd still has no --format, by design: it prints a convergence summary and writes the design/analysis under --results_dir rather than returning a table.

Test

tests/test_fzd.py::TestFzdIntegration::test_fzd_cli_input_path_aliases runs fzd_main with --input_path/--input_variables and asserts it succeeds.

Doc follow-up

The fzd flag-divergence note added in #68's reference.md should be softened once this lands (fzd now also accepts the aliases; only the --format difference remains). I'll update that note on the #68 branch.

🤖 Generated with Claude Code

…commands

fzd and the `fz design` subcommand named their input flags --input_dir and
--input_vars, diverging from fzi/fzc/fzr (--input_path / --input_variables) and
tripping muscle memory. Add the fzi/fzc/fzr names as aliases (same dest) on both
entry points: --input_path (= --input_dir) and --input_variables/--variables
(= --input_vars). The original flags and -i/-v are unchanged.

fzd still has no --format by design (it prints a convergence summary and writes
the design/analysis under --results_dir).

Add a regression test asserting fzd_main runs with the new alias flags.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 14, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aligns fzd / fz design CLI flag naming with the rest of the CLI by adding backward-compatible aliases, reducing user/agent friction from inconsistent option names.

Changes:

  • Add --input_path as an alias for --input_dir in both fzd and fz design.
  • Add --input_variables / --variables as aliases for --input_vars in both entry points.
  • Add an integration test covering fzd_main with the alias flags and document the change in NEWS.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
fz/cli.py Adds argparse aliases so fzd/fz design accept --input_path and --input_variables/--variables.
tests/test_fzd.py Adds a regression test ensuring fzd_main succeeds when invoked with the alias flags.
NEWS.md Documents the new fzd/fz design input-flag aliases and clarifies --format remains unsupported for fzd.

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

Comment thread tests/test_fzd.py
Comment on lines +196 to +208
from fz import cli
monkeypatch.setattr(sys, "argv", [
"fzd",
"--input_path", str(input_dir), # alias of --input_dir
"-m", json.dumps(model),
"--input_variables", json.dumps({"x": "[0;1]", "y": "[0;1]"}), # alias of --input_vars
"-e", "result",
"-a", algo_path,
"-o", json.dumps({"nvalues": 3, "seed": 42}),
"-r", str(Path(input_dir).parent / "fzd_alias_out"),
])
rc = cli.fzd_main()
assert rc == 0
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.

3 participants