<commit_before>import argparse, sys, yaml, os, logging
from craftrun import command

class Settings(object):
    """Cli and config file settings."""
    def __init__(self, cli):
        self.cli = cli

        with open(cli.config, 'r') as io:
            self.config = yaml.load(io.read())

    @property
    def base_dir(self):
        return self._absolute_path(self.config['base_dir'])

    @property
    def backup_dir(self):
        return self._absolute_path(self.config['backup_dir'])

    @property
    def server_name(self):
        return self.config['server_name']

    @property
    def java_bin(self):
        return self.config.get('java_bin', 'java')

    @property
    def server_jar(self):
        return self.config['server_jar']

    @property
    def java_args(self):
        default_args = ['-Xmx2G', '-XX:MaxPermSize=256M']
        return self.config.get('java_args', default_args)

    def _absolute_path(self, path):
        config_dir = os.path.dirname(self.cli.config)
        return os.path.realpath(os.path.join(config_dir, path))

class CraftRunCli(object):
    """
    Creates commands and runs them with apropriate settings.
    """
    def __init__(self):
        self.commands = [
            command.StartCommand,
            command.StopCommand,
            command.ConsoleCommand,
            command.BackupCommand,
        ]

    def run(self):
        parser = self.get_parser()
        parser.add_argument("-c", "--config", dest="config")
        parsed = parser.parse_args()

        logging.basicConfig(
                level=logging.DEBUG,<commit_msg>Document --config and make it required.<commit_after>import argparse, sys, yaml, os, logging
from craftrun import command

class Settings(object):
    """Cli and config file settings."""
    def __init__(self, cli):
        self.cli = cli

        with open(cli.config, 'r') as io:
            self.config = yaml.load(io.read())

    @property
    def base_dir(self):
        return self._absolute_path(self.config['base_dir'])

    @property
    def backup_dir(self):
        return self._absolute_path(self.config['backup_dir'])

    @property
    def server_name(self):
        return self.config['server_name']

    @property
    def java_bin(self):
        return self.config.get('java_bin', 'java')

    @property
    def server_jar(self):
        return self.config['server_jar']

    @property
    def java_args(self):
        default_args = ['-Xmx2G', '-XX:MaxPermSize=256M']
        return self.config.get('java_args', default_args)

    def _absolute_path(self, path):
        config_dir = os.path.dirname(self.cli.config)
        return os.path.realpath(os.path.join(config_dir, path))

class CraftRunCli(object):
    """
    Creates commands and runs them with apropriate settings.
    """
    def __init__(self):
        self.commands = [
            command.StartCommand,
            command.StopCommand,
            command.ConsoleCommand,
            command.BackupCommand,
        ]

    def run(self):
        parser = self.get_parser()
        parser.add_argument("-c", "--config", dest="config", required=True,
                            help="Server configuration.")
        parsed = parser.parse_args()

        logging.basicConfig(
                level=logging.DEBUG,
{'fraction_non_alphanumeric': 0.11986613933678127, 'fraction_numerical': 0.002433830240340736, 'mean_word_length': 2.464699683877766, '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': '1724514', 'n_tokens_mistral': 985, 'n_tokens_neox': 954, 'n_words': 207}