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

Ensure __str__ and __repr__ copied from Swig

    XMLWordPrintable

    Details

    • Story Points:
      4
    • Sprint:
      Alert Production S17 - 3
    • Team:
      Alert Production

      Description

      Our current pybind11 workflow makes it easy to accidentally discard implementations of __str__ and __repr__ that were located in Swig .i files. While we can (and should) try to transfer these methods to pybind11 as we wrap their classes, we will probably need a dedicated pass through the code base if we want to make sure we haven't missed any.

      This ticket is not blocked by Methods for Stringification or any resulting RFCs, because it concerns only existing code.

        Attachments

          Activity

          Hide
          krzys Krzysztof Findeisen added a comment - - edited

          Packages wrapped for pybind11:

          • sconsUtils (no Swig wrappers)
          • ndarray (no Swig wrappers)
          • base (no definitions of __str__ or __repr__)
          • pex_exceptions (no definitions of __str__ or __repr__)
          • utils (no definitions of __str__ or __repr__)
          • log (no definitions of __str__ or __repr__)
          • daf_base (already fully ported)
          • pex_policy (already fully ported)
          • pex_config (no Swig wrappers)
          • daf_persistence (no definitions of __str__ or __repr__)
          • ctrl_orca (no Swig wrappers)
          • afw::cameraGeom (already fully ported)
          • afw::coord Weather
          • afw::detection PeakRecord
          • afw::display (no definitions of __str__ or __repr__)
          • afw::fits (no definitions of __str__ or __repr__)
          • afw::geom Angle, CoordinateBase, ellipses::*Radius, ellipses::Distortion, ellipses::ConformalShear, ellipses::ReducedShear, ellipses::Separable
          • afw::image (no definitions of __str__ or __repr__)
          • afw::math (no definitions of __str__ or __repr__)
          • afw::table Schema, Field, Key
          • display_ds9 (no definitions of __str__ or __repr__)
          • obs_base (no Swig wrappers)
          • obs_test (no Swig wrappers)
          • coadd_utils (no definitions of __str__ or __repr__)
          • meas_base (no definitions of __str__ or __repr__)
          • coadd_chisquared (no definitions of __str__ or __repr__)
          • meas_extensions_simpleShape (no definitions of __str__ or __repr__)
          • meas_algorithms (no definitions of __str__ or __repr__)
          • ip_isr (no definitions of __str__ or __repr__)
          • meas_extensions_shapeHSM (no definitions of __str__ or __repr__)
          • meas_deblender (no definitions of __str__ or __repr__)
          • ip_diffim (no definitions of __str__ or __repr__)
          • meas_extensions_photometryKron (no definitions of __str__ or __repr__)
          • meas_extensions_psfex (no definitions of __str__ or __repr__)
          • meas_extensions_convolved
          • meas_astrom (no definitions of __str__ or __repr__)
          • pipe_tasks (no Swig wrappers)
          • obs_sdss (no Swig wrappers)
          • pipe_drivers (no Swig wrappers)
          • obs_decam (no Swig wrappers)
          • obs_lsstSim (no definitions of __str__ or __repr__)
          • meas_modelfit Mixture, MixtureComponent
          • lsst_apps (no Swig wrappers)
          • obs_cfht (no Swig wrappers)
          • obs_subaru (no definitions of __str__ or __repr__)
          Show
          krzys Krzysztof Findeisen added a comment - - edited Packages wrapped for pybind11: sconsUtils (no Swig wrappers) ndarray (no Swig wrappers) base (no definitions of __str__ or __repr__ ) pex_exceptions (no definitions of __str__ or __repr__ ) utils (no definitions of __str__ or __repr__ ) log (no definitions of __str__ or __repr__ ) daf_base (already fully ported) pex_policy (already fully ported) pex_config (no Swig wrappers) daf_persistence (no definitions of __str__ or __repr__ ) ctrl_orca (no Swig wrappers) afw::cameraGeom (already fully ported) afw::coord Weather afw::detection PeakRecord afw::display (no definitions of __str__ or __repr__ ) afw::fits (no definitions of __str__ or __repr__ ) afw::geom Angle, CoordinateBase, ellipses::*Radius, ellipses::Distortion, ellipses::ConformalShear, ellipses::ReducedShear, ellipses::Separable afw::image (no definitions of __str__ or __repr__ ) afw::math (no definitions of __str__ or __repr__ ) afw::table Schema, Field, Key display_ds9 (no definitions of __str__ or __repr__ ) obs_base (no Swig wrappers) obs_test (no Swig wrappers) coadd_utils (no definitions of __str__ or __repr__ ) meas_base (no definitions of __str__ or __repr__ ) coadd_chisquared (no definitions of __str__ or __repr__ ) meas_extensions_simpleShape (no definitions of __str__ or __repr__ ) meas_algorithms (no definitions of __str__ or __repr__ ) ip_isr (no definitions of __str__ or __repr__ ) meas_extensions_shapeHSM (no definitions of __str__ or __repr__ ) meas_deblender (no definitions of __str__ or __repr__ ) ip_diffim (no definitions of __str__ or __repr__ ) meas_extensions_photometryKron (no definitions of __str__ or __repr__ ) meas_extensions_psfex (no definitions of __str__ or __repr__ ) meas_extensions_convolved meas_astrom (no definitions of __str__ or __repr__ ) pipe_tasks (no Swig wrappers) obs_sdss (no Swig wrappers) pipe_drivers (no Swig wrappers) obs_decam (no Swig wrappers) obs_lsstSim (no definitions of __str__ or __repr__ ) meas_modelfit Mixture, MixtureComponent lsst_apps (no Swig wrappers) obs_cfht (no Swig wrappers) obs_subaru (no definitions of __str__ or __repr__ )
          Hide
          krzys Krzysztof Findeisen added a comment -

          Note: this ticket is done, but will not have a PR until master uses the pybind11 stack.

          Show
          krzys Krzysztof Findeisen added a comment - Note: this ticket is done, but will not have a PR until master uses the pybind11 stack.
          Hide
          krzys Krzysztof Findeisen added a comment -

          Hi Pim Schellart [X], would you be willing to review this small pybind11 cleanup ticket?

          Show
          krzys Krzysztof Findeisen added a comment - Hi Pim Schellart [X] , would you be willing to review this small pybind11 cleanup ticket?
          Hide
          pschella Pim Schellart [X] (Inactive) added a comment -

          Nice work!
          While the implementation is not as uniform as I would like, and will probably need revision after RFC-298, restoring Swig equivalent strigification in the mean time is great. No comments.

          Show
          pschella Pim Schellart [X] (Inactive) added a comment - Nice work! While the implementation is not as uniform as I would like, and will probably need revision after RFC-298 , restoring Swig equivalent strigification in the mean time is great. No comments.

            People

            Assignee:
            krzys Krzysztof Findeisen
            Reporter:
            krzys Krzysztof Findeisen
            Reviewers:
            Pim Schellart [X] (Inactive)
            Watchers:
            Krzysztof Findeisen, Pim Schellart [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.