0

I have generated a index.rst file with sphinx:

Welcome to my_project's documentation!
=================================================

.. toctree::
   :maxdepth: 2

   modules

In modules.rst, I have:

Feature Engineering
=====================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   features_dict
   feature_eng_actes_liq

Here is an example of function you can find in feature_eng_actes_liq.py:

def my_function(a, b):
    """ Return the sum of a and b
        Parameters
        ----------
        ...
        Returns
        -------
        ...
    """
    return a + b

Now I would like that in features_dict page all my functions from feature_eng_actes_liq.py are documented with only the description of the function ("Return the sum of a and b" in the example).

I also want that in feature_eng_actes_liq all my functions from feature_eng_actes_liq.py are fully documented with description, parameters and returns.

I tried to use sphinx.ext.autodoc.between but I didn't succeed.

mzjn
  • 48,958
  • 13
  • 128
  • 248
  • So you want to document your functions twice: 1) with only the first paragraph of the docstring, and 2) one more time with all the details. Is that right? – mzjn Mar 17 '23 at 10:06
  • Exactly. You understood ! –  Mar 17 '23 at 14:54

0 Answers0