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

Add specification thresholds back to the code_changes app

    XMLWordPrintable

    Details

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

      Description

      That feature is missing in the current implementation because we were not able to query specifications from the API until recently. See DM-15240.

        Attachments

          Issue Links

            Activity

            Hide
            afausti Angelo Fausti added a comment -

            Now it is possible to query specifications filtering by dataset name, filter name (as in the specification query metadata) and tag.

            Retrieve all specifications for the validate_drp.AM1 metric and for the validation_data_cfht dataset:

            http://localhost:5000/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht

            Retrieve only the design specification from the above:

            http://localhost:5000/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&tag=design

            Retrive all specifications for the validate_drp.PA1 metric, validation_data_cfht dataset, and r filter.

            http://localhost:5000/specs?metric=validate_drp.PA1&dataset_name=validation_data_cfht&filter_name=r

            Show
            afausti Angelo Fausti added a comment - Now it is possible to query specifications filtering by dataset name, filter name (as in the specification query metadata) and tag. Retrieve all specifications for the validate_drp.AM1 metric and for the validation_data_cfht dataset: http://localhost:5000/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht Retrieve only the design specification from the above: http://localhost:5000/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&tag=design Retrive all specifications for the validate_drp.PA1 metric, validation_data_cfht dataset, and r filter. http://localhost:5000/specs?metric=validate_drp.PA1&dataset_name=validation_data_cfht&filter_name=r
            Hide
            afausti Angelo Fausti added a comment -

            Simon Krughoff wanted your opinion on the behavior of the SQuaSH API when querying for specs:

            On a query like this

            http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.PA1&dataset_name=validation_data_cfht&filter_name=r
             
            I don't know in advance if the specs are chromatic or achromatic.

            If they are chromatic, filter_name will be present in the query metadata and the query above will return the expected result.

            Now suppose that there are only achromatic specs like in this query:

            http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&filter_name=r

            then nothing is returned. The constraint on filter_name=r is not satisfied because filter_name is not present in the query_metadata for achromatic specs.

            In that case the following query would return the expected result:

            http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht

            Do you think this behavior is ok?

            I mean, as a procedure for retrieving specs I would do the most restrictive query first

            http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&filter_name=r

            and if nothing is returned I would relax the constraint on filter_name and do:

            http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht

            Show
            afausti Angelo Fausti added a comment - Simon Krughoff wanted your opinion on the behavior of the SQuaSH API when querying for specs: On a query like this http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.PA1&dataset_name=validation_data_cfht&filter_name=r   I don't know in advance if the specs are chromatic or  achromatic . If they are chromatic , filter_name will be present in the query metadata and the query above will return the expected result. Now suppose that there are only achromatic specs like in this query: http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&filter_name=r then nothing is returned. The constraint on filter_name=r is not satisfied because filter_name is not present in the query_metadata for achromatic specs. In that case the following query would return the expected result: http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht Do you think this behavior is ok? I mean, as a procedure for retrieving specs I would do the most restrictive query first http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht&filter_name=r and if nothing is returned I would relax the constraint on filter_name and do: http://squash-restful-api-demo.lsst.codes/specs?metric=validate_drp.AM1&dataset_name=validation_data_cfht
            Hide
            krughoff Simon Krughoff added a comment -

            Angelo Fausti Your procedure is similar to the way I do it in validate_drp. I think we should think about how best to use tags and query metadata, but it seems like your approach will work in the mean time.

            Show
            krughoff Simon Krughoff added a comment - Angelo Fausti Your procedure is similar to the way I do it in validate_drp . I think we should think about how best to use tags and query metadata, but it seems like your approach will work in the mean time.
            Hide
            afausti Angelo Fausti added a comment -

            Thanks Simon Krughoff, will proceed this way.

            Show
            afausti Angelo Fausti added a comment - Thanks Simon Krughoff , will proceed this way.
            Show
            afausti Angelo Fausti added a comment - See PRs: https://github.com/lsst-sqre/squash-restful-api/pull/29 https://github.com/lsst-sqre/squash-bokeh/pull/22 Deployed to production: https://squash-demo.lsst.codes/dash/code_changes/

              People

              Assignee:
              afausti Angelo Fausti
              Reporter:
              afausti Angelo Fausti
              Watchers:
              Angelo Fausti, Simon Krughoff
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.