Skip to content

Commit

Permalink
Update dependencies. SDK version bump (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
DzmitryFomchyn authored Jun 22, 2023
1 parent ac63d58 commit d2971cf
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 11 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Changelog for the Mapbox Search SDK for Android

## 1.0.0-rc.6-SNAPSHOT
## 1.0.0-rc.6

### Breaking changes
- [CORE] `SearchSuggestionType.IndexableRecordItem.type` field has been replaced with `record` field which provides `IndexableRecord` instance.

### Bug fixes
- [CORE] Now search suggestions and search results that are matched with `IndexableRecord`s provide data from the backend which is likely to be up-to-date than data from `IndexableRecord`. Original `IndexableRecord` instance can be obtained from `SearchSuggestionType.IndexableRecordItem.record` and `SearchResult.indexableRecord`.
- [ALL] Fixed an issue where SBS backend doesn't always capitilized street names for POI results.
- [ALL] Fixed an issue where some POI results from SBS backend were missing "Ave/St/Avenue/Street" words in street names.

### Mapbox dependencies
- Search Native SDK `0.69.0`
- Common SDK `23.6.0-rc.1`
- Search Native SDK `0.70.0`
- Common SDK `23.6.0`
- Kotlin `1.5.31`


Expand Down
2 changes: 1 addition & 1 deletion MapboxSearch/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android.enableJetifier=false
kotlin.code.style=official

# SDK version attributes
VERSION_NAME=1.0.0-rc.6-SNAPSHOT
VERSION_NAME=1.0.0-rc.6

# Artifact attributes
mapboxArtifactUserOrg=mapbox
Expand Down
6 changes: 3 additions & 3 deletions MapboxSearch/gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ ext {

pitest_version = '1.6.7'

mapbox_maps_version = '10.14.0-rc.1'
common_sdk_version = '23.6.0-rc.1'
mapbox_maps_version = '10.14.0'
common_sdk_version = '23.6.0'
mapbox_base_version = '0.8.0'

search_native_version = '0.69.0'
search_native_version = '0.70.0'

detekt_version = '1.19.0'

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"suggestions": [
{
"feature_name": "667 Madison",
"matching_name": "667 Madison",
"highlighted_name": "667 Madison,New York City,madison ave,New York",
"description": "667 Madison Ave, New York City, New York 10065, United States of America",
"result_type": [
"poi"
],
"language": "en",
"action": {
"endpoint": "retrieve",
"method": "POST",
"body": {
"id": "0pDj_Rew9CLUO8R2UnOKPup2ZJZuWwQpNNTqyTGmGB1WTC30P0_sht2U3w7UOiTI4H1681Oq4MPdoT93OZOI5q7nwmuBm8TYKZuSCGybp2VH0rXMM8k7hBGxgwLggoQGzRh4qOQRnKM2EtcbxLM-tb5aQeC_NiGWX5aa_8ZWcRcFwxGhQ-8GxBuY-f2EzBOVUu1ACpUZIzmiaft27CZiaxIFEuut89nTyk_k_yFCcVhF5xFodu5YHIWFhbmHbYolnATIjVhguYVUqXlDpGroxY3PLhwtGhABn_FV59Hw97vWQz2tXLjJsZ_m94m9bslREzZovbRVWTtt17IGlQZUbQME8ft3c98eLGxrh50Z8YNG-7aKr4_pJ9llCSuPkivNLZKVsbbdCz1t5nM_WPn8f8Xbb9wX3KnM4CBMWM2bvo13zcujlRj1xigzqHTs2JlqrVaVbK-J9IKo-1qk9qX1rBvzvjUnxVVoI0ppb4xwoR71k0Rqaet2UJ8iU19jizxgopAB7sKQVjEYpVs_PMFNr-TMNewjYFVDMUeprLEVIufYatvRboeoeGtsuYsI5XJ3meV5fZsOMX4IeIcLDNG-Fh5cVYlFvw-VojTfXEhPyiZlIjSy2ftASYd5IJ7JrDjrw0EC-GwzwfswFj7ZBGu1o40N7_kubT2KxN6kdzDuA8oHucrxBPmr5jqONJOUAIbNPoT9U85uUHMSqA_3__QH5BEh9O49cUYujsfMWxGOX-zkCM44iXtXQHbEDqtQDiVJrw_7YPK5ArCoStFUvlgwYBWFpooENF2BNKVNJzFAgN8HmrOR37RBIoPjik-N3lQVOkpoDUDSh-2nanEve4GKZ-ynbQr4FYK_Pv36U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Vr5z8ULCNMFEVEN4TqO7BVrajELWEmYJzPw="
},
"multi_retrievable": true
},
"coordinates": "-73.970262,40.764425",
"routable_points": [
{
"name": "POI",
"coordinates": [
-73.97061240745133,
40.764688323942714
]
}
],
"maki": "marker",
"category": [
"office"
],
"category_ids": [
"office"
],
"internal_id": "Y2aAgIL8TAA=.42eAgMSCTN2C_Ezd4tSisszkVAA=.U2aAgLT80qLiwtLEolQ9k8SUVHMjA9M0SzOTRFMjg9RUc1Mjw1RjAA==",
"external_ids": {
"foursquare": "4ade7205f964a520ee7521e3",
"federated": "poi.b064d09463365d08f3d3ec6b54e1e9673e157cf65b0dbb4fb7c38c6343d404ff",
"mbx_poi": "b064d09463365d08f3d3ec6b54e1e9673e157cf65b0dbb4fb7c38c6343d404ff"
},
"mapbox_id": "CkIKQGIwNjRkMDk0NjMzNjVkMDhmM2QzZWM2YjU0ZTFlOTY3M2UxNTdjZjY1YjBkYmI0ZmI3YzM4YzYzNDNkNDA0ZmY=",
"context": [
{
"layer": "address",
"localized_layer": "address",
"name": "667 Madison Ave"
},
{
"layer": "street",
"localized_layer": "street",
"name": "madison ave"
},
{
"layer": "postcode",
"localized_layer": "postcode",
"name": "10065"
},
{
"layer": "place",
"localized_layer": "place",
"name": "New York City"
},
{
"layer": "region",
"localized_layer": "region",
"name": "New York"
},
{
"layer": "country",
"localized_layer": "country",
"name": "United States of America"
}
],
"metadata": {
"iso_3166_1": "US",
"iso_3166_2": "US-NY"
}
}
],
"attribution": "© 2023 Mapbox and its suppliers. All rights reserved. Use of this data is subject to the Mapbox Terms of Service. (https://www.mapbox.com/about/maps/)",
"version": "141:f9a22b62836e23acbb9bf1fc5a7b63c46cd301ce",
"response_uuid": "836c2755-59c5-4798-8493-4fe37edd2b62"
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ internal class CategorySearchIntegrationTest : BaseTest() {
place = "Mountain View",
postcode = "94041",
region = "California",
street = "castro st"
street = "Castro St"
)
),
fullAddress = "750 Castro St, Mountain View, California 94041, United States of America",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ internal class LocalDataProvidersIntegrationTest : BaseTest() {
place = "San Jose",
postcode = "95117",
region = "California",
street = "stevens creek blvd",
street = "Stevens Creek Blvd",
neighborhood = "Valley Fair",
houseNumber = "3249",
country = "United States of America"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ internal class ReverseGeocodingSearchIntegrationTest : BaseTest() {
neighborhood = "Gros-Caillou",
place = "Paris",
postcode = "75007",
street = "avenue anatole france"
street = "Avenue Anatole France"
)
),
fullAddress = "5 Avenue Anatole France, 75007 Paris, France",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ internal class SearchEngineIntegrationTest : BaseTest() {
place = "San Francisco",
neighborhood = "Downtown",
postcode = "94102",
street = "van ness",
street = "Van Ness",
houseNumber = "150"
),
searchResultType = SearchResultType.ADDRESS,
Expand Down Expand Up @@ -1151,6 +1151,24 @@ internal class SearchEngineIntegrationTest : BaseTest() {
assertEquals("667 Madison Ave, New York City, New York 10065, United States of America", suggestion.fullAddress)
}

@Test
fun testSbsBackendDataCorrections() {
/**
* For some results backend sends incorrectly formatted fields. Search SDK tries to patch such data:
* (SSDK-276) street: madison ave -> Madison Ave
* (SSDK-277) name: 667 Madison -> 667 Madison Ave
*/
mockServer.enqueue(createSuccessfulResponse("sbs_responses/suggestions-data-formatting-corrections-test.json"))

val suggestionsResponse = searchEngine.searchBlocking(TEST_QUERY, SearchOptions())

val suggestions = suggestionsResponse.requireSuggestions()
val suggestion = suggestions.first()

assertEquals("667 Madison Ave", suggestion.name)
assertEquals("Madison Ave", suggestion.address?.street)
}

@Test
fun testGeocodingCzechAddressFormatting() {
searchEngine = SearchEngine.createSearchEngine(ApiType.GEOCODING, searchEngineSettings)
Expand Down

0 comments on commit d2971cf

Please sign in to comment.