<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function

from marshmallow import Schema, fields, post_load

from polyaxon_schemas.base import BaseConfig


class GlobalConfigurationSchema(Schema):
    verbose = fields.Bool(allow_none=True)
    host = fields.Str(allow_none=True)
    working_directory = fields.Str(allow_none=True)

    class Meta:
        ordered = True

    @post_load
    def make(self, data):
        return GlobalConfigurationConfig(**data)


class GlobalConfigurationConfig(BaseConfig):
    SCHEMA = GlobalConfigurationSchema
    IDENTIFIER = 'global'

    def __init__(self, verbose=False, host='localhost', working_directory='.'):
        self.verbose = verbose
        self.host = host
        self.working_directory = working_directory<commit_msg>Update global config<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function

from marshmallow import Schema, fields, post_load, post_dump

from polyaxon_schemas.base import BaseConfig


class GlobalConfigurationSchema(Schema):
    verbose = fields.Bool(allow_none=True)
    host = fields.Str(allow_none=True)
    working_directory = fields.Str(allow_none=True)

    class Meta:
        ordered = True

    @post_load
    def make(self, data):
        return GlobalConfigurationConfig(**data)

    @post_dump
    def unmake(self, data):
        return GlobalConfigurationConfig.remove_reduced_attrs(data)


class GlobalConfigurationConfig(BaseConfig):
    SCHEMA = GlobalConfigurationSchema
    IDENTIFIER = 'global'

    def __init__(self, verbose=False, host='localhost', working_directory='.'):
        self.verbose = verbose
        self.host = host
        self.working_directory = working_directory
{'fraction_non_alphanumeric': 0.08757062146892655, 'fraction_numerical': 0.0011299435028248588, 'mean_word_length': 4.03125, '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': '3390814', 'n_tokens_mistral': 504, 'n_tokens_neox': 475, 'n_words': 116}