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

Remove json dependency from verify API

    Details

    • Type: Improvement
    • Status: To Do
    • Resolution: Unresolved
    • Fix Version/s: None
    • Component/s: verify
    • Labels:
      None
    • Team:
      SQuaRE

      Description

      The current idiom for loading a persisted Job is:

      with open(filename) as f:
          job = lsst.verify.Job.deserialize(**json.load(f))
      

      This design is problematic for clients for two reasons:

      • The use of JSON as the persistence format is hardcoded into the client code, and if (as seems likely) the persistence format changes, all such code will need to be updated.
      • The client module must import json even if it does not handle JSON data itself.

      Please provide a way to automatically deserialize a Job given nothing but a filename or file descriptor, allowing client code to remain agnostic to the serialization format.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              krzys Krzysztof Findeisen
              Watchers:
              Krzysztof Findeisen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel