<commit_before>================
PipelineFunction
================

.. class:: PipelineFunction

Transforms data streams in a pipeline.

.. snippet-display:: pipeline

.. class:: Rollup

   A rollup downsamples sensor data by applying a folding function over all
   points that fall within a given time period. For example, the maximum within
   each 1-hour period.

   Rollups are defined by a folding function and a time period.


   **Name:** ``rollup``

   **Arguments:**

   =======  =====================  ===========
   Name     Type                   Description
   =======  =====================  ===========
   fold     :class:`Fold`          Folding function to apply
   period   :class:`Period`        Time period for performing the rollup
   start    :class:`DateTime`      Same as the start time in the read interval
   =======  =====================  ===========

.. todo:: note about start param in rollups


.. class:: MultiRollup

   The multi-rollup function applies several folds to the same sensor data. The
   result will contain multiple streams for each sensor, one per rollup function.

   **Name:** ``multi_rollup``

   **Arguments:**

   =======  ======================  ===========
   Name     Type                    Description
   =======  ======================  ===========
   folds    Array of :class:`Fold`  The list of folding functions to apply
   period   :class:`Period`         Time period for performing the rollup
   start    :class:`DateTime`       Same as the start time in the read interval
   =======  ======================  ===========


.. only:: dev

  .. todo:: Decide if interpolate/aggregate are ready to be exposed publicly

  .. class:: Interpolate

     **Name:** ``interpolate``

     **Arguments:**

     ========  ==================  ===========
     Name      Type                Description
     ========  ==================  ===========
     function  "linear" or "zoh"   The interpolation function to use
     period    :class:`Period`     Period to interpolate to
     start     :class:`DateTime`   Same as the start time in the read interval
     stop      :class:`DateTime`   Same as the stop time in the read interval
     ========  ==================  ===========


  .. class:: Aggregate

     **Name:** ``aggregation``

     **Arguments:**

     ========  ==================  ===========
     Name      Type                Description
     ========  ==================  ===========
     function  :class:`Fold`       The aggregation function to use
     ========  ==================  ===========


.. class:: Find

   Find is similar to a rollup, but it returns an actual data point from each
   period, based on the predicate function.

   **Name:** ``find``

   **Arguments:**<commit_msg>Add interpolation to published docs<commit_after>================
PipelineFunction
================

.. class:: PipelineFunction

Transforms data streams in a pipeline.

.. snippet-display:: pipeline

.. class:: Rollup

   A rollup downsamples sensor data by applying a folding function over all
   points that fall within a given time period. For example, the maximum within
   each 1-hour period.

   Rollups are defined by a folding function and a time period.


   **Name:** ``rollup``

   **Arguments:**

   =======  =====================  ===========
   Name     Type                   Description
   =======  =====================  ===========
   fold     :class:`Fold`          Folding function to apply
   period   :class:`Period`        Time period for performing the rollup
   start    :class:`DateTime`      Same as the start time in the read interval
   =======  =====================  ===========

.. todo:: note about start param in rollups


.. class:: MultiRollup

   The multi-rollup function applies several folds to the same sensor data. The
   result will contain multiple streams for each sensor, one per rollup function.

   **Name:** ``multi_rollup``

   **Arguments:**

   =======  ======================  ===========
   Name     Type                    Description
   =======  ======================  ===========
   folds    Array of :class:`Fold`  The list of folding functions to apply
   period   :class:`Period`         Time period for performing the rollup
   start    :class:`DateTime`       Same as the start time in the read interval
   =======  ======================  ===========



.. class:: Interpolate

   **Name:** ``interpolate``

   **Arguments:**

   ========  ==================  ===========
   Name      Type                Description
   ========  ==================  ===========
   function  "linear" or "zoh"   The interpolation function to use
   period    :class:`Period`     Period to interpolate to
   start     :class:`DateTime`   Same as the start time in the read interval
   stop      :class:`DateTime`   Same as the stop time in the read interval
   ========  ==================  ===========


.. only:: dev

  .. class:: Aggregate

     **Name:** ``aggregation``

     **Arguments:**

     ========  ==================  ===========
     Name      Type                Description
     ========  ==================  ===========
     function  :class:`Fold`       The aggregation function to use
     ========  ==================  ===========


.. class:: Find

   Find is similar to a rollup, but it returns an actual data point from each
   period, based on the predicate function.

   **Name:** ``find``

   **Arguments:**
{'fraction_non_alphanumeric': 0.24287552858981432, 'fraction_numerical': 0.00036771465342893915, 'mean_word_length': 2.8175438596491227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7375528', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1213, 'n_words': 495}