def addStopLongRunning(self):
     stop_long_running = ConfigurationLineDefinition(keyword=KeywordDefinition("STOP_LONG_RUNNING"),
                                                     arguments=[BoolArgument()],
                                                     documentation_link="keywords/stop_long_running",
                                                     required=False,
                                                     group=self.group)
     return stop_long_running
示例#2
0
 def addInternal(self):
     internal = ConfigurationLineDefinition(keyword=KeywordDefinition("INTERNAL"),
                                            arguments=[BoolArgument()],
                                            documentation_link="keywords/internal",
                                            required=False,
                                            group=self.group)
     return internal
示例#3
0
 def addEnkfPenPress(self):
     enkf_pen_press = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_PEN_PRESS"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_pen_press",
         required=False,
         group=self.group)
     return enkf_pen_press
示例#4
0
 def addEnkfLocalCv(self):
     enkf_local_cv = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_LOCAL_CV"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_local_cv",
         required=False,
         group=self.group)
     return enkf_local_cv
示例#5
0
 def addEnkfForceNComp(self):
     enkf_force_ncomp = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_FORCE_NCOMP"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_force_ncomp",
         required=False,
         group=self.group)
     return enkf_force_ncomp
示例#6
0
 def addPlotErrorbar(self):
     plot_errorbar = ConfigurationLineDefinition(
         keyword=KeywordDefinition("PLOT_ERRORBAR"),
         arguments=[BoolArgument()],
         documentation_link="keywords/plot_errorbar",
         required=False,
         group=self.group)
     return plot_errorbar
示例#7
0
 def addUpdateResults(self):
     update_results = ConfigurationLineDefinition(
         keyword=KeywordDefinition("UPDATE_RESULTS"),
         arguments=[BoolArgument()],
         documentation_link="keywords/update_results",
         required=False,
         group=self.group)
     return update_results
示例#8
0
 def addEnkfScaling(self):
     enkf_scaling = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_SCALING"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_scaling",
         required=False,
         group=self.group)
     return enkf_scaling
示例#9
0
 def addEnkfRerun(self):
     enkf_rerun = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_RERUN"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_rerun",
         required=False,
         group=self.group)
     return enkf_rerun
示例#10
0
 def addReportLarge(self):
     report_large = ConfigurationLineDefinition(
         keyword=KeywordDefinition("REPORT_LARGE"),
         arguments=[BoolArgument()],
         documentation_link="keywords/report_large",
         required=False,
         group=self.group)
     return report_large
示例#11
0
 def addPlotRefcase(self):
     plot_refcase = ConfigurationLineDefinition(
         keyword=KeywordDefinition("PLOT_REFCASE"),
         arguments=[BoolArgument()],
         documentation_link="keywords/plot_refcase",
         required=False,
         group=self.group)
     return plot_refcase
示例#12
0
 def addMergeObservations(self):
     enkf_merge_observations = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_MERGE_OBSERVATIONS"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_merge_observations",
         required=False,
         group=self.group)
     return enkf_merge_observations
示例#13
0
 def addEnkfBootstrap(self):
     enkf_bootstrap = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENKF_BOOTSTRAP"),
         arguments=[BoolArgument()],
         documentation_link="keywords/enkf_bootstrap",
         required=False,
         group=self.group)
     return enkf_bootstrap
示例#14
0
 def addSingleNodeUpdate(self):
     single_node_update = ConfigurationLineDefinition(
         keyword=KeywordDefinition("SINGLE_NODE_UPDATE"),
         arguments=[BoolArgument()],
         documentation_link="keywords/single_node_update",
         required=False,
         group=self.group)
     return single_node_update
示例#15
0
 def addIgnoreSchedule(self):
     ignore_schedule = ConfigurationLineDefinition(
         keyword=KeywordDefinition("IGNORE_SCHEDULE"),
         arguments=[BoolArgument()],
         documentation_link="keywords/ignore_schedule",
         required=False,
         group=self.group)
     return ignore_schedule
示例#16
0
 def addPreClearRunpath(self):
     pre_clear_runpath = ConfigurationLineDefinition(
         keyword=KeywordDefinition("PRE_CLEAR_RUNPATH"),
         arguments=[BoolArgument()],
         documentation_link="keywords/pre_clear_runpath",
         required=False,
         group=self.group)
     return pre_clear_runpath
示例#17
0
    def test_bool_argument(self):
        bool_arg = BoolArgument()

        validation_status = bool_arg.validate("TRUE")
        self.assertTrue(validation_status)
        self.assertTrue(validation_status.value())
        self.assertEqual(validation_status.message(), "")

        validation_status = bool_arg.validate("FALSE")
        self.assertTrue(validation_status)
        self.assertFalse(validation_status.value())
        self.assertEqual(validation_status.message(), "")

        validation_status = bool_arg.validate("True")
        self.assertTrue(validation_status)

        validation_status = bool_arg.validate("False")
        self.assertTrue(validation_status)

        validation_status = bool_arg.validate(" FALSE")
        self.assertFalse(validation_status)
        self.assertEqual(validation_status.message(), bool_arg.NOT_BOOL)

        self.assertTrue(bool_arg.validate("T"))
        self.assertTrue(bool_arg.validate("F"))
        self.assertTrue(bool_arg.validate("0"))
        self.assertTrue(bool_arg.validate("1"))
        self.assertTrue(bool_arg.validate("TrUe"))
        self.assertTrue(bool_arg.validate("FaLsE"))

        self.assertFalse(bool_arg.validate("t"))
        self.assertFalse(bool_arg.validate("f"))
        self.assertFalse(bool_arg.validate("Tr"))

        self.assertTrue(bool_arg.validate("T").value())
        self.assertFalse(bool_arg.validate("F").value())
示例#18
0
    def test_bool_argument(self):
        bool_arg = BoolArgument()

        validation_status = bool_arg.validate("TRUE")
        self.assertTrue(validation_status)
        self.assertTrue(validation_status.value())
        self.assertEqual(validation_status.message(), "")

        validation_status = bool_arg.validate("FALSE")
        self.assertTrue(validation_status)
        self.assertFalse(validation_status.value())
        self.assertEqual(validation_status.message(), "")

        validation_status = bool_arg.validate("True")
        self.assertTrue(validation_status)

        validation_status = bool_arg.validate("False")
        self.assertTrue(validation_status)

        validation_status = bool_arg.validate(" FALSE")
        self.assertFalse(validation_status)
        self.assertEqual(validation_status.message(), bool_arg.NOT_BOOL)

        self.assertTrue(bool_arg.validate("T"))
        self.assertTrue(bool_arg.validate("F"))
        self.assertTrue(bool_arg.validate("0"))
        self.assertTrue(bool_arg.validate("1"))
        self.assertTrue(bool_arg.validate("TrUe"))
        self.assertTrue(bool_arg.validate("FaLsE"))

        self.assertFalse(bool_arg.validate("t"))
        self.assertFalse(bool_arg.validate("f"))
        self.assertFalse(bool_arg.validate("Tr"))

        self.assertTrue(bool_arg.validate("T").value())
        self.assertFalse(bool_arg.validate("F").value())