@@ -19,6 +19,9 @@ class ConfigRunner(object):
1919 def run (self , args ):
2020 parser = self .get_parser ()
2121 opts = parser .parse_args (args )
22+ self .do_run (opts )
23+
24+ def do_run (self , opts ):
2225 cwd = opts .cwd if opts .cwd else os .getcwd ()
2326 filters = opts .filter if opts .filter else ()
2427 excluded_keys = opts .exclude if opts .exclude else ()
@@ -31,11 +34,15 @@ def run(self, args):
3134 opts .skip_interpolation_validation )
3235
3336 @staticmethod
34- def get_parser ():
35- parser = argparse .ArgumentParser ()
36- parser .add_argument ('path' , type = str , help = 'The config directory' )
37+ def get_parser (parser = None ):
38+ if not parser :
39+ parser = argparse .ArgumentParser ()
40+ parser .add_argument ('path' , type = str , help = 'The config directory' )
41+
3742 parser .add_argument ('--output-file' , dest = 'output_file' , type = str ,
3843 help = 'output file location' )
44+ parser .add_argument ('--print-data' , action = 'store_true' ,
45+ help = 'print generated data on screen' )
3946 parser .add_argument ('--format' , dest = 'output_format' , type = str , default = "yaml" ,
4047 help = 'output file format' )
4148 parser .add_argument ('--filter' , dest = 'filter' , action = 'append' ,
0 commit comments