ome / design

OME Design proposals
http://ome.github.io/design/
1 stars 15 forks source link

imgData json parents #29

Closed will-moore closed 7 years ago

will-moore commented 8 years ago

Discussion started about what parent info to include in the imgData json and how to handle multiple parents. See https://github.com/openmicroscopy/openmicroscopy/pull/4486

Currently we have added a list of datasets and wells under meta, but have not removed the existing datasetName, datasetId, datasetDescription, wellSampleId, wellId and we haven't made any changes to handle multiple Projects, so these current changes are not "breaking".

"meta": {
        "projectDescription": "",
        "datasetName": "atest1",
        "datasets": [
            {
                "description": "",
                "id": 6901,
                "name": "atest1"
            },
            {
                "description": "",
                "id": 6902,
                "name": "atest2"
            }
        ],
        "wellSampleId": 15901,
        "projectName": "Multiple",
        "imageDescription": "",
        "imageTimestamp": 1158540058,
        "wells": [
            {
                "wellSampleId": 15901,
                "id": 314251
            },
            {
                "wellSampleId": 15904,
                "id": 314252
            }
        ],
        "imageId": 8751,
        "imageAuthor": "user-1 user-1",
        "imageName": "IN-CSFV01_01_R3D_D3D.dv",
        "datasetDescription": "",
        "wellId": 314251,
        "projectId": null,
        "pixelsType": "uint16",
        "datasetId": 6901
    },

We could include multiple Projects within each dataset object

{
   "id": 6901,
   "name": "atest1",
   "projects": [
        {"id": 246, "name": "P53"},
    ]
}

cc @chris-allan @jburel

will-moore commented 8 years ago

Alternative idea, in keeping with the move to a standard json API, is to provide a way to query the parents of an image. E.g. listing objects & filtering by image:

/api/datasets/?image=123
/api/plates/?image=123

Or perhaps image_marshal of an image would include Datasets if loaded, and we could specify whether to load parents in the query, E.g:

/api/images/10/?load=datasets&load=wells.wellsamples.plate
will-moore commented 7 years ago

cc @chris-allan @jburel We need to resume discussion of this: how to include S/P/W and P/D parents in imgData json.

will-moore commented 7 years ago

Closing - see reason at https://github.com/openmicroscopy/openmicroscopy/pull/4486#issuecomment-253175508