Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-16102

API Reference for lsst.daf.butler.Config etc not appearing

    XMLWordPrintable

    Details

      Description

      The Sphinx-generated API Reference for lsst.daf.butler.Config is only showing the class docstring, and does not show any methods or attributes.

        Attachments

          Activity

          Hide
          jsick Jonathan Sick added a comment -

          I've got a fix for the lsst.daf.butler.Config API reference issue.

          The problem is here: https://github.com/astropy/sphinx-automodapi/blob/6c3960abd26e169a83eb54592a9820a2d7e3b667/sphinx_automodapi/automodsumm.py#L549-L557

          First, my mistake was that I didn't set automodsumm_inherited_members = True in the Sphinx config. I'm doing this now, and as a benefit, we actually get inherited members now in our docs.

          The consequence of accidentally disabling documenting inherited members before is that if a class has a _slots attribute, it looks for members only in slots and doesn't use dir(). I think the MutableMapping base class adds these slots, but in this case, the logic in automodsumm isn't appropriate since it means that effectively _none of the class's own members are discovered and documented.

          Thus the overall solution for us is to use automodsumm_inherited_members = True in our Sphinx configurations through Documenteer.

          Show
          jsick Jonathan Sick added a comment - I've got a fix for the lsst.daf.butler.Config API reference issue. The problem is here: https://github.com/astropy/sphinx-automodapi/blob/6c3960abd26e169a83eb54592a9820a2d7e3b667/sphinx_automodapi/automodsumm.py#L549-L557 First, my mistake was that I didn't set automodsumm_inherited_members = True in the Sphinx config. I'm doing this now, and as a benefit, we actually get inherited members now in our docs. The consequence of accidentally disabling documenting inherited members before is that if a class has a _ slots attribute, it looks for members only in slots and doesn't use dir() . I think the MutableMapping base class adds these slots , but in this case, the logic in automodsumm isn't appropriate since it means that effectively _none of the class's own members are discovered and documented. Thus the overall solution for us is to use automodsumm_inherited_members = True in our Sphinx configurations through Documenteer.

            People

            Assignee:
            jsick Jonathan Sick
            Reporter:
            jsick Jonathan Sick
            Watchers:
            Jonathan Sick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: