<commit_before>""" Contains the TaskPars class and any related functions.

$Id: taskpars.py 1 2008-11-04 15:45:32Z sontag $
"""

class TaskPars:
    """ This represents a task's collection of configurable parameters.
    This class is meant to be mostly abstract, though there may be found some
    functionality to include which could be common to all derived classes.
    This also serves to document the interface which must be met for EPAR.
    """

    def getName(self, *args, **kw):
        """ Returns the string name of the task. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getPkgname(self, *args, **kw):
        """ Returns the string name of the package, if applicable. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getParList(self, *args, **kw):
        """ Returns a list of parameter objects. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getDefaultParList(self, *args, **kw):
        """ Returns a list of parameter objects with default values set. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def setParam(self, *args, **kw):
        """ Allows one to set the value of a single parameter. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getFilename(self, *args, **kw):
        """ Returns the string name of any associated config/parameter file. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def saveParList(self, *args, **kw):
        """ Allows one to save the entire set to a file. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def run(self, *args, **kw):
        """ Runs the task with the known parameters. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    # also, eparam, lParam, tParam, dParam ?<commit_msg>for pyraf ticket #87; added canPerformValidation()<commit_after>""" Contains the TaskPars class and any related functions.

$Id: taskpars.py 1 2008-11-04 15:45:32Z sontag $
"""

class TaskPars:
    """ This represents a task's collection of configurable parameters.
    This class is meant to be mostly abstract, though there is some
    functionality included which could be common to most derived classes.
    This also serves to document the interface which must be met for EPAR.
    """

    def getName(self, *args, **kw):
        """ Returns the string name of the task. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getPkgname(self, *args, **kw):
        """ Returns the string name of the package, if applicable. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getParList(self, *args, **kw):
        """ Returns a list of parameter objects. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getDefaultParList(self, *args, **kw):
        """ Returns a list of parameter objects with default values set. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def setParam(self, *args, **kw):
        """ Allows one to set the value of a single parameter. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def getFilename(self, *args, **kw):
        """ Returns the string name of any associated config/parameter file. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def saveParList(self, *args, **kw):
        """ Allows one to save the entire set to a file. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def run(self, *args, **kw):
        """ Runs the task with the known parameters. """
        raise RuntimeError("Bug: class TaskPars is not to be used directly")

    def canPerformValidation(self):
        """ Returns bool.  If True, expect tryValue() to be called next. """
        return False

    # also, eparam, lParam, tParam, dParam ?
{'fraction_non_alphanumeric': 0.10129679471494984, 'fraction_numerical': 0.007829703939319794, 'mean_word_length': 3.0757726819541378, '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': '3897876', 'n_tokens_mistral': 1122, 'n_tokens_neox': 1063, 'n_words': 512}