Пример #1
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
Пример #2
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
Пример #3
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
Пример #4
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
Пример #5
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
Пример #6
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
Пример #7
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
Пример #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 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
Пример #10
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
Пример #11
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
Пример #12
0
 def addInternal(self):
     internal = ConfigurationLineDefinition(
         keyword=KeywordDefinition("INTERNAL"),
         arguments=[BoolArgument()],
         documentation_link="keywords/internal",
         required=False,
         group=self.group)
     return internal
Пример #13
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
Пример #14
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
Пример #15
0
 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
Пример #16
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())