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

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: utils
    • Labels:
    • Story Points:
      1
    • Team:
      Architecture
    • Urgent?:
      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

          Hide
          tjenness Tim Jenness added a comment -

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

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

          LGTM.

          Show
          ktl Kian-Tat Lim added a comment - LGTM.

            People

            Assignee:
            tjenness Tim Jenness
            Reporter:
            tjenness Tim Jenness
            Reviewers:
            Kian-Tat Lim
            Watchers:
            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.