fzr/fzc: optional input_variables + simplified variable syntax - #82
Merged
Conversation
…fied variable syntax fzr/fzc (CLI and Python) no longer require input_variables when the input files declare no variables: the CLI can omit --input_variables, and the Python API accepts fzr(input_path, model=model, ...) without it. When the input files do declare variables and it's omitted, a clear error lists them instead of failing the generic "argument required" check. Also adds a simplified --input_variables/--input_vars syntax as an alternative to inline JSON, e.g. "a=1,b=[4,5,6],c=[0;1]", for fzc/fzr/fzd. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
SCALE (and other tools) can emit locale-encoded text (e.g. French month names in cp1252), which crashed grep-based output extraction with UnicodeDecodeError. read() now uses charset-normalizer to detect the actual encoding, falling back to Latin-1 (never fails) if detection is inconclusive. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
Summary
fzr/fzc(CLI and Python API) no longer requireinput_variableswhen the input files declare no variables (non-parametric dataset):--input_variablescan be omitted; if the input files do declare variables, the CLI errors out listing them instead of failing the generic "argument required" check.input_variablesnow defaults toNone; callfzr(input_path, model=model, ...)(keywordmodel=) to omit it. If the input files declare variables and it's omitted, aValueErrornames them.--input_variables/--input_varssyntax as an alternative to inline JSON, forfzc/fzr/fzd:--input_variables "a=1,b=[4,5,6],c=[0;1]"— scalars become int/float, bracketed comma/semicolon-separated values become a list (fzdkeeps values as strings since its algorithms parse"[min;max]"themselves).Test plan
pytest tests/test_cli_commands.py tests/test_cli_aliases.py tests/test_no_variables.py tests/test_skill_static.py -q— all passingfzr/fzcwithout--input_variableson a variable-free input (succeeds) and on a variable-declaring input (clear error naming the variable)--input_variables "a=1,b=[4,5,6]"grid expansion viafzrpytest tests/suite (in progress in background at time of PR creation; unrelated tofz/outparsers.pyWIP left out of this branch)🤖 Generated with Claude Code