VEuPathDB / EdaDataService

Apache License 2.0
2 stars 0 forks source link

Map: standalone-map endpoints taking binned date overlayConfig are giving 500 #278

Closed bobular closed 1 year ago

bobular commented 1 year ago

I tested dates as per https://github.com/VEuPathDB/web-eda/issues/1323

An example request is at the end of this description.

The error returned is {"keyedErrors":{},"validationLevel":"RUNNABLE","validationStatus":"FAILED","errors":["For input string: \"2020-05-19\""]} I've looked in the container logs and I can't see any stack traces that shed any further light, sorry.

According to the spec, it looks like strings should be accepted.

Maine Ticks, feature.vectorbase.org, overlay variable = specimen collection start date standalone-map/visualizations/map-markers

{
    "config": {
        "geoAggregateVariable": {
            "entityId": "GAZ_00000448",
            "variableId": "EUPATH_0043205"
        },
        "latitudeVariable": {
            "entityId": "GAZ_00000448",
            "variableId": "OBI_0001620"
        },
        "longitudeVariable": {
            "entityId": "GAZ_00000448",
            "variableId": "OBI_0001621"
        },
        "outputEntityId": "OBI_0000659",
        "overlayConfig": {
            "overlayType": "continuous",
            "overlayValues": [
                {
                    "binEnd": "2020-08-21",
                    "binLabel": "[2020-05-19, 2020-08-21]",
                    "binStart": "2020-05-19"
                },
                {
                    "binEnd": "2020-11-23",
                    "binLabel": "(2020-08-21, 2020-11-23]",
                    "binStart": "2020-08-21"
                },
                {
                    "binEnd": "2021-02-25",
                    "binLabel": "(2020-11-23, 2021-02-25]",
                    "binStart": "2020-11-23"
                },
                {
                    "binEnd": "2021-05-30",
                    "binLabel": "(2021-02-25, 2021-05-30]",
                    "binStart": "2021-02-25"
                },
                {
                    "binEnd": "2021-09-02",
                    "binLabel": "(2021-05-30, 2021-09-02]",
                    "binStart": "2021-05-30"
                },
                {
                    "binEnd": "2021-12-05",
                    "binLabel": "(2021-09-02, 2021-12-05]",
                    "binStart": "2021-09-02"
                },
                {
                    "binEnd": "2022-03-09",
                    "binLabel": "(2021-12-05, 2022-03-09]",
                    "binStart": "2021-12-05"
                },
                {
                    "binEnd": "2022-06-11",
                    "binLabel": "(2022-03-09, 2022-06-11]",
                    "binStart": "2022-03-09"
                },
                {
                    "binEnd": "2022-09-13",
                    "binLabel": "(2022-06-11, 2022-09-13]",
                    "binStart": "2022-06-11"
                },
                {
                    "binEnd": "2022-12-17",
                    "binLabel": "(2022-09-13, 2022-12-17]",
                    "binStart": "2022-09-13"
                }
            ],
            "overlayVariable": {
                "entityId": "OBI_0000659",
                "variableId": "OBI_REPLACEME1"
            }
        },
        "valueSpec": "count",
        "viewport": {
            "latitude": {
                "xMax": 48.246625590713826,
                "xMin": 41.705728515237524
            },
            "longitude": {
                "left": -78.49731445312501,
                "right": -61.57836914062501
            }
        }
    },
    "filters": [],
    "studyId": "2023-maine-ricinus"
}
bobular commented 1 year ago

PS. Seems to affect the floating plot endpoints too.

dmgaldi commented 1 year ago

Hey Bob, I think I see the issue. It has to do with date parsing. Should we assume that dates will always be yyyy-MM-dd? Do we have existing variables that are Datetimes, or only dates?

bobular commented 1 year ago

Thanks @dmgaldi - did this get tagged for the feature services yet?