Skip to content

Commit

Permalink
save parameter to json file
Browse files Browse the repository at this point in the history
  • Loading branch information
aormu authored and rlxdev committed Jan 9, 2025
1 parent 67abc58 commit 2d05e16
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scubagoggles/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,12 @@ def _run_reporter(self):
total_output.update({'Summary': summary})
total_output.update({'Results': results})

args_dict = vars(args)
param_out_path = out_folder / 'args_param.json'

with param_out_path.open(mode='w', encoding='UTF-8') as parm_file:
json.dump(args_dict, parm_file, indent=4)

# Create the ScubaResults files
scuba_results_file = out_folder / f'{args.outputproviderfilename}.json'
with scuba_results_file.open(encoding='UTF-8') as file:
Expand Down Expand Up @@ -389,6 +395,10 @@ def _run_cached(self):
with open(f'{args.outputpath}/{args.outputproviderfilename}.json',
'w', encoding='UTF-8') as provider_file:
json.dump(provider_output, provider_file)
args_dict = vars(args)
param_out_path = os.path.join(args.outputpath, 'args_param.json')
with open(param_out_path, mode='w', encoding='UTF-8') as parm_file:
json.dump( args_dict, parm_file, indent=4)

self._rego_eval()
self._run_reporter()
Expand Down

0 comments on commit 2d05e16

Please sign in to comment.