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

add Schema method to join strings using the appropriate delimiter

    XMLWordPrintable

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: afw

      Description

      Delimiters in Schema field names are version-dependent. One can currently use schema["a"]["b"].getPrefix() to join fields using the appropriate delimiter, but this is confusing to read.

        Attachments

          Activity

          Hide
          jbosch Jim Bosch added a comment -

          Andy, up for a tiny review? This adds a convenience method to afw::table::Schema to join field name components using the appropriate delimiter (version 0 tables use '.', version > 0 tables use '_'). I was finding it annoying to write version-independent code without something like this.

          All changes are on a single commit on branch u/jbosch/DM-1281 of afw:

          afw:u/jbosch/DM-1281 % git diff master...u/jbosch/DM-1281 --stat
           include/lsst/afw/table/Schema.h |   13 +++++++++++++
           src/table/Schema.cc             |    5 +++++
           tests/testSchema.py             |    9 +++++++++
           3 files changed, 27 insertions(+)

          Show
          jbosch Jim Bosch added a comment - Andy, up for a tiny review? This adds a convenience method to afw::table::Schema to join field name components using the appropriate delimiter (version 0 tables use '.', version > 0 tables use '_'). I was finding it annoying to write version-independent code without something like this. All changes are on a single commit on branch u/jbosch/ DM-1281 of afw: afw:u/jbosch/DM-1281 % git diff master...u/jbosch/DM-1281 --stat include/lsst/afw/table/Schema.h | 13 +++++++++++++ src/table/Schema.cc | 5 +++++ tests/testSchema.py | 9 +++++++++ 3 files changed, 27 insertions(+)
          Hide
          jbosch Jim Bosch added a comment -

          Andy reported this off-line as reviewed with no needed changes.

          Show
          jbosch Jim Bosch added a comment - Andy reported this off-line as reviewed with no needed changes.

            People

            Assignee:
            jbosch Jim Bosch
            Reporter:
            jbosch Jim Bosch
            Reviewers:
            Andrew Becker [X] (Inactive)
            Watchers:
            Andrew Becker [X] (Inactive), Jim Bosch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Jenkins

                No builds found.