Exemplo n.º 1
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
Exemplo n.º 2
0
 def addInternal(self):
     internal = ConfigurationLineDefinition(keyword=KeywordDefinition("INTERNAL"),
                                            arguments=[BoolArgument()],
                                            documentation_link="keywords/internal",
                                            required=False,
                                            group=self.group)
     return internal
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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())
Exemplo n.º 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())