<commit_before>#!/usr/bin/python
import re
import os
import yaml
import urllib2
from logger import Logger
from serverconfig import ServerConfig

class ConfigValidator(object):

    PLUGINS_DIR = "data/plugins"

    def __init__(self, cfg_file="csgo.conf"):
        self._logger= Logger()
        self._config = ServerConfig()

        self._root_dir = self._config.get("csgo.root_directory")
        self._fastdl_url = self._config.get("csgo.fastdl_server")
        self._maps = self._config.get("csgo.maps")
        self._plugins = self._config.get("sourcemod.plugins")

        self._logger.info("csgo config file validation initialized")

    def validate(self):
        """
            validate csgo config
        """
        if not self.validate_maps():
            return False
        if not self.validate_plugins():
            return False

        return True

    def validate_plugins(self):
        """
            check if all listed plugins are
            available in data/plugins directory
        """
        self._logger.info("validating plugins ...")<commit_msg>update paths<commit_after>#!/usr/bin/python
import re
import os
import yaml
import urllib2
from logger import Logger
from serverconfig import ServerConfig

class ConfigValidator(object):

    PLUGINS_DIR = os.path.join(os.path.os.getcwd(), "data/plugins")

    def __init__(self, cfg_file="csgo.conf"):
        self._logger= Logger()
        self._config = ServerConfig()

        self._root_dir = self._config.get("csgo.root_directory")
        self._fastdl_url = self._config.get("csgo.fastdl_server")
        self._maps = self._config.get("csgo.maps")
        self._plugins = self._config.get("sourcemod.plugins")

        self._logger.info("csgo config file validation initialized")

    def validate(self, args):
        """
            validate csgo config
        """
        if not self.validate_maps():
            return False
        if not self.validate_plugins():
            return False

        return True

    def validate_plugins(self):
        """
            check if all listed plugins are
            available in data/plugins directory
        """
        self._logger.info("validating plugins ...")
{'fraction_non_alphanumeric': 0.10380779691749774, 'fraction_numerical': 0.0009066183136899365, 'mean_word_length': 2.41112828438949, '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': '7624977', 'n_tokens_mistral': 610, 'n_tokens_neox': 590, 'n_words': 147}