feat(cli): fzd accepts --input_path/--input_variables like the other commands#69
Open
yannrichet-asnr wants to merge 1 commit into
Open
feat(cli): fzd accepts --input_path/--input_variables like the other commands#69yannrichet-asnr wants to merge 1 commit into
yannrichet-asnr wants to merge 1 commit into
Conversation
…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>
Contributor
There was a problem hiding this comment.
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_pathas an alias for--input_dirin bothfzdandfz design. - Add
--input_variables/--variablesas aliases for--input_varsin both entry points. - Add an integration test covering
fzd_mainwith the alias flags and document the change inNEWS.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 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
fzd(andfz design) named their input flags--input_dir/--input_vars, whilefzi/fzc/fzruse--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/fzrnames as aliases (samedest) on bothfzdentry points:--input_path→--input_dir--input_variables/--variables→--input_varsThe original
--input_dir/--input_varsand-i/-vare unchanged — purely additive.fzdstill has no--format, by design: it prints a convergence summary and writes the design/analysis under--results_dirrather than returning a table.Test
tests/test_fzd.py::TestFzdIntegration::test_fzd_cli_input_path_aliasesrunsfzd_mainwith--input_path/--input_variablesand asserts it succeeds.Doc follow-up
The
fzdflag-divergence note added in #68'sreference.mdshould be softened once this lands (fzd now also accepts the aliases; only the--formatdifference remains). I'll update that note on the #68 branch.🤖 Generated with Claude Code