<commit_before># -*- coding: utf-8 -*-
'''
Sync custom types to the Master
'''
from __future__ import absolute_import

# Import python libs
import logging

# Import salt libs
import salt.utils.extmods

log = logging.getLogger(__name__)


def sync_all(saltenv=None):
    '''
    Sync all custom types

    CLI Example:

    .. code-block:: bash

        salt '*' saltutil.sync_all
    '''
    log.debug('Syncing all')
    ret = {}
    ret['modules'] = sync_modules(saltenv=saltenv)
    ret['states'] = sync_states(saltenv=saltenv)
    ret['grains'] = sync_grains(saltenv=saltenv)
    ret['renderers'] = sync_renderers(saltenv=saltenv)
    ret['returners'] = sync_returners(saltenv=saltenv)
    ret['output'] = sync_output(saltenv=saltenv)
    ret['proxymodules'] = sync_proxymodules(saltenv=saltenv)
    ret['runners'] = sync_runners(saltenv=saltenv)
    ret['wheel'] = sync_wheel(saltenv=saltenv)
    ret['engines'] = sync_engines(saltenv=saltenv)
    return ret


def sync_modules(saltenv='base'):
    '''
    Sync execution modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_modules
    '''
    return salt.utils.extmods.sync(__opts__, 'modules', saltenv=saltenv)[0]


def sync_states(saltenv='base'):
    '''
    Sync state modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_states
    '''
    return salt.utils.extmods.sync(__opts__, 'states', saltenv=saltenv)[0]


def sync_grains(saltenv='base'):
    '''
    Sync grains modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_grains
    '''
    return salt.utils.extmods.sync(__opts__, 'grains', saltenv=saltenv)[0]


def sync_renderers(saltenv='base'):
    '''
    Sync renderer modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_renderers
    '''
    return salt.utils.extmods.sync(__opts__, 'renderers', saltenv=saltenv)[0]


def sync_returners(saltenv='base'):
    '''
    Sync returner modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_returners
    '''
    return salt.utils.extmods.sync(__opts__, 'returners', saltenv=saltenv)[0]


def sync_output(saltenv='base'):
    '''
    Sync output modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_output
    '''
    return salt.utils.extmods.sync(__opts__, 'output', saltenv=saltenv)[0]


def sync_proxymodules(saltenv='base'):
    '''
    Sync proxy modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_proxy
    '''
    return salt.utils.extmods.sync(__opts__, 'proxy', saltenv=saltenv)[0]


def sync_runners(saltenv='base'):
    '''
    Sync runners to the Master's :conf_master:`extension_modules` directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_runners
    '''
    return salt.utils.extmods.sync(__opts__, 'runners', saltenv=saltenv)[0]


def sync_wheel(saltenv='base'):
    '''
    Sync wheel modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_wheel
    '''
    return salt.utils.extmods.sync(__opts__, 'wheel', saltenv=saltenv)[0]


def sync_engines(saltenv='base'):
    '''
    Sync engine modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_engines
    '''
    return salt.utils.extmods.sync(__opts__, 'engines', saltenv=saltenv)[0]
<commit_msg>Add function to sync queues to saltutil runner<commit_after># -*- coding: utf-8 -*-
'''
Sync custom types to the Master
'''
from __future__ import absolute_import

# Import python libs
import logging

# Import salt libs
import salt.utils.extmods

log = logging.getLogger(__name__)


def sync_all(saltenv=None):
    '''
    Sync all custom types

    CLI Example:

    .. code-block:: bash

        salt '*' saltutil.sync_all
    '''
    log.debug('Syncing all')
    ret = {}
    ret['modules'] = sync_modules(saltenv=saltenv)
    ret['states'] = sync_states(saltenv=saltenv)
    ret['grains'] = sync_grains(saltenv=saltenv)
    ret['renderers'] = sync_renderers(saltenv=saltenv)
    ret['returners'] = sync_returners(saltenv=saltenv)
    ret['output'] = sync_output(saltenv=saltenv)
    ret['proxymodules'] = sync_proxymodules(saltenv=saltenv)
    ret['runners'] = sync_runners(saltenv=saltenv)
    ret['wheel'] = sync_wheel(saltenv=saltenv)
    ret['engines'] = sync_engines(saltenv=saltenv)
    ret['queues'] = sync_queues(saltenv=saltenv)
    return ret


def sync_modules(saltenv='base'):
    '''
    Sync execution modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_modules
    '''
    return salt.utils.extmods.sync(__opts__, 'modules', saltenv=saltenv)[0]


def sync_states(saltenv='base'):
    '''
    Sync state modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_states
    '''
    return salt.utils.extmods.sync(__opts__, 'states', saltenv=saltenv)[0]


def sync_grains(saltenv='base'):
    '''
    Sync grains modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_grains
    '''
    return salt.utils.extmods.sync(__opts__, 'grains', saltenv=saltenv)[0]


def sync_renderers(saltenv='base'):
    '''
    Sync renderer modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_renderers
    '''
    return salt.utils.extmods.sync(__opts__, 'renderers', saltenv=saltenv)[0]


def sync_returners(saltenv='base'):
    '''
    Sync returner modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_returners
    '''
    return salt.utils.extmods.sync(__opts__, 'returners', saltenv=saltenv)[0]


def sync_output(saltenv='base'):
    '''
    Sync output modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_output
    '''
    return salt.utils.extmods.sync(__opts__, 'output', saltenv=saltenv)[0]


def sync_proxymodules(saltenv='base'):
    '''
    Sync proxy modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_proxy
    '''
    return salt.utils.extmods.sync(__opts__, 'proxy', saltenv=saltenv)[0]


def sync_runners(saltenv='base'):
    '''
    Sync runners to the Master's :conf_master:`extension_modules` directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_runners
    '''
    return salt.utils.extmods.sync(__opts__, 'runners', saltenv=saltenv)[0]


def sync_wheel(saltenv='base'):
    '''
    Sync wheel modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_wheel
    '''
    return salt.utils.extmods.sync(__opts__, 'wheel', saltenv=saltenv)[0]


def sync_engines(saltenv='base'):
    '''
    Sync engine modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_engines
    '''
    return salt.utils.extmods.sync(__opts__, 'engines', saltenv=saltenv)[0]


def sync_queues(saltenv='base'):
    '''
    Sync queue modules to the Master's :conf_master:`extension_modules`
    directory

    CLI Example:

    .. code-block:: bash

        salt-run saltutil.sync_queues
    '''
    return salt.utils.extmods.sync(__opts__, 'queues', saltenv=saltenv)[0]

{'fraction_non_alphanumeric': 0.1270358306188925, 'fraction_numerical': 0.0027747617324164553, 'mean_word_length': 3.388565378507147, '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': '7625830', 'n_tokens_mistral': 2890, 'n_tokens_neox': 2718, 'n_words': 551}