# Path: anchorhub/exceptions/validationexception.py
# class ValidationException(Exception):
#     def __init__(self, *args, **kwargs):
#         Exception.__init__(self, *args, **kwargs)


import sys
import anchorhub.validation.validate_input as vi
import anchorhub.validation.validate_extensions as ve
import anchorhub.validation.validate_overwrite as vo
import anchorhub.validation.validate_wrapper as vw
from anchorhub.exceptions.validationexception import ValidationException
"""
validate_opts.py - Functions for validating parsed command line arguments.
"""



def validate(opts):
    """
    Client facing validate function for command line arguments.

    Perform validation operations on opts, a namespace created from
    command line arguments. Returns True if all validation tests are successful.
    If an exception is raised by the validations, this gracefully exits the
    program and leaves a message to the user.

    Required attributes on opts:
    * input: String giving the path to input files
    * output: String giving the path to output destination
    * wrapper: String specifying the wrapper format
    * extensions: List of strings specifying the file extensions to look for
    * overwrite: Boolean specifying whether the original input files should
                 be overridden

    :param opts: namespace containing necessary parameters
    :return: True, if all tests are successful
    """
    try:
        return _validate(opts)

# Path: anchorhub/exceptions/validationexception.py
# class ValidationException(Exception):
#     def __init__(self, *args, **kwargs):
#         Exception.__init__(self, *args, **kwargs)


# Path: anchorhub/validation/validate_opts.py
import sys
import anchorhub.validation.validate_input as vi
import anchorhub.validation.validate_extensions as ve
import anchorhub.validation.validate_overwrite as vo
import anchorhub.validation.validate_wrapper as vw
from anchorhub.exceptions.validationexception import ValidationException

"""
validate_opts.py - Functions for validating parsed command line arguments.
"""



def validate(opts):
    """
    Client facing validate function for command line arguments.

    Perform validation operations on opts, a namespace created from
    command line arguments. Returns True if all validation tests are successful.
    If an exception is raised by the validations, this gracefully exits the
    program and leaves a message to the user.

    Required attributes on opts:
    * input: String giving the path to input files
    * output: String giving the path to output destination
    * wrapper: String specifying the wrapper format
    * extensions: List of strings specifying the file extensions to look for
    * overwrite: Boolean specifying whether the original input files should
                 be overridden

    :param opts: namespace containing necessary parameters
    :return: True, if all tests are successful
    """
    try:
        return _validate(opts)

    except ValidationException as e: