diff --git a/projects/north-america/test_cases/address_interpolation.json b/projects/north-america/test_cases/address_interpolation.json new file mode 100644 index 0000000..0f73641 --- /dev/null +++ b/projects/north-america/test_cases/address_interpolation.json @@ -0,0 +1,203 @@ +{ + "name": "address interpolation", + "endpoint": "search", + "priorityThresh": 1, + "distanceThresh": 50, + "tests": [ + { + "id": 1, + "user": "missinglink", + "status": "pass", + "in": { + "text": "475f west 26th street, new york" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "475", + "street": "West 26th Street", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ -74.0026336, 40.7495275 ] + ] + } + }, + { + "id": "1a", + "user": "missinglink", + "status": "pass", + "description": "fails when specifying size param", + "issue": "https://github.com/pelias/pelias/issues/562", + "in": { + "text": "475f west 26th street, new york", + "size": 1 + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "475", + "street": "West 26th Street", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ -74.0026336, 40.7495275 ] + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "missinglink", + "description": "interpolated address (between two different datasets)", + "in": { + "text": "257 west 26th street, new york" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "257", + "street": "West 26th Street", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ -73.996716, 40.7470427 ] + ] + } + }, + { + "id": "2a", + "user": "missinglink", + "status": "fail", + "description": "interpolation service not queried when admin info omittted", + "issue": "https://github.com/pelias/api/issues/897", + "in": { + "text": "257 west 26th street" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "257", + "street": "West 26th Street", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ -73.996716, 40.7470427 ] + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "missinglink", + "in": { + "text": "rigaer strasse 11, berlin" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "11", + "street": "Rigaer Straße", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ 13.4568939, 52.5178399 ] + ] + } + }, + { + "id": 4, + "user": "missinglink", + "status": "fail", + "description": [ + "test passes when hitting the interpolation service directly", + "but fails when accessed via pelias/api" + ], + "in": { + "text": "6 potsdamer platz, berlin" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "6", + "street": "Potsdamer Platz", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ 13.375818, 52.509349 ] + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "missinglink", + "description": [ "must not interpolate in center of park" ], + "in": { + "text": "49 nevern square, london" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "49", + "street": "Nevern Square", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ -0.1971474, 51.4920998 ] + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "missinglink", + "in": { + "text": "19 glasgow street, wellington" + }, + "expected": { + "properties": [ + { + "layer": "address", + "source": "mixed", + "housenumber": "19", + "street": "Glasgow Street", + "match_type": "interpolated", + "accuracy": "point" + } + ], + "coordinates": [ + [ 174.767101, -41.2887933 ] + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/address_matching.json b/projects/north-america/test_cases/address_matching.json new file mode 100644 index 0000000..7ef15ca --- /dev/null +++ b/projects/north-america/test_cases/address_matching.json @@ -0,0 +1,117 @@ +{ + "name": "address matching", + "priorityThresh": 5, + "endpoint": "search", + "tests": [ + { + "id": 1, + "issue": "https://github.com/pelias/pelias/issues/424", + "description": "libpostal should understand street names without ordinal sufffixes", + "user": "dianashk", + "type": "dev", + "in": { + "text": "30 w 26 st" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "30", + "street": "West 26th Street" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "dianashk", + "type": "dev", + "in": { + "text": "507 hackney rd" + }, + "expected": { + "properties": [ + { + "housenumber": "507", + "street": "Hackney Road" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/296", + "description": "Need to decide if a result is more relevant when the house number matches or the street name", + "user": "dianashk", + "type": "dev", + "in": { + "text": "49 Kay Street" + }, + "expected": { + "properties": [ + { + "street": "Kay Street" + } + ] + }, + "unexpected": { + "properties": [ + { + "street": "Kay Drive" + }, + { + "street": "Kay Avenue" + }, + { + "street": "Kay Road" + }, + { + "street": "De Kay Street" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "dianashk", + "description": "postalcodes should not strip leading 0's", + "in": { + "text": "461 W Main St, Cheshire, 06410" + }, + "expected": { + "properties": [ + { + "postalcode": "06410", + "country": "United States", + "region": "Connecticut" + } + ] + }, + "unexpected": { + "properties": [ + { + "postalcode": "6410" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "missinglink", + "description": [ "borough matching, no delimiter", "OA/OSM import order seems to matter so increase priorityThresh" ], + "in": { + "text": "190 dean street brooklyn" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { "label": "190 Dean Street, Brooklyn, New York, NY, USA" } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/address_parsing.json b/projects/north-america/test_cases/address_parsing.json new file mode 100644 index 0000000..0262191 --- /dev/null +++ b/projects/north-america/test_cases/address_parsing.json @@ -0,0 +1,349 @@ +{ + "name": "address parsing", + "priorityThresh": 5, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Harish", + "type": "dev", + "in": { + "text": "101 saint marks pl 10009" + }, + "expected": { + "properties": [ + { + "name": "101 Saint Marks Place", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "East Village", + "postalcode": "10009", + "housenumber": "101", + "street": "Saint Marks Place", + "label": "101 Saint Marks Place, Manhattan, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "issue": "https://github.com/pelias/api/issues/187", + "user": "Harish", + "type": "dev", + "notes": [ + "at last count there are 21 exact matches for '1 water street' in", + "new york state, the manhattan result should sort to the top due to it", + "also being part of 'new york city' and therefore admin matching twice" + ], + "in": { + "text": "1 water st manhattan ny" + }, + "expected": { + "properties": [ + { + "name": "1 Water Street", + "borough": "Manhattan", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 2.2, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "text": "1 water st manhattan ny" + }, + "expected": { + "properties": [ + { + "name": "1 Water Street", + "borough": "Manhattan", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "isssue": "https://github.com/pelias/api/issues/456", + "description": "result in the wrong zipcode and city shows up first", + "user": "Harish", + "type": "dev", + "in": { + "text": "450 37th st, new york, ny 11232" + }, + "expected": { + "properties": [ + { + "name": "450 37th Street", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "Kings County", + "borough": "Brooklyn", + "locality": "New York", + "postalcode": "11232", + "housenumber": "450", + "street": "37th Street", + "label": "450 37th Street, Brooklyn, New York, NY, USA" + } + ] + }, + "unexpected": { + "properties": [ + { + "postalcode": "10018" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Harish", + "type": "dev", + "in": { + "text": "starbucks 10010" + }, + "expected": { + "properties": [ + { + "name": "Starbucks", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "postalcode": "10010" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Harish", + "type": "dev", + "in": { + "text": "455 43rd st new york ny 11232" + }, + "expected": { + "properties": [ + { + "name": "455 43rd Street", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "Kings County", + "borough": "Brooklyn", + "locality": "New York", + "neighbourhood": "Sunset Park", + "postalcode": "11232", + "housenumber": "455", + "street": "43rd Street", + "label": "455 43rd Street, Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Harish", + "type": "dev", + "in": { + "text": "1 main st ny 11201" + }, + "expected": { + "properties": [ + { + "name": "1 Main Street", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "Kings County", + "borough": "Brooklyn", + "locality": "New York", + "neighbourhood": "DUMBO", + "postalcode": "11201", + "housenumber": "1", + "street": "Main Street", + "label": "1 Main Street, Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "description": [ + "was failing due to a double-space in the street name" + ], + "issue": [ "https://github.com/pelias/openaddresses/issues/69 (comment 1)" ], + "user": "Harish", + "in": { + "text": "186 Tuskegee St SE Atlanta GA" + }, + "expected": { + "properties": [ + { + "name": "186 Tuskegee Street Southeast", + "country_a": "USA", + "country": "United States", + "region": "Georgia", + "region_a": "GA", + "county": "Fulton County", + "locality": "Atlanta", + "postalcode": "30315", + "housenumber": "186", + "street": "Tuskegee Street Southeast", + "label": "186 Tuskegee Street Southeast, Atlanta, GA, USA" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "Harish", + "in": { + "text": "3122 16th St San Francisco, CA 94103" + }, + "expected": { + "properties": [ + { + "name": "3122 16th Street", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "county": "San Francisco County", + "locality": "San Francisco", + "neighbourhood": "Mission Dolores", + "housenumber": "3122", + "street": "16th Street", + "label": "3122 16th Street, San Francisco, CA, USA" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "description": "The mission is now a macrohood, so we won't be able to get this right until that's imported", + "issue": "https://github.com/pelias/whosonfirst/issues/213", + "user": "Harish", + "in": { + "text": "3010 20th St San Francisco CA 94110" + }, + "expected": { + "properties": [ + { + "name": "3010 20th Street", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "county": "San Francisco County", + "locality": "San Francisco", + "postalcode": "94110", + "housenumber": "3010", + "street": "20th Street", + "label": "3010 20th Street, San Francisco, CA, USA" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "Harish", + "in": { + "text": "3577 Jackson St San Francisco, CA 94118" + }, + "expected": { + "properties": [ + { + "name": "3577 Jackson St", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "county": "San Francisco County", + "locality": "San Francisco", + "postalcode": "94118", + "housenumber": "3577", + "street": "Jackson St", + "label": "3577 Jackson St, San Francisco, CA, USA" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "user": "Harish", + "type": "dev", + "in": { + "text": "whole foods NY" + }, + "expected": { + "properties": [ + { + "name": "Whole Foods", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/440", + "user": "diana", + "in": { + "text": "301 Commons Park S, Stamford, CT 06902" + }, + "expected": { + "properties": [ + { + "housenumber": "301", + "street": "Commons Park South", + "postalcode": "06902", + "confidence": 1, + "match_type": "exact", + "accuracy": "point", + "region": "Connecticut", + "region_a": "CT", + "localadmin": "Stamford", + "locality": "Stamford", + "label": "301 Commons Park South, Stamford, CT, USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/address_type.json b/projects/north-america/test_cases/address_type.json new file mode 100644 index 0000000..3664a7d --- /dev/null +++ b/projects/north-america/test_cases/address_type.json @@ -0,0 +1,87 @@ +{ + "name": "address type", + "priorityThresh": 5, + "description": [ + "These tests ensure that address records are stored in a layer which is distict from the POI layers", + "see: https://github.com/pelias/openstreetmap/issues/29", + "see: https://github.com/pelias/pelias/issues/60" + ], + "tests": [ + { + "id": "1", + "status": "pass", + "user": "missinglink", + "endpoint": "search", + "description": [ + "Ensure address records are stored in the 'osmaddress' layer." + ], + "in": { + "text": "102 Fleet Street", + "focus.point.lat": 51.53177, + "focus.point.lon": -0.06672 + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:address:node:1401849738", + "layer": "address", + "source": "openstreetmap", + "id": "node:1401849738" + } + ] + } + }, + { + "id": "2", + "status": "pass", + "user": "missinglink", + "endpoint": "search", + "description": [ + "Ensure address records are stored in the 'address' layer.", + "Ensure POI records are cloned to 2x different layers", + "related: test(3)" + ], + "in": { + "text": "Shepherd and Flock", + "focus.point.lat": 51.219671, + "focus.point.lon": -0.779389 + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:way:338854694", + "layer": "venue", + "source": "openstreetmap", + "id": "way:338854694" + } + ] + } + }, + { + "id": "3", + "status": "pass", + "user": "missinglink", + "endpoint": "search", + "description": [ + "Ensure address records are stored in the 'address' layer.", + "Ensure POI records are cloned to 2x different layers", + "related: test(2)" + ], + "in": { + "text": "22 Moor Park Lane", + "focus.point.lat": 51.219671, + "focus.point.lon": -0.779389 + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:address:way:338854694", + "layer": "address", + "source": "openstreetmap", + "id": "way:338854694" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/admin_lookup.json b/projects/north-america/test_cases/admin_lookup.json new file mode 100644 index 0000000..91ead25 --- /dev/null +++ b/projects/north-america/test_cases/admin_lookup.json @@ -0,0 +1,518 @@ +{ + "name": "admin lookup", + "priorityThresh": 5, + "tests": [ + { + "id": "1", + "status": "pass", + "user": "sevko", + "endpoint": "reverse", + "in": { + "point.lat": 46.65132155014943, + "point.lon": 14.61353302001953 + }, + "expected": { + "properties": [ + { + "county": "Völkermarkt" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Vã¶lkermarkt" + } + ] + } + }, + { + "id": "2", + "status": "pass", + "issue": "https://github.com/pelias/api/issues/150", + "type": "dev", + "description": "checking for County to be part of the admin2 value", + "in": { + "text": "bronx", + "layers": "county" + }, + "expected": { + "properties": [ + { + "county": "Bronx County" + } + ] + } + }, + { + "id": "3", + "status": "pass", + "type": "dev", + "in": { + "text": "Lake, MT", + "layers": "county" + }, + "expected": { + "properties": [ + { + "county": "Lake County" + } + ] + } + }, + { + "id": "4", + "status": "pass", + "endpoint": "reverse", + "description": "Reverse does not fall back to point-in-polygon for admin areas", + "issue": [ + "https://github.com/pelias/pelias/issues/360", + "https://github.com/pelias/pelias/wiki/Reverse-Geocoding,-Part-Deux" + ], + "in": { + "point.lat": -40.806533324215565, + "point.lon": 144.8101043701172 + }, + "expected": { + "properties": [ + { + "county": "Circular Head" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Circular Head (m)" + } + ] + } + }, + { + "id": "5", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/297", + "description": "not sure it's an actual failure. needs discussion", + "endpoint": "reverse", + "type": "dev", + "in": { + "point.lat": 51.515049, + "point.lon": -0.093229 + }, + "expected": { + "properties": [ + { + "region": "London" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "City and County of the City of London" + } + ] + } + }, + { + "id": "6", + "status": "pass", + "type": "dev", + "in": { + "layers": "neighbourhood", + "text": "hoboken" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85801273", + "name": "Hoboken" + }, + { + "gid": "whosonfirst:neighbourhood:420509993", + "name": "Hoboken" + } + ] + } + }, + { + "id": "7", + "status": "pass", + "description": "returned by placeholder so it works now", + "issue": "https://github.com/pelias/whosonfirst/issues/213", + "type": "dev", + "in": { + "text": "mission, san francisco", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "name": "Mission District", + "layer": "macrohood", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "county": "San Francisco County", + "label": "Mission District, San Francisco, CA, USA" + } + ] + } + }, + { + "id": "8", + "status": "pass", + "type": "dev", + "in": { + "text": "crown heights", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "label": "Crown Heights, Brooklyn, New York, NY, USA", + "name": "Crown Heights", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "Kings County", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "9", + "status": "pass", + "in": { + "text": "palo alto", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "label": "Palo Alto, CA, USA" + } + ] + } + }, + { + "id": "9-1", + "status": "pass", + "in": { + "text": "palo alto, ca", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "label": "Palo Alto, CA, USA" + } + ] + } + }, + { + "id": "10", + "status": "pass", + "endpoint": "reverse", + "in": { + "point.lat": 51.47945855891035, + "point.lon": -3.2018280029296875 + }, + "expected": { + "properties": [ + { + "region": "Cardiff" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "Caerdydd#Cardiff" + } + ] + } + }, + { + "id": "15", + "status": "pass", + "in": { + "text": "cardiff, gbr", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "region": "Cardiff" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "Caerdydd#Cardiff" + } + ] + } + }, + { + "id": "11", + "status": "pass", + "endpoint": "reverse", + "in": { + "point.lat": 51.52754263322114, + "point.lon": -3.115997314453125 + }, + "expected": { + "properties": [ + { + "region": "Cardiff" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "Caerdydd#Cardiff" + } + ] + } + }, + { + "id": "12", + "status": "pass", + "endpoint": "reverse", + "in": { + "point.lat": 53.08654986822245, + "point.lon": -3.393487930297851 + }, + "expected": { + "properties": [ + { + "region": "Denbighshire" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Sir Ddinbych#Denbighshire" + } + ] + } + }, + { + "id": "13", + "status": "pass", + "description": [ + "all words in query text are potential address stop-words" + ], + "issue": "https://github.com/pelias/api/issues/357", + "type": "dev", + "in": { + "text": "Vista Center", + "layers": "neighbourhood" + }, + "expected": { + "properties": [ + { + "country": "United States", + "country_a": "USA", + "region": "New Jersey", + "region_a": "NJ", + "county": "Ocean County" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Ocean" + } + ] + } + }, + { + "id": "14", + "status": "pass", + "type": "dev", + "in": { + "text": "Yadkin Trail", + "layers": "neighbourhood" + }, + "expected": { + "properties": [ + { + "country": "United States", + "country_a": "USA", + "region": "North Carolina", + "region_a": "NC", + "county": "Moore County" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Moore" + } + ] + } + }, + { + "id": "15", + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/294", + "description": "fixed with pelias/api#850", + "type": "dev", + "in": { + "text": "Hillside, Santa Clara", + "layers": "neighbourhood" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "country": "United States", + "country_a": "USA", + "region": "California", + "region_a": "CA", + "county": "Santa Clara County" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Moore" + } + ] + } + }, + { + "id": "16", + "status": "pass", + "type": "dev", + "in": { + "text": "Cardiff, GBR", + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "country_a": "GBR", + "country": "United Kingdom", + "region": "Cardiff" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "Caerdydd#cardiff" + } + ] + } + }, + { + "id": "17", + "status": "pass", + "type": "dev", + "in": { + "text": "ringland", + "layers": "neighbourhood" + }, + "expected": { + "properties": [ + { + "country_a": "GBR", + "country": "United Kingdom", + "region": "Newport" + } + ] + }, + "unexpected": { + "properties": [ + { + "region": "Casnewydd#Newport", + "county": "Newport" + } + ] + } + }, + { + "id": "18", + "status": "pass", + "type": "dev", + "in": { + "text": "california", + "layers": "region" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "California", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "label": "California, USA" + } + ] + } + }, + { + "id": "19", + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/144", + "description": [ + "Problem in the QS data, so should be fixed once we move to WOF" + ], + "in": { + "text": "5 West 4th Avenue Canada" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "5", + "street": "W 4th Ave", + "country_a": "CAN", + "country": "Canada", + "locality": "Vancouver" + } + ] + } + }, + { + "id": "20", + "status": "pass", + "in": { + "text": "1 Hämeenkatu, Tampere, Finland" + }, + "description": [ + "waiting on libpostal to fix diacritical issues" + ], + "issue": "https://github.com/pelias/pelias/issues/425", + "expected": { + "properties": [ + { + "housenumber": "1", + "street": "Hämeenkatu", + "name": "Hämeenkatu 1", + "locality": "Tampere", + "region": "Pirkanmaa", + "macroregion": "West Finland", + "country": "Finland", + "country_a": "FIN" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_acushnet_antiques.json b/projects/north-america/test_cases/autocomplete_acushnet_antiques.json new file mode 100644 index 0000000..c570fbb --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_acushnet_antiques.json @@ -0,0 +1,81 @@ +{ + "name": "autocomplete acushnet antiques", + "notes": "https://github.com/pelias/pelias/issues/271", + "endpoint": "autocomplete", + "priorityThresh": 1, + "tests": [ + { + "id": "1", + "status": "pass", + "user": "missinglink", + "description": [ + "the venue should be retrieved using only a few characters due to the focus", + "point being directly on top of the venue" + ], + "in": { + "focus.point.lat": "41.652889", + "focus.point.lon": "-70.922898", + "text": "acus" + }, + "expected": { + "properties": [{ + "name": "Acushnet River Antiques Showroom" + }] + } + }, + { + "id": "2", + "status": "pass", + "user": "missinglink", + "description": [ + "as above except using a prefix of 'antique'" + ], + "in": { + "focus.point.lat": "41.652889", + "focus.point.lon": "-70.922898", + "text": "antiq" + }, + "expected": { + "properties": [{ + "name": "Acushnet River Antiques Showroom" + }] + } + }, + { + "id": "3", + "status": "pass", + "user": "missinglink", + "description": [ + "as above except using the full token of the stem of 'antiques'" + ], + "in": { + "focus.point.lat": "41.652889", + "focus.point.lon": "-70.922898", + "text": "antique" + }, + "expected": { + "properties": [{ + "name": "Acushnet River Antiques Showroom" + }] + } + }, + { + "id": "4", + "status": "pass", + "user": "missinglink", + "description": [ + "no focus point, this test assumes the name is unique globally", + "at time of writing only one document is returned, this test may need to", + "be updated if another document is added to the index with a similar name" + ], + "in": { + "text": "acushnet an" + }, + "expected": { + "properties": [{ + "name": "Acushnet River Antiques Showroom" + }] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_admin_areas.json b/projects/north-america/test_cases/autocomplete_admin_areas.json new file mode 100644 index 0000000..b50ed1a --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_admin_areas.json @@ -0,0 +1,353 @@ +{ + "name": "autocomplete admin areas", + "priorityThresh": 5, + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "text": "brooklyn" + }, + "expected": { + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": "1-1", + "status": "pass", + "user": "Riordan", + "description": ["K-stemming on Autocomplete is leading to strange results", + "for the progressive characters in `brooklyn`, leading to jitter"], + "in": { + "text": "broo" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": "1-2", + "status": "pass", + "user": "Riordan", + "description": ["K-stemming on Autocomplete is leading to strange results", + "for the progressive characters in `brooklyn`, leading to jitter"], + "in": { + "text": "brook" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": "1-3", + "status": "pass", + "user": "Riordan", + "description": ["K-stemming on Autocomplete is leading to strange results", + "for the progressive characters in `brooklyn`, leading to jitter"], + "in": { + "text": "brookl" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": "1-4", + "status": "pass", + "user": "Riordan", + "description": ["K-stemming on Autocomplete is leading to strange results", + "for the progressive characters in `brooklyn`, leading to jitter"], + "in": { + "text": "brookly" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": "1-5", + "status": "pass", + "user": "Riordan", + "description": ["K-stemming on Autocomplete is leading to strange results", + "for the progressive characters in `brooklyn`, leading to jitter"], + "in": { + "text": "brooklyn" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/295", + "description": "data issue", + "user": "Diana", + "type": "dev", + "in": { + "text": "new york" + }, + "expected": { + "properties": [ + { + "label": "New York, NY, USA" + }, + { + "label": "New York City, Manhattan, NY, USA" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/293", + "description": "data issue", + "user": "missinglink", + "in": { + "text": "london" + }, + "expected": { + "properties": [ + { + "label": "London, Greater London, United Kingdom" + }, + { + "label": "London, Middlesex, Canada" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "missinglink", + "in": { + "text": "san francisco" + }, + "expected": { + "properties": [ + { + "region": "California", + "county": "San Francisco County", + "locality": "San Francisco", + "layer": "locality" + } + ] + } + }, + { + "id": 5, + "status": "fail", + "user": "missinglink", + "description": "remove partial match results from the top 5 when exact matches are found", + "issue": "https://github.com/pelias/pelias/issues/646", + "in": { + "text": "victoria" + }, + "expected": { + "properties": [ + { + "region": "Victoria", + "country": "Australia", + "layer": "region" + }, + { + "locality": "Victoria", + "region": "British Columbia", + "country": "Canada", + "layer": "locality" + + } + ] + } + }, + { + "id": 7, + "status": "fail", + "issue": "https://github.com/pelias/geonames/issues/49", + "description": "geonames types are not properly mapped", + "user": "missinglink", + "in": { + "text": "wales" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "Wales, United Kingdom" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "missinglink", + "in": { + "text": "new south wales" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "label": "New South Wales, Australia" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "missinglink", + "in": { + "text": "california" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "California, USA" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "missinglink", + "in": { + "text": "west bengal" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "West Bengal, India" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "issue": "https://github.com/pelias/geonames/pull/43", + "description": "geonames types are not properly mapped", + "user": "missinglink", + "in": { + "text": "madrid" + }, + "expected": { + "properties": [ + { + "locality": "Madrid", + "region": "Madrid", + "country": "Spain", + "layer": "locality" + + + } + ] + } + }, + { + "id": 12, + "status": "pass", + "user": "missinglink", + "notes": [ "from mapillary home page" ], + "in": { + "text": "malmo" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "name": "Malmo", + "country": "Sweden" + } + ] + } + }, + { + "id": 13, + "status": "pass", + "user": "missinglink", + "in": { + "text": "Singarpuram" + }, + "expected": { + "properties": [ + { + "label": "Singarpuram, Madurai, India" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "user": "missinglink", + "description": "partially complete major city name", + "issue": "https://github.com/pelias/pelias/issues/143", + "in": { + "text": "Pari" + }, + "expected": { + "properties": [ + { + "label": "Paris, France" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "user": "missinglink", + "description": "partially complete major city name", + "issue": "https://github.com/pelias/pelias/issues/143", + "in": { + "text": "Londo" + }, + "expected": { + "properties": [ + { + "label": "London, England, United Kingdom" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_boundary_country.json b/projects/north-america/test_cases/autocomplete_boundary_country.json new file mode 100644 index 0000000..c79aff2 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_boundary_country.json @@ -0,0 +1,33 @@ + +{ + "name": "autocomplete boundary.country", + "priorityThresh": 1, + "description": "ensure that only USA results, and especially not GBR results, come back with boundary.country set", + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "julian", + "type": "dev", + "in": { + "boundary.country": "USA", + "text": "London" + }, + "unexpected" : { + "properties": [ + { + "country_a": "GBR" + } + ] + }, + "expected": { + "properties": [ + { + "country_a": "USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_boundary_rect.json b/projects/north-america/test_cases/autocomplete_boundary_rect.json new file mode 100644 index 0000000..983b0ed --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_boundary_rect.json @@ -0,0 +1,33 @@ +{ + "name": "autocomplete boundary.rect", + "priorityThresh": 3, + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Julian", + "type": "dev", + "in": { + "boundary.rect.min_lat":19, + "boundary.rect.max_lat":20, + "boundary.rect.min_lon":-99, + "boundary.rect.max_lon":-98, + "text": "san francisco" + }, + "expected": { + "properties": [ + { + "name": "San Francisco", + "country_a": "MEX" + } + ] + }, + "unexpected": { + "properties": [{ + "country_a": "USA" + }] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_daly_city.json b/projects/north-america/test_cases/autocomplete_daly_city.json new file mode 100644 index 0000000..b10f468 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_daly_city.json @@ -0,0 +1,145 @@ +{ + "name": "autocomplete daly city", + "notes": "https://github.com/pelias/pelias/issues/191", + "endpoint": "autocomplete", + "priorityThresh": 1, + "tests": [ + { + "id": "1", + "status": "fail", + "user": "missinglink", + "description": [ + "'Daly City' city not returned for 'dal' due to other more relevant..", + "results such as 'Dal, Sweden' matching.", + "'Daly City' is correctly returned from 'daly' (4 chars) onwards", + "This behaviour will fluctuate with changes to regional/local balance" + ], + "priorityThresh": 1, + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "dal" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "2", + "status": "pass", + "user": "missinglink", + "description": [ + "as per above, except there are other places closer to the focus", + "point than the centroid of Daly City" + ], + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "3", + "status": "pass", + "user": "missinglink", + "description": [ + "as per above, except there are other places closer to the focus", + "point than the centroid of Daly City" + ], + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly " + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "4", + "status": "pass", + "user": "missinglink", + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly c" + }, + "expected": { + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "5", + "status": "pass", + "user": "missinglink", + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly ci" + }, + "expected": { + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "6", + "status": "pass", + "user": "missinglink", + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly cit" + }, + "expected": { + "properties": [ + { + "name": "Daly City" + } + ] + } + }, + { + "id": "7", + "status": "pass", + "user": "missinglink", + "in": { + "focus.point.lat": "37.769316", + "focus.point.lon": "-122.484223", + "text": "daly city" + }, + "expected": { + "properties": [ + { + "name": "Daly City" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_focus.json b/projects/north-america/test_cases/autocomplete_focus.json new file mode 100644 index 0000000..0f9e0b3 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_focus.json @@ -0,0 +1,277 @@ +{ + "name": "autocomplete focus", + "priorityThresh": 5, + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "DiDi dumpling" + }, + "expected": { + "properties": [ + { + "label": "DiDi Dumpling, Manhattan, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "missinglink", + "notes": [ "NYC union square more important when focussed on NYC" ], + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "union square" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "Union Square, New York County, NY, USA" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "missinglink", + "notes": [ "SF union square more important when focussed on SF" ], + "type": "dev", + "in": { + "focus.point.lat": 37.769316, + "focus.point.lon": -122.484223, + "text": "union square" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "Union Square, San Francisco County, CA, USA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "missinglink", + "notes": [ "Berlin hard rock cafe more important when focussed on Berlin" ], + "type": "dev", + "in": { + "focus.point.lat": 52.5070540, + "focus.point.lon": 13.3217140, + "text": "hard rock cafe" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "Hard Rock Cafe Berlin, Berlin, Germany" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "missinglink", + "notes": [ "NYC hard rock cafe more important when focussed on NYC" ], + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "hard rock cafe" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "Hard Rock Cafe, Manhattan, New York, NY, USA" + } + ] + } + }, + { + "id": 24, + "status": "fail", + "user": "riordan", + "notes": [ "ID is 24 to match ID from search.json. SF Zoo should show up in SF. Logged by @nvkelso in: https://github.com/pelias/pelias/issues/183" ], + "in": { + "focus.point.lat": 37.743618, + "focus.point.lon": -122.426117, + "text": "zoo" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "San Francisco Zoo, San Francisco, CA, USA", + "name": "San Francisco Zoo" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "user": "randyme", + "notes": [ "Autocomplete is not prioritizing local address.", + "Issue filed in: https://github.com/pelias/pelias/issues/240" ], + "in": { + "focus.point.lat": 40.744131, + "focus.point.lon": -73.990424, + "text": "1 madison ave" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "1", + "street": "Madison Avenue", + "region": "New York", + "borough": "Manhattan", + "locality": "New York" + }, + { + "layer": "address", + "housenumber": "1", + "street": "Madison Ave", + "region": "New York", + "borough": "Manhattan", + "locality": "New York" + } + ] + } + }, + { + "id": 26, + "status": "pass", + "user": "missinglink", + "notes": [ + "tight markering clustering around focus.", + "when given a query which matches many results, the chosen results", + "should be as 'tightly' clustered around the focus point as possible", + "note: this test is not ideal, I would really like to confirm this:", + "http://missinglink.embed.s3.amazonaws.com/pelias_clustering.png", + "however the test suite doesn't currently support this behaviour." + ], + "in": { + "focus.point.lat": 40.744131, + "focus.point.lon": -73.990424, + "text": "w 26th st" + }, + "expected": { + "priorityThresh": 1, + "distanceThresh": 100, + "properties": [ + { + "region": "New York", + "borough": "Manhattan" + } + ], + "coordinates": [ + [ -73.990424, 40.744131 ] + ] + } + }, + { + "id": 27, + "status": "fail", + "user": "julian", + "notes": [ + "Searching for New York City with a focus in Stamford, CT" + ], + "issue": "https://github.com/pelias/pelias/issues/164", + "in": { + "focus.point.lat": 41.05343, + "focus.point.lon": -73.53873, + "text": "New York" + }, + "expected": { + "priorityThresh": 1, + "distanceThresh": 100, + "properties": [ + { + "name": "New York", + "layer": "locality", + "region": "New York" + } + ], + "coordinates": [ + [ -73.93827, 40.663931 ] + ] + } + }, + { + "id": 28, + "status": "fail", + "user": "julian", + "notes": [ + "Searching for New York City with a focus in Stamford, CT" + ], + "description": [ + "currently marked as failing due to https://github.com/pelias/pelias/issues/330" + ], + "issue": [ + "https://github.com/pelias/pelias/issues/330", + "https://github.com/pelias/pelias/issues/164" + ], + "in": { + "focus.point.lat": 41.05343, + "focus.point.lon": -73.53873, + "text": "New York, NY" + }, + "expected": { + "priorityThresh": 1, + "distanceThresh": 100, + "properties": [ + { + "name": "New York", + "layer": "locality", + "region": "New York" + } + ], + "coordinates": [ + [ -73.93827, 40.663931 ] + ] + } + }, + { + "id": 29, + "status": "pass", + "user": "julian", + "notes": [ + "searching for San Francisco via autocomplete with a focus in NYC" + ], + "issue": "https://github.com/pelias/pelias/issues/330", + "in": { + "focus.point.lat": 40.744131, + "focus.point.lon": -73.990424, + "text": "San Francisco" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco", + "layer": "locality" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_jitter.json b/projects/north-america/test_cases/autocomplete_jitter.json new file mode 100644 index 0000000..40a14e7 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_jitter.json @@ -0,0 +1,403 @@ +{ + "name": "autocomplete jitter", + "priorityThresh": 5, + "endpoint": "autocomplete", + "tests": [ + { + "id": "1.1", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dea" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.2", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.3", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean " + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.4", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean s" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.5", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean st" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.6", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean str" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.7", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean stre" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.8", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean stree" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.9", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.10", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street " + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.11", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street b" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.12", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street br" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.13", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street bro" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.14", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street broo" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.15", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street brook" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.16", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street brookl" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.17", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street brookly" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + }, + { + "id": "1.18", + "status": "pass", + "user": "missinglink", + "description": [ "find NYC address from Orient Point, Long Island" ], + "issue": "https://github.com/pelias/pelias/issues/165", + "in": { + "focus.point.lat": 41.15232, + "focus.point.lon": -72.25119, + "text": "190 dean street brooklyn" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "housenumber": "190", + "street": "Dean Street", + "borough": "Brooklyn" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_poi.json b/projects/north-america/test_cases/autocomplete_poi.json new file mode 100644 index 0000000..afe1f99 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_poi.json @@ -0,0 +1,135 @@ +{ + "name": "Autocomplete POI", + "notes": "For testing POI autocomplete responses", + "endpoint": "autocomplete", + "priorityThresh": 5, + "tests": [ + { + "id": "1-1", + "status": "fail", + "description": "@nvkelso couldn't find Target in Eureka while visiting home", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "priorityThresh": 1, + "in": { + "text": "Target Eureka CA" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "1-2", + "status": "fail", + "description": "@nvkelso couldn't find Target in Eureka while visiting home", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "priorityThresh": 1, + "in": { + "text": "Target Eureka California" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "1-3", + "status": "pass", + "description": "Searching with focus on", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "priorityThresh": 1, + "in": { + "text": "Target", + "focus.point.lat": "40.801944", + "focus.point.lon": "-124.163611" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "1-4", + "status": "fail", + "description": "Searching with focus on", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "priorityThresh": 1, + "in": { + "text": "Target Eureka", + "focus.point.lat": "40.801944", + "focus.point.lon": "-124.163611" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "2", + "status": "pass", + "description": "https://github.com/pelias/api/issues/287", + "user": "missinglink", + "priorityThresh": 5, + "in": { + "text": "didi", + "focus.point.lat": "40.744243", + "focus.point.lon": "-73.990342" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "DiDi Dumpling", + "region": "New York" + } + ] + } + }, + { + "id": "3", + "status": "pass", + "user": "feedback-app", + "note": "migrated this test from /search to /autocomplete", + "in": { + "text": "perugia air" + }, + "expected": { + "properties": [ + { + "name": "Perugia San Francesco d'Assisi – Umbria International Airport", + "region": "Perugia", + "country_a": "ITA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_stop_words.json b/projects/north-america/test_cases/autocomplete_stop_words.json new file mode 100644 index 0000000..efda95e --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_stop_words.json @@ -0,0 +1,57 @@ +{ + "name": "autocomplete stop words", + "notes": "https://github.com/pelias/schema/issues/105", + "endpoint": "autocomplete", + "priorityThresh": 5, + "tests": [ + { + "id": "1", + "status": "pass", + "user": "missinglink", + "priorityThresh": 5, + "in": { + "text": "world trade center" + }, + "expected": { + "properties": [ + { + "name": "World Trade Center" + } + ] + } + }, + { + "id": "2", + "status": "pass", + "user": "missinglink", + "priorityThresh": 5, + "in": { + "text": "242 hackney road" + }, + "expected": { + "properties": [ + { + "name": "242 Hackney Road" + } + ] + } + }, + { + "id": "3", + "status": "pass", + "user": "missinglink", + "description": [ "case of a query ending in a directional (west)" ], + "priorityThresh": 3, + "in": { + "text": "moscone west" + }, + "expected": { + "properties": [ + { + "name": "Moscone Convention Center West" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_street_centroids.json b/projects/north-america/test_cases/autocomplete_street_centroids.json new file mode 100644 index 0000000..3d91496 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_street_centroids.json @@ -0,0 +1,148 @@ +{ + "name": "autocomplete street centroids", + "priorityThresh": 1, + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/openstreetmap/issues/28", + "in": { + "sources": "osm", + "layers": "street", + "text": "rushendon furlong, england" + }, + "expected": { + "coordinates": [ -0.636911, 51.83567 ], + "properties": [ + { + "country_a": "GBR", + "name": "Rushendon Furlong", + "street": "Rushendon Furlong", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 2, + "status": "pass", + "user": "missinglink", + "description": "road segement divided in the middle by a park", + "notes": [ + "there should be two records, returned as result 1 & 2", + "the testing framework doesn't support this type of test" + ], + "in": { + "sources": "osm", + "layers": "street", + "text": "grolmanstr, berlin" + }, + "expected": { + "coordinates": [ 13.324042, 52.503915 ], + "properties": [ + { + "country_a": "DEU", + "name": "Grolmanstraße", + "street": "Grolmanstraße", + "layer": "street", + "source": "openstreetmap" + },{ + "country_a": "DEU", + "name": "Grolmanstraße", + "street": "Grolmanstraße", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 3, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/pelias/issues/545", + "in": { + "sources": "osm", + "layers": "street", + "text": "w 26 st, new york" + }, + "expected": { + "coordinates": [ -73.9981, 40.747625 ], + "distanceThresh": 1500, + "properties": [ + { + "country_a": "USA", + "name": "West 26th Street", + "street": "West 26th Street", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 4, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "glen rd, kelburn" + }, + "expected": { + "coordinates": [ 174.76323, -41.287732 ], + "properties": [ + { + "country_a": "NZL", + "name": "Glen Road", + "street": "Glen Road", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 5, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "dionysiou areopagitou, athens" + }, + "expected": { + "coordinates": [ 23.726606, 37.969645 ], + "properties": [ + { + "country_a": "GRC", + "name": "Dionysiou Areopagitou", + "street": "Dionysiou Areopagitou", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 6, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "혜화로, seoul" + }, + "expected": { + "coordinates": [ 127.000552, 37.586582 ], + "properties": [ + { + "country_a": "KOR", + "name": "혜화로", + "street": "혜화로", + "layer": "street", + "source": "openstreetmap" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_street_fallback.json b/projects/north-america/test_cases/autocomplete_street_fallback.json new file mode 100644 index 0000000..524fbbd --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_street_fallback.json @@ -0,0 +1,56 @@ +{ + "name": "autocomplete street fallback", + "priorityThresh": 5, + "endpoint": "autocomplete", + "description": [ + "query should return street centroid(s) followed by one or", + "more addresses on that street." + ], + "tests": [ + { + "id": 1, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/openstreetmap/issues/28", + "in": { + "text": "grolmanstr, berlin" + }, + "expected": { + "coordinates": [ 13.324042, 52.503915 ], + "properties": [ + { + "country_a": "DEU", + "street": "Grolmanstraße", + "layer": "street" + },{ + "country_a": "DEU", + "street": "Grolmanstraße", + "layer": "address" + } + ] + } + },{ + "id": 2, + "status": "pass", + "user": "missinglink", + "in": { + "text": "w 26th st, new york" + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "street": "West 26th Street", + "region": "New York", + "layer": "street" + },{ + "country_a": "USA", + "street": "West 26th Street", + "region": "New York", + "layer": "address" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_streets.json b/projects/north-america/test_cases/autocomplete_streets.json new file mode 100644 index 0000000..2ca0331 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_streets.json @@ -0,0 +1,438 @@ +{ + "name": "Autocomplete Streets", + "priorityThresh": 1, + "endpoint": "autocomplete", + "notes": "When searching for an address, after an abbreviation for the place has been typed, continuing to type the placename should improve or keep the top result as the same (e.g. st, stre, street). Related to: https://github.com/pelias/pelias/issues/165", + "tests": [ + { + "id": "1-1", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "1-2", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea A" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "1-2", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea Av" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "1-3", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea Ave" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "1-4", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea Aven" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "1-5", + "status": "pass", + "user": "riordan", + "in": { + "text": "90 Vermilyea Avenue" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + }, + { + "layer": "address", + "housenumber": "90", + "street": "Vermilyea Avenue" + } + ] + } + }, + { + "id": "2-1", + "status": "fail", + "user": "riordan", + "description": "Clay Ave should rank higher than Clayton Ave with this input", + "issue": "https://github.com/pelias/pelias/issues/331", + "in": { + "text": "424 Clay Av" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "424", + "street": "Clay Ave" + } + ] + } + }, + { + "id": "2-2", + "status": "pass", + "user": "riordan", + "description": [ "OA/OSM import order seems to matter so increase priorityThresh" ], + "in": { + "text": "424 Clay Ave" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "layer": "address", + "housenumber": "424", + "street": "Clay Ave" + }, + { + "layer": "address", + "housenumber": "424", + "street": "Clay Avenue" + } + ] + } + }, + { + "id": "2-3", + "status": "pass", + "user": "riordan", + "in": { + "text": "424 Clay Avenu" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "424", + "street": "Clay Avenue" + } + ] + } + }, + { + "id": "2-4", + "status": "pass", + "user": "riordan", + "in": { + "text": "424 Clay Avenue" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "424", + "street": "Clay Avenue" + } + ] + } + }, + { + "id": "3-1", + "status": "pass", + "user": "riordan", + "in": { + "text": "198 Baker St", + "focus.point.lat": 42.102222, + "focus.point.lon": -75.911667 + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "198", + "street": "Baker Street" + } + ] + } + }, + { + "id": "3-2", + "status": "pass", + "user": "riordan", + "in": { + "text": "198 Baker Str", + "focus.point.lat": 42.102222, + "focus.point.lon": -75.911667 + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "198", + "street": "Baker Street" + } + ] + } + }, + { + "id": "3-3", + "status": "pass", + "user": "riordan", + "in": { + "text": "198 Baker Stre", + "focus.point.lat": 42.102222, + "focus.point.lon": -75.911667 + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "198", + "street": "Baker Street" + } + ] + } + }, + { + "id": "3-4", + "status": "pass", + "user": "riordan", + "in": { + "text": "198 Baker Street", + "focus.point.lat": 42.102222, + "focus.point.lon": -75.911667 + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "198", + "street": "Baker Street" + } + ] + } + }, + { + "id": "4-1", + "status": "pass", + "user": "riordan", + "in": { + "text": "451 Fog Hill" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "451", + "street": "Fog Hill Road" + } + ] + } + }, + { + "id": "4-2", + "status": "pass", + "user": "riordan", + "in": { + "text": "451 Fog Hill rd" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "451", + "street": "Fog Hill Road" + } + ] + } + }, + { + "id": "4-3", + "status": "pass", + "user": "riordan", + "in": { + "text": "451 Fog Hill Road" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "451", + "street": "Fog Hill Road" + } + ] + } + }, + { + "id": "5", + "status": "pass", + "user": "missinglink", + "description": "https://github.com/pelias/api/issues/370", + "in": { + "text": "Hämeenkatu 1, Tampere" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "1", + "street": "Hämeenkatu", + "locality": "Tampere", + "country": "Finland" + } + ] + } + }, + { + "id": "6", + "status": "pass", + "user": "missinglink", + "description": "query ending with a single digit", + "notes": [ + "priorityThresh set to 5 as some sources contain the abbreviated", + "form Grolmanstr." + ], + "in": { + "text": "grolmanstr 1" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "layer": "address", + "housenumber": "1", + "street": "Grolmanstraße" + } + ] + } + }, + { + "id": "7", + "status": "pass", + "user": "missinglink", + "description": [ "house number provided in 3rd position instead of 1st" ], + "in": { + "text": "glasgow street 18, kelburn, wellington" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { "label": "18 Glasgow Street, Wellington, New Zealand" } + ] + } + }, + { + "id": "8", + "status": "pass", + "user": "missinglink", + "description": [ "house number provided in 3rd position instead of 1st" ], + "in": { + "text": "grolmanstrasse 51, charlottenburg, berlin" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { "label": "Grolmanstraße 51, Berlin, Germany" } + ] + } + }, + { + "id": "9", + "status": "pass", + "user": "missinglink", + "description": [ "borough matching, no delimiter" ], + "in": { + "text": "190 dean street brooklyn" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { "label": "190 Dean Street, Brooklyn, New York, NY, USA" } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/autocomplete_venues.json b/projects/north-america/test_cases/autocomplete_venues.json new file mode 100644 index 0000000..e663505 --- /dev/null +++ b/projects/north-america/test_cases/autocomplete_venues.json @@ -0,0 +1,85 @@ +{ + "name": "autocomplete", + "priorityThresh": 5, + "endpoint": "autocomplete", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "text": "DiDi Dumpling" + }, + "expected": { + "properties": [ + { + "label": "DiDi Dumpling, Manhattan, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "missinglink", + "in": { + "text": "hackney city farm" + }, + "expected": { + "properties": [ + { + "label": "Hackney City Farm, London, England, United Kingdom" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "missinglink", + "in": { + "text": "1 Grolmanstrasse" + }, + "expected": { + "properties": [ + { + "housenumber": "1", + "street": "Grolmanstraße", + "country": "Germany" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "missinglink", + "in": { + "text": "Beach Bablyon" + }, + "expected": { + "properties": [ + { + "label": "Beach Bablyon, Wellington, New Zealand" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "missinglink", + "in": { + "text": "Waiotapu" + }, + "expected": { + "properties": [ + { + "label": "Waiotapu, New Zealand" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/balance.json b/projects/north-america/test_cases/balance.json new file mode 100644 index 0000000..2195994 --- /dev/null +++ b/projects/north-america/test_cases/balance.json @@ -0,0 +1,144 @@ +{ + "name": "poi vs. admin areas balance", + "priorityThresh": 5, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "autocomplete", + "issue": "https://github.com/pelias/api/issues/346", + "description": [ + "When focus point is specified, results should slightly favor", + "nearby POIs, while still surfacing larger regions further away" + ], + "user": "dianashk", + "type": "dev", + "in": { + "text": "starbucks", + "focus.point.lat": 40.743987, + "focus.point.lon": -73.990417 + }, + "expected": { + "properties": [ + { + "name": "Starbucks", + "layer": "venue", + "county": "New York County", + "locality": "New York" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "issue": "https://github.com/pelias/api/issues/346", + "description": [ + "When focus point is specified, results should slightly favor", + "nearby POIs, while still surfacing larger regions further away" + ], + "user": "dianashk", + "type": "dev", + "in": { + "text": "starbucks", + "focus.point.lat": 40.743987, + "focus.point.lon": -73.990417 + }, + "expected": { + "properties": [ + { + "name": "Starbucks", + "layer": "venue", + "county": "New York County", + "locality": "New York" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "autocomplete", + "issue": "https://github.com/pelias/api/issues/346", + "description": [ + "When focus point is specified, results should slightly favor", + "nearby POIs, while still surfacing larger regions further away" + ], + "user": "dianashk", + "type": "dev", + "in": { + "text": "mcdonalds", + "focus.point.lat": 40.743987, + "focus.point.lon": -73.990417 + }, + "expected": { + "properties": [ + { + "name": "McDonald's", + "layer": "venue", + "county": "New York County", + "locality": "New York" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "endpoint": "search", + "issue": "https://github.com/pelias/api/issues/346", + "description": [ + "When focus point is specified, results should slightly favor", + "nearby POIs, while still surfacing larger regions further away" + ], + "user": "dianashk", + "type": "dev", + "in": { + "text": "mcdonalds", + "focus.point.lat": 40.743987, + "focus.point.lon": -73.990417 + }, + "expected": { + "properties": [ + { + "name": "McDonald's", + "layer": "venue", + "county": "New York County", + "locality": "New York" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "endpoint": "autocomplete", + "issue": "https://github.com/pelias/api/issues/328", + "description": [ + "When focus point is specified, results should slightly favor", + "nearby POIs, while still surfacing larger regions further away" + ], + "user": "dianashk", + "type": "dev", + "in": { + "text": "katzs deli", + "focus.point.lat": 40.74686681162143, + "focus.point.lon": -73.98983001708986 + }, + "expected": { + "properties": [ + { + "name": "Katz's Delicatessen", + "country_a": "USA", + "region": "New York", + "county": "New York County", + "locality": "New York" + } + ] + } + } + ] +} + diff --git a/projects/north-america/test_cases/brooklyn.json b/projects/north-america/test_cases/brooklyn.json new file mode 100644 index 0000000..cf26edc --- /dev/null +++ b/projects/north-america/test_cases/brooklyn.json @@ -0,0 +1,117 @@ +{ + "name": "Brooklyn", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Julian", + "type": "dev", + "in": { + "text": "brooklyn", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Julian", + "type": "dev", + "in": { + "text": "brooklyn", + "layers": "borough", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + }, + { + "id": "3-autocomplete", + "status": "pass", + "user": "Julian", + "type": "dev", + "endpoint": "autocomplete", + "in": { + "text": "brooklyn", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Julian", + "type": "dev", + "in": { + "text": "brooklyn" + }, + "expected": { + "priorityThresh": 4, + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Julian", + "type": "dev", + "in": { + "text": "brooklyn", + "layers": "borough" + }, + "expected": { + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + }, + { + "id": "6-autocomplete", + "status": "pass", + "user": "Julian", + "type": "dev", + "endpoint": "autocomplete", + "in": { + "text": "brooklyn" + }, + "expected": { + "priorityThresh": 5, + "properties": [ + { + "name": "Brooklyn", + "region": "New York" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/confidence_score.json b/projects/north-america/test_cases/confidence_score.json new file mode 100644 index 0000000..d676050 --- /dev/null +++ b/projects/north-america/test_cases/confidence_score.json @@ -0,0 +1,35 @@ +{ + "name": "confidence score", + "priorityThresh": 5, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Julian", + "description": "This is an attempt to test that an address with zipcode that is found does not fail a 'deal breaker'", + "type": "dev", + "in": { + "text": "1 West 72nd St, New York, NY, 10023" + }, + "expected": { + "properties": [ + { + "name": "1 W 72 St", + "housenumber": "1", + "street": "W 72 St", + "country_a": "USA", + "postalcode": "10023", + "confidence": 1 + } + ] + }, + "unexpected": { + "properties": [ + { + "confidence": 0.5 + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/data.json b/projects/north-america/test_cases/data.json new file mode 100644 index 0000000..c04dc26 --- /dev/null +++ b/projects/north-america/test_cases/data.json @@ -0,0 +1,25 @@ +{ + "name": "data issues", + "description": "Tests intended to confirm that certain data is present and correct", + "priorityThresh": 1, + "tests": [ + { + "id": "1", + "status": "pass", + "user": "julian", + "description": "WOF once said that all of Copenhagen was within Sweden", + "in": { + "text": "Copenhagen" + }, + "expected": { + "properties": [ + { + "country_a": "DNK", + "country": "Denmark", + "name": "Copenhagen" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/encoding.json b/projects/north-america/test_cases/encoding.json new file mode 100644 index 0000000..99e3587 --- /dev/null +++ b/projects/north-america/test_cases/encoding.json @@ -0,0 +1,73 @@ +{ + "name": "encoding, or fun with diacritics", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "make sure that results return the appropriate accents on results", + "in": { + "text": "mexico city" + }, + "expected": { + "properties": [ + { + "county": "Benito Juárez", + "region": "Ciudad de México", + "name": "Mexico City", + "country": "Mexico" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "description": "make sure that results return the appropriate accents on results", + "notes": "https://github.com/pelias/api/issues/731", + "in": { + "lang": "et", + "text": "pärnu, estonia" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "name": "Pärnu maakond", + "region": "Pärnu maakond", + "country": "Eesti" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "search", + "issue": [ + "https://github.com/pelias/api/issues/600", + "https://github.com/pelias/pelias/issues/426" + ], + "description": [ + "the Chambéry accent issue, with the accented e represented as 1 character", + "waiting for libpostal to address diacriticals" + ], + "in":{ + "text": "Chambéry" + }, + "expected": { + "properties": [ + { + "name": "Chambéry", + "macroregion": "Auvergne-Rhone-Alpes", + "locality": "Chambéry", + "label": "Chambéry, France", + "country": "France" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/exact_matches.json b/projects/north-america/test_cases/exact_matches.json new file mode 100644 index 0000000..537af64 --- /dev/null +++ b/projects/north-america/test_cases/exact_matches.json @@ -0,0 +1,138 @@ +{ + "name": "exact matches", + "priorityThresh": 5, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "sevko", + "in": { + "text": "100 20th street" + }, + "expected": { + "properties": [ + { + "name": "100 20th St" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "sevko", + "in": { + "text": "40 20th street" + }, + "expected": { + "properties": [ + { + "name": "40 20th Street" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "sevko", + "in": { + "text": "120 42nd Street" + }, + "expected": { + "properties": [ + { + "name": "120 42nd Street" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "sevko", + "type": "dev", + "in": { + "text": "358 41st street, ny" + }, + "expected": { + "properties": [ + { + "name": "358 41st Street" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "sevko", + "type": "dev", + "in": { + "text": "1359 54 street, ny" + }, + "expected": { + "properties": [ + { + "name": "1359 54th Street" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "sevko", + "type": "dev", + "in": { + "text": "310 7 street, ny" + }, + "expected": { + "properties": [ + { + "name": "310 7th Street" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "sevko", + "type": "dev", + "description": "libpostal id's `921` as postcode", + "issue": "https://github.com/pelias/pelias/issues/427", + "in": { + "text": "921 83 street, ny" + }, + "expected": { + "properties": [ + { + "name": "921 83rd Street" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "sevko", + "type": "dev", + "in": { + "text": "518 3 street, ny" + }, + "expected": { + "properties": [ + { + "name": "518 3rd Street", + "locality": "New York" + }, + { + "name": "518 3 St", + "locality": "New York" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/fallback.json b/projects/north-america/test_cases/fallback.json new file mode 100644 index 0000000..84da73d --- /dev/null +++ b/projects/north-america/test_cases/fallback.json @@ -0,0 +1,78 @@ +{ + "name": "fallback queries", + "priorityThresh": 5, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": [ + "this test verifies that a housenumber+street outscores the very common city of berlin", + "https://github.com/pelias/pelias/issues/442" + ], + "in": { + "text": "grolmanstraße 51, berlin" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "DEU", + "locality": "Berlin", + "housenumber": "51", + "street": "Grolmanstraße" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": [ + "this test verifies that a street outscores the very common city of berlin", + "https://github.com/pelias/pelias/issues/442" + ], + "in": { + "text": "grolmanstraße, berlin" + }, + "expected": { + "properties": [ + { + "layer": "street", + "country_a": "DEU", + "locality": "Berlin", + "street": "Grolmanstraße" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": [ + "this test verifies that a housenumber+street outscores the very common city of berlin", + "https://github.com/pelias/pelias/issues/442" + ], + "in": { + "text": "101 california, san francisco" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "USA", + "locality": "San Francisco", + "housenumber": "101", + "street": "California" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/french_addresses.json b/projects/north-america/test_cases/french_addresses.json new file mode 100644 index 0000000..954d9bb --- /dev/null +++ b/projects/north-america/test_cases/french_addresses.json @@ -0,0 +1,220 @@ +{ + "name": "French addresses", + "priorityThresh": 1, + "endpoint": "search", + "normalizers": { + "street": [ + "toUpperCase" + ] + }, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "7 Rue Pointeau du Ronceray Rennes" + }, + "expected": { + "properties": [ + { + "housenumber": "7", + "street": "Rue Pointeau Du Ronceray", + "locality": "Rennes", + "country_a": "FRA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "20 Boulevard Saint-Martin, Paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": "2-abbrev", + "status": "fail", + "user": "adefarge", + "type": "france", + "issue": "Missing synonyms", + "in": { + "text": "20 bd saint-martin paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": "2-abbrev-hyphen", + "status": "fail", + "user": "adefarge", + "type": "france", + "issue": "Missing synonyms and split on hyphen", + "in": { + "text": "20 bd st martin paris" + }, + "expected": { + "properties": [ + { + "housenumber": "20", + "street": "Boulevard Saint-martin", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "Avenue du Maine Paris" + }, + "expected": { + "properties": [ + { + "street": "Avenue du Maine", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": "3-abbrev", + "status": "fail", + "user": "adefarge", + "type": "france", + "issue": "Missing synonyms", + "in": { + "text": "av du maine paris" + }, + "expected": { + "properties": [ + { + "street": "Avenue du Maine", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "Boulevard de la Liberte, Rennes" + }, + "expected": { + "properties": [ + { + "name": "Boulevard de la Liberté", + "locality": "Rennes", + "country_a": "FRA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "st germain les arpajon" + }, + "expected": { + "properties": [ + { + "locality": "Saint-Germain-lès-Arpajon", + "country_a": "FRA" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "adefarge", + "type": "france", + "in": { + "text": "14 impasse du parc st germain les arpajon " + }, + "expected": { + "properties": [ + { + "housenumber": "14", + "street": "Impasse Du Parc", + "locality": "Saint-Germain-lès-Arpajon", + "country_a": "FRA" + } + ] + } + }, + { + "id": 7, + "status": "fail", + "user": "adefarge", + "type": "france", + "issue": "Missing synonyms", + "in": { + "text": "6 r de bellevue mur de bretagne" + }, + "expected": { + "properties": [ + { + "housenumber": "6", + "street": "Rue De Bellevue", + "locality": "Mûr-de-Bretagne", + "country_a": "FRA" + } + ] + } + }, + { + "id": 8, + "status": "fail", + "user": "adefarge", + "type": "france", + "issue": "Missing synonyms and split on hyphen", + "in": { + "text": "r gay lussac paris" + }, + "expected": { + "properties": [ + { + "street": "Rue Gay-Lussac", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/international.json b/projects/north-america/test_cases/international.json new file mode 100644 index 0000000..e194f05 --- /dev/null +++ b/projects/north-america/test_cases/international.json @@ -0,0 +1,372 @@ +{ + "name": "International addresses", + "priorityThresh": 5, + "normalizers": { + "name": [ + "toUpperCase" + ] + }, + "tests": [ + { + "id": 0, + "status": "pass", + "user": "lily", + "in": { + "text": "553 St. Kilda Road Melbourne 3004", + "boundary.country": "AUS" + }, + "expected": { + "properties": [ + { + "name": "553 St Kilda Road", + "locality": "Melbourne", + "country_a": "AUS" + } + ] + } + }, + { + "id": 1, + "status": "pass", + "user": "lily", + "issue": "https://github.com/pelias/pelias/issues/603", + "description": [ + "match is found by removing neighborhood (WOF locality) Chácara Santo Antônio and " + ], + "in": { + "text": "Rua Henri Dunant 500 04709-110 São Paulo", + "boundary.country": "BRA" + }, + "expected": { + "properties": [ + { + "name": "500 Rua Henri Dunant", + "locality": "São Paulo", + "country_a": "BRA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "lily", + "in": { + "text": "Clayallee 170 14191 Berlin", + "boundary.country": "DEU" + }, + "expected": { + "properties": [ + { + "name": "Clayallee 170", + "locality": "Berlin", + "country_a": "DEU" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "lily", + "in": { + "text": "Calle de Serrano 75 28006 Madrid", + "boundary.country": "ESP" + }, + "expected": { + "properties": [ + { + "name": "75 Calle de Serrano", + "locality": "Madrid", + "country_a": "ESP" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "lily", + "in": { + "text": "2 avenue Gabriel 75008 Paris", + "boundary.country": "FRA" + }, + "expected": { + "properties": [ + { + "name": "2 avenue Gabriel", + "locality": "Paris", + "country_a": "FRA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "lily", + "in": { + "text": "via Vittorio Veneto 121 00187 Roma", + "boundary.country": "ITA" + }, + "expected": { + "properties": [ + { + "name": "121 via Vittorio Veneto", + "locality": "Rome", + "country_a": "ITA" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "lily", + "in": { + "text": "490 Sussex Drive Ottawa K1N 1G8", + "boundary.country": "CAN" + }, + "expected": { + "properties": [ + { + "name": "490 Sussex Drive", + "locality": "Ottawa", + "country_a": "CAN" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "lily", + "in": { + "text": "24 Grosvenor Square London W1K 6AH", + "boundary.country": "GBR" + }, + "expected": { + "properties": [ + { + "name": "24 Grosvenor Square", + "locality": "London", + "country_a": "GBR" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "lily", + "in": { + "text": "Prolongación Ave. Alfonso Reyes #150 Col. Valle del Poniente Santa Catarina 66196", + "boundary.country": "MEX" + }, + "expected": { + "properties": [ + { + "name": "150 Prolongacion Avenida Alfonso Reyes", + "locality": "Ciudad Santa Catarina", + "country_a": "MEX" + } + ] + } + }, + { + "id": 9, + "status": "fail", + "user": "lily", + "description": [ + "Russian street name in native langauge passes" + ], + "issue": "https://github.com/pelias/pelias/issues/685", + "in": { + "text": "15 Фурштатская улица Saint Petersburg 191028", + "boundary.country": "RUS" + }, + "expected": { + "properties": [ + { + "name": "15 Фурштатская улица", + "locality": "Saint Petersburg", + "country_a": "RUS" + } + ] + } + }, + { + "id": 10, + "status": "fail", + "user": "Lily", + "type": "dev", + "issue": "https://github.com/pelias/api/issues/783", + "description": [ + "not recognized: spanish abbreviation av. for avenida. Similar problem with Brazilian addresses (Portuguese)" + ], + "in": { + "text": "Av. Juárez, Guadalajara, México" + }, + "expected": { + "properties": [ + { + "name": "Avenida Juárez", + "region": "Jalisco", + "country": "Mexico" + } + ] + } + }, + { + "id": 11, + "status": "fail", + "user": "lily", + "description": [ + "fallsback to street centroid", + "Brazilian addresses generally fail because they are composed of street intersections" + ], + "in": { + "text": "Rua Gonçalves Maia 163 – Boa Vista 50070-060 Recife", + "boundary.country": "BRA" + }, + "expected": { + "properties": [ + { + "name": "Rua Gonçalves Maia 163", + "locality": "Recife", + "country_a": "BRA" + } + ] + } + }, + { + "id": 12, + "status": "pass", + "user": "lily", + "description": [ + "prod missing locality data. passes on prodbuild" + ], + "in": { + "text": "615 MacLeod Trail S.E. 10th Floor Calgary T2G 4T8", + "boundary.country": "CAN" + }, + "expected": { + "properties": [ + { + "name": "615 MacLeod Tr SE", + "locality": "Calgary", + "country_a": "CAN" + } + ] + } + }, + { + "id": 13, + "status": "fail", + "user": "lily", + "description": [ + "Eliminate abbreviation in parens. Gets neighborhood, Kurla East, instead of a venue" + ], + "in": { + "text": "Bandra Kurla Complex Mumbai 400051", + "boundary.country": "IND" + }, + "expected": { + "properties": [ + { + "name": "Bandra Kurla Complex (BKC)", + "locality": "Mumbai", + "country_a": "IND" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "user": "lily", + "description": [ + "Street exists in OSM data but returns various addresses instead of street centroid" + ], + "in": { + "text": "Paseo de la Reforma Colonia Cuauhtemoc Mexico D.F. 06500", + "boundary.country": "MEX" + }, + "expected": { + "properties": [ + { + "name": "Paseo de la Reforma", + "layer": "street", + "locality": "Mexico City", + "country_a": "MEX" + } + ] + } + }, + { + "id": 15, + "status": "fail", + "user": "lily", + "issue": "https://github.com/pelias/pelias/issues/603", + "description": [ + "Including the neighborhood, Col. Americana, causes falling back to the locaity" + ], + "in": { + "text": "Progreso 175 Col. Americana Guadalajara 44160", + "boundary.country": "MEX" + }, + "expected": { + "properties": [ + { + "name": "Progreso 175", + "locality": "Guadalajara", + "country_a": "MEX" + } + ] + } + }, + { + "id": 16, + "status": "fail", + "user": "lily", + "issue": "https://github.com/pelias/api/issues/127", + "description": [ + "Russian street name does not exist in English" + ], + "in": { + "text": "32 Pushkinskaya St. Vladivostok 690001", + "boundary.country": "RUS" + }, + "expected": { + "properties": [ + { + "name": "32 Pushkinskaya St.", + "locality": "Vladivostok", + "country_a": "RUS" + } + ] + } + }, + { + "id": 17, + "status": "fail", + "user": "lily", + "description": [ + "housenumber has a slash. Falls back to street centroid. The building next to it has housenumber 2" + ], + "in": { + "text": "via Principe Amedeo 2/10 20121 MILANO", + "boundary.country": "ITA" + }, + "expected": { + "properties": [ + { + "name": "via Principe Amedeo 2/10", + "locality": "Milano", + "country_a": "ITA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/korean_addresses.json b/projects/north-america/test_cases/korean_addresses.json new file mode 100644 index 0000000..6704a2f --- /dev/null +++ b/projects/north-america/test_cases/korean_addresses.json @@ -0,0 +1,216 @@ +{ + "name": "Korean address (new format)", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "Diana", + "description": "existing address, new format, with postalcode", + "issue": "waiting for Seoul rename to be published", + "in": { + "text": "3047 서울특별시 청운동 종로구 자하문로 94", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "자하문로", + "county": "종로구", + "locality": "서울", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 종로구 자하문로 94" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "Hanbyul", + "description": "", + "in": { + "text": "모세로 27", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "모세로", + "county": "광명시", + "region": "경기도", + "country": "한국", + "country_a": "KOR", + "label": "한국 경기도 광명시 모세로 27" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "Hanbyul", + "description": "existing address", + "issue": "waiting for Seoul and Gangseo-gu rename to be published", + "in": { + "text": "서울시 강서구 허준로 139", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "허준로", + "county": "강서구", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 강서구 허준로 139" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Gangseo-gu" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "Hanbyul", + "description": "building name after housenumber is not in data, but should not screw up search", + "issue": "waiting for Seoul rename to be published", + "in": { + "text": "마포구 서강로9길 12 한솔빌라트", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "서강로9길", + "county": "마포구", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 마포구 서강로9길 12" + } + ] + } + }, + { + "id": 5, + "status": "fail", + "user": "Hanbyul", + "description": "new format address", + "issue": "check if data exists", + "in": { + "text": "제주시 중앙로 236", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "중앙로", + "county": "제주시", + "region": "제주특별자치도", + "country": "한국", + "country_a": "KOR", + "label": "한국 제주특별자치도 제주시 중앙로 236" + } + ] + } + }, + { + "id": 6, + "status": "fail", + "user": "Diana", + "description": "existing address in new format", + "issue": "waiting for Seoul rename to be published", + "in": { + "text": "독서당로39길 22", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "독서당로39길", + "housenumber": "22", + "county": "용산구", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 용산구 독서당로39길 22" + } + ] + } + }, + { + "id": 7, + "status": "fail", + "user": "Hanbyul", + "description": "old format", + "issue": "no street name but neighbourhood instead", + "in": { + "text": "방배동 13-8", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "13-8", + "neighbourhood": "방배동", + "county": "서초구", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 서초구 방배동 13-8" + } + ] + } + }, + { + "id": 8, + "status": "fail", + "user": "Hanbyul", + "description": "new format", + "issue": "possibly missing the data for this address, also no korean name for county", + "in": { + "text": "의정부 시민로 122번길 9", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "9", + "street": "시민로122번길", + "neighbourhood": "의정부동", + "county": "의정부시", + "region": "경기도", + "country": "한국", + "country_a": "KOR", + "label": "한국 경기도 의정부시 시민로122번길 9" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Uijeongbu-si" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/korean_admin.json b/projects/north-america/test_cases/korean_admin.json new file mode 100644 index 0000000..7dbde0b --- /dev/null +++ b/projects/north-america/test_cases/korean_admin.json @@ -0,0 +1,124 @@ +{ + "name": "Korean admin", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "Diana", + "description": "Seoul (locality, region)", + "issue": "waiting on Seoul renaming to be published", + "in": { + "text": "서울", + "lang": "ko" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "서울", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 서울" + }, + { + "layer": "region", + "region": "서울특별시", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "Diana", + "description": "Yongsan-gu (county)", + "issue": "waiting on Seoul renaming to be published", + "in": { + "text": "용산구", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "name": "용산구", + "country": "한국", + "country_a": "KOR", + "region": "서울특별시", + "county": "용산구", + "label": "한국 서울특별시 용산구" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "Diana", + "description": "Pohang (localadmin)", + "issue": "wrong county admin lookup", + "in": { + "text": "포항시", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "name": "포항시", + "country": "한국", + "country_a": "KOR", + "region": "경상북도", + "county": "경북", + "localadmin": "포항시", + "label": "한국 경상북도 포항시" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "Diana", + "description": "Goyang-Si (locality)", + "issue": "not sure what the label and hierarchy should be for this", + "in": { + "text": "고양시", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "고양시", + "country": "한국", + "country_a": "KOR", + "region": "경기도", + "locality": "고양시", + "label": "한국 경기도 고양시" + } + ] + } + }, + { + "id": 4.1, + "status": "fail", + "user": "Diana", + "description": "Counties missing native names", + "in": { + "text": "Goyangsiilsandonggu", + "lang": "ko" + }, + "unexpected": { + "properties": [ + { + "county": "Goyangsiilsandonggu" + } + ]} + } + ] +} diff --git a/projects/north-america/test_cases/korean_venues.json b/projects/north-america/test_cases/korean_venues.json new file mode 100644 index 0000000..ed976c0 --- /dev/null +++ b/projects/north-america/test_cases/korean_venues.json @@ -0,0 +1,266 @@ +{ + "name": "Korean venues", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "Diana", + "description": "Seoul Starbucks, make sure the top result is in Seoul and not another city", + "issue": "libpostal doesn't recognize Seoul as city when it comes first in the query", + "in": { + "text": "서울 스타벅스", + "lang": "ko", + "size": "1" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "스타벅스", + "locality": "서울", + "county": "종로구", + "region": "서울", + "country": "한국", + "country_a": "KOR", + "label": "한국 서울특별시 종로구 스타벅스" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "Hanbyul", + "description": [ + "input text is `Sangam World Cup Park 2 complex` as the text", + "expected result should be as follows:", + "new format: 서울특별시 마포구 월드컵북로47길 46", + "old format: 상암동, 상암월드컵파크 2단지" + ], + "in": { + "text": "마포구 상암동 월드컵파크 2단지", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "address", + "street": "월드컵북로47길", + "county": "마포구", + "region": "서울특별시", + "country": "한국", + "neighbourhood": "상암동", + "country_a": "KOR", + "label": "한국 서울특별시 상암동 상암월드컵파크 2단지" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "Hanbyul", + "description": "input is Gyeongbuk Pohang-si Nam-gu Jigok-ro, Pohang University of Science and Technology", + "issue": "county admin lookup seems to be incorrect", + "in": { + "text": "경북 포항시 남구 효자동 포항공과대학교 기계실험동", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "street": "서강로9길", + "county": "포항시", + "region": "경상북도", + "country": "한국", + "country_a": "KOR", + "label": "한국 경상북도 포항시 포항공과대학교 기계실험동" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "Hanbyul", + "description": "input is Galleria Department Store", + "issue": "waiting on county names in Korean to be moved from unk_x_variant to kor_x_preferred", + "in": { + "text": "갤러리아 타임월드", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "region": "대전광역시", + "county": "서구", + "locality": "대전", + "country": "한국", + "country_a": "KOR", + "label": "한국 대전광역시 서구 갤러리아 타임월드점" + } + ] + }, + "unexpected": { + "properties": [ + { + "county": "Seo-gu" + } + ] + } + }, + { + "id": 5, + "status": "fail", + "user": "Hanbyul", + "description": "input is Gwangmyeong Sung Ae Hospital", + "issue": "name should not have the english version in ()", + "in": { + "text": "광명성애병원", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "광명성애병원", + "country": "한국", + "country_a": "KOR", + "region": "경기도", + "county": "광명시", + "label": "한국 경기도 광명시 광명성애병원" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Hanbyul", + "description": "input is Youngpoong Book, it's a chain so just check for venue layer and name", + "in": { + "text": "영풍문고", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "영풍문고", + "country": "한국", + "country_a": "KOR" + } + ] + } + }, + { + "id": 7, + "status": "fail", + "user": "Hanbyul", + "description": "input is Chosun University", + "issue": "waiting on Seoul renaming to be published", + "in": { + "text": "조선대학교", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "조선대학교", + "country": "한국", + "country_a": "KOR", + "region": "광주광역시", + "county": "동구", + "locality": "광주광역시", + "label": "한국 광주광역시 동구 조선대학교" + } + ] + } + }, + { + "id": 8, + "status": "fail", + "user": "Hanbyul", + "description": "input is Seoul Metropolitan Government Library", + "issue": "waiting on Seoul renaming to be published", + "in": { + "text": "서울특별시립정독도서관", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "서울특별시립정독도서관", + "country": "한국", + "country_a": "KOR", + "region": "서울특별시", + "county": "종로구", + "locality": "서울", + "label": "한국 서울특별시 종로구 서울특별시립정독도서관" + } + ] + } + }, + { + "id": 9, + "status": "fail", + "user": "Hanbyul", + "description": [ + "input is Pohangjukdo Market (it's a supermarket)", + "when it's one word the record is found, but when there is a space", + "between the two words we can't find it" + ], + "in": { + "text": "포항죽도시장", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "포항죽도시장", + "country": "한국", + "country_a": "KOR", + "region": "경북", + "county": "포항시", + "locality": "북구", + "label": "한국 경북 포항시 포항죽도시장" + } + ] + } + }, + { + "id": 9.1, + "status": "fail", + "user": "Hanbyul", + "description": [ + "input is Pohangjukdo Market (it's a supermarket)", + "when it's one word the record is found, but when there is a space", + "between the two words we can't find it" + ], + "in": { + "text": "포항 죽도시장", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "포항죽도시장", + "country": "한국", + "country_a": "KOR", + "region": "경북", + "county": "포항시", + "locality": "북구", + "label": "한국 경북 포항시 포항죽도시장" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/labels.json b/projects/north-america/test_cases/labels.json new file mode 100644 index 0000000..a69fd13 --- /dev/null +++ b/projects/north-america/test_cases/labels.json @@ -0,0 +1,397 @@ +{ + "name": "labels", + "priorityThresh": 10, + "notes": [ "Ensure the 'label' property is being correctly built" ], + "tests": [ + { + "id": 1, + "status": "pass", + "user": "missinglink", + "in": { + "text": "San Francisco, San Francisco County, CA" + }, + "expected": { + "properties": [{ + "label": "San Francisco, CA, USA" + }] + } + }, + { + "id": 2, + "status": "pass", + "user": "missinglink", + "in": { + "text": "30 West 26th Street, Manhattan, NY" + }, + "expected": { + "properties": [{ + "label": "30 West 26th Street, Manhattan, New York, NY, USA" + }] + } + }, + { + "id": 3, + "status": "pass", + "user": "missinglink", + "in": { + "text": "New South Wales, Australia" + }, + "expected": { + "properties": [{ + "label": "New South Wales, Australia" + }] + } + }, + { + "id": 4, + "status": "pass", + "description": "placeholder matches both California (USA region) and Canada (country)", + "user": "missinglink", + "in": { + "text": "California, CA" + }, + "expected": { + "properties": [{ + "label": "California, USA" + }] + } + }, + { + "id": 5, + "status": "pass", + "user": "missinglink", + "in": { + "text": "West Bengal, India" + }, + "expected": { + "properties": [{ + "label": "West Bengal, India" + }] + } + }, + { + "id": 6, + "status": "pass", + "issue": [ + "https://github.com/pelias/pelias/issues/294", + "https://github.com/pelias/pelias/issues/428" + ], + "description": "libpostal/placeholder get this now", + "user": "missinglink", + "in": { + "text": "North West, Singapore" + }, + "expected": { + "priorityThresh": 1, + "properties": [{ + "label": "North West, Singapore" + }] + } + }, + { + "id": 7, + "status": "fail", + "user": "missinglink", + "description": "hierarchy for the county of Erbil is missing in WOF", + "issue": "https://github.com/pelias/wof-admin-lookup/issues/156", + "in": { + "text": "Erbil, Iraq" + }, + "expected": { + "properties": [{ + "label": "Erbil, Iraq" + }] + } + }, + { + "id": 8, + "status": "pass", + "user": "missinglink", + "in": { + "text": "Madrid, Spain" + }, + "expected": { + "properties": [{ + "label": "Madrid, Spain" + }] + } + }, + { + "id": 9, + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/292", + "description": [ + "Dungannon is showing up as a region, when it should be a locality.", + "The label is also generated incorrectly given the information available to it." + ], + "user": "missinglink", + "in": { + "text": "1 Main St, Dungannon, United Kingdom" + }, + "expected": { + "properties": [{ + "label": "1 Main St, Dungannon, United Kingdom" + }] + } + }, + { + "id": 10, + "status": "pass", + "user": "missinglink", + "in": { + "text": "Hackney City Farm, Haggerston, Greater London" + }, + "expected": { + "properties": [{ + "label": "Hackney City Farm, London, England, United Kingdom" + }] + } + }, + { + "id": 11, + "status": "pass", + "user": "missinglink", + "in": { + "text": "1 Grolmanstraße, Berlin, Germany" + }, + "expected": { + "properties": [{ + "label": "Grolmanstraße 1, Berlin, Germany" + }] + } + }, + { + "id": 12, + "status": "pass", + "user": "missinglink", + "in": { + "text": "New Zealand" + }, + "expected": { + "properties": [{ + "label": "New Zealand" + }] + } + }, + { + "id": 13, + "status": "pass", + "user": "missinglink", + "in": { + "text": "McDonald's, Central Singapore, Singapore" + }, + "expected": { + "properties": [{ + "label": "McDonald's, Singapore, Singapore" + }] + } + }, + { + "id": 14, + "status": "pass", + "user": "julian", + "in": { + "text": "France" + }, + "expected": { + "properties": [{ + "label": "France" + }] + } + }, + { + "id": 15, + "status": "fail", + "description": "geonnames localadmin records should not have borough or locality component in label", + "issue": [ "https://github.com/pelias/wof-admin-lookup/issues/49", + "https://github.com/pelias/wof-admin-lookup/issues/220" ], + "user": "julian", + "in": { + "text": "city of new york", + "sources": "geonames", + "layers": "localadmin" + }, + "expected": { + "properties": [{ + "source": "geonames", + "label": "City of New York, NY, USA" + }] + } + }, + { + "id": 16, + "status": "fail", + "description": "geonames country records should not have duplicate country in the label", + "issue": "https://github.com/pelias/wof-admin-lookup/issues/49", + "user": "julian", + "in": { + "text": "china", + "sources": "geonames", + "layers": "country" + }, + "expected": { + "properties": [{ + "label": "People's Republic of China" + }] + } + }, + { + "id": 17, + "status": "pass", + "description": "locality in US dependency should have dependency as least granular field", + "issue": "https://github.com/pelias/api/issues/628", + "user": "trescube", + "in": { + "text": "bayamon, pr", + "sources": "wof", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "label": "Bayamón, Puerto Rico" + } + ] + } + }, + { + "id": 18, + "status": "pass", + "description": "locality in US dependency should have dependency as least granular field", + "issue": "https://github.com/pelias/api/issues/628", + "user": "trescube", + "in": { + "text": "aasu, as", + "sources": "wof", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "label": "Aasu, American Samoa" + } + ] + } + }, + { + "id": 19, + "status": "fail", + "description": "locality in non-US dependency should still include country", + "issue": [ + "https://github.com/pelias/labels/issues/5", + "https://github.com/pelias/placeholder/issues/54" + ], + "user": "trescube", + "in": { + "text": "George Hill, Anguilla", + "sources": "wof", + "layers": "locality", + "boundary.country": "GBR" + }, + "expected": { + "properties": [ + { + "label": "George Hill, Anguilla" + } + ] + } + }, + { + "id": 20, + "status": "fail", + "description": "locality in non-US dependency should still include country", + "issue": [ + "https://github.com/pelias/labels/issues/5", + "https://github.com/pelias/placeholder/issues/54" + ], + "user": "trescube", + "in": { + "text": "Tórshavn faroe islands", + "sources": "wof", + "layers": "locality", + "lang": "da" + }, + "expected": { + "properties": [ + { + "label": "Tórshavn, Færøerne" + } + ] + } + }, + { + "id": 21, + "status": "pass", + "description": "locality in non-US dependency should still include country", + "issue": "https://github.com/pelias/labels/issues/5", + "user": "trescube", + "in": { + "text": "Hog Bay Bermuda", + "sources": "wof", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "label": "Hog Bay, Bermuda" + } + ] + } + }, + { + "id": 22, + "status": "pass", + "description": "locality in non-US dependency should still include country", + "issue": "https://github.com/pelias/labels/issues/5", + "user": "trescube", + "in": { + "text": "Adamstown, Pitcairn Islands", + "sources": "wof", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "label": "Adamstown, Pitcairn Islands" + } + ] + } + }, + { + "id": 23, + "status": "pass", + "description": "non-US dependency should still include the parent country", + "issue": "https://github.com/pelias/labels/issues/5", + "user": "trescube", + "in": { + "text": "Bermuda", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "label": "Bermuda" + } + ] + } + }, + { + "id": 24, + "status": "pass", + "description": "Washington, D.C. venues should have District of Columbia abbreviation", + "issue": "https://github.com/pelias/labels/issues/14", + "user": "julian", + "in": { + "text": "national air and space museum, washington dc" + }, + "expected": { + "properties": [ + { + "label": "National Air and Space Museum, Washington, DC, USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/landmarks.json b/projects/north-america/test_cases/landmarks.json new file mode 100644 index 0000000..56f3ad6 --- /dev/null +++ b/projects/north-america/test_cases/landmarks.json @@ -0,0 +1,31 @@ +{ + "name": "landmarks", + "priorityThresh": 5, + "tests": [ + { + "id": 14, + "status": "fail", + "description": [ + "because there is no indication of importance or popularity in our data", + "we have no way of knowing how to properly sort the results.", + "When they all have a name that matches the query, sort order of results", + "is based purely on order at import time or some variable ES search process.", + "In order to really fix this test, we must find definitive source of popularity data", + "for POIs that have common names." + ], + "issue": "https://github.com/pelias/pelias/issues/171", + "type": "dev", + "user": "hkrishna", + "in": { + "text": "statue of liberty" + }, + "expected": { + "properties": [ + { + "label": "Statue of Liberty, Manhattan, NY, USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/locality_geodisambiguation.json b/projects/north-america/test_cases/locality_geodisambiguation.json new file mode 100644 index 0000000..b93e445 --- /dev/null +++ b/projects/north-america/test_cases/locality_geodisambiguation.json @@ -0,0 +1,48 @@ +{ + "name": "locality geodisambiguation", + "description": [ + "Counties and boroughs are often labeled locality in sturctured search or libpostal results.", + "This leads to us not finding the expected result eventhough it exists in the index." + ], + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Diana", + "in": { + "text": "Bichlachweg 83, 6370 Kitzbühel, Austria" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "83 Bichlachweg", + "county": "Kitzbühel" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Diana", + "endpoint": "search/structured", + "in": { + "address": "Bichlachweg 83", + "locality": "Kitzbühel", + "country": "Austria" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "83 Bichlachweg", + "county": "Kitzbühel" + } + ] + } + } + ] +} + diff --git a/projects/north-america/test_cases/missing_postcodes.json b/projects/north-america/test_cases/missing_postcodes.json new file mode 100644 index 0000000..eac7464 --- /dev/null +++ b/projects/north-america/test_cases/missing_postcodes.json @@ -0,0 +1,59 @@ +{ + "name": "missing postcodes", + "priorityThresh": 3, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Julian", + "type": "dev", + "notes": "Correct zipcode is 10009", + "in": { + "text": "267 e 10th st, new york, ny 10010" + }, + "expected": { + "properties": [ + { + "name": "267 East 10th Street", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "East Village", + "housenumber": "267", + "street": "East 10th Street" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "Julian", + "type": "dev", + "notes": "Desired document has no zipcode, but should be 33801. If we ever get better data, find a new test case", + "in": { + "text": "440 S Combee Rd, Lakeland, FL 33801" + }, + "expected": { + "properties": [ + { + "name": "440 South Combee Road", + "country_a": "USA", + "country": "United States", + "region": "Florida", + "region_a": "FL", + "county": "Polk County", + "locality": "Crystal Lake", + "housenumber": "440", + "street": "South Combee Road" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/place.json b/projects/north-america/test_cases/place.json new file mode 100644 index 0000000..f764c05 --- /dev/null +++ b/projects/north-america/test_cases/place.json @@ -0,0 +1,129 @@ +{ + "name": "GET /place", + "endpoint": "place", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "description": "place endpoint should return the desired record", + "in": { + "ids": "openstreetmap:venue:node:2562438641" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:node:2562438641", + "layer": "venue", + "source": "openstreetmap", + "id": "node:2562438641" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "issue": "https://github.com/pelias/api/issues/441", + "description": "shortened source name should also work", + "in": { + "ids": "osm:venue:node:2562438641" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:node:2562438641", + "layer": "venue", + "source": "openstreetmap", + "id": "node:2562438641" + } + ] + } + }, + + { + "id": 3, + "status": "pass", + "description": "the correct OSM way should be returned even when there is an OSM node with the same ID", + "issue": "https://github.com/pelias/api/issues/317", + "in": { + "ids": "openstreetmap:venue:way:5013364" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:way:5013364", + "layer": "venue", + "source": "openstreetmap", + "id": "way:5013364" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "description": "the place endpoint should return multiple results when multiple ids are specified", + "in": { + "ids": "whosonfirst:region:85688525,whosonfirst:locality:101928027" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "gid": "whosonfirst:region:85688525", + "layer": "region", + "source": "whosonfirst", + "id": "85688525", + "name": "North Dakota" + }, + { + "gid": "whosonfirst:locality:101928027", + "layer": "locality", + "source": "whosonfirst", + "id": "101928027", + "name": "Cape Town" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "description": "Records from other layers should not be returned", + "issue": "https://github.com/pelias/pelias/issues/643", + "in": { + "ids": "openstreetmap:address:node:2420772655" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:address:node:2420772655", + "layer": "address", + "source": "openstreetmap", + "id": "node:2420772655" + } + ] + } + }, + { + "id": 6, + "status": "fail", + "description": "Records from other sources should not be returned", + "issue": "https://github.com/pelias/pelias/issues/672", + "in": { + "ids": "whosonfirst:locality:123" + }, + "unexpected": { + "properties": [ + { + "gid": "geonames:locality:123", + "layer": "locality", + "source": "geonames", + "id": "123" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/placeholder_altnames.json b/projects/north-america/test_cases/placeholder_altnames.json new file mode 100644 index 0000000..8614013 --- /dev/null +++ b/projects/north-america/test_cases/placeholder_altnames.json @@ -0,0 +1,621 @@ +{ + "name": "Placeholder alt names", + "priorityThresh": 2, + "tests": [ + { + "id": 0, + "status": "pass", + "user": "lily", + "description": [ + "admin area only", + "input: Chinese", + "lang: korean" + ], + "in": { + "text": "灣仔, 香港", + "lang": "ko" + }, + "expected": { + "properties": [ + { + "name": "완쯔", + "country": "홍콩", + "country_a": "HKG" + } + ] + } + }, + { + "id": 1, + "status": "pass", + "user": "lily", + "description": [ + "address", + "lang: spanish" + ], + "in": { + "text": "553 s main st red lion pa usa", + "lang": "es" + }, + "expected": { + "properties": [ + { + "region": "Pensilvania", + "country": "Estados Unidos" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "lily", + "description": [ + "address in French", + "lang: japanese" + ], + "in": { + "text": "37 Rue Des Remparts d’Ainay, Lyon", + "lang": "ja" + }, + "expected": { + "properties": [ + { + "locality": "リヨン", + "country": "フランス" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "lily", + "description": [ + "address in French with admin info in Japanese", + "lang: Chinese" + ], + "in": { + "text": "3632 Rue Notre-Dame Ouest モントリオール", + "lang": "zh" + }, + "expected": { + "properties": [ + { + "locality": "蒙特利尔", + "country": "加拿大" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "lily", + "description": [ + "Yasnaya Polyana (venue) in Russian with admin info in English", + "lang: bengali" + ], + "in": { + "text": "Я́сная Поля́на, Russia", + "lang": "bn" + }, + "expected": { + "properties": [ + { + "country": "রাশিয়া" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "lily", + "description": [ + "interpolated address", + "lang: italian" + ], + "in": { + "text": "3 forest street, cape town, south africa", + "lang": "it" + }, + "expected": { + "properties": [ + { + "name": "3 Forest Street", + "locality": "Città del Capo", + "country": "Sud Africa" + } + ] + } + }, + { + "id": 6, + "status": "fail", + "user": "lily", + "endpoint": "autocomplete", + "description": [ + "autocomplete", + "input text and lang in German", + "autocomplete is not yet capable of _searching_ on non-default names" + ], + "in": { + "text": "Österreic", + "lang": "de" + }, + "expected": { + "properties": [ + { + "country": "Österreich" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "lily", + "endpoint": "search/structured", + "description": [ + "structured address for 1 world trade center", + "lang: polish" + ], + "in": { + "address": "285 Fulton St", + "borough": "Manhattan", + "locality": "New York", + "region": "NY", + "postalcode": "10007", + "lang": "pl" + }, + "expected": { + "properties": [ + { + "locality": "Nowy Jork", + "country": "Stany Zjednoczone" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "lily", + "endpoint": "reverse", + "description": [ + "reverse geocoding. address for 1 World Trade Center, New York", + "lang: portuguese" + ], + "in": { + "point.lon": "-74.013296", + "point.lat": "40.712748", + "lang": "pt" + }, + "expected": { + "properties": [ + { + "name": "285 Fulton St", + "locality": "Nova Iorque", + "country": "Estados Unidos" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "lily", + "endpoint": "reverse", + "description": [ + "coarse reverse geocoding. address for 1 World Trade Center, New York", + "lang: portuguese" + ], + "in": { + "point.lon": "-74.013296", + "point.lat": "40.712748", + "layers": "coarse", + "lang": "pt" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Financial District", + "locality": "Nova Iorque", + "country": "Estados Unidos" + } + ] + } + }, + { + "id": 10, + "status": "fail", + "user": "lily", + "endpoint": "nearby", + "description": [ + "nearby search", + "lang: portuguese" + ], + "in": { + "point.lon": "-74.013296", + "point.lat": "40.712748", + "lang": "pt" + }, + "expected": { + "properties": [ + { + "locality": "Nova Iorque", + "country": "Estados Unidos" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "user": "lily", + "description": [ + "address in Estonian, locality (Tallinn) in Finnish, region in English" + ], + "in": { + "text": "Akadeemia tee 15b Tallinna, Harjumaa" + }, + "expected": { + "properties": [ + { + "region": "Harjumaa", + "locality": "Tallinn", + "country": "Estonia" + } + ] + } + }, + { + "id": 12, + "status": "pass", + "user": "lily", + "description": [ + "search with boundary circle parameter", + "lang: spanish" + ], + "in": { + "boundary.circle.lat": "31.030974", + "boundary.circle.lon": "-98.326329", + "boundary.circle.radius": 125, + "text": "beverly hills", + "lang": "es" + }, + "expected": { + "properties": [ + { + "country": "Estados Unidos" + } + ] + } + }, + { + "id": 13, + "status": "pass", + "user": "lily", + "description": [ + "search with boundary rect parameter", + "lang: serbian" + ], + "in": { + "boundary.rect.min_lon": "-106.645646", + "boundary.rect.min_lat": "25.837164", + "boundary.rect.max_lon": "-93.508039", + "boundary.rect.max_lat": "36.500704", + "text": "beverly hills", + "lang": "sr" + }, + "expected": { + "properties": [ + { + "name": "Беверли Хилс", + "region": "Тексас", + "country": "Сједињене Америчке Државе" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "user": "lily", + "description": [ + "search with focus point parameter", + "lang: russian" + ], + "in": { + "text": "springfield", + "focus.point.lon": "-82.985586", + "focus.point.lat": "39.98072", + "lang": "ru" + }, + "expected": { + "properties": [ + { + "name": "Спрингфилд", + "region": "Огайо", + "country": "Соединённые Штаты Америки" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "user": "lily", + "description": [ + "search with layers parameter", + "search for a town in tennessee", + "lang: arabic" + ], + "in": { + "text": "Lebanon", + "layers": "locality", + "lang": "ar" + }, + "expected": { + "properties": [ + { + "name": "لبنان", + "region": "تينيسي", + "country": "الولايات المتحدة" + } + ] + } + }, + { + "id": 16, + "status": "pass", + "user": "lily", + "description": [ + "search with sources parameter", + "Greek input", + "St. Petersburg", + "returns unrelated results in Greek", + "lang: greek" + ], + "in": { + "text": "Αγία Πετρούπολη", + "sources": "wof", + "lang": "el" + }, + "expected": { + "properties": [ + { + "name": "Αγία Πετρούπολη", + "gid": "whosonfirst:locality:85931833" + } + ] + } + }, + { + "id": 17, + "status": "pass", + "user": "lily", + "endpoint": "place", + "description": [ + "place id search", + "lang: hungarian" + ], + "in": { + "ids": "whosonfirst:locality:102031307", + "lang": "hu" + }, + "expected": { + "properties": [ + { + "name": "Tokió", + "country": "Japán" + } + ] + } + }, + { + "id": 18, + "status": "pass", + "user": "lily", + "description": [ + "search with boundary country param", + "lang: bulgarian" + ], + "in": { + "text": "damascus", + "boundary.country": "US", + "lang": "bg" + }, + "expected": { + "properties": [ + { + "name": "Дамаскъс", + "region": "Орегон", + "country": "Съединени американски щати" + } + ] + } + }, + { + "id": 19, + "status": "fail", + "user": "lily", + "endpoint": "reverse", + "description": [ + "reverse with boundary country", + "point is at border of Vatican City and Italy", + "lang: swedish" + ], + "issue": "https://github.com/pelias/pelias/issues/686", + "in": { + "point.lon": "12.457532", + "point.lat": "41.903966", + "boundary.country": "VA", + "lang": "sv" + }, + "expected": { + "properties": [ + { + "locality": "Vatikanstaten", + "region": "Vatikanen", + "country": "Vatikanstaten" + } + ] + } + }, + { + "id": 20, + "status": "fail", + "user": "lily", + "endpoint": "search/structured", + "description": [ + "locality in Estonian and country in Latvian", + "city of Valga/Valka is split between Latvia and Estonia" + ], + "in": { + "locality": "Valga", + "country": "Igaunija" + }, + "expected": { + "properties": [ + { + "name": "Valga", + "country": "Estonia" + } + ] + } + }, + + { + "id": 21, + "status": "pass", + "user": "lily", + "endpoint": "autocomplete", + "description": [ + "lang: russian" + ], + "in": { + "text": "Mooselookmegu", + "lang": "ru" + }, + "expected": { + "properties": [ + { + "name": "Mooselookmeguntic", + "region": "Мэн", + "country": "Соединённые Штаты Америки" + } + ] + } + }, + + { + "id": 22, + "status": "pass", + "user": "lily", + "endpoint": "autocomplete", + "description": [ + "autocomplete with only admin info that has translation", + "lang: russian" + ], + "in": { + "text": "Germa", + "lang": "ru" + }, + "expected": { + "properties": [ + { + "name": "Германия", + "country_a": "DEU" + } + ] + } + }, + + { + "id": 23, + "status": "pass", + "user": "stephen", + "endpoint": "search", + "description": "spanish spelling of New York", + "in": { + "text": "30 west 26th street, nueva york, ny" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "30", + "street": "W 26 St", + "postalcode": "10010" + } + ] + } + }, + { + "id": 24, + "status": "pass", + "user": "stephen", + "endpoint": "search", + "description": "Kazakh for Socorro, French for New Mexico", + "in": { + "text": "1220 calle de lago Сокорро Nouveau-Mexique" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "1220", + "street": "Calle De Lago", + "locality": "Socorro", + "region_a": "NM", + "country_a": "USA" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "user": "stephen", + "endpoint": "search", + "description": "Bengali for Toronto, Japanese for Ontario, Farsi/Persian for Canada", + "in": { + "text": "280 Bloor Street West টরোন্টো オンタリオ州 کانادا" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "280", + "street": "Bloor Street West", + "locality": "Toronto", + "region_a": "ON", + "country_a": "CAN" + } + ] + } + }, + { + "id": 26, + "status": "pass", + "user": "julian", + "description": "from mapillary home page", + "in": { + "text": "malmo", + "lang": "sv" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "name": "Malmö", + "country": "Sverige" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/placeholder_general.json b/projects/north-america/test_cases/placeholder_general.json new file mode 100644 index 0000000..b177508 --- /dev/null +++ b/projects/north-america/test_cases/placeholder_general.json @@ -0,0 +1,587 @@ +{ + "name": "General Placeholder requests", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "Port Saint Lucie should be found with full word", + "in": { + "text": "port saint lucie, fl" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85933297", + "confidence": 1, + "name": "Port St. Lucie" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "description": "Port Saint Lucie should be found with abbreviation", + "in": { + "text": "port st. lucie, fl" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85933297", + "confidence": 1, + "name": "Port St. Lucie" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "search", + "description": "Sault Sainte Marie should be found with full word", + "in": { + "text": "Sault Sainte Marie, Ontario" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101735641", + "confidence": 1, + "name": "Sault Ste. Marie" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "endpoint": "search", + "description": "Sault Sainte Marie should be found with abbreviation", + "in": { + "text": "Sault Ste Marie, Ontario" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101735641", + "confidence": 1, + "name": "Sault Ste. Marie" + } + ] + } + }, + { + "id": 5, + "status": "fail", + "endpoint": "search", + "description": "Fort Hood should be found with full word, waiting for work on https://github.com/pelias/placeholder/issues/36", + "in": { + "text": "Fort Hood, TX" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101726923", + "confidence": 0.6, + "name": "Fort Hood" + } + ] + } + }, + { + "id": 6, + "status": "fail", + "endpoint": "search", + "description": "Fort Hood should be found with abbreviation, waiting for work on https://github.com/pelias/placeholder/issues/36", + "in": { + "text": "Ft Hood, TX" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101726923", + "confidence": 0.6, + "name": "Fort Hood" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "endpoint": "search", + "description": "Mount Pleasant should be found with full word", + "in": { + "text": "Mount Pleasant, SC" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101720773", + "confidence":1, + "name": "Mount Pleasant" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "endpoint": "search", + "description": "Mount Pleasant should be found with abbreviation", + "in": { + "text": "Mt Pleasant, SC" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101720773", + "confidence": 1, + "name": "Mount Pleasant" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "endpoint": "search", + "description": "Carmel-by-the-Sea should be found with hyphens", + "in": { + "text": "Carmel-by-the-Sea, CA" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85922639", + "confidence": 1, + "name": "Carmel-by-the-Sea" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "endpoint": "search", + "description": "Carmel-by-the-Sea should be found without hyphens", + "in": { + "text": "Carmel by the Sea, CA" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85922639", + "confidence": 1, + "name": "Carmel-by-the-Sea" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "endpoint": "search", + "description": "GB counties with 'County' prefixed should be found", + "in": { + "text": "County Durham, GB" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85684523", + "confidence": 0.3, + "name": "County Durham" + } + ] + } + }, + { + "id": 12, + "status": "pass", + "endpoint": "search", + "description": "GB counties without 'County' prefixed should be found", + "in": { + "text": "Durham, GB" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85684523", + "confidence": 0.3, + "name": "County Durham" + } + ] + } + }, + { + "id": 13, + "status": "pass", + "endpoint": "search", + "description": "'city of' should be normalized away", + "in": { + "text": "City of Socorro, NM" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85976677", + "confidence": 1, + "name": "Socorro" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "endpoint": "search", + "description": "abbreviating periods should be removed", + "in": { + "text": "L.A. C.A." + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85923517", + "confidence": 1, + "name": "Los Angeles" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "endpoint": "search", + "description": "&s should be treated the same as 'and'", + "in": { + "text": "Trinidad & Tobago" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:country:85632271", + "confidence": 1, + "name": "Trinidad and Tobago" + } + ] + } + }, + { + "id": 16, + "status": "pass", + "endpoint": "search", + "description": "ß should be treated as 'ss'", + "in": { + "text": "Strass im Strassertale" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101783387", + "confidence": 1, + "name": "Straß im Straßertale" + } + ] + } + }, + { + "id": 17, + "status": "pass", + "endpoint": "search", + "description": "diacriticals should be flattened", + "in": { + "text": "Schöneberg, DE" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101907543", + "confidence": 1, + "name": "Schöneberg" + } + ] + } + }, + { + "id": 18, + "status": "pass", + "endpoint": "search", + "description": "diacriticals should be flattened", + "in": { + "text": "Schöneberg, DE" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101907543", + "confidence": 1, + "name": "Schöneberg" + } + ] + } + }, + { + "id": 19, + "status": "pass", + "endpoint": "search", + "description": "should be found with diacriticals", + "in": { + "text": "Łódź" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101913783", + "confidence": 1, + "name": "Łódź" + } + ] + } + }, + { + "id": 20, + "status": "pass", + "endpoint": "search", + "description": "should be found w/o diacriticals", + "in": { + "text": "Lodz" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101913783", + "confidence": 1, + "name": "Łódź" + } + ] + } + }, + { + "id": 21, + "status": "pass", + "endpoint": "search", + "description": "variant should be found", + "in": { + "text": "Sorbonne" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85873821", + "confidence": 1, + "name": "Quartier de la Sorbonne" + } + ] + } + }, + { + "id": 22, + "status": "pass", + "endpoint": "search", + "description": "layers should be respected", + "priorityThresh": 4, + "in": { + "text": "Luxembourg", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101751765", + "confidence": 0.6, + "name": "Luxembourg City" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "region" + }, + { + "layer": "country" + } + ] + } + }, + { + "id": 23, + "status": "pass", + "endpoint": "search", + "description": "layers should be respected", + "priorityThresh": 10, + "in": { + "text": "Socorro, NM", + "layers": "county" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:county:102081575", + "confidence": 0.4, + "name": "Socorro County" + } + ] + }, + "unexpected": { + "properties": [ + { + "gid": "whosonfirst:locality:85976677" + } + ] + } + }, + { + "id": 24, + "status": "pass", + "endpoint": "search", + "description": "boundary.country should be respected", + "priorityThresh": 10, + "in": { + "text": "London", + "boundary.country": "CAN" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101735809", + "confidence": 1, + "name": "London" + } + ] + }, + "unexpected": { + "properties": [ + { + "country_a": "USA" + }, + { + "country_a": "GBR" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "endpoint": "search", + "description": "boundary.rect should be respected", + "priorityThresh": 10, + "in": { + "text": "London", + "boundary.rect.min_lat": "42.593921", + "boundary.rect.max_lat": "44.048675", + "boundary.rect.min_lon": "-82.003082", + "boundary.rect.max_lon": "-80.278096" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101735809", + "confidence": 1, + "name": "London" + } + ] + }, + "unexpected": { + "properties": [ + { + "country_a": "USA" + }, + { + "country_a": "GBR" + } + ] + } + }, + { + "id": 26, + "status": "pass", + "endpoint": "search", + "description": "boundary.rect should be respected", + "priorityThresh": 10, + "in": { + "text": "Las Vegas", + "boundary.rect.min_lat": "31.346514", + "boundary.rect.max_lat": "36.987116", + "boundary.rect.min_lon": "-109.049381", + "boundary.rect.max_lon": "-103.006901" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85976683", + "confidence": 1, + "name": "Las Vegas", + "region_a": "NM" + } + ] + }, + "unexpected": { + "properties": [ + { + "gid": "whosonfirst:locality:85974801", + "region_a": "NV" + } + ] + } + }, + { + "id": 27, + "status": "pass", + "endpoint": "search", + "description": "boundary.circle should be respected", + "priorityThresh": 10, + "in": { + "text": "London", + "boundary.circle.radius": "50", + "boundary.circle.lat": "43.096883", + "boundary.circle.lon": "-81.622706" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101735809", + "confidence": 1, + "name": "London" + } + ] + }, + "unexpected": { + "properties": [ + { + "country_a": "USA" + }, + { + "country_a": "GBR" + } + ] + } + }, + { + "id": 28, + "status": "pass", + "endpoint": "search", + "description": "Dundee has 0 population: https://github.com/pelias/pelias/issues/526", + "priorityThresh": 10, + "in": { + "text": "Dundee" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101750641", + "confidence": 1, + "name": "Dundee" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/placeholder_geometric_filters.json b/projects/north-america/test_cases/placeholder_geometric_filters.json new file mode 100644 index 0000000..0a1e167 --- /dev/null +++ b/projects/north-america/test_cases/placeholder_geometric_filters.json @@ -0,0 +1,42 @@ +{ + "name": "Placeholder should obey geometric filters", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "Should obey geometric filter", + "in": { + "text": "57, ROUTE DE POITIERS 79300 SAINT SAUVEUR", + "boundary.country": "FR" + }, + "expected": { + "properties": [ + { + "name": "Saint-Sauveur", + "country_a": "FRA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "description": "Fallback query should obey geometric filter", + "in": { + "text": "2000 main st, berlin", + "boundary.country": "CA" + }, + "expected": { + "properties": [ + { + "name": "2000 Main St", + "country_a": "CAN" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/placeholder_sorting.json b/projects/north-america/test_cases/placeholder_sorting.json new file mode 100644 index 0000000..fdcb82c --- /dev/null +++ b/projects/north-america/test_cases/placeholder_sorting.json @@ -0,0 +1,769 @@ +{ + "name": "Sorting rules for admin-only placeholder responses", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "megacities should rank higher than everything else", + "in": { + "text": "Paris" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101751119", + "name": "Paris" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "description": "megacities should rank higher than everything else", + "in": { + "text": "Moscow" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:102003033", + "name": "Moscow" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "search", + "description": "megacities should rank higher than everything else", + "in": { + "text": "Sydney" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101932003", + "name": "Sydney" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "endpoint": "search", + "description": "Paris, France should rank higher than Paris, TX even with focus.point on Paris, TX", + "in": { + "text": "Paris", + "focus.point.lat": "33.675", + "focus.point.lon": "-95.601" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101751119", + "name": "Paris" + } + ] + } + }, + { + "id": 100, + "status": "pass", + "endpoint": "search", + "description": "continent should rank above everything else", + "in": { + "text": "Asia" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:continent:102191569", + "name": "Asia" + } + ] + } + }, + { + "id": 101, + "status": "pass", + "endpoint": "search", + "description": "continent should rank above everything else", + "in": { + "text": "africa" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:continent:102191573", + "name": "Africa" + } + ] + } + }, + { + "id": 102, + "status": "pass", + "endpoint": "search", + "description": "alt-name continent should rank above everything else", + "in": { + "text": "Europa" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:continent:102191581", + "name": "Europe" + } + ] + } + }, + { + "id": 200, + "status": "pass", + "endpoint": "search", + "description": "the country Luxembourg should rank higher than cities of the same name", + "in": { + "text": "Belgium" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:country:85632997", + "name": "Belgium" + } + ] + } + }, + { + "id": 201, + "status": "pass", + "endpoint": "search", + "description": "the country Luxembourg should rank higher than cities and regions of the same name", + "in": { + "text": "Luxembourg" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:country:85633275", + "name": "Luxembourg" + } + ] + } + }, + { + "id": 203, + "status": "pass", + "endpoint": "search", + "description": "country code input should find country and rank higher than cities", + "in": { + "text": "RUS" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:country:85632685", + "name": "Russia" + } + ] + } + }, + { + "id": 300, + "status": "pass", + "endpoint": "search", + "description": "dependency input should find and rank higher than cities", + "in": { + "text": "new caledonia" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:dependency:85632473", + "name": "New Caledonia" + } + ] + } + }, + { + "id": 301, + "status": "pass", + "endpoint": "search", + "description": "dependency input should find and rank higher than cities", + "in": { + "text": "Montserrat" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:dependency:85632677", + "name": "Montserrat" + } + ] + } + }, + { + "id": 302, + "status": "pass", + "endpoint": "search", + "description": "dependency abbreviation input should find and rank higher than cities", + "in": { + "text": "GIB" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:dependency:85633167", + "name": "Gibraltar" + } + ] + } + }, + { + "id": 303, + "status": "pass", + "endpoint": "search", + "description": "dependency altnam input should find and rank higher than cities", + "in": { + "text": "Bermudy" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:dependency:85632731", + "name": "Bermuda" + } + ] + } + }, + { + "id": 400, + "status": "pass", + "endpoint": "search", + "description": "large cities should rank higher than medium and small cities", + "in": { + "text": "Albuquerque" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85976715", + "name": "Albuquerque" + } + ] + } + }, + { + "id": 401, + "status": "pass", + "endpoint": "search", + "description": "large cities should rank higher than medium and small cities", + "in": { + "text": "Marseille" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101749199", + "name": "Marseille" + } + ] + } + }, + { + "id": 402, + "status": "pass", + "endpoint": "search", + "description": "large cities should rank higher than medium and small cities", + "in": { + "text": "San Francisco" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85922583", + "name": "San Francisco" + } + ] + } + }, + { + "id": 500, + "status": "pass", + "endpoint": "search", + "description": "macroregions should rank higher than medium and small cities", + "in": { + "text": "Sardinia" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macroregion:404227535", + "name": "Sardinia" + } + ] + } + }, + { + "id": 501, + "status": "pass", + "endpoint": "search", + "description": "macroregions should rank higher than medium and small cities", + "in": { + "text": "Andalucía" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macroregion:404227361", + "name": "Andalusia" + } + ] + } + }, + { + "id": 502, + "status": "pass", + "endpoint": "search", + "description": "Scotland, GB should outrank counties and cities", + "in": { + "text": "Scotland" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macroregion:404227471", + "name": "Scotland" + } + ] + } + }, + { + "id": 600, + "status": "pass", + "endpoint": "search", + "description": "regions should rank higher than medium and small cities", + "in": { + "text": "New Mexico" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85688493", + "name": "New Mexico" + } + ] + } + }, + { + "id": 601, + "status": "pass", + "endpoint": "search", + "description": "regions should rank higher than medium and small cities", + "in": { + "text": "British Columbia" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85682117", + "name": "British Columbia" + } + ] + } + }, + { + "id": 602, + "status": "pass", + "endpoint": "search", + "description": "regions should rank higher than medium and small cities", + "in": { + "text": "California" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85688637", + "name": "California" + } + ] + } + }, + { + "id": 603, + "status": "pass", + "endpoint": "search", + "description": "region should outrank mid-size city", + "in": { + "text": "Ontario, CA" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85682057", + "name": "Ontario" + } + ] + } + }, + { + "id": 700, + "status": "pass", + "endpoint": "search", + "description": "borough should rank higher than mid-size city", + "in": { + "text": "Manhattan" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:borough:421205771", + "name": "Manhattan" + } + ] + } + }, + { + "id": 701, + "status": "fail", + "endpoint": "search", + "description": "borough should rank higher than county", + "issue": "https://github.com/pelias/placeholder/issues/55", + "in": { + "text": "Queens" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:borough:421205767", + "name": "Queens" + } + ] + } + }, + { + "id": 800, + "status": "pass", + "endpoint": "search", + "description": "very popular neighbourhood should rank higher than mid-size city", + "in": { + "text": "Chelsea" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85810589", + "name": "Chelsea" + } + ] + } + }, + { + "id": 900, + "status": "pass", + "endpoint": "search", + "description": "mid-size city should rank higher than county", + "in": { + "text": "Socorro, NM" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85976677", + "name": "Socorro" + } + ] + } + }, + { + "id": 901, + "status": "pass", + "endpoint": "search", + "description": "mid-size cities should be ordered by descending population", + "in": { + "text": "Lancaster" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85923547", + "name": "Lancaster" + } + ] + } + }, + { + "id": 902, + "status": "pass", + "endpoint": "search", + "description": "mid-size cities should be ordered by distance to center point", + "in": { + "text": "Lancaster", + "focus.point.lat": 54.153467, + "focus.point.lon": -4.599907 + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101873271", + "name": "Lancaster" + } + ] + } + }, + { + "id": 1000, + "status": "pass", + "endpoint": "search", + "description": "macrocounty", + "in": { + "text": "Mittelfranken" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macrocounty:404227565", + "name": "Mittelfranken" + } + ] + } + }, + { + "id": 1100, + "status": "pass", + "endpoint": "search", + "description": "county", + "in": { + "text": "Maui" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:county:102085577", + "name": "Maui County" + } + ] + } + }, + { + "id": 1101, + "status": "fail", + "endpoint": "search", + "description": "county. failed because of space temporarily at the end of the name", + "in": { + "text": "Nordsachsen" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:county:102064235", + "name": "Nordsachsen" + } + ] + } + }, + { + "id": 1200, + "status": "pass", + "endpoint": "search", + "description": "macrohood", + "in": { + "text": "San Fernando Valley" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macrohood:1108692439", + "name": "San Fernando Valley" + } + ] + } + }, + { + "id": 1201, + "status": "pass", + "endpoint": "search", + "description": "macrohood", + "in": { + "text": "Suutarila" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macrohood:890537277", + "name": "Suutarila" + } + ] + } + }, + { + "id": 1201, + "status": "pass", + "endpoint": "search", + "description": "macrohood > popular neighbourhood", + "in": { + "text": "Mission District" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:macrohood:1108830809", + "name": "Mission District" + } + ] + } + }, + { + "id": 1300, + "status": "pass", + "endpoint": "search", + "description": "popular neighbourhood > non-popular neighbourhood", + "in": { + "text": "Flatiron District" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85869245", + "name": "Flatiron District" + } + ] + } + }, + { + "id": 1301, + "status": "pass", + "endpoint": "search", + "description": "popular neighbourhood > small cities", + "in": { + "text": "Brockley" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85860571", + "name": "Brockley" + } + ] + } + }, + { + "id": 1302, + "status": "pass", + "endpoint": "search", + "description": "popular neighbourhood > small cities", + "in": { + "text": "Haight Ashbury" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85823479", + "name": "Haight-Ashbury" + } + ] + } + }, + { + "id": 1303, + "status": "pass", + "endpoint": "search", + "description": "unambiguous neighbourhood in Paris", + "in": { + "text": "Le Marais" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:420782743", + "name": "Le Marais" + } + ] + } + }, + { + "id": 1304, + "status": "pass", + "endpoint": "search", + "description": "popular neighbourhood > small city > non-popular neighbourhood", + "in": { + "text": "Les Halles" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85873785", + "name": "Les Halles" + } + ] + } + }, + { + "id": 1400, + "status": "pass", + "endpoint": "search", + "description": "small cities should be found and ordered by population descending", + "in": { + "boundary.country": "USA", + "text": "Felton" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "gid": "whosonfirst:locality:85924297" + }, + { + "gid": "whosonfirst:locality:85931491" + }, + { + "gid": "whosonfirst:locality:101717257" + } + ] + } + }, + { + "id": 1500, + "status": "pass", + "endpoint": "search", + "description": "non-popular neighbourhoods should be found", + "in": { + "text": "Getz" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:neighbourhood:85821441", + "name": "Getz" + } + ] + } + }, + { + "id": 1600, + "status": "fail", + "endpoint": "search", + "description": "county should be after locality generally", + "issue": [ + "https://github.com/pelias/placeholder/issues/55" + ], + "in": { + "text": "pärnu, estonia" + }, + "expected": { + "properties": [ + { + "name": "Parnu", + "layer": "locality" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/properties_source_id.json b/projects/north-america/test_cases/properties_source_id.json new file mode 100644 index 0000000..9ac78c8 --- /dev/null +++ b/projects/north-america/test_cases/properties_source_id.json @@ -0,0 +1,93 @@ +{ + "name": "Result properties", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "test it in search results and OSM data", + "in": { + "text": "IHOP", + "focus.point.lon": -73.944108, + "focus.point.lat": 40.815263, + "layers": "venue" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:node:2562438641", + "layer": "venue", + "source": "openstreetmap", + "id": "node:2562438641", + "source_id": "node:2562438641" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "autocomplete", + "description": "test it in autocomplete results and WOF data", + "in": { + "text": "London", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:101750367", + "layer": "locality", + "source": "whosonfirst", + "id": "101750367", + "source_id": "101750367" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "reverse", + "in": { + "point.lon": -73.989231, + "point.lat": 40.744022, + "layers": "venue" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:way:248143769", + "layer": "venue", + "id": "way:248143769", + "source": "openstreetmap", + "source_id": "way:248143769", + "name": "Flatiron Hotel" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "description": "OSM venue", + "endpoint": "place", + "in": { + "ids": "openstreetmap:venue:node:4509430011" + }, + "expected": { + "properties": [ + { + "gid": "openstreetmap:venue:node:4509430011", + "layer": "venue", + "source": "openstreetmap", + "id": "node:4509430011", + "source_id": "node:4509430011", + "name": "INDAY" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/quattroshapes_popularity.json b/projects/north-america/test_cases/quattroshapes_popularity.json new file mode 100644 index 0000000..601eebc --- /dev/null +++ b/projects/north-america/test_cases/quattroshapes_popularity.json @@ -0,0 +1,151 @@ +{ + "name": "quattroshapes popularity", + "priorityThresh": 5, + "comment": "Test cases for boosting Quattro records by popularity values.", + "info": [ + "use the following query to test which records have a higher population", + "https://gist.github.com/missinglink/da2b0132fe9ecdf2dc4ac7c07a9cfef5" + ], + "tests": [ + { + "id": 1, + "user": "sevko", + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/300", + "type": "dev", + "in": { + "layers": "neighbourhood", + "text": "chelsea" + }, + "expected": { + "properties": [ + { + "name": "Chelsea", + "layer": "neighbourhood", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + }, + { + "name": "Chelsea", + "layer": "neighbourhood", + "locality": "London", + "country_a": "GBR" + } + ] + } + }, + { + "id": "1-1", + "user": "sevko", + "status": "pass", + "issue": [ + "https://github.com/pelias/pelias/issues/548", + "https://github.com/pelias/pelias/issues/294" + ], + "type": "dev", + "in": { + "layers": "coarse", + "text": "chelsea, ny" + }, + "expected": { + "properties": [ + { + "name": "Chelsea", + "layer": "neighbourhood", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 2, + "user": "sevko", + "status": "pass", + "type": "dev", + "in": { + "layers": "neighbourhood", + "text": "williamsburg" + }, + "expected": { + "properties": [ + { + "name": "Williamsburg", + "layer": "neighbourhood", + "borough": "Brooklyn", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": "2-1", + "user": "sevko", + "status": "pass", + "type": "dev", + "in": { + "layers": "neighbourhood", + "text": "williamsburg, ny" + }, + "expected": { + "properties": [ + { + "name": "Williamsburg", + "layer": "neighbourhood", + "borough": "Brooklyn", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "user": "sevko", + "status": "pass", + "type": "dev", + "in": { + "layers": "coarse", + "text": "ridgewood" + }, + "expected": { + "properties": [ + { + "name": "Ridgewood", + "borough": "Queens", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": "3-1", + "user": "sevko", + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/548", + "type": "dev", + "in": { + "layers": "coarse", + "text": "ridgewood, ny" + }, + "expected": { + "properties": [ + { + "name": "Ridgewood", + "borough": "Queens", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/reverse_address.json b/projects/north-america/test_cases/reverse_address.json new file mode 100644 index 0000000..aaa305f --- /dev/null +++ b/projects/north-america/test_cases/reverse_address.json @@ -0,0 +1,163 @@ +{ + "name": "reverse non-coarse", + "priorityThresh": 1, + "endpoint": "reverse", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "description": "there should be no non-address results, lat/lon is for Lancaster, PA", + "type": "dev", + "in": { + "point.lat": 40.038123, + "point.lon": -76.304096 + }, + "expected": { + "properties": [ + { + "layer": "address" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "locality" + }, + { + "layer": "localadmin" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "description": "there should be no non-address results, lat/lon is for Ventura County, CA", + "type": "dev", + "in": { + "point.lat": 34.35755, + "point.lon": -119.126008 + }, + "expected": { + "properties": [ + { + "layer": "street" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "county" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "description": "addresses should be returned before coarse results, this lat/lon is for Red Lion, PA", + "type": "dev", + "in": { + "point.lat": 39.898111, + "point.lon": -76.607958 + }, + "expected": { + "properties": [ + { + "layer": "address" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "locality" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "trescube", + "description": "venues should be returned before coarse results, this lat/lon is for Red Lion, PA", + "type": "dev", + "in": { + "point.lat": 39.898111, + "point.lon": -76.607958, + "layers": "venue,locality" + }, + "expected": { + "properties": [ + { + "layer": "venue" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "locality" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "trescube", + "description": "addresses should be returned before coarse results, this lat/lon is for Red Lion, PA", + "type": "dev", + "in": { + "point.lat": 39.898111, + "point.lon": -76.607958, + "layers": "address,locality" + }, + "expected": { + "properties": [ + { + "layer": "address" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "locality" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "trescube", + "description": "streets should be returned before coarse results, this lat/lon is for Red Lion, PA", + "type": "dev", + "in": { + "point.lat": 39.898111, + "point.lon": -76.607958, + "layers": "street,locality" + }, + "expected": { + "properties": [ + { + "layer": "street" + } + ] + }, + "unexpected": { + "properties": [ + { + "layer": "locality" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/reverse_coarse.json b/projects/north-america/test_cases/reverse_coarse.json new file mode 100644 index 0000000..a9deefa --- /dev/null +++ b/projects/north-america/test_cases/reverse_coarse.json @@ -0,0 +1,571 @@ +{ + "name": "reverse coarse", + "priorityThresh": 1, + "endpoint": "reverse", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "description": "layers=coarse should search all coarse layers (down to neighbourhood)", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "neighbourhood": "Flatiron District", + "borough": "Manhattan", + "locality": "New York", + "county": "New York County", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "description": "layers=coarse should search all coarse layers (includes localadmin)", + "type": "dev", + "in": { + "point.lat": 40.042013, + "point.lon": -76.301163, + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "neighbourhood": "Rossmere", + "locality": "Lancaster", + "localadmin": "Lancaster", + "county": "Lancaster County", + "region": "Pennsylvania", + "country": "United States" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "description": "layers=coarse should search all coarse layers (includes dependency)", + "type": "dev", + "in": { + "point.lat": 18.406523, + "point.lon": -66.063914, + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "San Juan", + "county": "San Juan", + "region": "Puerto Rico", + "dependency": "Puerto Rico", + "label": "San Juan, Puerto Rico" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "trescube", + "description": "layers=coarse should search all coarse layers (includes macrocounty/macroregion)", + "type": "dev", + "in": { + "point.lat": 45.525755, + "point.lon": 3.70626, + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "localadmin": "Saint-Ferreol-Des-Cotes", + "county": "Ambert", + "macrocounty": "Ambert", + "region": "Puy-de-Dôme", + "macroregion": "Auvergne-Rhone-Alpes", + "country": "France" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "trescube", + "description": "layers=coarse should return most granular layer, which is county in this case", + "type": "dev", + "in": { + "point.lat": 33.214722, + "point.lon": -106.363415, + "layers": "coarse" + }, + "expected": { + "properties": [ + { + "layer": "county", + "county": "Sierra County", + "region": "New Mexico", + "country": "United States" + } + ] + } + }, + + { + "id": 10, + "status": "pass", + "user": "trescube", + "description": "specified layer should return that layer when found", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "neighbourhood" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "neighbourhood": "Flatiron District", + "borough": "Manhattan", + "locality": "New York", + "county": "New York County", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "borough" + }, + "expected": { + "properties": [ + { + "layer": "borough", + "borough": "Manhattan", + "locality": "New York", + "county": "New York County", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 12, + "status": "fail", + "user": "trescube", + "description": [ + "more granular results should be ignored when layers don't specify them", + "fails with the introduction of https://github.com/pelias/api/pull/1002, which uses the first hierarchy of a WOF record instead of calling all polygons" + ], + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "locality" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "New York", + "county": "New York County", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 13, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 40.042013, + "point.lon": -76.301163, + "layers": "localadmin" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "localadmin": "Lancaster", + "county": "Lancaster County", + "region": "Pennsylvania", + "country": "United States" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "county" + }, + "expected": { + "properties": [ + { + "layer": "county", + "county": "New York County", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 45.525755, + "point.lon": 3.70626, + "layers": "macrocounty" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "macrocounty": "Ambert", + "region": "Puy-de-Dôme", + "macroregion": "Auvergne-Rhone-Alpes", + "country": "France" + } + ] + } + }, + { + "id": 16, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "region" + }, + "expected": { + "properties": [ + { + "layer": "region", + "region": "New York", + "country": "United States" + } + ] + } + }, + { + "id": 17, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 45.525755, + "point.lon": 3.70626, + "layers": "macroregion" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "macroregion": "Auvergne-Rhone-Alpes", + "country": "France" + } + ] + } + }, + { + "id": 18, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 18.406523, + "point.lon": -66.063914, + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "dependency": "Puerto Rico" + } + ] + } + }, + { + "id": 19, + "status": "pass", + "user": "trescube", + "description": "more granular results should be ignored when layers don't specify them", + "type": "dev", + "in": { + "point.lat": 40.744260, + "point.lon": -73.990400, + "layers": "country" + }, + "expected": { + "properties": [ + { + "layer": "country", + "country": "United States" + } + ] + } + }, + { + "id": 20, + "status": "pass", + "user": "trescube", + "description": "address/venue/street not found should fallback to coarse reverse (no layers specified)", + "type": "dev", + "in": { + "point.lat": 34.119423, + "point.lon": -106.284351 + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:county:102081575", + "name": "Socorro County" + } + ] + } + }, + { + "id": 21, + "status": "pass", + "user": "trescube", + "description": "address/venue/street not found should fallback to coarse reverse (no layers specified)", + "type": "dev", + "in": { + "point.lat": 57.672717, + "point.lon": 36.002802 + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:county:1108735021", + "name": "Maksatikhinskiy" + } + ] + } + }, + { + "id": 22, + "status": "pass", + "user": "trescube", + "description": "https://github.com/pelias/pelias/issues/585, should fallback to coarse", + "type": "dev", + "in": { + "point.lat": 38.260674, + "point.lon": -8.5448 + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85687359", + "name": "Setúbal District" + } + ] + } + }, + { + "id": 23, + "status": "pass", + "user": "trescube", + "description": "only look for empires", + "type": "dev", + "in": { + "point.lat": 54.709749, + "point.lon": 20.514126, + "layers": "empire" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:empire:874393555", + "name": "Russia" + } + ] + } + }, + { + "id": 24, + "status": "pass", + "user": "trescube", + "description": "only look for empires", + "type": "dev", + "in": { + "point.lat": 36.129463, + "point.lon": -5.3467, + "layers": "empire" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:empire:136253055", + "name": "United Kingdom" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "user": "trescube", + "description": "only look for continents", + "type": "dev", + "in": { + "point.lat": 12.264674, + "point.lon": -3.311809, + "layers": "continent" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:continent:102191573", + "name": "Africa" + } + ] + } + }, + { + "id": 26, + "status": "pass", + "user": "trescube", + "description": "only look for continents", + "type": "dev", + "in": { + "point.lat": -77.335330, + "point.lon": -1.681634, + "layers": "continent" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:continent:102191579", + "name": "Antarctica" + } + ] + } + }, + { + "id": 27, + "status": "pass", + "user": "trescube", + "description": "only look for marineareas", + "type": "dev", + "in": { + "point.lat": 38.048214, + "point.lon": -76.294635, + "layers": "marinearea" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:marinearea:404528937", + "name": "Chesapeake Bay" + } + ] + } + }, + { + "id": 28, + "status": "pass", + "user": "trescube", + "description": "only look for marineareas", + "type": "dev", + "in": { + "point.lat": 73.313889, + "point.lon": 158.845395, + "layers": "marinearea" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:marinearea:404528973", + "name": "East Siberian Sea" + } + ] + } + }, + { + "id": 29, + "status": "pass", + "user": "trescube", + "description": "only look for oceans", + "type": "dev", + "in": { + "point.lat": -23.175327, + "point.lon": -20.666009, + "layers": "ocean" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:ocean:404528719", + "name": "South Atlantic Ocean" + } + ] + } + }, + { + "id": 30, + "status": "pass", + "user": "trescube", + "description": "only look for oceans", + "type": "dev", + "in": { + "point.lat": 2.041589, + "point.lon": 87.221323, + "layers": "ocean" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:ocean:404528717", + "name": "Indian Ocean" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/reverse_coordinate_wrapping.json b/projects/north-america/test_cases/reverse_coordinate_wrapping.json new file mode 100644 index 0000000..8eab06b --- /dev/null +++ b/projects/north-america/test_cases/reverse_coordinate_wrapping.json @@ -0,0 +1,191 @@ +{ + "name": "reverse coordinate wrapping", + "priorityThresh": 3, + "endpoint": "reverse", + "description": "Verify that the API supports longitude wrapping as expected.", + "tests": [ + { + "id": 3, + "status": "pass", + "issue": "https://github.com/pelias/wof-pip-service/issues/40", + "description": "base case (no wrapping) for a reverse query in NYC", + "user": "sev", + "type": "dev", + "in": { + "point.lat": 40.72956780913899, + "point.lon": -73.99463653564453 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "Greenwich Village" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "issue": "https://github.com/pelias/wof-pip-service/issues/40", + "description": "same effective coordinate as base case with positive longitude wrapping", + "user": "sev", + "type": "dev", + "in": { + "point.lat": 40.72956780913899, + "point.lon": 286.00536346435547 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "Greenwich Village" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "issue": "https://github.com/pelias/wof-pip-service/issues/40", + "description": "same effective coordinate as base case with negative longitude wrapping", + "user": "sev", + "type": "dev", + "in": { + "point.lat": 40.72956780913899, + "point.lon": -433.99463653564453 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "Greenwich Village" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "issue": "https://github.com/pelias/wof-pip-service/issues/40", + "description": "same effective coordinate as base case with double negative longitude wrapping", + "user": "sev", + "type": "dev", + "in": { + "point.lat": 40.72956780913899, + "point.lon": -793.9946365356445 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "neighbourhood": "Greenwich Village" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "description": "elasticsearch <2 handled longitude wrapping and now does not", + "issue": "https://github.com/pelias/api/issues/570", + "user": "orangejulius", + "type": "dev", + "in": { + "point.lat": 40.744131, + "point.lon": 286.009575 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "name": "30 West 26th Street" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "description": "elasticsearch <2 handled longitude wrapping and now does not", + "issue": "https://github.com/pelias/api/issues/570", + "user": "orangejulius", + "type": "dev", + "in": { + "point.lat": 40.744131, + "point.lon": -433.990425 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "name": "30 West 26th Street" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "description": "elasticsearch <2 handled longitude wrapping and now does not", + "issue": "https://github.com/pelias/api/issues/570", + "user": "orangejulius", + "description": "latitude wrapping (this also requires the longitude to change)", + "type": "dev", + "in": { + "point.lat": 139.255869, + "point.lon": 106.009575 + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "name": "30 West 26th Street" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/reverse_venue.json b/projects/north-america/test_cases/reverse_venue.json new file mode 100644 index 0000000..335f1a4 --- /dev/null +++ b/projects/north-america/test_cases/reverse_venue.json @@ -0,0 +1,71 @@ +{ + "name": "reverse venues", + "priorityThresh": 1, + "endpoint": "reverse", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "julian", + "description": "until we finalize the /nearby endpoint, /reverse should still be able to return Geonames venues", + "issue": "https://github.com/pelias/api/issues/930", + "in": { + "point.lat": 47.417, + "point.lon": 10.75, + "layers": "venue", + "sources": "geonames" + }, + "expected": { + "properties": [ + { + "name": "Axljoch Berg", + "layer": "venue", + "source": "geonames" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "julian", + "description": "until we finalize the /nearby endpoint, /reverse should still be able to return Geonames venues, even with no source specified", + "issue": "https://github.com/pelias/api/issues/930", + "in": { + "point.lat": 47.417, + "point.lon": 10.75, + "layers": "venue" + }, + "expected": { + "properties": [ + { + "name": "Axljoch Berg", + "layer": "venue", + "source": "geonames" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "julian", + "description": "until we finalize the /nearby endpoint, /reverse should still be able to return OSM venues", + "issue": "https://github.com/pelias/api/issues/930", + "in": { + "point.lat": -13.1748, + "point.lon": -72.56463, + "layers": "venue" + }, + "expected": { + "properties": [ + { + "name": "Machu Picchu", + "layer": "venue", + "source": "openstreetmap" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/san_francisco.json b/projects/north-america/test_cases/san_francisco.json new file mode 100644 index 0000000..c47033d --- /dev/null +++ b/projects/north-america/test_cases/san_francisco.json @@ -0,0 +1,169 @@ +{ + "name": "San Francisco", + "priorityThresh": 1, + "distanceThresh": 1000, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco", + "layers": "locality", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco", + "layers": "locality,localadmin", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": "4-autocomplete", + "status": "pass", + "user": "Julian", + "endpoint": "autocomplete", + "in": { + "text": "san francisco", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "Julian", + "in": { + "text": "san francisco", + "layers": "locality,localadmin" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + }, + { + "id": "8-autocomplete", + "status": "pass", + "user": "Julian", + "endpoint": "autocomplete", + "in": { + "text": "san francisco" + }, + "expected": { + "properties": [ + { + "region": "California", + "name": "San Francisco" + } + ], + "coordinates": [ + [ -122.431272, 37.778008 ] + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search.json b/projects/north-america/test_cases/search.json new file mode 100644 index 0000000..98e4a79 --- /dev/null +++ b/projects/north-america/test_cases/search.json @@ -0,0 +1,603 @@ +{ + "name": "search", + "priorityThresh": 5, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Randy", + "type": "dev", + "in": { + "text": "brooklyn" + }, + "expected": { + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Randy", + "type": "dev", + "in": { + "text": "brooklyn, ny" + }, + "expected": { + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "text": "philadelphia" + }, + "expected": { + "properties": [ + { + "name": "Philadelphia", + "region": "Pennsylvania", + "country_a": "USA" + } + ] + } + }, + { + "id": "4-1", + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "text": "philadelphia, pa" + }, + "expected": { + "properties": [ + { + "name": "Philadelphia", + "region": "Pennsylvania", + "country_a": "USA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "type": "dev", + "user": "Randy", + "in": { + "text": "new york, new york" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "gid": "whosonfirst:locality:85977539", + "name": "New York" + }, + { + "gid": "whosonfirst:county:102081863", + "name": "New York County" + } + ] + } + }, + { + "id": "5:2", + "status": "pass", + "type": "dev", + "user": "missinglink", + "in": { + "text": "new york city" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85977539", + "name": "New York" + } + ] + } + }, + { + "id": "5:3", + "status": "pass", + "type": "dev", + "user": "missinglink", + "in": { + "text": "new york city, usa" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:85977539", + "name": "New York" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "type": "dev", + "user": "Randy", + "in": { + "text": "130 dean street brooklyn, ny" + }, + "expected": { + "properties": [ + { + "name": "130 Dean Street", + "borough": "Brooklyn", + "locality": "New York", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "type": "dev", + "user": "Randy", + "in": { + "text": "billerica" + }, + "expected": { + "properties": [ + { + "name": "Billerica", + "county": "Middlesex County", + "region_a": "MA", + "country_a": "USA" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "type": "dev", + "user": "Randy", + "in": { + "text": "billerica, ma" + }, + "expected": { + "properties": [ + { + "name": "Billerica", + "county": "Middlesex County", + "region_a": "MA", + "country_a": "USA" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "issue": "https://github.com/openaddresses/openaddresses/pull/1892", + "description": "test failed due to data entry issue with openaddresses", + "user": "Randy", + "in": { + "text": "15 call street billerica, ma" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "name": "15 Call Street", + "country": "United States", + "region": "Massachusetts", + "county": "Middlesex County", + "region_a": "MA", + "country_a": "USA" + } + ] + } + }, + { + "id": "1425586777012:0", + "status": "fail", + "notes": [ + "we don't support 'sq' here, when using 'square' instead the address", + "parser kicks in and only shows street addresses" + ], + "user": "feedback-app", + "type": "dev", + "in": { + "text": "union sq" + }, + "expected": { + "properties": [ + { + "name": "Union Square", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "county": "San Francisco County", + "label": "Union Square, San Francisco County, CA, USA" + } + ] + } + }, + { + "id": "1425586777012:2", + "status": "pass", + "user": "feedback-app", + "type": "dev", + "in": { + "text": "portland" + }, + "expected": { + "properties": [ + { + "name": "Portland", + "county": "Multnomah County", + "region_a": "OR", + "country_a": "USA" + } + ] + } + }, + { + "id": "1425586777012:2-1", + "status": "pass", + "user": "feedback-app", + "type": "dev", + "in": { + "text": "portland, oregon" + }, + "expected": { + "properties": [ + { + "name": "Portland", + "county": "Multnomah County", + "region_a": "OR", + "country_a": "USA" + } + ] + } + }, + { + "id": "1425586777012:3", + "status": "pass", + "user": "feedback-app", + "in": { + "text": "paris" + }, + "expected": { + "properties": [ + { + "name": "Paris", + "country": "France" + } + ] + } + }, + { + "id": "1425586777012:4", + "status": "pass", + "notes": [ + "the quattroshapes data contains entries for 'France' in", + "French Guiana (GUF), not sure of the politics behind this" + ], + "user": "feedback-app", + "in": { + "text": "france" + }, + "expected": { + "properties": [ + { + "name": "France" + } + ] + } + }, + { + "id": "1425586777012:6", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/293", + "description": "data issue", + "user": "feedback-app", + "type": "dev", + "in": { + "text": "london" + }, + "expected": { + "properties": [ + { + "label": "London, Greater London, United Kingdom" + }, + { + "label": "London, Middlesex, Canada" + }, + { + "label": "London, United Kingdom" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "hkrishna", + "type": "dev", + "in": { + "text": "chelsea, new york" + }, + "expected": { + "properties": [ + { + "name": "Chelsea", + "layer": "neighbourhood", + "borough": "Manhattan", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "issue": "https://github.com/whosonfirst-data/whosonfirst-data/issues/744", + "type": "dev", + "user": "hkrishna", + "in": { + "text": "soho, new york" + }, + "expected": { + "properties": [ + { + "name": "SoHo", + "layer": "neighbourhood", + "borough": "Manhattan", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": "1426085141587:0", + "status": "fail", + "issue": "https://github.com/pelias/api/issues/151", + "user": "feedback-app", + "in": { + "text": "perugia airport" + }, + "expected": { + "priorityThresh": 10, + "properties": [ + { + "name": "Perugia San Francesco d'Assisi – Umbria International Airport", + "region": "Perugia", + "country_a": "ITA" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "type": "dev", + "user": "hkrishna", + "in": { + "text": "101 saint marks pl, new york" + }, + "expected": { + "properties": [ + { + "name": "101 Saint Marks Place", + "neighbourhood": "East Village", + "region_a": "NY", + "country_a": "USA" + } + ] + } + }, + { + "id": 18, + "user": "sevko", + "status": "fail", + "issue": "https://github.com/pelias/api/issues/151", + "type": "dev", + "in": { + "text": "newark airport" + }, + "expected": { + "properties": [ + { + "name": "Newark Liberty International Airport", + "country_a": "USA", + "country": "United States", + "region": "New Jersey", + "region_a": "NJ", + "county": "Essex County", + "localadmin": "Newark", + "locality": "Newark", + "neighbourhood": "Dayton", + "label": "Newark Liberty International Airport, Newark, NJ, USA" + } + ] + } + }, + { + "id": "1427414405152:3", + "user": "sevko", + "in": { + "text": "7 Simon-Dach-Straße" + }, + "expected": { + "properties": [ + { + "housenumber": "7", + "street": "Simon-Dach-Straße" + } + ] + }, + "status": "pass" + }, + { + "id": "1427414405152:4", + "user": "sevko", + "in": { + "text": "Simon-Dach-Straße 7" + }, + "expected": { + "properties": [ + { + "housenumber": "7", + "street": "Simon-Dach-Straße" + } + ] + }, + "status": "pass" + }, + { + "id": 19, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "30 West 26th Street", + "layers": "address", + "sources": "openstreetmap" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "30 West 26th Street", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "borough": "Manhattan", + "locality": "New York", + "postalcode": "10010", + "housenumber": "30", + "street": "West 26th Street", + "source": "openstreetmap" + } + ] + } + }, + { + "id": 20, + "user": "orangejulius", + "in": { + "text": "statue of liberty", + "boundary.country": "USA" + }, + "expected": { + "properties": [{ + "name": "Statue of Liberty", + "country_a": "USA", + "region": "New York" + }] + }, + "unexpected": { + "properties": [{ + "country_a": "FRA" + }] + } + }, + { + "id": 20, + "user": "orangejulius", + "in": { + "text": "statue of liberty", + "boundary.country": "FRA" + }, + "expected": { + "properties": [{ + "name": "Statue of Liberty", + "country_a": "FRA", + "region": "Paris" + }] + }, + "unexpected": { + "properties": [{ + "country_a": "USA" + }] + } + }, + { + "id": "1426636804303:51", + "user": "feedback-app", + "in": { + "text": "4th and King" + }, + "expected": { + "properties": [ + { + "name": "San Francisco 4th & King Street Station", + "country_a": "USA" + } + ], + "priorityThresh": 2 + }, + "status": "pass" + }, + { + "id": 24, + "status": "fail", + "user": "riordan", + "notes": [ "SF Zoo should show up in SF. Logged by @nvkelso in: https://github.com/pelias/pelias/issues/183" ], + "in": { + "focus.point.lat": 37.743618, + "focus.point.lon": -122.426117, + "text": "zoo" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "label": "San Francisco Zoo, San Francisco, CA, USA", + "name": "San Francisco Zoo" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "user": "trescube", + "notes": [ + "test ES query size hardcoding to lower score address matches are returned", + "https://github.com/pelias/pelias/issues/434" + ], + "in": { + "text": "82 Whitney Ave, Hamilton, Ontario", + "size": 1 + }, + "expected": { + "priorityThresh": 1, + "properties": { + "layer": "address", + "housenumber": "82", + "street": "Whitney Avenue", + "locality": "Hamilton", + "region": "Ontario" + } + } + } + ] +} diff --git a/projects/north-america/test_cases/search_abbreviations.json b/projects/north-america/test_cases/search_abbreviations.json new file mode 100644 index 0000000..7cc3f21 --- /dev/null +++ b/projects/north-america/test_cases/search_abbreviations.json @@ -0,0 +1,45 @@ +{ + "name": "search", + "priorityThresh": 5, + "tests": [ + { + "id": 1, + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/737", + "user": "julian", + "in": { + "text": "412 Saint Patrick St, donaldsonville, la" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "412", + "street": "St Patrick St", + "locality": "Donaldsonville", + "region": "Louisiana" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "julian", + "in": { + "text": "412 St Patrick St, donaldsonville, la" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "412", + "street": "St Patrick St", + "locality": "Donaldsonville", + "region": "Louisiana" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_city_country.json b/projects/north-america/test_cases/search_city_country.json new file mode 100644 index 0000000..d774741 --- /dev/null +++ b/projects/north-america/test_cases/search_city_country.json @@ -0,0 +1,636 @@ +{ + "name": "search city/country", + "priorityThresh": 1, + "endpoint": "search", + "notes": "these tests test functionality to match libpostal city/country analysis, these can be moved to a general placeholder test area", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Palora ecuador" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:421177865", + "locality": "Palora", + "country": "Ecuador", + "country_a": "ECU" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Tena ecuador" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Tena", + "country": "Ecuador", + "country_a": "ECU" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Paris France" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Paris", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Paris France" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Paris", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Anthering, Austria" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Anthering", + "country": "Austria", + "country_a": "AUT" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Portoviejo ecu" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Portoviejo", + "country": "Ecuador", + "country_a": "ECU" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "windhoek, namibia" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Windhoek", + "country": "Namibia", + "country_a": "NAM" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "maseru, lesotho" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Maseru", + "country": "Lesotho", + "country_a": "LSO" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "lusaka, zambia" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Lusaka", + "country": "Zambia", + "country_a": "ZMB" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "WOF previously lacked 'Cairo' as an altname for the city: https://whosonfirst.mapzen.com/spelunker/id/421174399", + "in": { + "text": "Cairo, EGY" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Cairo", + "country": "Egypt", + "country_a": "EGY" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "region currently ranks higher than mid-size locality", + "in": { + "text": "toledo, spain" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Toledo", + "country": "Spain", + "country_a": "ESP" + } + ] + } + }, + { + "id": 12, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Sarajevo, Bosnia and Herzegovina" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Sarajevo", + "country": "Bosnia and Herzegovina", + "country_a": "BIH" + } + ] + } + }, + { + "id": 13, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "prague, czech republic" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Prague", + "country": "Czechia", + "country_a": "CZE" + } + ] + } + }, + { + "id": 14, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "lang": "pl", + "text": "Poznań, poland" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Poznań", + "country": "Polska", + "country_a": "POL" + } + ] + } + }, + { + "id": 15, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Akmenė, lithuania" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Akmenė", + "country": "Lithuania", + "country_a": "LTU" + } + ] + } + }, + { + "id": 16, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "mikkeli, finland" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Mikkeli", + "country": "Finland", + "country_a": "FIN" + } + ] + } + }, + { + "id": 17, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "beijing, china" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Beijing", + "country": "China", + "country_a": "CHN" + } + ] + } + }, + { + "id": 18, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "sendai, japan" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:102031919", + "locality": "Sendai-shi", + "country": "Japan", + "country_a": "JPN" + } + ] + } + }, + { + "id": 19, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Vladivostok, russia" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Vladivostok", + "country": "Russia", + "country_a": "RUS" + } + ] + } + }, + { + "id": 20, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "truth or consequences, usa" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Truth Or Consequences", + "region_a": "NM", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 21, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "toronto, ca" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Toronto", + "region_a": "ON", + "country": "Canada", + "country_a": "CAN" + } + ] + } + }, + { + "id": 22, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "yakima, us" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Yakima", + "region_a": "WA", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 23, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "Bermuda is a dependency", + "in": { + "layers": "locality", + "text": "hamilton, bermuda" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:890442097", + "locality": "Hamilton", + "dependency": "Bermuda" + } + ] + } + }, + { + "id": 24, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "American Samoa is a dependency", + "in": { + "text": "pago pago, American Samoa" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Pago Pago", + "dependency": "American Samoa", + "dependency_a": "ASM" + } + ] + } + }, + { + "id": 25, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "Anguilla is a dependency", + "in": { + "layers": "locality", + "text": "the valley, Anguilla" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:locality:890441875", + "locality": "The Valley", + "dependency": "Anguilla" + } + ] + } + }, + { + "id": 26, + "status": "fail", + "user": "trescube", + "type": "dev", + "notes": "New Caledonia is a dependency", + "issue": "https://github.com/pelias/wof-admin-lookup/issues/156", + "in": { + "text": "Bourail, new caledonia" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Bourail", + "dependency": "New Caledonia", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 27, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "region currently ranks higher than mid-size locality", + "in": { + "text": "phuket tha" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Phuket", + "country": "Thailand", + "country_a": "THA" + } + ] + } + }, + { + "id": 28, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "region altname currently ranks higher than mid-size locality", + "in": { + "text": "Vientiane, laos" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "locality", + "locality": "Vientiane", + "country": "Laos", + "country_a": "LAO" + } + ] + } + }, + { + "id": 29, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Dushanbe, TJK" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Dushanbe", + "country": "Tajikistan", + "country_a": "TJK" + } + ] + } + }, + { + "id": 30, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "Bishkek, Kyrgyzstan" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Bishkek", + "country": "Kyrgyzstan", + "country_a": "KGZ" + } + ] + } + }, + { + "id": 31, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "mismatch should fallback to country", + "in": { + "text": "seattle, canada" + }, + "expected": { + "properties": [ + { + "layer": "country", + "country": "Canada", + "country_a": "CAN" + } + ] + } + }, + { + "id": 32, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "mismatch should fallback to country", + "in": { + "text": "socorro, thailand" + }, + "expected": { + "properties": [ + { + "layer": "country", + "country": "Thailand", + "country_a": "THA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_coarse.json b/projects/north-america/test_cases/search_coarse.json new file mode 100644 index 0000000..0f603c7 --- /dev/null +++ b/projects/north-america/test_cases/search_coarse.json @@ -0,0 +1,56 @@ +{ + "name": "search coarse", + "priorityThresh": 5, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Diana", + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "brooklyn" + }, + "expected": { + "properties": [ + { + "label": "Brooklyn, New York, NY, USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/295", + "description": "data issue", + "user": "Diana", + "type": "dev", + "in": { + "focus.point.lat": 40.744243, + "focus.point.lon": -73.990342, + "text": "new york" + }, + "expected": { + "properties": [ + { + "label": "New York, USA" + }, + { + "label": "New York, NY, USA" + } + ] + }, + "unexpected": { + "properties": [ + { + "name": "New York", + "borough": "Brooklyn" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_geodisambiguation.json b/projects/north-america/test_cases/search_geodisambiguation.json new file mode 100644 index 0000000..bd5e305 --- /dev/null +++ b/projects/north-america/test_cases/search_geodisambiguation.json @@ -0,0 +1,31 @@ +{ + "name": "search geodisambiguation", + "priorityThresh": 1, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "issue": "https://github.com/pelias/whosonfirst/issues/106", + "notes": "this is now covered by placeholder which doesn't ingest geonames", + "in": { + "text": "Aliquippa, PA", + "sources": "wof" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "localadmin", + "name": "Aliquippa", + "region": "Pennsylvania", + "region_a": "PA", + "country": "United States", + "country_a": "USA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_iso2_to_iso3.json b/projects/north-america/test_cases/search_iso2_to_iso3.json new file mode 100644 index 0000000..948e90f --- /dev/null +++ b/projects/north-america/test_cases/search_iso2_to_iso3.json @@ -0,0 +1,111 @@ +{ + "name": "ISO2->ISO3 internal conversion", + "notes": "this test verifies that an iso2 country matches", + "priorityThresh": 1, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "1 Main St, Richlandtown, PA, US" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "USA", + "region": "Pennsylvania", + "region_a": "PA", + "locality": "Richlandtown", + "street": "Main St", + "housenumber": "1" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "grolmanstraße 51, berlin, de" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "DEU", + "locality": "Berlin", + "street": "Grolmanstraße", + "housenumber": "51" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "23 Avenue Duquesne, 75007 Paris, Fr" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "layer": "address", + "country_a": "FRA", + "locality": "Paris", + "street": "Avenue Duquesne", + "housenumber": "23" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "22 Lloyd George Ave, Toronto Ontario CA" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "CAN", + "locality": "Toronto", + "street": "Lloyd George Ave", + "housenumber": "22" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "trescube", + "type": "dev", + "in": { + "text": "327 Rincon de Romos, Aguascalientes, MX" + }, + "expected": { + "properties": [ + { + "layer": "address", + "country_a": "MEX", + "locality": "Aguascalientes", + "street": "Rincón De Romos", + "housenumber": "327" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_layers.json b/projects/north-america/test_cases/search_layers.json new file mode 100644 index 0000000..6197cbe --- /dev/null +++ b/projects/north-america/test_cases/search_layers.json @@ -0,0 +1,51 @@ +{ + "name": "search layers", + "tests": [ + { + "id": "1", + "status": "pass", + "user": "orangejulius", + "endpoint": "search", + "description": "Ensure there are no non-venue records when searching for venue", + "issue": "https://github.com/pelias/pelias/issues/253", + "in": { + "text": "london", + "layers": "venue" + }, + "unexpected": { + "properties": [ + { + "layer": "country" + }, + { + "layer": "macroregion" + }, + { + "layer": "region" + }, + { + "layer": "macrocounty" + }, + { + "layer": "county" + }, + { + "layer": "localadmin" + }, + { + "layer": "locality" + }, + { + "layer": "borough" + }, + { + "layer": "neighbourhood" + }, + { + "layer": "address" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_poi.json b/projects/north-america/test_cases/search_poi.json new file mode 100644 index 0000000..af74541 --- /dev/null +++ b/projects/north-america/test_cases/search_poi.json @@ -0,0 +1,72 @@ +{ + "name": "search_poi", + "notes": "For testing POI searches", + "priorityThresh": 5, + "tests": [ + { + "id": "searchpoi-1", + "status": "fail", + "description": "@nvkelso couldn't find Target in Eureka while visiting home", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "in": { + "text": "Target Eureka CA" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "searchpoi-2", + "status": "fail", + "description": "@nvkelso couldn't find Target in Eureka while visiting home", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "in": { + "text": "Target Eureka California" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + }, + { + "id": "searchpoi-3", + "status": "fail", + "description": "Searching with focus on", + "issue": "https://github.com/pelias/pelias/issues/185", + "user": "riordan", + "in": { + "text": "Target", + "focus.point.lat": "40.801944", + "focus.point.lon": "-124.163611" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "layer": "venue", + "name": "Target", + "locality": "Eureka", + "region": "California" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_postalcodes.json b/projects/north-america/test_cases/search_postalcodes.json new file mode 100644 index 0000000..d873e29 --- /dev/null +++ b/projects/north-america/test_cases/search_postalcodes.json @@ -0,0 +1,89 @@ +{ + "name": "search_postalcodes", + "notes": "For testing postalcode searches", + "priorityThresh": 1, + "tests": [ + { + "id": "searchpostal-1", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/692", + "user": "diana", + "in": { + "text": "90210" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "90210", + "locality": "Los Angeles", + "region": "California" + } + ] + } + }, + { + "id": "searchpostal-2", + "status": "pass", + "user": "diana", + "in": { + "text": "LA1 1DL" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "LA1 1DL", + "locality": "Lancaster", + "country": "United Kingdom" + } + ] + } + }, + { + "id": "searchpostal-3", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/692", + "user": "diana", + "in": { + "text": "M2M 1C8" + }, + "expected": { + "properties": [ + { + "name": "M2M 1C8", + "postalcode": "M2M 1C8", + "postalcode_gid": "whosonfirst:postalcode:521433719", + "confidence": 1, + "match_type": "exact", + "accuracy": "centroid", + "country": "Canada", + "region": "Ontario", + "locality": "Toronto", + "label": "M2M 1C8, Toronto, ON, Canada" + } + ] + } + }, + { + "id": "searchpostal-4", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/692", + "user": "diana", + "description": "fallback to postalcode when city is not found", + "in": { + "text": "not-an-address, 90210" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "90210", + "locality": "Los Angeles", + "region": "California" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_sources.json b/projects/north-america/test_cases/search_sources.json new file mode 100644 index 0000000..cb97214 --- /dev/null +++ b/projects/north-america/test_cases/search_sources.json @@ -0,0 +1,57 @@ +{ + "name": "search sources", + "endpoint": "search", + "priorityThresh": 9, + "tests": [ + { + "id": 1, + "status": "pass", + "endpoint": "search", + "description": "Admin-only query with undefined `sources` should return WhosOnFirst", + "in": { + "text": "Lusaka, Zambia" + }, + "expected": { + "properties": [ + { + "source": "whosonfirst" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "endpoint": "search", + "description": "Admin-only query requesting Geonames returns only Geonames", + "in": { + "text": "Kathmandu, Nepal", + "sources": "geonames" + }, + "expected": { + "properties": [ + { + "source": "geonames" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "endpoint": "search", + "description": "Admin-only query requesting WhosOnFirst returns only WhosOnFirst", + "in": { + "text": "Yangon, Myanmar", + "sources": "whosonfirst" + }, + "expected": { + "properties": [ + { + "source": "whosonfirst" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_spelling_mistakes.json b/projects/north-america/test_cases/search_spelling_mistakes.json new file mode 100644 index 0000000..4350197 --- /dev/null +++ b/projects/north-america/test_cases/search_spelling_mistakes.json @@ -0,0 +1,27 @@ +{ + "name": "search_spelling_mistakes", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "notes": [ + "this was wishful thinking, at one point this test passed but it", + "wasn't due to any specific spelling correction algorithm" + ], + "user": "missinglink", + "in": { + "text": "neu yorp" + }, + "expected": { + "properties": [ + { "name": "New York" }, + { "name": "New York" }, + { "name": "New York" }, + { "name": "New York" }, + { "name": "New York" } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_street_centroids.json b/projects/north-america/test_cases/search_street_centroids.json new file mode 100644 index 0000000..a84ba3f --- /dev/null +++ b/projects/north-america/test_cases/search_street_centroids.json @@ -0,0 +1,148 @@ +{ + "name": "search street centroids", + "priorityThresh": 1, + "endpoint": "search", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/openstreetmap/issues/28", + "in": { + "sources": "osm", + "layers": "street", + "text": "rushendon furlong, england" + }, + "expected": { + "coordinates": [ -0.636911, 51.83567 ], + "properties": [ + { + "country_a": "GBR", + "name": "Rushendon Furlong", + "street": "Rushendon Furlong", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 2, + "status": "pass", + "user": "missinglink", + "description": "road segement divided in the middle by a park", + "notes": [ + "there should be two records, returned as result 1 & 2", + "the testing framework doesn't support this type of test" + ], + "in": { + "sources": "osm", + "layers": "street", + "text": "grolmanstr, berlin" + }, + "expected": { + "coordinates": [ 13.324042, 52.503915 ], + "properties": [ + { + "country_a": "DEU", + "name": "Grolmanstraße", + "street": "Grolmanstraße", + "layer": "street", + "source": "openstreetmap" + },{ + "country_a": "DEU", + "name": "Grolmanstraße", + "street": "Grolmanstraße", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 3, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/pelias/issues/545", + "in": { + "sources": "osm", + "layers": "street", + "text": "w 26 st, new york" + }, + "expected": { + "coordinates": [ -73.9981, 40.747625 ], + "distanceThresh": 1500, + "properties": [ + { + "country_a": "USA", + "name": "West 26th Street", + "street": "West 26th Street", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 4, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "glen rd, kelburn" + }, + "expected": { + "coordinates": [ 174.76323, -41.287732 ], + "properties": [ + { + "country_a": "NZL", + "name": "Glen Road", + "street": "Glen Road", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 5, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "dionysiou areopagitou, athens" + }, + "expected": { + "coordinates": [ 23.726606, 37.969645 ], + "properties": [ + { + "country_a": "GRC", + "name": "Dionysiou Areopagitou", + "street": "Dionysiou Areopagitou", + "layer": "street", + "source": "openstreetmap" + } + ] + } + },{ + "id": 6, + "status": "pass", + "user": "missinglink", + "in": { + "sources": "osm", + "layers": "street", + "text": "혜화로, seoul" + }, + "expected": { + "coordinates": [ 127.000552, 37.586582 ], + "properties": [ + { + "country_a": "KOR", + "name": "혜화로", + "street": "혜화로", + "layer": "street", + "source": "openstreetmap" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/search_street_fallback.json b/projects/north-america/test_cases/search_street_fallback.json new file mode 100644 index 0000000..d9633d2 --- /dev/null +++ b/projects/north-america/test_cases/search_street_fallback.json @@ -0,0 +1,47 @@ +{ + "name": "search street fallback", + "priorityThresh": 5, + "endpoint": "search", + "description": [ + "query should return street centroid(s) followed by one or", + "more addresses on that street." + ], + "tests": [ + { + "id": 1, + "status": "pass", + "user": "missinglink", + "issue": "https://github.com/pelias/openstreetmap/issues/28", + "in": { + "text": "grolmanstraße, berlin, germany" + }, + "expected": { + "coordinates": [ 13.324042, 52.503915 ], + "properties": [ + { + "country_a": "DEU", + "street": "Grolmanstraße", + "layer": "street" + } + ] + } + },{ + "id": 2, + "status": "pass", + "user": "missinglink", + "in": { + "text": "glen rd, kelburn" + }, + "expected": { + "coordinates": [ 174.76323, -41.287732 ], + "properties": [ + { + "country_a": "NZL", + "street": "Glen Road", + "layer": "street" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/structured_address_parsing.json b/projects/north-america/test_cases/structured_address_parsing.json new file mode 100644 index 0000000..31cfc84 --- /dev/null +++ b/projects/north-america/test_cases/structured_address_parsing.json @@ -0,0 +1,57 @@ +{ + "name": "structured address parsing", + "priorityThresh": 1, + "endpoint": "search/structured", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "diana", + "notes": "address with highway number should not result in 500 error", + "in": { + "address": "1396 Dual 40 Hwy", + "locality": "Hagerstown", + "region": "MD", + "postalcode": "21740", + "country": "United States" + }, + "expected": { + "properties": [ + { + "country_a": "USA", + "country": "United States", + "region": "Maryland", + "region_a": "MD", + "locality": "Hagerstown" + } + ] + } + }, + { + "id": 1.1, + "status": "fail", + "user": "diana", + "in": { + "address": "1396 Dual 40 Hwy", + "locality": "Hagerstown", + "region": "MD", + "postalcode": "21740", + "country": "United States" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "1396", + "street": "Dual Highway", + "country_a": "USA", + "country": "United States", + "region": "Maryland", + "region_a": "MD", + "locality": "Hagerstown" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/structured_geocoding.json b/projects/north-america/test_cases/structured_geocoding.json new file mode 100644 index 0000000..6336bd2 --- /dev/null +++ b/projects/north-america/test_cases/structured_geocoding.json @@ -0,0 +1,1225 @@ +{ + "name": "structured geocoding", + "priorityThresh": 1, + "endpoint": "search/structured", + "tests": [ + { + "id": 1, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "full address found should return that result", + "in": { + "address": "1090 N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "1090 N Charlotte St", + "country_a": "USA", + "country": "United States", + "region": "Pennsylvania", + "region_a": "PA", + "county": "Lancaster County", + "locality": "Lancaster", + "housenumber": "1090", + "street": "N Charlotte St" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "no house number supplied should use street result", + "in": { + "address": "North Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "street", + "name": "North Charlotte Street", + "country_a": "USA", + "country": "United States", + "region": "Pennsylvania", + "region_a": "PA", + "county": "Lancaster County", + "locality": "Lancaster", + "street": "North Charlotte Street" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": [ + "house number not found should fallback to street", + "https://github.com/pelias/pelias/issues/454" + ], + "in": { + "address": "12200000 Calle de Lago", + "locality": "Socorro", + "region": "NM" + }, + "expected": { + "properties": [ + { + "layer": "street", + "name": "Calle de Lago", + "country_a": "USA", + "country": "United States", + "region": "New Mexico", + "region_a": "NM", + "county": "Socorro County", + "locality": "Socorro", + "street": "Calle de Lago" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "house number and street not found should fallback to city", + "in": { + "address": "1090 Trescube Boulevard", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Lancaster", + "country_a": "USA", + "country": "United States", + "region": "Pennsylvania", + "region_a": "PA", + "county": "Lancaster County", + "locality": "Lancaster" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "libpostal parses as postcode/road", + "in": { + "address": "1338 Kobbe Ave", + "locality": "San Francisco", + "region": "CA" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "1338 Kobbe Ave", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "locality": "San Francisco" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "libpostal parses as house_number/road, non-US address", + "in": { + "address": "Grolmanstrasse 51", + "locality": "Berlin" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "Grolmanstraße 51", + "country_a": "DEU", + "country": "Germany", + "locality": "Berlin" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "libpostal parses as house_number/suburb/road, non-US address", + "in": { + "address": "5 russian hill pl", + "locality": "San Francisco", + "region": "CA" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "5 Russian Hill Pl", + "country_a": "USA", + "country": "United States", + "region": "California", + "region_a": "CA", + "locality": "San Francisco" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "number+street-only input should return address before street", + "in": { + "address": "1090 n charlotte st" + }, + "expected": { + "properties": [ + { + "layer": "address", + "name": "1090 N Charlotte St" + } + ] + } + }, + + { + "id": 100, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous neighbourhood", + "in": { + "neighbourhood": "Dumbo", + "borough": "Brooklyn" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "DUMBO", + "country_a": "USA", + "country": "United States", + "region": "New York", + "locality": "New York", + "borough": "Brooklyn", + "neighbourhood": "DUMBO" + } + ] + } + }, + { + "id": 101, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "ambiguous neighbourhood", + "in": { + "neighbourhood": "Chelsea" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Chelsea", + "country_a": "USA", + "country": "United States", + "region": "New York", + "locality": "New York", + "borough": "Manhattan", + "neighbourhood": "Chelsea" + } + ] + } + }, + { + "id": 102, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous neighbourhood", + "in": { + "neighbourhood": "Noho" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "NoHo", + "country_a": "USA", + "country": "United States", + "region": "New York", + "locality": "New York", + "borough": "Manhattan", + "neighbourhood": "NoHo" + } + ] + } + }, + + + { + "id": 200, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "exercises treating locality as borough when latter not explicitly supplied", + "in": { + "locality": "Manhattan" + }, + "expected": { + "priorityThresh": 3, + "properties": [ + { + "layer": "borough", + "name": "Manhattan", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "locality": "New York", + "borough": "Manhattan" + }, + { + "layer": "locality", + "name": "Manhattan", + "country_a": "USA", + "country": "United States", + "region": "Kansas", + "region_a": "KS", + "county": "Riley County", + "locality": "Manhattan" + } + ] + } + }, + { + "id": 201, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "tests borough. priorityThresh can be removed when geonames records are deduped properly or removed", + "issue": "ttps://github.com/pelias/pelias/issues/322", + "in": { + "borough": "Manhattan", + "locality": "New York", + "region": "NY" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "borough", + "name": "Manhattan", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "county": "New York County", + "locality": "New York", + "borough": "Manhattan" + } + ] + } + }, + + + { + "id": 300, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "just city/state", + "in": { + "locality": "Socorro", + "region": "NM" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Socorro", + "country_a": "USA", + "country": "United States", + "region": "New Mexico", + "region_a": "NM", + "county": "Socorro County", + "locality": "Socorro" + } + ] + } + }, + { + "id": 301, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "city/state/country", + "in": { + "locality": "New York", + "region": "NY", + "country": "USA" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "New York", + "country_a": "USA", + "country": "United States", + "region": "New York", + "region_a": "NY", + "locality": "New York" + } + ] + } + }, + { + "id": 302, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "", + "in": { + "locality": "Paris", + "country": "France" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Paris", + "country_a": "FRA", + "country": "France", + "locality": "Paris" + } + ] + } + }, + { + "id": 303, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "", + "in": { + "locality": "Beijing", + "country": "China" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Beijing", + "country_a": "CHN", + "country": "China", + "locality": "Beijing" + } + ] + } + }, + + { + "id": 400, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "ambiguous localadmin", + "in": { + "sources": "wof", + "locality": "Zickrick" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Zickrick", + "country_a": "USA", + "country": "United States", + "localadmin": "Zickrick" + } + ] + } + }, + { + "id": 401, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "ambiguous localadmin", + "in": { + "sources": "wof", + "locality": "Zumbehl" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Zumbehl", + "country_a": "USA", + "country": "United States", + "localadmin": "Zumbehl" + } + ] + } + }, + { + "id": 402, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous localadmin by country", + "in": { + "sources": "wof", + "locality": "Aastad", + "country": "United States" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Aastad", + "country_a": "USA", + "country": "United States", + "region_a": "MN", + "region": "Minnesota", + "localadmin": "Aastad" + } + ] + } + }, + { + "id": 403, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous localadmin by state", + "in": { + "sources": "wof", + "locality": "Bloominggrove", + "region": "Ohio" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Bloominggrove", + "country_a": "USA", + "country": "United States", + "region_a": "OH", + "region": "Ohio", + "localadmin": "Bloominggrove" + } + ] + } + }, + + + { + "id": 500, + "status": "fail", + "issue": "https://github.com/pelias/wof-admin-lookup/issues/220", + "user": "trescube", + "type": "dev", + "notes": "ambiguous county", + "in": { + "county": "Lancaster" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "county", + "name": "Lancaster County", + "country_a": "USA", + "country": "United States", + "region_a": "PA", + "region": "Pennsylvania" + }, + { + "layer": "county", + "name": "Lancaster County", + "country_a": "USA", + "country": "United States", + "region_a": "NE", + "region": "Nebraska" + } + ] + } + }, + { + "id": 501, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous county", + "in": { + "county": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "Lancaster County", + "country_a": "USA", + "country": "United States", + "region_a": "PA", + "region": "Pennsylvania" + } + ] + } + }, + { + "id": 502, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous county", + "in": { + "county": "L'Hermenault" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "L'Hermenault", + "country_a": "FRA", + "country": "France", + "region": "Vendée" + } + ] + } + }, + { + "id": 503, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "unambiguous county", + "in": { + "county": "Chongqing", + "country": "China" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "Chongqing Shi", + "country_a": "CHN", + "country": "China", + "region": "Chongqing", + "county": "Chongqing Shi" + } + ] + } + }, + + { + "id": 600, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macrocounty should be queried with county input", + "in": { + "county": "Gießen" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Gießen", + "country_a": "DEU", + "country": "Germany", + "macrocounty": "Gießen" + } + ] + } + }, + { + "id": 601, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macrocounty should be queried with county input", + "in": { + "county": "Mittelfranken", + "country": "Germany" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Mittelfranken", + "country_a": "DEU", + "country": "Germany", + "macrocounty": "Mittelfranken" + } + ] + } + }, + { + "id": 602, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macrocounty should be queried with county input", + "in": { + "county": "Arnsberg" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Arnsberg", + "country_a": "DEU", + "country": "Germany", + "macrocounty": "Arnsberg" + } + ] + } + }, + + + { + "id": 700, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "state-only abbreviation", + "in": { + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Pennsylvania", + "country_a": "USA", + "country": "United States", + "region_a": "PA", + "region": "Pennsylvania" + } + ] + } + }, + { + "id": 701, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "state-only full name", + "in": { + "region": "New Mexico" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "New Mexico", + "country_a": "USA", + "country": "United States", + "region_a": "NM", + "region": "New Mexico" + } + ] + } + }, + { + "id": 702, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "non-US region", + "in": { + "region": "Kakheti" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Kakheti", + "country_a": "GEO", + "country": "Georgia", + "region": "Kakheti" + } + ] + } + }, + { + "id": 703, + "status": "pass", + "user": "Stephen", + "description": "", + "notes": "similar to wof_regions/#8 but uses structured geocoding to show that region works", + "in": { + "region": "Xaçmaz", + "country": "Azerbaijan", + "sources": "wof" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "region", + "name": "Xacmaz", + "region": "Xacmaz", + "country": "Azerbaijan", + "country_a": "AZE" + } + ] + } + }, + + { + "id": 800, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macroregion should be queried with state input", + "in": { + "region": "Marche" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Marche", + "country_a": "ITA", + "country": "Italy", + "macroregion": "Marche" + } + ] + } + }, + { + "id": 801, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macroregion should be queried with state input", + "in": { + "region": "Marche" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Marche", + "country_a": "ITA", + "country": "Italy", + "macroregion": "Marche" + } + ] + } + }, + { + "id": 802, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "macroregion should be queried with state input", + "in": { + "region": "Northern Finland", + "country": "Finland" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Northern Finland", + "country_a": "FIN", + "country": "Finland", + "macroregion": "Northern Finland" + } + ] + } + }, + + + { + "id": 900, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "dependency-only", + "in": { + "country": "United States Virgin Islands" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "US Virgin Islands", + "dependency": "US Virgin Islands" + } + ] + } + }, + { + "id": 901, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country name with dependency layer", + "in": { + "country": "United States", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "US Virgin Islands", + "dependency": "US Virgin Islands" + } + ] + } + }, + { + "id": 902, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "british dependency", + "in": { + "country": "Bermuda" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Bermuda", + "dependency": "Bermuda" + } + ] + } + }, + + { + "id": 1000, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "USA" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "United States", + "country_a": "USA", + "country": "United States" + } + ] + } + }, + { + "id": 1001, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "US" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "United States", + "country_a": "USA", + "country": "United States" + } + ] + } + }, + { + "id": 1002, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "United States" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "United States", + "country_a": "USA", + "country": "United States" + } + ] + } + }, + { + "id": 1003, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "THA", + "sources": "whosonfirst" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Thailand", + "country_a": "THA", + "country": "Thailand" + } + ] + } + }, + { + "id": 1004, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "FR" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "France", + "country_a": "FRA", + "country": "France" + } + ] + } + }, + { + "id": 1005, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "country-only", + "in": { + "country": "Australia", + "sources": "whosonfirst" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Australia", + "country_a": "AUS", + "country": "Australia" + } + ] + } + }, + + { + "id": 1100, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "venue+address should ignore address", + "in": { + "venue": "police", + "address": "1090 N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Lancaster Bureau of Police", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1101, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "venue+address should also search category", + "in": { + "venue": "nightlife", + "address": "1090 N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Chameleon Club", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1102, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "venue+street should ignore street", + "in": { + "venue": "police", + "address": "N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Lancaster Bureau of Police", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1103, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "non-existent venue+address should fallback to address", + "in": { + "venue": "unsupported venue", + "address": "1090 N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "1090", + "street": "N Charlotte St", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1104, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "non-existent venue+street should fallback to street", + "in": { + "venue": "unsupported venue", + "address": "N Charlotte Street", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "street", + "street": "North Charlotte Street", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1105, + "status": "pass", + "user": "trescube", + "type": "dev", + "notes": "non-existent venue+locality should fallback to locality", + "in": { + "venue": "unsupported venue", + "locality": "Lancaster", + "region": "PA" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Lancaster", + "region_a": "PA" + } + ] + } + }, + { + "id": 1201, + "status": "pass", + "user": "julian", + "notes": "saint should be handled when not-abbreviated", + "issue": "https://github.com/pelias/api/issues/1077", + "in": { + "locality": "saint-pavace", + "country": "France" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "locality": "Saint-Pavace", + "country": "France" + } + ] + } + }, + { + "id": 1202, + "status": "fail", + "user": "julian", + "notes": "saint should be handled when not-abbreviated in address searches", + "issue": "https://github.com/pelias/pelias/issues/737", + "in": { + "address": "412 saint patrick st", + "locality": "donaldsonville" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "412", + "street": "St Patrick St", + "locality": "Donaldsonville", + "region": "Louisiana" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/structured_postalcodes.json b/projects/north-america/test_cases/structured_postalcodes.json new file mode 100644 index 0000000..bf1b9fc --- /dev/null +++ b/projects/north-america/test_cases/structured_postalcodes.json @@ -0,0 +1,87 @@ +{ + "name": "structured_postalcodes", + "notes": "For testing postalcode structured searches", + "priorityThresh": 1, + "endpoint": "search/structured", + "tests": [ + { + "id": "structuredpostal-1", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/692", + "user": "diana", + "in": { + "postalcode": "90210" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "90210", + "locality": "Los Angeles", + "region": "California" + } + ] + } + }, + { + "id": "structuredpostal-2", + "status": "pass", + "user": "diana", + "in": { + "postalcode": "LA1 1DL" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "LA1 1DL", + "locality": "Lancaster", + "country": "United Kingdom" + } + ] + } + }, + { + "id": "structuredpostal-3", + "status": "fail", + "issue": "https://github.com/pelias/pelias/issues/692", + "user": "diana", + "description": "fallback to postalcode when city is not found", + "in": { + "address": "not-an-address", + "postalcode": "90210" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "90210", + "locality": "Los Angeles", + "region": "California" + } + ] + } + }, + { + "id": "structuredpostal-4", + "status": "pass", + "user": "julian", + "description": "postalcode and country does not fall back to country", + "issue": "https://github.com/pelias/api/issues/973", + "in": { + "postalcode": "83278", + "country": "United States" + }, + "expected": { + "properties": [ + { + "layer": "postalcode", + "name": "83278", + "county": "Custer County", + "region": "Idaho" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/tizen-sdk-geocoder.json b/projects/north-america/test_cases/tizen-sdk-geocoder.json new file mode 100644 index 0000000..46e1fbf --- /dev/null +++ b/projects/north-america/test_cases/tizen-sdk-geocoder.json @@ -0,0 +1,97 @@ +{ + "name": "tizen sdk: geocode", + "priorityThresh": 1, + "description": [ + "maps_service_geocode (const char *address): Gets the position coordinates for a given address", + "maps_service_geocode_inside_area (const char *address, const maps_area_h bounds): Gets the position for a given address, within the specified bounding box", + "maps_service_geocode_by_structured_address (const maps_address_h address): Gets the position coordinates for a given address", + "maps_service_reverse_geocode (double latitude, double longitude): Gets the address for a given position coordinates", + "maps_service_multi_reverse_geocode (maps_coordinates_list_h coordinates_list): Gets the address list for a given position coordinates list" + ], + "tests": [ + { + "id": "maps_service_geocode & maps_service_multi_reverse_geocode", + "status": "pass", + "description": "don't support batch reverse, implement using single calls in the SDK wrapper", + "user": "dianashk", + "endpoint": "search", + "in": { + "text": "1 Main St, Richlandtown, PA" + }, + "expected": { + "properties": [ + { + "name": "1 Main St", + "region_a": "PA" + } + ] + } + }, + { + "id": "maps_service_geocode_inside_area", + "status": "pass", + "user": "dianashk", + "endpoint": "search", + "in": { + "text": "30 w 26th street", + "boundary.rect.min_lon": -80.947265625, + "boundary.rect.min_lat": 41.343824581185686, + "boundary.rect.max_lat": 42.407234661551875, + "boundary.rect.max_lon": -78.90380859375 + }, + "expected": { + "properties": [ + { + "name": "30 W 26th St", + "region_a": "PA" + } + ] + }, + "unexpected": { + "properties": [ + { + "region_a": "NY" + } + ] + } + }, + { + "id": "maps_service_geocode_by_structured_address", + "status": "pass", + "user": "dianashk", + "endpoint": "search/structured", + "in": { + "address": "30 w 26th street", + "region": "new york", + "postalcode": "10010" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "name": "30 West 26th Street", + "region_a": "NY" + } + ] + } + }, + { + "id": "maps_service_reverse_geocode", + "status": "pass", + "endpoint": "reverse", + "in": { + "point.lon": -73.989231, + "point.lat": 40.744022, + "layers": "address" + }, + "expected": { + "properties": [ + { + "name": "9 West 26th Street", + "distance": 0 + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/tizen-sdk-places.json b/projects/north-america/test_cases/tizen-sdk-places.json new file mode 100644 index 0000000..893f5a3 --- /dev/null +++ b/projects/north-america/test_cases/tizen-sdk-places.json @@ -0,0 +1,122 @@ +{ + "name": "tizen sdk: places", + "priorityThresh": 1, + "description": [ + "maps_service_search_place (const maps_coordinates_h position, int distance, const maps_place_filter_h filter): Queries a Place information by a coordinates position and a distance", + "maps_service_search_place_by_area (const maps_area_h boundary, const maps_place_filter_h filter): Queries a Place information by a coordinates boundary", + "maps_service_search_place_by_address (const char *address, const maps_area_h boundary, const maps_place_filter_h filter): Queries a Place information by a free-formed address string", + "maps_service_search_place_list (const maps_area_h boundary, const maps_place_filter_h filter): Queries a brief Place information by a coordinates boundary", + "maps_service_get_place_details (const char *uri): Queries a Detail place information by a place uri" + ], + "tests": [ + { + "id": "maps_service_search_place", + "status": "fail", + "user": "dianashk", + "endpoint": "nearby", + "in": { + "point.lon": -74.937712, + "point.lat": 40.235771, + "boundary.circle.radius": 10, + "categories": "food:pizza" + }, + "expected": { + "properties": [ + { + "name": "Brother's pizza", + "region_a": "PA" + } + ] + } + }, + { + "id": "maps_service_search_place_by_area", + "status": "fail", + "user": "dianashk", + "endpoint": "nearby", + "in": { + "point.lon": -74.937712, + "point.lat": 40.235771, + "boundary.rect.min_lat": 40.235974, + "boundary.rect.min_lon": -74.937158, + "boundary.rect.max_lat": 40.228095, + "boundary.rect.max_lon": -74.944906, + "categories": "finance" + }, + "expected": { + "properties": [ + { + "name": "Wells Fargo", + "localadmin": "Newtown", + "region_a": "PA" + } + ] + } + }, + { + "id": "maps_service_search_place_by_address", + "status": "pass", + "user": "dianashk", + "endpoint": "search", + "in": { + "text": "Roosevelt", + "point.lon": -73.99875, + "point.lat": 40.722880, + "boundary.rect.min_lat": 40.707710007867334, + "boundary.rect.min_lon": -74.01763916015625, + "boundary.rect.max_lat": 40.759220487652186, + "boundary.rect.max_lon": -73.97300720214844, + "categories": "education" + }, + "expected": { + "properties": [ + { + "name": "Eleanor Roosevelt High School", + "region_a": "NY" + } + ] + } + }, + { + "id": "maps_service_search_place_by_list", + "status": "fail", + "description": "?????? how is this different from by_area?", + "user": "dianashk", + "endpoint": "nearby", + "in": { + "point.lon": -74.937712, + "point.lat": 40.235771, + "boundary.rect.min_lat": 40.235974, + "boundary.rect.min_lon": -74.937158, + "boundary.rect.max_lat": 40.228095, + "boundary.rect.max_lon": -74.944906, + "categories": "finance" + }, + "expected": { + "properties": [ + { + "name": "Wells Fargo", + "localadmin": "Newtown", + "region_a": "PA" + } + ] + } + }, + { + "id": "maps_service_get_place_details", + "status": "fail", + "user": "dianashk", + "endpoint": "place", + "in": { + "ids": "openstreetmap:venue:node:357621540" + }, + "expected": { + "properties": [ + { + "name": "Eleanor Roosevelt High School" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/university.json b/projects/north-america/test_cases/university.json new file mode 100644 index 0000000..8bdfee7 --- /dev/null +++ b/projects/north-america/test_cases/university.json @@ -0,0 +1,277 @@ +{ + "name": "university", + "priorityThresh": 10, + "tests": [ + { + "id": 0, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "OSM record does't have umbrella university in name." + ], + "in": { + "text": "Teachers College, Columbia University", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Teachers College", + "region": "New York" + } + ] + } + }, + { + "id": 1, + "status": "fail", + "user": "Lily", + "type": "dev", + "description": [ + "expanded name of university has the word 'in' ", + "tracking ticket https://github.com/pelias/pelias/issues/602" + ], + "in": { + "text": "Washington University in St. Louis", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Washington University", + "region": "Missouri" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "Miami is a city in Florida but this university is in Ohio" + ], + "in": { + "text": "Miami University", + "boundary.country": "USA" + }, + "expected": { + "properties": [ + { + "name": "Miami University", + "region": "Ohio" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "parsing: Hawaii without apostrophe" + ], + "in": { + "text": "University of Hawaii at Hilo" + }, + "expected": { + "properties": [ + { + "name": "University of Hawai‘i at Hilo", + "region": "Hawaii" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "the university, a venue. there are also streets with the same name" + ], + "in": { + "text": "Universidad de Guadalajara, Guadalajara, Jalisco, México" + }, + "expected": { + "properties": [ + { + "name": "CUCEA (Universidad de Guadalajara)", + "layer": "venue", + "region": "Jalisco", + "country": "Mexico" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "university in spanish without diacritics" + ], + "in": { + "text": "Universidad Autonoma de Ciudad Juarez" + }, + "expected": { + "properties": [ + { + "name": "Universidad Autónoma de Ciudad Juárez", + "region": "Chihuahua" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "many institutions are called oxford college. looking for the one in Georgia" + ], + "in": { + "text": "Oxford College, oxford, ga" + }, + "expected": { + "properties": [ + { + "name": "Oxford College of Emory University", + "region": "Georgia" + } + ] + } + }, + { + "id": 7, + "status": "fail", + "user": "Lily", + "type": "dev", + "description": [ + "english translation of russian university name", + "OSM record is a relation. Returns places in St. Petersburg, FL", + "Geonames record exists: http://www.geonames.org/search.html?q=Saint+Petersburg+State+University&country=RU", + "test passes if search for name in Russian https://github.com/pelias/api/issues/127" + ], + "in": { + "text": "Saint Petersburg State University" + }, + "expected": { + "properties": [ + { + "name": "Saint Petersburg State University", + "country": "Russia" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "Russian university in Russian" + ], + "in": { + "text": "Санкт-Петербургский Государственный Университет" + }, + "expected": { + "properties": [ + { + "name": "Санкт-Петербургский Государственный Университет", + "country": "Russia" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "Looking for regional campus of Ohio State University in Lima. Main campus in Columbia, Ohio" + ], + "in": { + "text": "Ohio State University" + }, + "expected": { + "properties": [ + { + "name": "Ohio State University Lima", + "localadmin": "Bath" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "Campus of Antioch University. Actual name omits \"Seattle\". no comma" + ], + "in": { + "text": "Antioch University Seattle" + }, + "expected": { + "properties": [ + { + "name": "Antioch University", + "locality": "Seattle" + } + ] + } + }, + { + "id": 11, + "status": "pass", + "user": "Lily", + "type": "dev", + "description": [ + "Union College in Kentucky specifies it is not associated with other Union Colleges", + "With comma" + ], + "in": { + "text": "Union college, kentucky" + }, + "expected": { + "properties": [ + { + "name": "Union College", + "region": "Kentucky" + } + ] + } + }, + { + "id": 12, + "status": "fail", + "user": "Lily", + "type": "dev", + "description": [ + "Without comma will return places in Kentucky with Union in the name. Addressit parsing issue", + "ticket tracking https://github.com/pelias/pelias/issues/602" + ], + "in": { + "text": "Union college kentucky" + }, + "expected": { + "properties": [ + { + "name": "Union College", + "region": "Kentucky" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/washington_dc.json b/projects/north-america/test_cases/washington_dc.json new file mode 100644 index 0000000..53bf178 --- /dev/null +++ b/projects/north-america/test_cases/washington_dc.json @@ -0,0 +1,105 @@ +{ + "name": "washington dc", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "julian", + "description": "address searches in washington DC should work when 'district of columbia' is abbreviated", + "issue": "https://github.com/pelias/pelias/issues/509", + "in": { + "text": "1705 P St NW, Washington, dc" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "1705", + "street": "P Street NW", + "locality": "Washington", + "region": "District of Columbia" + }, + { + "layer": "address", + "housenumber": "1705", + "street": "P Street Northwest", + "locality": "Washington", + "region": "District of Columbia" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "julian", + "description": "address searches in washington DC should work when 'district of columbia' is not abbreviated", + "issue": "https://github.com/pelias/pelias/issues/509", + "in": { + "text": "1705 P St NW, Washington, district of columbia" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "address", + "housenumber": "1705", + "street": "P Street NW", + "locality": "Washington", + "region": "District of Columbia" + }, + { + "layer": "address", + "housenumber": "1705", + "street": "P Street Northwest", + "locality": "Washington", + "region": "District of Columbia" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "julian", + "description": "venue searches in washington DC should work when 'district of columbia' is abbreviated", + "issue": "https://github.com/pelias/pelias/issues/509", + "in": { + "text": "busboys and poets, washington dc" + }, + "expected": { + "properties": [ + { + "layer": "venue", + "name": "Busboys and Poets", + "locality": "Washington", + "region": "District of Columbia" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "julian", + "description": "S Street in Washington, DC should not be interpreted as 'South St'", + "issue": "https://github.com/pelias/pelias/issues/329", + "in": { + "text": "641 S Street NW, washington, district of columbia" + }, + "expected": { + "properties": [ + { + "layer": "address", + "housenumber": "641", + "street": "S Street NW", + "locality": "Washington", + "region": "District of Columbia" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_counties.json b/projects/north-america/test_cases/wof_counties.json new file mode 100644 index 0000000..062b892 --- /dev/null +++ b/projects/north-america/test_cases/wof_counties.json @@ -0,0 +1,104 @@ +{ + "name": "Who's on First counties", + "priorityThresh": 1, + "tests": [ + { + "id": 2, + "status": "fail", + "user": "Stephen", + "issue": "https://github.com/pelias/pelias/issues/311", + "description": [ + "chosen since it's also not the name of a city", + "Result from UK shows up first because we still don't handle admin parts properly" + ], + "in": { + "text": "Potter, PA", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "Potter", + "county": "Potter", + "region": "Pennsylvania", + "region_a": "PA", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "description": "chosen because users think it's a city", + "in": { + "text": "Maui, Hawaii", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "Maui County", + "county": "Maui County", + "region": "Hawaii", + "region_a": "HI", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Stephen", + "description": "chosen because France and complicated hierarchy", + "in": { + "text": "Arzacq-Arraziguet", + "sources": "wof" + }, + "expected": { + "priorityThresh": 2, + "properties": [ + { + "layer": "county", + "name": "Arzacq-Arraziguet", + "county": "Arzacq-Arraziguet", + "macrocounty": "Pau", + "region": "Pyrénées-Atlantiques", + "macroregion": "New Aquitaine", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/548", + "user": "Stephen", + "description": "works with switch to placeholder", + "in": { + "text": "KoÅobrzeski, Poland", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "county", + "name": "KoÅobrzeski", + "county": "KoÅobrzeski", + "region": "Zachodniopomorskie", + "country": "Poland", + "country_a": "POL" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_countries.json b/projects/north-america/test_cases/wof_countries.json new file mode 100644 index 0000000..07475b9 --- /dev/null +++ b/projects/north-america/test_cases/wof_countries.json @@ -0,0 +1,208 @@ +{ + "name": "Who's on First countries", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "United States", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "United States", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Canada", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Canada", + "country": "Canada", + "country_a": "CAN" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Netherlands", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Netherlands", + "country": "Netherlands", + "country_a": "NLD" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Burkina Faso", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Burkina Faso", + "country": "Burkina Faso", + "country_a": "BFA" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Stephen", + "issue": "https://github.com/pelias/pelias/issues/263", + "description": "placeholder supports alpha3 and alpha2 country codes", + "in": { + "text": "DEU", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Germany", + "country": "Germany", + "country_a": "DEU" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Stephen", + "issue": "https://github.com/pelias/pelias/issues/263", + "description": "placeholder supports alpha3 and alpha2 country codes", + "in": { + "text": "USA", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "United States", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "Stephen", + "issue": "https://github.com/pelias/pelias/issues/263", + "description": "placeholder supports alpha3 and alpha2 country codes", + "in": { + "text": "LUX", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Luxembourg", + "country": "Luxembourg", + "country_a": "LUX" + } + ] + } + }, + { + "id": 8, + "status": "pass", + "user": "Stephen", + "issue": "https://github.com/pelias/pelias/issues/263", + "description": "placeholder supports alpha3 and alpha2 country codes", + "in": { + "text": "BOL", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Bolivia", + "country": "Bolivia", + "country_a": "BOL" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "Diana", + "description": "https://github.com/pelias/api/issues/166", + "in": { + "text": "Sweden" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Sweden", + "country": "Sweden", + "country_a": "SWE" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "Diana", + "description": "https://github.com/pelias/api/issues/166", + "in": { + "text": "Finland" + }, + "expected": { + "properties": [ + { + "layer": "country", + "name": "Finland", + "country": "Finland", + "country_a": "FIN" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_dependencies.json b/projects/north-america/test_cases/wof_dependencies.json new file mode 100644 index 0000000..38374ea --- /dev/null +++ b/projects/north-america/test_cases/wof_dependencies.json @@ -0,0 +1,146 @@ +{ + "name": "Who's on First dependencies", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "Anguilla", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Anguilla", + "dependency": "Anguilla", + "country": "United Kingdom", + "country_a": "GBR" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "Bermuda", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Bermuda", + "dependency": "Bermuda", + "country": "United Kingdom", + "country_a": "GBR" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "Faroe Islands", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Faroe Islands", + "dependency": "Faroe Islands", + "country": "Denmark", + "country_a": "DNK" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "Puerto Rico", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Puerto Rico", + "dependency": "Puerto Rico", + "dependency_a": "PRI", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 5, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "American Samoa", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "American Samoa", + "dependency": "American Samoa", + "dependency_a": "ASM", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 6, + "status": "fail", + "user": "trescube", + "description": "", + "issue": "https://github.com/pelias/placeholder/issues/54", + "in": { + "text": "Niue", + "sources": "wof", + "layers": "dependency" + }, + "expected": { + "properties": [ + { + "layer": "dependency", + "name": "Niue", + "dependency": "Niue", + "country": "New Zealand", + "country_a": "NZL" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_localadmins.json b/projects/north-america/test_cases/wof_localadmins.json new file mode 100644 index 0000000..f6850e4 --- /dev/null +++ b/projects/north-america/test_cases/wof_localadmins.json @@ -0,0 +1,75 @@ +{ + "name": "Who's on First localadmins", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "Stephen", + "description": "chosen for diacriticals. space at the end of the name", + "in": { + "text": "Villares De Órbigo, Spain", + "sources": "wof", + "layers": "localadmin" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Villares De Órbigo", + "region": "Leon", + "macroregion": "Castile and Leon", + "country": "Spain", + "country_a": "ESP" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Norwood Young America, Minnesota, US", + "sources": "wof", + "layers": "localadmin" + }, + "expected": { + "properties": [ + { + "layer": "localadmin", + "name": "Norwood Young America", + "county": "Carver County", + "region": "Minnesota", + "region_a": "MN", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Zickrick, SD", + "sources": "wof" + }, + "expected": { + "priorityThresh": 1, + "properties": [ + { + "layer": "localadmin", + "name": "Zickrick", + "region": "South Dakota", + "region_a": "SD", + "country": "United States", + "country_a": "USA" + } + ] + } + } + + ] +} diff --git a/projects/north-america/test_cases/wof_localities.json b/projects/north-america/test_cases/wof_localities.json new file mode 100644 index 0000000..dd5320e --- /dev/null +++ b/projects/north-america/test_cases/wof_localities.json @@ -0,0 +1,223 @@ +{ + "name": "Who's on First localities", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "in": { + "text": "New York, New York", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "New York", + "locality": "New York", + "county": "Kings County", + "region": "New York", + "region_a": "NY", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Socorro, New Mexico", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Socorro", + "locality": "Socorro", + "county": "Socorro County", + "region": "New Mexico", + "region_a": "NM", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Truth or Consequences, NM", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Truth Or Consequences", + "locality": "Truth Or Consequences", + "county": "Sierra County", + "region": "New Mexico", + "region_a": "NM", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Shanghai, China", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Shanghai", + "locality": "Shanghai", + "region": "Shanghai", + "country": "China", + "country_a": "CHN" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Carmel-by-the-Sea, California", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Carmel-by-the-Sea", + "county": "Monterey County", + "region": "California", + "region_a": "CA", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Springfield", + "sources": "wof", + "layers": "locality" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Springfield", + "locality": "Springfield", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Città del Vaticano, Vatican", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Vatican City", + "locality": "Vatican City", + "region": "Vatican", + "country": "Vatican City", + "country_a": "VAT" + } + ] + } + }, + { + "id": 8, + "status": "fail", + "issue": "https://github.com/pelias/acceptance-tests/issues/213", + "description": "returns the right result second, cause unknown", + "user": "Stephen", + "in": { + "text": "San Jaun, Puerto Rico", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "locality": "San Juan", + "region": "Puerto Rico", + "region_a": "PRI", + "country": "United States", + "country_a": "USA", + "name": "San Juan" + } + ] + } + }, + { + "id": 9, + "status": "pass", + "user": "Stephen", + "in": { + "text": "London, England", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "macroregion": "England", + "name": "London", + "country": "United Kingdom", + "country_a": "GBR" + } + ] + } + }, + { + "id": 10, + "status": "pass", + "user": "Stephen", + "description": "chosen for diacriticals + Münster Rebellion... YOLO!", + "in": { + "text": "Münster, DE", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "locality", + "name": "Münster", + "region": "Nordrhein-Westfalen", + "country": "Germany", + "country_a": "DEU" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_macrocounties.json b/projects/north-america/test_cases/wof_macrocounties.json new file mode 100644 index 0000000..739af16 --- /dev/null +++ b/projects/north-america/test_cases/wof_macrocounties.json @@ -0,0 +1,104 @@ +{ + "name": "Who's on First macrocounties", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "fail", + "user": "Stephen", + "issue": [ + "https://github.com/pelias/api/issues/495", + "https://github.com/pelias/api/issues/484" + ], + "description": "chosen for punctuation", + "in": { + "text": "Saint-Die-Des-Vosges, France", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Saint-Die-Des-Vosges", + "region": "Vosges", + "macroregion": "Lorraine", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 2, + "status": "fail", + "user": "Stephen", + "issue": "https://github.com/pelias/api/issues/484", + "description": [ + "chosen for diacriticals + Münster Rebellion... YOLO!", + "name of macrocounty and locality, also DE conflicts with DEU", + "legitimate results should only be from Germany or Delaware, not Indiana and France as they are now" + ], + "in": { + "text": "Münster, DE", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Münster", + "region": "Nordrhein-Westfalen", + "country": "Germany", + "country_a": "DEU" + } + ] + } + }, + { + "id": 3, + "status": "fail", + "user": "Stephen", + "issue": "https://github.com/pelias/api/issues/484", + "description": "", + "in": { + "text": "Perpignan, France", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Perpignan", + "region": "Pyrénées-Orientales", + "macroregion": "Languedoc-Roussillon", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "Stephen", + "issue": "https://github.com/pelias/api/issues/484", + "description": "chosen for punctuation", + "in": { + "text": "Les Sables-D'Olonne, France", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macrocounty", + "name": "Les Sables-d'Olonne", + "region": "Vendée", + "macroregion": "Pays De La Loire", + "country": "France", + "country_a": "FRA" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_macroregions.json b/projects/north-america/test_cases/wof_macroregions.json new file mode 100644 index 0000000..7378bea --- /dev/null +++ b/projects/north-america/test_cases/wof_macroregions.json @@ -0,0 +1,133 @@ +{ + "name": "Who's on First macroregions", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Észak-Alföld", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Northern Great Plain", + "macroregion": "Northern Great Plain", + "country": "Hungary", + "country_a": "HUN" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Comunidad Foral De Navarra, ES", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Navarra", + "macroregion": "Navarra", + "country": "Spain", + "country_a": "ESP" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Île-De-France, France", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Ile-of-France", + "macroregion": "Ile-of-France", + "country": "France", + "country_a": "FRA" + } + ] + } + }, + { + "id": 4, + "status": "fail", + "user": "Stephen", + "issue": "https://github.com/whosonfirst/whosonfirst-data/issues/250", + "description": "seems to be a data issue, country is set to Europe", + "in": { + "text": "Dél-Dunántúl, HU", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Dél-Dunántúl", + "macroregion": "Dél-Dunántúl", + "country": "Hungary", + "country_a": "HUN" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Sardegna, Italy", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Sardinia", + "macroregion": "Sardinia", + "country": "Italy", + "country_a": "ITA" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Közép-Magyarország, Hungary", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "macroregion", + "name": "Central Hungary", + "macroregion": "Central Hungary", + "country": "Hungary", + "country_a": "HUN" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_neighbourhoods.json b/projects/north-america/test_cases/wof_neighbourhoods.json new file mode 100644 index 0000000..c28c7de --- /dev/null +++ b/projects/north-america/test_cases/wof_neighbourhoods.json @@ -0,0 +1,134 @@ +{ + "name": "Who's on First neighbourhoods", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Crown Heights, Brooklyn, New York", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Crown Heights", + "locality": "New York", + "borough": "Brooklyn", + "county": "Kings County", + "region": "New York", + "region_a": "NY", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "issue": "https://github.com/pelias/pelias/issues/548", + "user": "Stephen", + "in": { + "text": "Reparto Vista Alegre, Cuba", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Reparto Vista Alegre", + "region": "Santiago de Cuba", + "country": "Cuba", + "country_a": "CUB" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Nuevo Cristóbal, Panama", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Nuevo Cristóbal", + "country": "Panama", + "country_a": "PAN" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Gaddiannaram, India", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Gaddiannaram", + "locality": "Hyderabad", + "region": "Andhra Pradesh", + "country": "India", + "country_a": "IND" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Stephen", + "in": { + "text": "9丁目, Japan", + "lang": "ja", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "9丁目", + "locality": "八王子市", + "region": "東京都", + "country": "日本", + "country_a": "JPN" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Stephen", + "in": { + "text": "Taman Taynton View, Malaysia", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "neighbourhood", + "name": "Taman Taynton View", + "locality": "Kuala Lumpur", + "region": "Kuala Lumpur", + "country": "Malaysia", + "country_a": "MYS" + } + ] + } + } + ] +} diff --git a/projects/north-america/test_cases/wof_regions.json b/projects/north-america/test_cases/wof_regions.json new file mode 100644 index 0000000..42a7a9a --- /dev/null +++ b/projects/north-america/test_cases/wof_regions.json @@ -0,0 +1,198 @@ +{ + "name": "Who's on First regions", + "priorityThresh": 1, + "tests": [ + { + "id": 1, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Pennsylvania", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Pennsylvania", + "region": "Pennsylvania", + "region_a": "PA", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 2, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "New Mexico", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "New Mexico", + "region": "New Mexico", + "region_a": "NM", + "country": "United States", + "country_a": "USA" + } + ] + } + }, + { + "id": 3, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Newfoundland and Labrador", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Newfoundland and Labrador", + "region": "Newfoundland and Labrador", + "region_a": "NL", + "country": "Canada", + "country_a": "CAN" + } + ] + } + }, + { + "id": 4, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Prince Edward Island", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Prince Edward Island", + "region": "Prince Edward Island", + "region_a": "PE", + "country": "Canada", + "country_a": "CAN" + } + ] + } + }, + { + "id": 5, + "status": "pass", + "user": "Stephen", + "description": "", + "in": { + "text": "Dadra and Nagar Haveli, IN", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Dadra and Nagar Haveli", + "region": "Dadra and Nagar Haveli", + "country": "India", + "country_a": "IND" + } + ] + } + }, + { + "id": 6, + "status": "pass", + "user": "Stephen", + "description": "chosen for diacriticals", + "in": { + "text": "Centar župa", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85674385", + "name": "Centar Zupa Municipality" + } + ] + } + }, + { + "id": 7, + "status": "pass", + "user": "Stephen", + "description": "included for length", + "in": { + "text": "Tajura' wa an Nawahi al Arba, LY", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Tajura' wa an Nawahi al Arba", + "region": "Tajura' wa an Nawahi al Arba", + "country": "Libya", + "country_a": "LBY" + } + ] + } + }, + { + "id": 8, + "status": "fail", + "user": "Stephen", + "description": "", + "notes": "libpostal identifies this as a city/country even though it's a WOF region", + "in": { + "text": "Xaçmaz, Azerbaijan", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "layer": "region", + "name": "Xaçmaz", + "region": "Xaçmaz", + "country": "Azerbaijan", + "country_a": "AZE" + } + ] + } + }, + { + "id": 9, + "status": "fail", + "user": "Stephen", + "description": "fails since placeholder indexes 'Democratic Republic of Congo' but not 'Congo'", + "in": { + "text": "Kasaï-Oriental, Congo", + "sources": "wof" + }, + "expected": { + "properties": [ + { + "gid": "whosonfirst:region:85670011", + "layer": "region", + "name": "Kasaï-Oriental", + "region": "Kasaï-Oriental", + "country": "Democratic Republic of the Congo", + "country_a": "COD" + } + ] + } + } + ] +}