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

Gen3 get/put with DatasetRef only

    XMLWordPrintable

    Details

      Description

      We've accidentally made it a bit painful to use the DatasetRef and Butler classes together, because Butler's get and put interfaces require one to unpack the contents of a DatasetRef.

      Make sure Butler.get(datasetRef) and Butler.put(obj, datasetRef) work.

      Note that the former is not just a renaming of Butler.getDirect; it should not permit loading datasets outside the Butler's collection, and it should not require the DatasetRef to have already been associated with a dataset_id (though it should take advantage of one, if present).

       

        Attachments

          Issue Links

            Activity

            Hide
            pschella Pim Schellart [X] (Inactive) added a comment -

            The logic is somewhat ugly but it gets the job done. I'm open to suggestions for improvement.

            Show
            pschella Pim Schellart [X] (Inactive) added a comment - The logic is somewhat ugly but it gets the job done. I'm open to suggestions for improvement.
            Hide
            jbosch Jim Bosch added a comment -

            I haven't taken a look yet, but possibly relevant: I had a conversation with Robert Lupton yesterday that reminded me of and confirmed the need to be able to do get (but perhaps not put?) with general DataUnit expressions, not just data IDs, while asserting that the given expression yields a unique data ID (e.g. instead of providing sensor, provide some combination of Sensor.name and Sensor.group that is unique).  That's not too tightly coupled to this issue, but it does represent another change to the signatures get will need to accept, so it might be worth keeping in mind now.

            Show
            jbosch Jim Bosch added a comment - I haven't taken a look yet, but possibly relevant: I had a conversation with Robert Lupton yesterday that reminded me of and confirmed the need to be able to do get (but perhaps not put ?) with general DataUnit expressions, not just data IDs, while asserting that the given expression yields a unique data ID (e.g. instead of providing sensor , provide some combination of Sensor.name and Sensor.group that is unique).  That's not too tightly coupled to this issue, but it does represent another change to the signatures get will need to accept, so it might be worth keeping in mind now.
            Hide
            tjenness Tim Jenness added a comment -

            Looks good.

            Show
            tjenness Tim Jenness added a comment - Looks good.

              People

              Assignee:
              pschella Pim Schellart [X] (Inactive)
              Reporter:
              jbosch Jim Bosch
              Reviewers:
              Tim Jenness
              Watchers:
              Jim Bosch, Pim Schellart [X] (Inactive), Tim Jenness
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.