:mod:`km3pipe.shell` ==================== .. py:module:: km3pipe.shell .. autoapi-nested-parse:: Some shell helpers .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3pipe.shell.Script Functions ~~~~~~~~~ .. autoapisummary:: km3pipe.shell.qsub km3pipe.shell.gen_job km3pipe.shell.get_jpp_env .. data:: log .. data:: JOB_TEMPLATE .. function:: qsub(script, job_name, dryrun=False, *args, **kwargs) Submit a job via qsub. .. !! processed by numpydoc !! .. function:: gen_job(script, job_name, log_path='qlogs', group='km3net', platform='cl7', walltime='00:10:00', vmem='8G', fsize='8G', shell=None, email=None, send_mail='n', job_array_start=1, job_array_stop=None, job_array_step=1, irods=False, sps=True, hpss=False, xrootd=False, dcache=False, oracle=False, split_array_logs=False) Generate a job script. .. !! processed by numpydoc !! .. function:: get_jpp_env(jpp_dir) Return the environment dict of a loaded Jpp env. The returned env can be passed to `subprocess.Popen("J...", env=env)` to execute Jpp commands. .. !! processed by numpydoc !! .. py:class:: Script Bases::class:`object` A shell script which can be built line by line for `qsub`. .. !! processed by numpydoc !! .. method:: add(self, line) Add a new line .. !! processed by numpydoc !! .. method:: echo(self, text) Add an echo command. The given text will be double qouted. .. !! processed by numpydoc !! .. method:: separator(self, character='=', length=42) Add a visual separator. .. !! processed by numpydoc !! .. method:: cp(self, source, target) Add a new copy instruction .. !! processed by numpydoc !! .. method:: mv(self, source, target) Add a new move instruction .. !! processed by numpydoc !! .. method:: mkdir(self, folder_path) Add a new 'mkdir -p' instruction .. !! processed by numpydoc !! .. method:: iget(self, irods_path, attempts=1, pause=15) Add an iget command to retrieve a file from iRODS. :Parameters: **irods_path: str** Filepath which should be fetched using iget attempts: int (default: 1) Number of retries, if iRODS access fails pause: int (default: 15) Pause between two access attempts in seconds .. !! processed by numpydoc !! .. method:: clear(self)