:py:mod:`hazimp.pipeline` ========================= .. py:module:: hazimp.pipeline .. autoapi-nested-parse:: The purpose of this module is to provide objects to process a series of :class:`Job` functions in a sequential order. The order is determined by the queue of :class:`Job`. Typically, a :class:`PipeLine` is created through pre-defined :ref:`templates` that have been built into HazImp already. These templates ensure the correct set of jobs are executed, in the correct order, for given use cases. It's also possible to build a :class:`PipeLine` manually, using the :meth:`PipeLine.add_job` method to add more jobs. .. warning:: The order of jobs in a :class:`PipeLine` is important. The existing templates ensure correct order of the jobs. If creating a :class:`PipeLine` manually, the user will be responsible for ensuring the correct order of jobs. A `RuntimeError` is raised if the order is incorrect, and we recommend any new job pipelines are adapted from the existing templates. .. note:: Currently we include the :class:`SaveProvenance` job in the templates, so a manually defined :class:`PipeLine` will have to explicitly include that at the end to ensure provenance information is captured. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: hazimp.pipeline.PipeLine Attributes ~~~~~~~~~~ .. autoapisummary:: hazimp.pipeline.log .. py:data:: log .. py:class:: PipeLine(jobs_list=None) Bases: :py:obj:`object` PipeLine allows to create a queue of jobs and execute them in order. .. py:method:: __eq__(self, other) Equal operator for pipeline .. py:method:: __ne__(self, other) Not equal operator for pipeline .. py:method:: add_job(self, a_job) Append a new job the to queue .. py:method:: run(self, context) Run all the jobs in queue, where each job take input data and write the results of calculation in context. :param context: Context object holding the i/o data for the pipelines.