Generalize doc style for class attributes #292
Labels
documentation
Improvements or additions to documentation
enhancement
New feature or request
priority-medium
Medium priority stuff
Currently, we have an inconsistent style of how we document class attributes. Here are the options:
columnflow.ml.MLModel
columnflow.util.TaskArrayFunction
I suggest to generalize the style in our docs. In principle, we could do style 2 or 3, but this has the disadvantage that the
autodoc
extension in sphinx doesn't pick it up correctly. As a result, the summary table with all the attributes has an empty column (see [1]) and is both in the doc string of the class itself as well as in the member list [2]. Here, we could of course opt to not show all members and only use the description in the doc string.On the other hand, we could also use style 4, which works nicely with the
autodoc
extension. For example, the codewill result in display [3] and [4]. In my personal opinion, the main advantage of option 4 w.r.t. 2+3 is that this will make the docs more maintainable since e.g. the default value is extracted directly from the code.
Additionally, the decision which members to show isn't hardcoded in some doc string, but can be centerally configured in the sphinx config or the corresponding .rst files for the individual pages.
This should be discussed of course, so any feedback would be most welcome!
[1]
[2]
[3]
[4]
The text was updated successfully, but these errors were encountered: