karrio-hermes 2026.1.4__py3-none-any.whl → 2026.1.5__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.
@@ -337,18 +337,17 @@ def load_services_from_csv() -> list:
337
337
  # Map carrier service code to karrio service code
338
338
  karrio_service_code = ShippingService.map(service_code).name_or_key
339
339
 
340
+ row_min_weight = float(row["min_weight"]) if row.get("min_weight") else None
341
+ row_max_weight = float(row["max_weight"]) if row.get("max_weight") else None
342
+
340
343
  # Initialize service if not exists
341
344
  if karrio_service_code not in services_dict:
342
345
  services_dict[karrio_service_code] = {
343
346
  "service_name": service_name,
344
347
  "service_code": karrio_service_code,
345
348
  "currency": row.get("currency", "EUR"),
346
- "min_weight": (
347
- float(row["min_weight"]) if row.get("min_weight") else None
348
- ),
349
- "max_weight": (
350
- float(row["max_weight"]) if row.get("max_weight") else None
351
- ),
349
+ "min_weight": row_min_weight,
350
+ "max_weight": row_max_weight,
352
351
  "max_length": (
353
352
  float(row["max_length"]) if row.get("max_length") else None
354
353
  ),
@@ -366,6 +365,15 @@ def load_services_from_csv() -> list:
366
365
  ),
367
366
  "zones": [],
368
367
  }
368
+ else:
369
+ # Update service-level weight bounds to cover all zones
370
+ current = services_dict[karrio_service_code]
371
+ if row_min_weight is not None:
372
+ if current["min_weight"] is None or row_min_weight < current["min_weight"]:
373
+ current["min_weight"] = row_min_weight
374
+ if row_max_weight is not None:
375
+ if current["max_weight"] is None or row_max_weight > current["max_weight"]:
376
+ current["max_weight"] = row_max_weight
369
377
 
370
378
  # Parse country codes
371
379
  country_codes = [
@@ -376,6 +384,8 @@ def load_services_from_csv() -> list:
376
384
  zone = models.ServiceZone(
377
385
  label=row.get("zone_label", "Default Zone"),
378
386
  rate=float(row.get("rate", 0.0)),
387
+ min_weight=row_min_weight,
388
+ max_weight=row_max_weight,
379
389
  transit_days=(
380
390
  int(row["transit_days"].split("-")[0]) if row.get("transit_days") and row["transit_days"].split("-")[0].isdigit() else None
381
391
  ),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: karrio_hermes
3
- Version: 2026.1.4
3
+ Version: 2026.1.5
4
4
  Summary: Karrio - Hermes Shipping Extension
5
5
  Author-email: karrio <hello@karrio.io>
6
6
  License-Expression: LGPL-3.0
@@ -6,7 +6,7 @@ karrio/plugins/hermes/__init__.py,sha256=zUfOhtzuErd1H1ICL4rQt68e6BWRQf_B6_kW5UV
6
6
  karrio/providers/hermes/__init__.py,sha256=wMiVnPz7EgKdbu1pGBuvalfyuHj5QwSeMijjvEP6q4w,590
7
7
  karrio/providers/hermes/error.py,sha256=YWmYC_l7_nyJCxiqM0Kgf6yV9IpJ04tkdZyyMT7QnkY,2974
8
8
  karrio/providers/hermes/tracking.py,sha256=olKfHEVYZuwGL9e4348Ui-mAKBGr94FLF6VyxCwtZZg,5941
9
- karrio/providers/hermes/units.py,sha256=91B_i4BeY1e_XguBOG2MZ126IT3mKdz6-dvn70AJyv8,13633
9
+ karrio/providers/hermes/units.py,sha256=8-_jGT_yjnBmZWcNBzbGD1AszxUIJ4v3apQjOfzW6N0,14275
10
10
  karrio/providers/hermes/utils.py,sha256=NOfS_K0Zw7_wxJGBJfkdXwZP6hs0bsaZye5uypztGc4,4163
11
11
  karrio/providers/hermes/pickup/__init__.py,sha256=E59ks-qJAsNmfQgaZ7X0tZuBetITsdRSMJUAZnqxabg,307
12
12
  karrio/providers/hermes/pickup/cancel.py,sha256=JYVGL9decPB0QOHsjrYU5cwT_4vzrpsaEjapC9F3t7A,1587
@@ -22,8 +22,8 @@ karrio/schemas/hermes/pickup_create_response.py,sha256=sAgq92J0TZOUolhMcvDkp6qSR
22
22
  karrio/schemas/hermes/shipment_request.py,sha256=FMqrSlCDG4eGDkuqPDc_DDCbtV_vGRyrRBFCiNTFkmM,7415
23
23
  karrio/schemas/hermes/shipment_response.py,sha256=BI2kUemG-wTzAFpok9KEnlwjm6eK_LemBA_Cyga_e6A,3477
24
24
  karrio/schemas/hermes/tracking_response.py,sha256=6-bqTSl-N65PHl8cs1puOCFubzIZB55RveLdpNsmTEE,1967
25
- karrio_hermes-2026.1.4.dist-info/METADATA,sha256=cxB5FLr58U6GhdnY-8PCdSYMGHNPOPNiG46K9X-mirI,982
26
- karrio_hermes-2026.1.4.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
27
- karrio_hermes-2026.1.4.dist-info/entry_points.txt,sha256=R8XDrYBqWXTPqaO0iTi4Buz8iQiiBiuHkJVNtZIXTkU,57
28
- karrio_hermes-2026.1.4.dist-info/top_level.txt,sha256=9Nasa6abG7pPPG8MGzlemnqw1ohIqgouzQ7HGBnOFLg,27
29
- karrio_hermes-2026.1.4.dist-info/RECORD,,
25
+ karrio_hermes-2026.1.5.dist-info/METADATA,sha256=Ute2gZYW9m-tFogSK6_rWzfYnplNCXt63cvk1bzjhuk,982
26
+ karrio_hermes-2026.1.5.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
27
+ karrio_hermes-2026.1.5.dist-info/entry_points.txt,sha256=R8XDrYBqWXTPqaO0iTi4Buz8iQiiBiuHkJVNtZIXTkU,57
28
+ karrio_hermes-2026.1.5.dist-info/top_level.txt,sha256=9Nasa6abG7pPPG8MGzlemnqw1ohIqgouzQ7HGBnOFLg,27
29
+ karrio_hermes-2026.1.5.dist-info/RECORD,,