Add support for template, configuration, and evaluation file paths#266
Add support for template, configuration, and evaluation file paths#266spateluf04 wants to merge 1 commit into
Conversation
Review Summary by QodoAdd CLI arguments for custom configuration file paths
WalkthroughsDescription• Add CLI arguments for custom template, config, and evaluation file paths • Allow users to override default file detection with explicit paths • Support -tF/--templateFile, -cF/--configFile, -eF/--evaluationFile flags • Update file path resolution logic to prioritize CLI arguments over directory detection Diagramflowchart LR
CLI["CLI Arguments<br/>-tF, -cF, -eF"]
Logic["Path Resolution<br/>Logic"]
Default["Default Directory<br/>Detection"]
Files["Template, Config,<br/>Evaluation Files"]
CLI -- "if provided" --> Logic
Default -- "if not provided" --> Logic
Logic -- "resolves to" --> Files
File Changes1. main.py
|
Code Review by Qodo
1. Missing invalid-path error handling
|
| local_config_path = ( | ||
| Path(args["config_path"]) | ||
| if args.get("config_path") | ||
| else curr_dir.joinpath(CONFIG_FILENAME) | ||
| ) |
There was a problem hiding this comment.
How about passing a default arg to .get()
| local_config_path = ( | |
| Path(args["config_path"]) | |
| if args.get("config_path") | |
| else curr_dir.joinpath(CONFIG_FILENAME) | |
| ) | |
| local_config_path = args.get("config_path", curr_dir.joinpath(CONFIG_FILENAME)) |
| ) | ||
|
|
||
| argparser.add_argument( | ||
| "-tF", |
There was a problem hiding this comment.
shorthands should be single letter, multiple letter short hands are for combining multiple different shorthands
Udayraj123
left a comment
There was a problem hiding this comment.
Thanks for the crisp PR, can you add a testing video or even better if possible - a unit test that checks this?
Feature: Support CLI arguments for config files
Adds support for passing config files
*templateFile
*configFile
*evaluationFile
Users can now specifically choose JSON paths instead of only on detection from the directory
Closes #201