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