def make_args()

in uberpoet/genproj.py [0:0]


    def make_args(args):
        """Parses command line arguments"""
        arg_desc = 'Generate a fake test project with many buck modules'

        parser = argparse.ArgumentParser(description=arg_desc)

        parser.add_argument('-o', '--output_directory', required=True, help='Where the mock project should be output.')
        parser.add_argument(
            '-bmp',
            '--buck_module_path',
            required=True,
            help='The root of the BUCK dependency path of the generated code.')

        parser.add_argument(
            '-gt',
            '--gen_type',
            required=True,
            choices=ModuleGenType.enum_list(),
            help='What kind of mock app generation you want.  See layer_types.md for a description of graph types.')
        parser.add_argument(
            '-wmo',
            '--use_wmo',
            default=False,
            help='Wether or not to use whole module optimization when building swift modules.')
        parser.add_argument(
            '--print_dependency_graph',
            default=False,
            help='If true, prints out the dependency edge list and exits instead of generating an application.')

        commandlineutil.AppGenerationConfig.add_app_gen_options(parser)
        args = parser.parse_args(args)
        commandlineutil.AppGenerationConfig.validate_app_gen_options(args)

        return args