welcome_args¶
-
yoda_powers.toolbox.
welcome_args
(version_arg, parser_arg)[source]¶ use this Decorator to add information to scripts with arguments
- Parameters
version_arg – the program version
parser_arg – the function which return
argparse.ArgumentParser
- Returns
- Return type
None
Notes
use at main() decorator for script with
argparse.ArgumentParser
Examples
>>> from yoda_powers.toolbox import welcome_args >>> @welcome_args(version, build_parser()) >>> def main(): >>> # some code >>> main() >>> ################################################################################ >>> # prog_name and version # >>> ################################################################################ >>> Start time: 16-09-2020 at 14:39:02 >>> Commande line run: ./filter_mummer.py -l mummer/GUY0011.pp1.fasta.PH0014.pp1.fasta.mum >>> >>> - Intput Info: >>> - debug: False >>> - plot: False >>> - scaff_min: 1000000 >>> - fragments_min: 5000 >>> - csv_file: blabla >>> PROGRAMME CODE HERE >>> Stop time: 16-09-2020 at 14:39:02 Run time: 0:00:00.139732 >>> ################################################################################ >>> # End of execution # >>> ################################################################################