add comparison output, refactor main, bump python version
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
@ -33,6 +33,17 @@ def parse_inputs() -> argparse.Namespace:
|
||||
default=None,
|
||||
help="location of post.json for comparison. defaults to <flake_path>/post.json",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--compare-output-to-file",
|
||||
action="store_true",
|
||||
help="whether to output comparison output to a file",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--compare-output-file",
|
||||
metavar="compare-output-file-path",
|
||||
default=None,
|
||||
help="location of comparison output. defaults to <flake_path>/post-diff. implies --compare-output-to-file.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
if args.compare_pre_json is None:
|
||||
@ -41,4 +52,10 @@ def parse_inputs() -> argparse.Namespace:
|
||||
if args.compare_post_json is None:
|
||||
args.compare_post_json = args.flake_path + "/post.json"
|
||||
|
||||
if args.compare_output_to_file and args.compare_output_file is None:
|
||||
args.compare_output_file = args.flake_path + "/post-diff"
|
||||
|
||||
if args.compare_output_file is not None:
|
||||
args.compare_output_to_file = True
|
||||
|
||||
return args
|
||||
|
Reference in New Issue
Block a user