예제 #1
0
파일: smoother.py 프로젝트: pgdr/ert
    def __init__(self, parent):
        super(Smoother, self).__init__("smoother", parent)

        self.addShellProperty(name="overlap_alpha",
                              getter=Smoother.getOverlapAlpha,
                              setter=Smoother.setOverlapAlpha,
                              validator=createFloatValidator(),
                              completer=None,
                              help_arguments="[alpha_value]",
                              help_message="Show or set the overlap alpha.",
                              pretty_attribute="Overlap Alpha")

        self.addShellProperty(name="std_cutoff",
                              getter=Smoother.getStdCutOff,
                              setter=Smoother.setStdCutOff,
                              validator=createFloatValidator(minimum=0),
                              completer=None,
                              help_arguments="[cutoff_value]",
                              help_message="Show or set the standard deviation cutoff value (>0).",
                              pretty_attribute="Standard Deviation Cutoff")

        self.addShellProperty(name="global_std_scaling",
                              getter=Smoother.getGlobalStdScaling,
                              setter=Smoother.setGlobalStdScaling,
                              validator=createFloatValidator(minimum=0),
                              completer=None,
                              help_arguments="[std_scaling]",
                              help_message="Show or set the global standard deviation scaling value (>0) applied to updates.",
                              pretty_attribute="Global Standard Deviation Scaling")

        self.addShellFunction(name="update",
                              function=Smoother.update,
                              help_arguments="<variable_name> <value>",
                              help_message="Set a variable value.")
예제 #2
0
파일: smoother.py 프로젝트: bramirex/ert
    def __init__(self, parent):
        super(Smoother, self).__init__("smoother", parent)

        self.addShellProperty(name="overlap_alpha",
                              getter=Smoother.getOverlapAlpha,
                              setter=Smoother.setOverlapAlpha,
                              validator=createFloatValidator(),
                              completer=None,
                              help_arguments="[alpha_value]",
                              help_message="Show or set the overlap alpha.",
                              pretty_attribute="Overlap Alpha")

        self.addShellProperty(name="std_cutoff",
                              getter=Smoother.getStdCutOff,
                              setter=Smoother.setStdCutOff,
                              validator=createFloatValidator(minimum=0),
                              completer=None,
                              help_arguments="[cutoff_value]",
                              help_message="Show or set the standard deviation cutoff value (>0).",
                              pretty_attribute="Standard Deviation Cutoff")

        self.addShellProperty(name="global_std_scaling",
                              getter=Smoother.getGlobalStdScaling,
                              setter=Smoother.setGlobalStdScaling,
                              validator=createFloatValidator(minimum=0),
                              completer=None,
                              help_arguments="[std_scaling]",
                              help_message="Show or set the global standard deviation scaling value (>0) applied to updates.",
                              pretty_attribute="Global Standard Deviation Scaling")

        self.addShellFunction(name="update",
                              function=Smoother.update,
                              help_arguments="<variable_name> <value>",
                              help_message="Set a variable value.")
예제 #3
0
    def setUp(self):
        self.properties = {
            "enabled": ("enabled", TestModel.isEnabled, TestModel.setEnabled),
            "status": ("status", TestModel.status, TestModel.setStatus),
            "priority": ("priority", TestModel.priority, TestModel.priority),
            "name": ("name", TestModel.name, None),
            "description":
            ("description", TestModel.description, TestModel.setDescription),
            "threshold":
            ("threshold", TestModel.threshold, TestModel.threshold)
        }

        self.completers = {
            "enabled": ["true", "false"],
            "status": TestModel.statusCompleter,
            "threshold": None,
            "priority": [1, 2, 3, 4, 5],
            "name": None,
            "description": None
        }

        self.validators = {
            "enabled": boolValidator,
            "status": TestModel.statusValidator,
            "threshold": createFloatValidator(0.0, 1.0),
            "priority": createListValidator(self.completers["priority"]),
            "name": None,
            "description": None
        }
예제 #4
0
    def setUp(self):
        self.properties = {
            "enabled": ("enabled", TestModel.isEnabled, TestModel.setEnabled),
            "status": ("status", TestModel.status, TestModel.setStatus),
            "priority": ("priority", TestModel.priority, TestModel.priority),
            "name": ("name", TestModel.name, None),
            "description": ("description", TestModel.description, TestModel.setDescription),
            "threshold": ("threshold", TestModel.threshold, TestModel.threshold)
        }

        self.completers = {
            "enabled": ["true", "false"],
            "status": TestModel.statusCompleter,
            "threshold": None,
            "priority": [1, 2, 3, 4, 5],
            "name": None,
            "description": None
        }

        self.validators = {
            "enabled": boolValidator,
            "status": TestModel.statusValidator,
            "threshold": createFloatValidator(0.0, 1.0),
            "priority": createListValidator(self.completers["priority"]),
            "name": None,
            "description": None
        }