dcicutils 8.14.3.1b4__py3-none-any.whl → 8.14.3.2b1__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.
- dcicutils/portal_utils.py +0 -6
- dcicutils/s3_utils.py +4 -2
- dcicutils/scripts/view_portal_object.py +1 -6
- dcicutils/structured_data.py +8 -2
- {dcicutils-8.14.3.1b4.dist-info → dcicutils-8.14.3.2b1.dist-info}/METADATA +1 -1
- {dcicutils-8.14.3.1b4.dist-info → dcicutils-8.14.3.2b1.dist-info}/RECORD +9 -9
- {dcicutils-8.14.3.1b4.dist-info → dcicutils-8.14.3.2b1.dist-info}/LICENSE.txt +0 -0
- {dcicutils-8.14.3.1b4.dist-info → dcicutils-8.14.3.2b1.dist-info}/WHEEL +0 -0
- {dcicutils-8.14.3.1b4.dist-info → dcicutils-8.14.3.2b1.dist-info}/entry_points.txt +0 -0
dcicutils/portal_utils.py
CHANGED
@@ -294,12 +294,6 @@ class Portal:
|
|
294
294
|
def get_health(self) -> OptionalResponse:
|
295
295
|
return self.get("/health")
|
296
296
|
|
297
|
-
def get_version(self) -> Optional[str]:
|
298
|
-
try:
|
299
|
-
return self.get_health().json()["project_version"]
|
300
|
-
except Exception:
|
301
|
-
return None
|
302
|
-
|
303
297
|
def ping(self) -> bool:
|
304
298
|
try:
|
305
299
|
return self.get_health().status_code == 200
|
dcicutils/s3_utils.py
CHANGED
@@ -328,8 +328,10 @@ class s3Utils(s3Base): # NOQA - This class name violates style rules, but a lot
|
|
328
328
|
# maybe its not json after all
|
329
329
|
return auth_text
|
330
330
|
|
331
|
-
def read_s3(self, filename: str):
|
332
|
-
|
331
|
+
def read_s3(self, filename: str, bucket: Optional[str] = None):
|
332
|
+
if (not isinstance(bucket, str)) or (not bucket):
|
333
|
+
bucket = self.outfile_bucket
|
334
|
+
response = self.s3.get_object(Bucket=bucket, Key=filename)
|
333
335
|
logger.info(str(response))
|
334
336
|
return response['Body'].read()
|
335
337
|
|
@@ -360,12 +360,7 @@ def _get_portal_object(portal: Portal, uuid: str,
|
|
360
360
|
path = f"/{uuid}"
|
361
361
|
else:
|
362
362
|
path = uuid
|
363
|
-
|
364
|
-
if response.status_code == 403:
|
365
|
-
_exit(f"Permission error getting Portal object from {portal.server}: {uuid}")
|
366
|
-
elif response.status_code == 404:
|
367
|
-
_exit(f"Not found Portal object from {portal.server}: {uuid}")
|
368
|
-
|
363
|
+
response = portal.get(path, raw=raw or inserts, database=database)
|
369
364
|
except Exception as e:
|
370
365
|
if "404" in str(e) and "not found" in str(e).lower():
|
371
366
|
_print(f"Portal object not found at {portal.server}: {uuid}")
|
dcicutils/structured_data.py
CHANGED
@@ -318,7 +318,7 @@ class StructuredDataSet:
|
|
318
318
|
order = {Schema.type_name(key): index for index, key in enumerate(self._order)} if self._order else {}
|
319
319
|
for sheet_name in sorted(excel.sheet_names, key=lambda key: order.get(Schema.type_name(key), sys.maxsize)):
|
320
320
|
self._load_reader(excel.sheet_reader(sheet_name), type_name=Schema.type_name(sheet_name))
|
321
|
-
if self._validator_sheet_hook
|
321
|
+
if self._validator_sheet_hook:
|
322
322
|
self._validator_sheet_hook(self, sheet_name, self.data[sheet_name])
|
323
323
|
# TODO: Do we really need progress reporting for the below?
|
324
324
|
# Check for unresolved reference errors which really are not because of ordering.
|
@@ -388,7 +388,13 @@ class StructuredDataSet:
|
|
388
388
|
structured_row = structured_row_template.create_row()
|
389
389
|
for column_name, value in row.items():
|
390
390
|
if self._validator_hook:
|
391
|
-
value =
|
391
|
+
value, validator_error = (
|
392
|
+
self._validator_hook(self, type_name, column_name, reader.row_number, value))
|
393
|
+
if validator_error:
|
394
|
+
self._note_error({
|
395
|
+
"src": create_dict(type=schema_name, row=reader.row_number),
|
396
|
+
"error": validator_error
|
397
|
+
}, "validation")
|
392
398
|
structured_row_template.set_value(structured_row, column_name, value, reader.file, reader.row_number)
|
393
399
|
if self._autoadd_properties:
|
394
400
|
self._add_properties(structured_row, self._autoadd_properties, schema)
|
@@ -49,24 +49,24 @@ dcicutils/misc_utils.py,sha256=mO-5i0IUZ2U-P7rnQcC9VURzQ35pz7jFsMZdq6BB_QM,11592
|
|
49
49
|
dcicutils/obfuscation_utils.py,sha256=fo2jOmDRC6xWpYX49u80bVNisqRRoPskFNX3ymFAmjw,5963
|
50
50
|
dcicutils/opensearch_utils.py,sha256=V2exmFYW8Xl2_pGFixF4I2Cc549Opwe4PhFi5twC0M8,1017
|
51
51
|
dcicutils/portal_object_utils.py,sha256=Az3n1aL-PQkN5gOFE6ZqC2XkYsqiwKlq7-tZggs1QN4,11062
|
52
|
-
dcicutils/portal_utils.py,sha256=
|
52
|
+
dcicutils/portal_utils.py,sha256=Ub4rlG6Ir4JVSH1KHQRRtJTU_5yBGzVOKrdIkhqJMLQ,45268
|
53
53
|
dcicutils/progress_bar.py,sha256=R3bWLMYM3Xq9PY7U0JadcFT1m7QmCbrbDp9qs9_Kf_c,19472
|
54
54
|
dcicutils/project_utils.py,sha256=qPdCaFmWUVBJw4rw342iUytwdQC0P-XKpK4mhyIulMM,31250
|
55
55
|
dcicutils/qa_checkers.py,sha256=j0kzo_T5VduKTxgsMTp7xjneyNokumZzI_iz55Y0Jjs,20505
|
56
56
|
dcicutils/qa_utils.py,sha256=tMvsMX0fXmE0BAaw34ulDw0f2twqgWnYcNQFBXHtAM0,160179
|
57
57
|
dcicutils/redis_tools.py,sha256=qkcSNMtvqkpvts-Cm9gWhneK523Q_oHwhNUud1be1qk,7055
|
58
58
|
dcicutils/redis_utils.py,sha256=VJ-7g8pOZqR1ZCtdcjKz3-6as2DMUcs1b1zG6wSprH4,6462
|
59
|
-
dcicutils/s3_utils.py,sha256=
|
59
|
+
dcicutils/s3_utils.py,sha256=Nft1H6ohkYTYpO6Q42bldfEWPtZARqhv_ZGvWme2lj0,28955
|
60
60
|
dcicutils/schema_utils.py,sha256=GmRm-XqZKJ6qine16SQF1txcby9WougDav_sYmKNs9E,12400
|
61
61
|
dcicutils/scripts/publish_to_pypi.py,sha256=sMd4WASQGlxlh7uLrt2eGkFRXYgONVmvIg8mClMS5RQ,13903
|
62
62
|
dcicutils/scripts/run_license_checker.py,sha256=z2keYnRDZsHQbTeo1XORAXSXNJK5axVzL5LjiNqZ7jE,4184
|
63
63
|
dcicutils/scripts/update_portal_object.py,sha256=BwZw1cZx2zhzp1ivn_DXUxfnmUyC5A9fAotjHV0fXf4,41875
|
64
|
-
dcicutils/scripts/view_portal_object.py,sha256=
|
64
|
+
dcicutils/scripts/view_portal_object.py,sha256=mfaWIjVD_dtLNl8Gfue-9Xo1zBrfChe2Tr9J6aoA7sA,41274
|
65
65
|
dcicutils/secrets_utils.py,sha256=8dppXAsiHhJzI6NmOcvJV5ldvKkQZzh3Fl-cb8Wm7MI,19745
|
66
66
|
dcicutils/sheet_utils.py,sha256=VlmzteONW5VF_Q4vo0yA5vesz1ViUah1MZ_yA1rwZ0M,33629
|
67
67
|
dcicutils/snapshot_utils.py,sha256=YDeI3vD-MhAtHwKDzfEm2q-n3l-da2yRpRR3xp0Ah1M,23021
|
68
68
|
dcicutils/ssl_certificate_utils.py,sha256=F0ifz_wnRRN9dfrfsz7aCp4UDLgHEY8LaK7PjnNvrAQ,9707
|
69
|
-
dcicutils/structured_data.py,sha256=
|
69
|
+
dcicutils/structured_data.py,sha256=75f03o6a3LwsP_AA3fN-RVJKwdVjVEsXxCisZvMQBXg,66662
|
70
70
|
dcicutils/submitr/progress_constants.py,sha256=5bxyX77ql8qEJearfHEvsvXl7D0GuUODW0T65mbRmnE,2895
|
71
71
|
dcicutils/submitr/ref_lookup_strategy.py,sha256=VJN-Oo0LLna6Vo2cu47eC-eU-yUC9NFlQP29xajejVU,4741
|
72
72
|
dcicutils/task_utils.py,sha256=MF8ujmTD6-O2AC2gRGPHyGdUrVKgtr8epT5XU8WtNjk,8082
|
@@ -75,8 +75,8 @@ dcicutils/trace_utils.py,sha256=g8kwV4ebEy5kXW6oOrEAUsurBcCROvwtZqz9fczsGRE,1769
|
|
75
75
|
dcicutils/validation_utils.py,sha256=cMZIU2cY98FYtzK52z5WUYck7urH6JcqOuz9jkXpqzg,14797
|
76
76
|
dcicutils/variant_utils.py,sha256=2H9azNx3xAj-MySg-uZ2SFqbWs4kZvf61JnK6b-h4Qw,4343
|
77
77
|
dcicutils/zip_utils.py,sha256=_Y9EmL3D2dUZhxucxHvrtmmlbZmK4FpSsHEb7rGSJLU,3265
|
78
|
-
dcicutils-8.14.3.
|
79
|
-
dcicutils-8.14.3.
|
80
|
-
dcicutils-8.14.3.
|
81
|
-
dcicutils-8.14.3.
|
82
|
-
dcicutils-8.14.3.
|
78
|
+
dcicutils-8.14.3.2b1.dist-info/LICENSE.txt,sha256=qnwSmfnEWMl5l78VPDEzAmEbLVrRqQvfUQiHT0ehrOo,1102
|
79
|
+
dcicutils-8.14.3.2b1.dist-info/METADATA,sha256=ZFbqt8tPihlmZmmJdjGlj8OYEv78noSFf4ll8AHiyXM,3446
|
80
|
+
dcicutils-8.14.3.2b1.dist-info/WHEEL,sha256=7Z8_27uaHI_UZAc4Uox4PpBhQ9Y5_modZXWMxtUi4NU,88
|
81
|
+
dcicutils-8.14.3.2b1.dist-info/entry_points.txt,sha256=W6kEWdUJk9tQ4myAgpehPdebcwvCAZ7UgB-wyPgDUMg,335
|
82
|
+
dcicutils-8.14.3.2b1.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|