# Path: dgitcore/plugins/common.py
# def plugins_get_mgr():
#     """
#     Get the global plugin manager
#     """
#     global pluginmgr
#     return pluginmgr
# 
# Path: dgitcore/helper.py
# def log_repo_action(func): 
#     """
#     Log all repo actions to .dgit/log.json 
#     """
#         
#     def _inner(*args, **kwargs):
#         result = func(*args, **kwargs)         
#         log_action(func, result, *args, **kwargs)
#         return result 
#         
#     _inner.__name__ = func.__name__
#     _inner.__doc__ = func.__doc__
#     return _inner


import os, sys, json
from ..plugins.common import plugins_get_mgr
from ..helper import log_repo_action
                validators[v]['rules-files'] = matching_files

    return validators

@log_repo_action 
def validate(repo, 
             validator_name=None, 
             filename=None, 
             rulesfiles=None,
             args=[]):
    """
    Validate the content of the files for consistency. Validators can
    look as deeply as needed into the files. dgit treats them all as
    black boxes.

    Parameters
    ----------

    repo: Repository object
    validator_name: Name of validator, if any. If none, then all validators specified in dgit.json will be included.
    filename: Pattern that specifies files that must be processed by the validators selected. If none, then the default specification in dgit.json is used.
    rules: Pattern specifying the files that have rules that validators will use
    show: Print the validation results on the terminal

    Returns
    -------

    status: A list of dictionaries, each with target file processed, rules file applied, status of the validation and any error  message.
    """


# Path: dgitcore/plugins/common.py
# def plugins_get_mgr():
#     """
#     Get the global plugin manager
#     """
#     global pluginmgr
#     return pluginmgr
# 
# Path: dgitcore/helper.py
# def log_repo_action(func): 
#     """
#     Log all repo actions to .dgit/log.json 
#     """
#         
#     def _inner(*args, **kwargs):
#         result = func(*args, **kwargs)         
#         log_action(func, result, *args, **kwargs)
#         return result 
#         
#     _inner.__name__ = func.__name__
#     _inner.__doc__ = func.__doc__
#     return _inner


# Path: dgitcore/datasets/validation.py
import os, sys, json
from ..plugins.common import plugins_get_mgr
from ..helper import log_repo_action

                validators[v]['rules-files'] = matching_files

    return validators

@log_repo_action 
def validate(repo, 
             validator_name=None, 
             filename=None, 
             rulesfiles=None,
             args=[]):
    """
    Validate the content of the files for consistency. Validators can
    look as deeply as needed into the files. dgit treats them all as
    black boxes.

    Parameters
    ----------

    repo: Repository object
    validator_name: Name of validator, if any. If none, then all validators specified in dgit.json will be included.
    filename: Pattern that specifies files that must be processed by the validators selected. If none, then the default specification in dgit.json is used.
    rules: Pattern specifying the files that have rules that validators will use
    show: Print the validation results on the terminal

    Returns
    -------

    status: A list of dictionaries, each with target file processed, rules file applied, status of the validation and any error  message.
    """


    mgr = plugins_get_mgr()