<commit_before># -*- coding: utf-8 -*-


from dp_tornado.engine.engine import Engine as dpEngine
from dp_tornado.engine.bootstrap import Bootstrap as EngineBootstrap
from dp_tornado.version import __version_info__


class CliHandler(dpEngine):
    def __init__(self):
        import argparse

        parser = argparse.ArgumentParser()

        args = [
            ['action', {'nargs': 1}],
            ['options', {'nargs': '*'}],
            ['--identifier', {'help': 'Identifier'}],
            ['--dryrun', {'help': 'Dryrun'}],
            ['--template', {'help': 'Template Name', 'default': 'helloworld'}],
            ['--path', {'help': 'App Path'}],
            ['--port', {'help': 'Binding port', 'type': int}]
        ]

        for e in args:
            parser.add_argument(e[0], **e[1])

        self.parser = parser
        self.args, self.args_unknown = parser.parse_known_args()
        self.cwd = self.helper.io.path.cwd()

    def main(self):
        self.logging.info('------------------------')
        self.logging.info('* dp for Python v%s' % '.'.join([str(e) for e in __version_info__]))
        self.logging.info('------------------------')

        for e in self.args.options:
            if not self.args.path:
                path = self.helper.io.path.join(self.cwd, e)

                if self.helper.io.path.is_file(path) or \
                        (self.helper.io.path.mkdir(path) and self.helper.io.path.is_dir(path)):
                    self.args.path = e
<commit_msg>modify help for dryrun option.<commit_after># -*- coding: utf-8 -*-


from dp_tornado.engine.engine import Engine as dpEngine
from dp_tornado.engine.bootstrap import Bootstrap as EngineBootstrap
from dp_tornado.version import __version_info__


class CliHandler(dpEngine):
    def __init__(self):
        import argparse

        parser = argparse.ArgumentParser()

        args = [
            ['action', {'nargs': 1}],
            ['options', {'nargs': '*'}],
            ['--identifier', {'help': 'Identifier'}],
            ['--dryrun', {'help': 'Dryrun, If this value specified `yes` then enabled.'}],
            ['--template', {'help': 'Template Name', 'default': 'helloworld'}],
            ['--path', {'help': 'App Path'}],
            ['--port', {'help': 'Binding port', 'type': int}]
        ]

        for e in args:
            parser.add_argument(e[0], **e[1])

        self.parser = parser
        self.args, self.args_unknown = parser.parse_known_args()
        self.cwd = self.helper.io.path.cwd()

    def main(self):
        self.logging.info('------------------------')
        self.logging.info('* dp for Python v%s' % '.'.join([str(e) for e in __version_info__]))
        self.logging.info('------------------------')

        for e in self.args.options:
            if not self.args.path:
                path = self.helper.io.path.join(self.cwd, e)

                if self.helper.io.path.is_file(path) or \
                        (self.helper.io.path.mkdir(path) and self.helper.io.path.is_dir(path)):
                    self.args.path = e

{'fraction_non_alphanumeric': 0.18977864583333334, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 1.893596986817326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5477428', 'n_tokens_mistral': 944, 'n_tokens_neox': 905, 'n_words': 211}