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

Add helper function to work out the stacklevel for out of module

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • utils
    • 1
    • Architecture
    • No

    Description

      Sometimes when calculating warning or log stacklevels, you would like to know what value to use to ensure that the message comes from user code outside of the current module.

      Move the implementation that is in lsst.utils.timer into lsst.utils.introspection and make it more general.

      Attachments

        Activity

          tjenness Tim Jenness added a comment -

          ktl this relocates an internal function so that it can be used elsewhere. I found it helpful when refactoring the butler.registry.dimensions usage.

          tjenness Tim Jenness added a comment - ktl this relocates an internal function so that it can be used elsewhere. I found it helpful when refactoring the butler.registry.dimensions usage.
          ktl Kian-Tat Lim added a comment -

          LGTM.

          ktl Kian-Tat Lim added a comment - LGTM.

          People

            tjenness Tim Jenness
            tjenness Tim Jenness
            Kian-Tat Lim
            Kian-Tat Lim, Tim Jenness
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Jenkins

                No builds found.