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

“Hidden” class confuses Sphinx automod.

    Details

    • Type: Story
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Templates:
    • Team:
      SQuaRE

      Description

      meas_base plugins are registered using makeSingleFramePlugin (or makeForcedPlugin). Those functions create “throwaway” classes SingleFrameFromGenericPlugin and ForcedFromGenericPlugin, of which the resulting plugins are then instances.

      In other words, we end up with (e.g.) a measurement plugin called SingleFrameInputCountPlugin which has class lsst.meas.base.wrappers.GenericPlugin.makeSingleFramePlugin.<locals>.SingleFrameFromGenericPlugin. As the locals implies, there's no way to instantiated that class directly.

      Unfortunately, this upsets Sphinx/automodapi. There seem to be two alternatives, both of which generate warnings. Simply using automodapi generates warnings of the form:

      meas_base/doc/meas_base/index.rst:57: WARNING: Could not import class or module 'lsst.meas.base.wrappers.SingleFrameFromGenericPlugin' specified for inheritance diagram
      

      An attempt to work around this by telling automodapi to skip these classes generates warnings like:

      /meas_base/doc/meas_base/index.rst:41: WARNING: Tried to skip objects {'SingleFrameFromGenericPlugin', 'ForcedFromGenericPlugin'} in module lsst.meas.base, but they were not present.  Ignoring.
      

      Neither of these warnings are fatal, but neither are they very satisfying.

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  jsick Jonathan Sick
                  Reporter:
                  swinbank John Swinbank
                  Watchers:
                  David Staker [X] (Inactive), John Swinbank, Jonathan Sick, Paul Price
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:

                    Summary Panel