Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
argv = args.cmdline
if args.append and args.overwrite:
logger.critical("You can't use both --continue and --overwrite")
sys.exit(2)
elif args.append:
append = True
elif args.overwrite:
append = False
else:
append = None
status = reprozip.tracer.trace.trace(args.cmdline[0],
argv,
Path(args.dir),
append,
args.verbosity)
reprozip.tracer.trace.write_configuration(Path(args.dir),
args.identify_packages,
args.find_inputs_outputs,
overwrite=False)
return status
The runs from the original traces are appended ('run_id' field gets
translated to avoid conflicts).
"""
traces = []
for tracepath in args.traces:
if tracepath == '-':
tracepath = Path(args.dir) / 'trace.sqlite3'
else:
tracepath = Path(tracepath)
if tracepath.is_dir():
tracepath = tracepath / 'trace.sqlite3'
traces.append(tracepath)
reprozip.traceutils.combine_traces(traces, Path(args.dir))
reprozip.tracer.trace.write_configuration(Path(args.dir),
args.identify_packages,
args.find_inputs_outputs,
overwrite=True)
def reset(args):
"""reset subcommand.
Just regenerates the configuration (config.yml) from the trace
(trace.sqlite3).
"""
reprozip.tracer.trace.write_configuration(Path(args.dir),
args.identify_packages,
args.find_inputs_outputs,
overwrite=True)