Some bugs in the tool I found in the data query response testing
-
Extent generation for the queries and general approach
- The
points_inside generate a diagonal corridor which starts quite close (but not) from the bottom left of the original API extent
- The tests expect a response of
200 i.e. data should be found. But for example with large extents containing a single station far away from most of the data points (eq. Antartica), this will most likely never return data and will most certainly fail
- One solution would be to generate a vertical corridor starting FROM the
bottom left and ending at the top left of the original API extent, but this case does not necessarily work with position queries since the most south-est station might not also be the most eastern and the test currently takes the bottom left of the generated corridor for the position query.
- Queries using
points outside make valid queries but assert that a 400 would be correct in the case of data not found, I think the correct expected response would be 404 if the query is otherwise correct.
-
Area queries
f"?coords=POLYGON({inside_polygon}) should be f"?coords=POLYGON(({inside_polygon})) for it to be correct
- WKT Polygons should be closed, so need to add the first point also as the last one in
inside_polygon and outside_polygon for area queries

Some bugs in the tool I found in the data query response testing
Extent generation for the queries and general approach
points_insidegenerate a diagonal corridor which starts quite close (but not) from thebottom leftof the original API extent200i.e. data should be found. But for example with large extents containing a single station far away from most of the data points (eq. Antartica), this will most likely never return data and will most certainly failbottom leftand ending at thetop leftof the original API extent, but this case does not necessarily work with position queries since the most south-est station might not also be the most eastern and the test currently takes thebottom leftof the generated corridor for the position query.points outsidemake valid queries but assert that a 400 would be correct in the case of data not found, I think the correct expected response would be 404 if the query is otherwise correct.Area queries
f"?coords=POLYGON({inside_polygon})should bef"?coords=POLYGON(({inside_polygon}))for it to be correctinside_polygonandoutside_polygonfor area queries