#!python

from argparse import ArgumentParser
from provenance_tools.write_provenance_data import write_provenance_data


desc = """Generate provenace information for the specified file. Provenance
information for file 'f' will be stored in 'f.provenance_info.xml'"""

parser = ArgumentParser(description=desc)
parser.add_argument('-f',
    help='File for which to generate provenance information', dest='f', \
    metavar='<string>', default=None)
parser.add_argument('--aux_file_deps',
    help='In some cases, a file might depend on other data files but may \
    itself be generated by third-party software that makes it difficult \
    to seemless track provenance information across the processing \
    pipeline. By specifying here a comma-separated list of file names \
    (including the complete paths) on which a third-party processing \
    operation depends, we can partially track information necessary to \
    recreate the data file. Note, however, that this is not optimal. \
    Ideally, one would also want to track all details of the processing \
    operation itself (parameter settings, code version, etc), but this \
    can be challenging in certain special circumstances.',
    dest='aux_file_deps', metavar='<string>', default=None)

op = parser.parse_args()

write_provenance_data(op.f, write_generator_info=False,
                      aux_file_deps=op.aux_file_deps)
