polly-python 4.2.0__tar.gz → 4.3.0__tar.gz

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.
Files changed (71) hide show
  1. {polly_python-4.2.0/polly_python.egg-info → polly_python-4.3.0}/PKG-INFO +1 -1
  2. polly_python-4.3.0/polly/__init__.py +1 -0
  3. {polly_python-4.2.0 → polly_python-4.3.0}/polly/polly_kg.py +57 -12
  4. {polly_python-4.2.0 → polly_python-4.3.0/polly_python.egg-info}/PKG-INFO +1 -1
  5. polly_python-4.2.0/polly/__init__.py +0 -1
  6. {polly_python-4.2.0 → polly_python-4.3.0}/LICENSE.md +0 -0
  7. {polly_python-4.2.0 → polly_python-4.3.0}/MANIFEST.in +0 -0
  8. {polly_python-4.2.0 → polly_python-4.3.0}/README.md +0 -0
  9. {polly_python-4.2.0 → polly_python-4.3.0}/polly/analyze.py +0 -0
  10. {polly_python-4.2.0 → polly_python-4.3.0}/polly/application_error_info.py +0 -0
  11. {polly_python-4.2.0 → polly_python-4.3.0}/polly/atlas.py +0 -0
  12. {polly_python-4.2.0 → polly_python-4.3.0}/polly/auth.py +0 -0
  13. {polly_python-4.2.0 → polly_python-4.3.0}/polly/constants.py +0 -0
  14. {polly_python-4.2.0 → polly_python-4.3.0}/polly/curation.py +0 -0
  15. {polly_python-4.2.0 → polly_python-4.3.0}/polly/data_management.py +0 -0
  16. {polly_python-4.2.0 → polly_python-4.3.0}/polly/errors.py +0 -0
  17. {polly_python-4.2.0 → polly_python-4.3.0}/polly/help.py +0 -0
  18. {polly_python-4.2.0 → polly_python-4.3.0}/polly/helpers.py +0 -0
  19. {polly_python-4.2.0 → polly_python-4.3.0}/polly/http_response_codes.py +0 -0
  20. {polly_python-4.2.0 → polly_python-4.3.0}/polly/index_schema_level_conversion_const.py +0 -0
  21. {polly_python-4.2.0 → polly_python-4.3.0}/polly/jobs.py +0 -0
  22. {polly_python-4.2.0 → polly_python-4.3.0}/polly/omixatlas.py +0 -0
  23. {polly_python-4.2.0 → polly_python-4.3.0}/polly/omixatlas_hlpr.py +0 -0
  24. {polly_python-4.2.0 → polly_python-4.3.0}/polly/pipelines.py +0 -0
  25. {polly_python-4.2.0 → polly_python-4.3.0}/polly/s3_utils.py +0 -0
  26. {polly_python-4.2.0 → polly_python-4.3.0}/polly/session.py +0 -0
  27. {polly_python-4.2.0 → polly_python-4.3.0}/polly/threading_utils.py +0 -0
  28. {polly_python-4.2.0 → polly_python-4.3.0}/polly/tracking.py +0 -0
  29. {polly_python-4.2.0 → polly_python-4.3.0}/polly/validation.py +0 -0
  30. {polly_python-4.2.0 → polly_python-4.3.0}/polly/validation_hlpr.py +0 -0
  31. {polly_python-4.2.0 → polly_python-4.3.0}/polly/workspaces.py +0 -0
  32. {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/IFiles.py +0 -0
  33. {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/IReporting.py +0 -0
  34. {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/ISchema.py +0 -0
  35. {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/__init__.py +0 -0
  36. {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/SOURCES.txt +0 -0
  37. {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/dependency_links.txt +0 -0
  38. {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/requires.txt +0 -0
  39. {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/top_level.txt +0 -0
  40. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/__init__.py +0 -0
  41. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/dataset.py +0 -0
  42. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/__init__.py +0 -0
  43. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/files.py +0 -0
  44. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/files_hlpr.py +0 -0
  45. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/polly_services_hlpr.py +0 -0
  46. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/__init__.py +0 -0
  47. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/reporting.py +0 -0
  48. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/reporting_hlpr.py +0 -0
  49. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/__init__.py +0 -0
  50. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema.py +0 -0
  51. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema_const.py +0 -0
  52. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema_hlpr.py +0 -0
  53. {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/validate_schema_hlpr.py +0 -0
  54. {polly_python-4.2.0 → polly_python-4.3.0}/pyproject.toml +0 -0
  55. {polly_python-4.2.0 → polly_python-4.3.0}/setup.cfg +0 -0
  56. {polly_python-4.2.0 → polly_python-4.3.0}/setup.py +0 -0
  57. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_atlas.py +0 -0
  58. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_constants.py +0 -0
  59. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_curation.py +0 -0
  60. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_data_management.py +0 -0
  61. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_help.py +0 -0
  62. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_helpers.py +0 -0
  63. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_jobs.py +0 -0
  64. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_kg.py +0 -0
  65. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_omixatlas.py +0 -0
  66. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_pipelines.py +0 -0
  67. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_s3_utils.py +0 -0
  68. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_schema_ux.py +0 -0
  69. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_threading_utils.py +0 -0
  70. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_validation.py +0 -0
  71. {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_workspaces.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polly_python
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Polly SDK
5
5
  Home-page: https://github.com/ElucidataInc/polly-python
6
6
  Project-URL: Documentation, https://docs.elucidata.io
@@ -0,0 +1 @@
1
+ __version__ = "4.3.0"
@@ -277,13 +277,30 @@ class PollyKG:
277
277
  result_json = requests.get(result_s3_signed_url)
278
278
  return result_json.json()
279
279
  elif status == "FAILED":
280
- raise QueryFailedException(
280
+ metadata = (
281
281
  status_response.json()
282
282
  .get("data", {})
283
283
  .get("attributes", {})
284
284
  .get("metadata", {})
285
- .get("error")
286
285
  )
286
+ # Try new format first: metadata.results.error and metadata.results.details
287
+ results = metadata.get("results", {})
288
+ if results and ("error" in results or "details" in results):
289
+ error_type = results.get("error", "Unknown error")
290
+ error_details = results.get("details", "")
291
+ error_message = (
292
+ f"{error_type}: {error_details}"
293
+ if error_details
294
+ else error_type
295
+ )
296
+ else:
297
+ # Fallback to old format: metadata.error
298
+ error_message = metadata.get(
299
+ "error", "Query failed without a specific error message."
300
+ )
301
+
302
+ print(f"Query failed. Query ID: {query_id}. Error: {error_message}")
303
+ raise QueryFailedException(error_message)
287
304
  except Exception as e:
288
305
  print(e)
289
306
  raise e
@@ -386,11 +403,25 @@ class PollyKG:
386
403
 
387
404
  status = data.get("attributes", {}).get("status")
388
405
  if status == "FAILED":
389
- raise QueryFailedException(
390
- data.get("attributes", {})
391
- .get("metadata", {})
392
- .get("error", "Query failed without a specific error message.")
393
- )
406
+ metadata = data.get("attributes", {}).get("metadata", {})
407
+ # Try new format first: metadata.results.error and metadata.results.details
408
+ results = metadata.get("results", {})
409
+ if results and ("error" in results or "details" in results):
410
+ error_type = results.get("error", "Unknown error")
411
+ error_details = results.get("details", "")
412
+ error_message = (
413
+ f"{error_type}: {error_details}"
414
+ if error_details
415
+ else error_type
416
+ )
417
+ else:
418
+ # Fallback to old format: metadata.error
419
+ error_message = metadata.get(
420
+ "error", "Query failed without a specific error message."
421
+ )
422
+
423
+ print(f"Query failed. Query ID: {query_id}. Error: {error_message}")
424
+ raise QueryFailedException(error_message)
394
425
  result_s3_signed_url = (
395
426
  data.get("attributes", {})
396
427
  .get("metadata", {})
@@ -436,11 +467,25 @@ class PollyKG:
436
467
 
437
468
  status = data.get("attributes", {}).get("status")
438
469
  if status == "FAILED":
439
- raise QueryFailedException(
440
- data.get("attributes", {})
441
- .get("metadata", {})
442
- .get("error", "Query failed without a specific error message.")
443
- )
470
+ metadata = data.get("attributes", {}).get("metadata", {})
471
+ # Try new format first: metadata.results.error and metadata.results.details
472
+ results = metadata.get("results", {})
473
+ if results and ("error" in results or "details" in results):
474
+ error_type = results.get("error", "Unknown error")
475
+ error_details = results.get("details", "")
476
+ error_message = (
477
+ f"{error_type}: {error_details}"
478
+ if error_details
479
+ else error_type
480
+ )
481
+ else:
482
+ # Fallback to old format: metadata.error
483
+ error_message = metadata.get(
484
+ "error", "Query failed without a specific error message."
485
+ )
486
+
487
+ print(f"Query failed. Query ID: {query_id}. Error: {error_message}")
488
+ raise QueryFailedException(error_message)
444
489
  result_s3_signed_url = (
445
490
  data.get("attributes", {})
446
491
  .get("metadata", {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: polly_python
3
- Version: 4.2.0
3
+ Version: 4.3.0
4
4
  Summary: Polly SDK
5
5
  Home-page: https://github.com/ElucidataInc/polly-python
6
6
  Project-URL: Documentation, https://docs.elucidata.io
@@ -1 +0,0 @@
1
- __version__ = "4.2.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes