Clean docstrings of V2
Objectives
As discussed in recent meetings, we need to take care of the docstrings of Leaspy V2. The goals are:
- make sure the docstrings exist (at least for public objects)
- make sure the docstrings are correctly formatted (Numpydoc style, cross-references etc...)
- make sure the texts of the docstrings are correct and complete (sometimes they are out-of-sync with the code, sometimes they don't make any sense, sometimes they are pretty obscure...)
- try to improve the docstrings as much as possible (add type hints, add references and so on)
Style and references
In terms of style, we use the Numpydoc style to write our docstrings, they should basically look like that:
def do_something(parameter1: int, parameter2: str = "all") -> float:
"""One line short description of what the function does.
Eventually a more detailed explanation which can span multiple lines.
Parameters
----------
parameter1 : :obj:`int`
Description of parameter1.
parameter2 : :obj:`str`, optional
Description of parameter2.
Default="all".
Returns
-------
:obj:`float` :
Description of the return value.
"""
....
In docstrings it is possible to link other functions or classes of Leaspy by using the following syntax: :class:~leaspy.models.AbstractModel
. You can take a look at MR !189 (merged) to see some examples.
Work organization
As discussed, we can share the load between us. I'm going to propose a split but we can re-organize things if some of you want to do more/less.
The idea would be to open small MR targeting a small number of files at the time. We could for example have one MR per bullet point if that makes sense.
leaspy.algo
-
leaspy.algo.fit
: @caglayantuna -
leaspy.algo.personalize
: @caglayantuna -
leaspy.algo.others
: @caglayantuna -
leaspy.algo.utils
: @caglayantuna -
leaspy.algo.base.py
: @caglayantuna -
leaspy.algo.factory.py
: @caglayantuna -
leaspy.algo.settings.py
: @caglayantuna
leaspy.datasets
-
leaspy.datasets
: @NicolasGensollen (It's more or less already done, I'll finish it if needed...)
leaspy.io
-
leaspy.io.data.data.py
: @laguilhon -
leaspy.io.data.dataset.py
: @maylistran01 -
leaspy.io.data.abstract_dataframe_data_reader.py
: @JulietteOrtholand -
leaspy.io.data.event_dataframe_data_reader.py
: @JulietteOrtholand -
leaspy.io.data.joint_dataframe_data_reader.py
: @JulietteOrtholand -
leaspy.io.data.visit_dataframe_data_reader.py
: @JulietteOrtholand -
leaspy.io.data.factory.py
: @NicolasGensollen -
leaspy.io.data.individual_data.py
: @NicolasGensollen -
leaspy.io.logs
: @caglayantuna -
leaspy.io.outputs.individual_parameters.py
: @sofia.kaisaridi -
leaspy.io.outputs.results.py
: @NicolasGensollen
leaspy.models
-
leaspy.models.obs_models
: @NicolasGensollen -
leaspy.models.abract_model.py
: @NicolasGensollen -
leaspy.models.absract_multivariate_model.py
: @NicolasGensollen -
leaspy.models.factory.py
: @NicolasGensollen -
leaspy.models.base.py
: @gabrielle-cas -
leaspy.models.constant.py
: @gabrielle-cas -
leaspy.models.joint.py
: @JulietteOrtholand -
leaspy.models.univariate_joint.py
: @JulietteOrtholand -
leaspy.models.multivariate.py
: @sofia.kaisaridi -
leaspy.models.settings.py
: @gabrielle-cas -
leaspy.models.univariate.py
: @gabrielle-cas -
leaspy.models.utilities.py
: @laguilhon
leaspy.samplers
-
leaspy.samplers
: @caglayantuna
leaspy.utils
-
leaspy.utils.functional
: @maylistran01 -
leaspy.utils.weighted_tensors
: @laguilhon -
Rest of module: @NicolasGensollen
leaspy.variables
-
leaspy.variables
: @NicolasGensollen (MR !189 (merged))