datagen/cli.py
def execute(self):
        """
        Given the command-line arguments, this creates a parser appropriate
        to that command, and runs it.
        """
        here = os.path.normpath(os.path.abspath(os.path.dirname(__file__)) + os.sep + os.pardir)
        with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fp:
            README = fp.read()
        epilog = README
        formatter_class = argparse.RawDescriptionHelpFormatter
        parser = argparse.ArgumentParser(
            prog=self.prog_name,
            description='{} version {}'.format(self.prog_name, VERSION),
            epilog=epilog,
            formatter_class=formatter_class)
        
        group = parser.add_mutually_exclusive_group()
        group.add_argument("-v", "--verbose", action="store_true")
        group.add_argument("-q", "--quiet", action="store_true")
        
        parser.add_argument("action",
            metavar="action",
            choices=['execute', 'validate'],
            help="action to execute")

        parser.add_argument("inp_json",
            metavar="inp_json",
            help="input json file")
        
        arguments = parser.parse_args(self.argv[1:])

        if arguments.verbose:
            logging.basicConfig(level=logging.DEBUG)
        else:
            logging.basicConfig(level=logging.CRITICAL)

        if arguments.action == "execute":
            schema_parsed = parse_json_config(arguments.inp_json)
            if schema_parsed.names.source == "fake":
                output_df = generate_fake_df(schema_parsed)
                persist_df (schema_parsed, output_df)
        elif arguments.action == "validate":
            schema_parsed = parse_json_config(arguments.inp_json)

        Given the command-line arguments, this creates a parser appropriate
        to that command, and runs it.
        
Given the command-line arguments, this creates a parser appropriate
to that command, and runs it.
Given the command - line arguments this creates a parser appropriate to that command and runs it .
def execute(self):
        here = os.path.normpath(os.path.abspath(os.path.dirname(__file__)) + os.sep + os.pardir)
        with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fp:
            README = fp.read()
        epilog = README
        formatter_class = argparse.RawDescriptionHelpFormatter
        parser = argparse.ArgumentParser(
            prog=self.prog_name,
            description='{} version {}'.format(self.prog_name, VERSION),
            epilog=epilog,
            formatter_class=formatter_class)
        group = parser.add_mutually_exclusive_group()
        group.add_argument("-v", "--verbose", action="store_true")
        group.add_argument("-q", "--quiet", action="store_true")
        parser.add_argument("action",
            metavar="action",
            choices=['execute', 'validate'],
            help="action to execute")
        parser.add_argument("inp_json",
            metavar="inp_json",
            help="input json file")
        arguments = parser.parse_args(self.argv[1:])
        if arguments.verbose:
            logging.basicConfig(level=logging.DEBUG)
        else:
            logging.basicConfig(level=logging.CRITICAL)
        if arguments.action == "execute":
            schema_parsed = parse_json_config(arguments.inp_json)
            if schema_parsed.names.source == "fake":
                output_df = generate_fake_df(schema_parsed)
                persist_df (schema_parsed, output_df)
        elif arguments.action == "validate":
            schema_parsed = parse_json_config(arguments.inp_json)
def execute ( self ) : here = os . path . normpath ( os . path . abspath ( os . path . dirname ( __file__ ) ) + os . sep + os . pardir ) with open ( os . path . join ( here , 'README.rst' ) , encoding = 'utf-8' ) as fp : README = fp . read ( ) epilog = README formatter_class = argparse . RawDescriptionHelpFormatter parser = argparse . ArgumentParser ( prog = self . prog_name , description = '{} version {}' . format ( self . prog_name , VERSION ) , epilog = epilog , formatter_class = formatter_class ) group = parser . add_mutually_exclusive_group ( ) group . add_argument ( "-v" , "--verbose" , action = "store_true" ) group . add_argument ( "-q" , "--quiet" , action = "store_true" ) parser . add_argument ( "action" , metavar = "action" , choices = [ 'execute' , 'validate' ] , help = "action to execute" ) parser . add_argument ( "inp_json" , metavar = "inp_json" , help = "input json file" ) arguments = parser . parse_args ( self . argv [ 1 : ] ) if arguments . verbose : logging . basicConfig ( level = logging . DEBUG ) else : logging . basicConfig ( level = logging . CRITICAL ) if arguments . action == "execute" : schema_parsed = parse_json_config ( arguments . inp_json ) if schema_parsed . names . source == "fake" : output_df = generate_fake_df ( schema_parsed ) persist_df ( schema_parsed , output_df ) elif arguments . action == "validate" : schema_parsed = parse_json_config ( arguments . inp_json )
Given the command-line arguments, this creates a parser appropriate
to that command, and runs it.
Given the command - line arguments this creates a parser appropriate to that command and runs it .
"""
        Given the command-line arguments, this creates a parser appropriate
        to that command, and runs it.
        """
self