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.
- {polly_python-4.2.0/polly_python.egg-info → polly_python-4.3.0}/PKG-INFO +1 -1
- polly_python-4.3.0/polly/__init__.py +1 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/polly_kg.py +57 -12
- {polly_python-4.2.0 → polly_python-4.3.0/polly_python.egg-info}/PKG-INFO +1 -1
- polly_python-4.2.0/polly/__init__.py +0 -1
- {polly_python-4.2.0 → polly_python-4.3.0}/LICENSE.md +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/MANIFEST.in +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/README.md +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/analyze.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/application_error_info.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/atlas.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/auth.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/constants.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/curation.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/data_management.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/errors.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/help.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/helpers.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/http_response_codes.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/index_schema_level_conversion_const.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/jobs.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/omixatlas.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/omixatlas_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/pipelines.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/s3_utils.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/session.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/threading_utils.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/tracking.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/validation.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/validation_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly/workspaces.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/IFiles.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/IReporting.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/ISchema.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_interfaces/__init__.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/SOURCES.txt +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/dependency_links.txt +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/requires.txt +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_python.egg-info/top_level.txt +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/__init__.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/dataset.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/__init__.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/files.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/files/files_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/polly_services_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/__init__.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/reporting.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/reporting/reporting_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/__init__.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema_const.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/schema_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/polly_services/schema/validate_schema_hlpr.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/pyproject.toml +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/setup.cfg +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/setup.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_atlas.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_constants.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_curation.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_data_management.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_help.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_helpers.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_jobs.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_kg.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_omixatlas.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_pipelines.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_s3_utils.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_schema_ux.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_threading_utils.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_validation.py +0 -0
- {polly_python-4.2.0 → polly_python-4.3.0}/tests/test_workspaces.py +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
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
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
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 +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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|