datamarket 0.9.35__py3-none-any.whl → 0.9.36__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of datamarket might be problematic. Click here for more details.

@@ -203,7 +203,7 @@ class Nominatim:
203
203
  dist_geonames: float,
204
204
  authoritative_postcode: Optional[str],
205
205
  authoritative_province_from_postcode: Optional[str],
206
- nominatim_address_province_raw: Optional[str],
206
+ nominatim_province: Optional[str],
207
207
  ) -> Dict[str, Optional[str]]:
208
208
  """
209
209
  Selects the final address result based on distances and applies the authoritative postcode/province.
@@ -211,7 +211,7 @@ class Nominatim:
211
211
  if dist_nominatim <= dist_geonames and dist_nominatim != float("inf"):
212
212
  final_result = parsed_nominatim_result
213
213
  final_result["postcode"] = authoritative_postcode
214
- final_result["province"] = nominatim_address_province_raw
214
+ final_result["province"] = nominatim_province
215
215
  elif dist_geonames < dist_nominatim and dist_geonames != float("inf"):
216
216
  final_result = parsed_geonames_result
217
217
  final_result["postcode"] = authoritative_postcode
@@ -251,9 +251,9 @@ class Nominatim:
251
251
  parsed_geonames_result = self._parse_geonames_result(geonames_response)
252
252
 
253
253
  # Determine authoritative postcode
254
- raw_nominatim_province = nominatim_response.get("address", {}).get("province")
254
+ nominatim_province = parsed_nominatim_result.get("province")
255
255
  selected_postcode, selected_province_from_postcode = self._select_postcode_and_derived_province(
256
- parsed_nominatim_result, parsed_geonames_result, raw_nominatim_province
256
+ parsed_nominatim_result, parsed_geonames_result, nominatim_province
257
257
  )
258
258
 
259
259
  # Calculate distances
@@ -280,7 +280,7 @@ class Nominatim:
280
280
  dist_geonames,
281
281
  selected_postcode,
282
282
  selected_province_from_postcode,
283
- raw_nominatim_province,
283
+ nominatim_province,
284
284
  )
285
285
 
286
286
  return final_result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: datamarket
3
- Version: 0.9.35
3
+ Version: 0.9.36
4
4
  Summary: Utilities that integrate advanced scraping knowledge into just one library.
5
5
  Home-page: https://datamarket.es
6
6
  License: GPL-3.0-or-later
@@ -4,7 +4,7 @@ datamarket/interfaces/alchemy.py,sha256=mQwjDqBpz1QHRV2JTCALvn5iK_ky69oE2Gw-EtRX
4
4
  datamarket/interfaces/aws.py,sha256=7KLUeBxmPN7avEMPsu5HC_KHB1N7W6Anp2X8fo43mlw,2383
5
5
  datamarket/interfaces/drive.py,sha256=shbV5jpQVe_KPE-8Idx6Z9te5Zu1SmVfrvSAyd9ZIgE,2915
6
6
  datamarket/interfaces/ftp.py,sha256=o0KlJxtksbop9OjCiQRzyAa2IeG_ExVXagS6apwrAQo,1881
7
- datamarket/interfaces/nominatim.py,sha256=xTMI7hUZ778xUZ0iCT6LA4pmiaWEJq3F_AC-dXcS1nc,12467
7
+ datamarket/interfaces/nominatim.py,sha256=XzqBFVBzGU2BIFnFueZ56tk4JhaQgj5dvFalnCG6Zxk,12417
8
8
  datamarket/interfaces/peerdb.py,sha256=cwYwvO740GyaPo9zLAwJsf3UeJDGDiYzjQVM9Q6s-_g,23652
9
9
  datamarket/interfaces/proxy.py,sha256=updoOStKd8-nQBbxWbnD9eOt6HksnYi-5dQ0rEySf5M,3152
10
10
  datamarket/interfaces/tinybird.py,sha256=AYrcRGNOCoCt7ojilkWa27POROee9sTCwZ61GGHEPeM,2698
@@ -21,7 +21,7 @@ datamarket/utils/strings/normalization.py,sha256=QLZ-THzjGOK9eWPPR1PrsffwQkSOx_M
21
21
  datamarket/utils/strings/obfuscation.py,sha256=8gMepfjPq0N4_IpKR6i2dy_9VJugQ3qJiRiRvKavB3s,5246
22
22
  datamarket/utils/typer.py,sha256=FDF3l6gh3UlAFPsHCtesnekvct2rKz0oFn3uKARBQvE,814
23
23
  datamarket/utils/types.py,sha256=vxdQZdwdXrfPR4Es52gBgol-tMRIOD6oK9cBo3rB0JQ,74
24
- datamarket-0.9.35.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
25
- datamarket-0.9.35.dist-info/METADATA,sha256=RNtstcJHXMjzSc_ZekIxbh86C9AwKlqQdwUSn908a0k,6871
26
- datamarket-0.9.35.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
27
- datamarket-0.9.35.dist-info/RECORD,,
24
+ datamarket-0.9.36.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
25
+ datamarket-0.9.36.dist-info/METADATA,sha256=btNtbOyIdvhPwecYvODNFruyWAWyr3y2Psa2U6G3D30,6871
26
+ datamarket-0.9.36.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
27
+ datamarket-0.9.36.dist-info/RECORD,,