コード例 #1
0
    def test_path_argument(self):

        path_arg = PathArgument()

        validation_status = path_arg.validate("/non_existing_file")
        self.assertFalse(validation_status)

        validation_status = path_arg.validate(__file__)
        self.assertTrue(validation_status)
コード例 #2
0
 def addUpdateLogPath(self):
     update_log_path = ConfigurationLineDefinition(keyword=KeywordDefinition("UPDATE_LOG_PATH"),
                                                   arguments=[PathArgument()],
                                                   documentation_link="keywords/update_log_path",
                                                   required=False,
                                                   group=self.group)
     return update_log_path
コード例 #3
0
 def addEnkfSchedFile(self):
     sched_file = ConfigurationLineDefinition(keyword=KeywordDefinition("ENKF_SCHED_FILE"),
                                              arguments=[PathArgument()],
                                              documentation_link="keywords/enkf_sched_file",
                                              required=False,
                                              group=self.group)
     return sched_file
コード例 #4
0
 def addRshCommand(self):
     rsh_command = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RSH_COMMAND"),
         arguments=[PathArgument()],
         documentation_link="keywords/rsh_command",
         group=self.group)
     return rsh_command
コード例 #5
0
 def addModule(self):
     module = ConfigurationLineDefinition(
         keyword=KeywordDefinition("MODULE"),
         arguments=[PathArgument()],
         documentation_link="keywords/module",
         required=False,
         group=self.group)
     return module
コード例 #6
0
 def addLicensePath(self):
     license_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("LICENSE_PATH"),
         arguments=[PathArgument()],
         documentation_link="keywords/license_path",
         required=False,
         group=self.group)
     return license_path
コード例 #7
0
ファイル: plot_keywords.py プロジェクト: tayloris/ert
 def addImageViewer(self):
     image_viewer = ConfigurationLineDefinition(
         keyword=KeywordDefinition("IMAGE_VIEWER"),
         arguments=[PathArgument()],
         documentation_link="keywords/image_viewer",
         required=False,
         group=self.group)
     return image_viewer
コード例 #8
0
ファイル: plot_keywords.py プロジェクト: tayloris/ert
 def addRftPath(self):
     rft_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RFTPATH"),
         arguments=[PathArgument()],
         documentation_link="keywords/rftpath",
         required=False,
         group=self.group)
     return rft_path
コード例 #9
0
ファイル: plot_keywords.py プロジェクト: tayloris/ert
 def addRftConfig(self):
     rft_config = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RFT_CONFIG"),
         arguments=[PathArgument()],
         documentation_link="keywords/rft_config",
         required=False,
         group=self.group)
     return rft_config
コード例 #10
0
ファイル: advanced_keywords.py プロジェクト: tayloris/ert
 def addSchedulePredictionFile(self):
     schedule_prediction_file = ConfigurationLineDefinition(
         keyword=KeywordDefinition("SCHEDULE_PREDICTION_FILE"),
         arguments=[PathArgument()],
         documentation_link="keywords/schedule_prediction_file",
         required=False,
         group=self.group)
     return schedule_prediction_file
コード例 #11
0
 def addObsConfig(self):
     obs_config = ConfigurationLineDefinition(
         keyword=KeywordDefinition("OBS_CONFIG"),
         arguments=[PathArgument()],
         documentation_link="keywords/obs_config",
         required=False,
         group=self.group)
     return obs_config
コード例 #12
0
 def addInclude(self):
     include = ConfigurationLineDefinition(
         keyword=KeywordDefinition("INCLUDE"),
         arguments=[PathArgument()],
         documentation_link="keywords/include",
         required=False,
         group=self.group)
     return include
コード例 #13
0
 def addRefCase(self):
     refcase = ConfigurationLineDefinition(
         keyword=KeywordDefinition("REFCASE"),
         arguments=[PathArgument()],
         documentation_link="keywords/refcase",
         required=False,
         group=self.group)
     return refcase
コード例 #14
0
 def addEnsPath(self):
     ens_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("ENSPATH"),
         arguments=[PathArgument()],
         documentation_link="keywords/enspath",
         required=False,
         group=self.group)
     return ens_path
コード例 #15
0
 def addExecutable(self):
     executable = ConfigurationLineDefinition(
         keyword=KeywordDefinition("EXECUTABLE"),
         arguments=[PathArgument()],
         documentation_link="keywords/executable",
         required=False,
         group=self.group)
     return executable
コード例 #16
0
ファイル: plot_keywords.py プロジェクト: tayloris/ert
 def addPlotPath(self):
     plot_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("PLOT_PATH"),
         arguments=[PathArgument(must_exist=False)],
         documentation_link="keywords/plot_path",
         required=False,
         group=self.group)
     return plot_path
コード例 #17
0
 def addWorkflowJobDirectory(self):
     workflow_job_directory = ConfigurationLineDefinition(
         keyword=KeywordDefinition("WORKFLOW_JOB_DIRECTORY"),
         arguments=[PathArgument()],
         documentation_link="keywords/workflow_job_directory",
         required=False,
         group=self.group)
     return workflow_job_directory
コード例 #18
0
 def addQCPath(self):
     qc_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("QC_PATH"),
         arguments=[PathArgument()],
         documentation_link="keywords/qc_path",
         required=False,
         group=self.group)
     return qc_path
コード例 #19
0
 def addRunTemplate(self):
     run_template = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RUN_TEMPLATE"),
         arguments=[PathArgument(), StringArgument()],
         documentation_link="keywords/run_template",
         required=False,
         group=self.group)
     return run_template
コード例 #20
0
 def addRunpathFile(self):
     runpath_file = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RUNPATH_FILE"),
         arguments=[PathArgument()],
         documentation_link="keywords/runpath_file",
         required=False,
         group=self.group)
     return runpath_file
コード例 #21
0
 def addJobScript(self):
     job_script = ConfigurationLineDefinition(
         keyword=KeywordDefinition("JOB_SCRIPT"),
         arguments=[PathArgument()],
         documentation_link="keywords/job_script",
         required=False,
         group=self.group)
     return job_script
コード例 #22
0
 def addRunpath(self):
     runpath = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RUNPATH"),
         arguments=[PathArgument(must_exist=False)],
         documentation_link="keywords/runpath",
         required=False,
         group=self.group)
     return runpath
コード例 #23
0
 def addInstallJob(self):
     install_job = ConfigurationLineDefinition(
         keyword=KeywordDefinition("INSTALL_JOB"),
         arguments=[StringArgument(), PathArgument()],
         documentation_link="keywords/install_job",
         required=False,
         group=self.group)
     return install_job
コード例 #24
0
 def addLogFile(self):
     log_file = ConfigurationLineDefinition(
         keyword=KeywordDefinition("LOG_FILE"),
         arguments=[PathArgument()],
         documentation_link="keywords/log_file",
         required=False,
         group=self.group)
     return log_file
コード例 #25
0
 def addUpdatePath(self):
     update_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("UPDATE_PATH"),
         arguments=[StringArgument(built_in=True),
                    PathArgument()],
         documentation_link="keywords/update_path",
         required=False,
         group=self.group)
     return update_path
コード例 #26
0
ファイル: ensemble_keywords.py プロジェクト: oysteoh/ert
 def addResultPath(self):
     result_path = ConfigurationLineDefinition(
         keyword=KeywordDefinition("RESULT_PATH"),
         arguments=[PathArgument()],
         documentation_link="keywords/result_path",
         required=False,
         group=self.group,
     )
     return result_path
コード例 #27
0
 def addLoadWorkflow(self):
     load_workflow = ConfigurationLineDefinition(
         keyword=KeywordDefinition("LOAD_WORKFLOW"),
         arguments=[PathArgument(),
                    StringArgument(optional=True)],
         documentation_link="keywords/load_workflow",
         required=False,
         group=self.group)
     return load_workflow