nci-cidc-api-modules 1.0.29__py3-none-any.whl → 1.1.0__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.
- cidc_api/models/csms_api.py +0 -1
- cidc_api/models/models.py +15 -1
- cidc_api/shared/emails.py +4 -4
- {nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/METADATA +31 -24
- {nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/RECORD +8 -8
- {nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/WHEEL +1 -1
- {nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/LICENSE +0 -0
- {nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/top_level.txt +0 -0
cidc_api/models/csms_api.py
CHANGED
@@ -456,7 +456,6 @@ def insert_manifest_into_blob(
|
|
456
456
|
|
457
457
|
logger.info("Patch for %s manifest %s:\n%s", trial_id, manifest_id, patch)
|
458
458
|
# merge and validate the data
|
459
|
-
# the existence of the correct cohort and collection_event names are checked here
|
460
459
|
merged, errs = merge_clinical_trial_metadata(patch, trial_md.metadata_json)
|
461
460
|
if errs:
|
462
461
|
raise RuntimeError({"prism errors": [str(e) for e in errs]})
|
cidc_api/models/models.py
CHANGED
@@ -272,6 +272,13 @@ class CommonColumns(BaseModel): # type: ignore
|
|
272
272
|
asc(sort_attribute) if sort_direction == "asc" else desc(sort_attribute)
|
273
273
|
)
|
274
274
|
query = query.order_by(field_with_dir)
|
275
|
+
if sort_field != "id":
|
276
|
+
# When sorting, need to guarantee unique order for offset/limit pagination to produce
|
277
|
+
# consistent results. Adding secondary "id" sort field to ensure unique order.
|
278
|
+
secondary_field_with_dir = (
|
279
|
+
asc("id") if sort_direction == "asc" else desc("id")
|
280
|
+
)
|
281
|
+
query = query.order_by(secondary_field_with_dir)
|
275
282
|
|
276
283
|
# Apply filter function
|
277
284
|
query = filter_(query)
|
@@ -1114,7 +1121,14 @@ class TrialMetadata(CommonColumns):
|
|
1114
1121
|
|
1115
1122
|
@staticmethod
|
1116
1123
|
def validate_metadata_json(metadata_json: dict) -> dict:
|
1117
|
-
|
1124
|
+
# Prior to running trial_metadata_validator.iter_error_messages on the metadata_json,
|
1125
|
+
# strip out unnecessary manifest data for the validation so that existing manifest data
|
1126
|
+
# that no longer conform to the post-CSMS-integration schema can be kept.
|
1127
|
+
# See more details in the strip_metadata_for_validation function docs.
|
1128
|
+
metadata_to_validate = json_validation.strip_metadata_for_validation(
|
1129
|
+
metadata_json
|
1130
|
+
)
|
1131
|
+
errs = trial_metadata_validator.iter_error_messages(metadata_to_validate)
|
1118
1132
|
messages = list(f"'metadata_json': {err}" for err in errs)
|
1119
1133
|
if messages:
|
1120
1134
|
raise ValidationMultiError(messages)
|
cidc_api/shared/emails.py
CHANGED
@@ -19,7 +19,7 @@ from ..config.settings import ENV, GOOGLE_ACL_DATA_BUCKET
|
|
19
19
|
# - errors from CSMS in update_cidc_from_csms,
|
20
20
|
# - errors from kicking off permissions in grant_download_permissions, and
|
21
21
|
# - errors from implementing permissions in worker > permissions_worker
|
22
|
-
CIDC_MAILING_LIST = "essex-alert@cimac-network.org"
|
22
|
+
CIDC_MAILING_LIST = ["essex-alert@cimac-network.org", "mustafa.kucukkal@nih.gov"]
|
23
23
|
|
24
24
|
|
25
25
|
def sendable(email_template):
|
@@ -76,7 +76,7 @@ def new_user_registration(email: str) -> dict:
|
|
76
76
|
)
|
77
77
|
|
78
78
|
email = {
|
79
|
-
"to_emails":
|
79
|
+
"to_emails": CIDC_MAILING_LIST,
|
80
80
|
"subject": subject,
|
81
81
|
"html_content": html_content,
|
82
82
|
}
|
@@ -110,7 +110,7 @@ def new_upload_alert(upload, full_metadata) -> dict:
|
|
110
110
|
"""
|
111
111
|
|
112
112
|
email = {
|
113
|
-
"to_emails":
|
113
|
+
"to_emails": CIDC_MAILING_LIST,
|
114
114
|
"subject": subject,
|
115
115
|
"html_content": html_content,
|
116
116
|
}
|
@@ -152,7 +152,7 @@ def intake_metadata(
|
|
152
152
|
"""
|
153
153
|
|
154
154
|
email = {
|
155
|
-
"to_emails":
|
155
|
+
"to_emails": CIDC_MAILING_LIST,
|
156
156
|
"subject": subject,
|
157
157
|
"html_content": html_content,
|
158
158
|
}
|
@@ -1,34 +1,41 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: nci_cidc_api_modules
|
3
|
-
Version: 1.0
|
3
|
+
Version: 1.1.0
|
4
4
|
Summary: SQLAlchemy data models and configuration tools used in the NCI CIDC API
|
5
5
|
Home-page: https://github.com/NCI-CIDC/cidc-api-gae
|
6
6
|
License: MIT license
|
7
7
|
Requires-Python: >=3.9
|
8
8
|
Description-Content-Type: text/markdown
|
9
9
|
License-File: LICENSE
|
10
|
-
Requires-Dist: werkzeug
|
11
|
-
Requires-Dist: flask
|
12
|
-
Requires-Dist: flask-migrate
|
13
|
-
Requires-Dist: flask-sqlalchemy
|
14
|
-
Requires-Dist: sqlalchemy
|
15
|
-
Requires-Dist: marshmallow
|
16
|
-
Requires-Dist: marshmallow-sqlalchemy
|
17
|
-
Requires-Dist: google-cloud-storage
|
18
|
-
Requires-Dist: google-cloud-secret-manager
|
19
|
-
Requires-Dist: google-cloud-pubsub
|
20
|
-
Requires-Dist: google-cloud-bigquery
|
21
|
-
Requires-Dist: google-api-python-client
|
22
|
-
Requires-Dist: google-auth
|
23
|
-
Requires-Dist: packaging
|
24
|
-
Requires-Dist: pyarrow
|
25
|
-
Requires-Dist: numpy
|
26
|
-
Requires-Dist: pandas
|
27
|
-
Requires-Dist: python-dotenv
|
28
|
-
Requires-Dist: requests
|
29
|
-
Requires-Dist: jinja2
|
30
|
-
Requires-Dist: certifi
|
31
|
-
Requires-Dist: nci-cidc-schemas
|
10
|
+
Requires-Dist: werkzeug==3.0.6
|
11
|
+
Requires-Dist: flask==2.2.5
|
12
|
+
Requires-Dist: flask-migrate==2.5.2
|
13
|
+
Requires-Dist: flask-sqlalchemy==2.5.1
|
14
|
+
Requires-Dist: sqlalchemy~=1.3.0
|
15
|
+
Requires-Dist: marshmallow==3.19.0
|
16
|
+
Requires-Dist: marshmallow-sqlalchemy==0.22.3
|
17
|
+
Requires-Dist: google-cloud-storage==2.18.0
|
18
|
+
Requires-Dist: google-cloud-secret-manager==2.20.1
|
19
|
+
Requires-Dist: google-cloud-pubsub==2.22.0
|
20
|
+
Requires-Dist: google-cloud-bigquery==3.18.0
|
21
|
+
Requires-Dist: google-api-python-client==2.64.0
|
22
|
+
Requires-Dist: google-auth==2.32.0
|
23
|
+
Requires-Dist: packaging>=20.0.0
|
24
|
+
Requires-Dist: pyarrow==14.0.1
|
25
|
+
Requires-Dist: numpy<2,>=1.16.5
|
26
|
+
Requires-Dist: pandas==1.5.3
|
27
|
+
Requires-Dist: python-dotenv==0.10.3
|
28
|
+
Requires-Dist: requests==2.32.3
|
29
|
+
Requires-Dist: jinja2==3.1.5
|
30
|
+
Requires-Dist: certifi==2024.7.4
|
31
|
+
Requires-Dist: nci-cidc-schemas==0.27.00
|
32
|
+
Dynamic: description
|
33
|
+
Dynamic: description-content-type
|
34
|
+
Dynamic: home-page
|
35
|
+
Dynamic: license
|
36
|
+
Dynamic: requires-dist
|
37
|
+
Dynamic: requires-python
|
38
|
+
Dynamic: summary
|
32
39
|
|
33
40
|
# NCI CIDC API <!-- omit in TOC -->
|
34
41
|
|
@@ -6,21 +6,21 @@ cidc_api/config/settings.py,sha256=2VHOVWdN4yUCNYMob2gaWgH2-1_4sbuo46JEIVT_PCY,4
|
|
6
6
|
cidc_api/csms/__init__.py,sha256=eJkY6rWNOAUBmSd4G1_U6h7i472druKEtBdVmgFZVPg,20
|
7
7
|
cidc_api/csms/auth.py,sha256=25Yma2Kz3KLENAPSeBYacFuSZXng-EDgmgInKBsRyP0,3191
|
8
8
|
cidc_api/models/__init__.py,sha256=bl445G8Zic9YbhZ8ZBni07wtBMhLJRMBA-JqjLxx2bw,66
|
9
|
-
cidc_api/models/csms_api.py,sha256=
|
9
|
+
cidc_api/models/csms_api.py,sha256=U_JP6Z41G4hi48yNn9MAd70IYfBcm3AF3wHa31NdA78,31578
|
10
10
|
cidc_api/models/migrations.py,sha256=gp9vtkYbA9FFy2s-7woelAmsvQbJ41LO2_DY-YkFIrQ,11464
|
11
|
-
cidc_api/models/models.py,sha256=
|
11
|
+
cidc_api/models/models.py,sha256=ykt0aG8jMjDdHYw3iPnU3laOaOZloHLf3ep6BeYM2cI,126732
|
12
12
|
cidc_api/models/schemas.py,sha256=7tDYtmULuzTt2kg7RorWhte06ffalgpQKrFiDRGcPEQ,2711
|
13
13
|
cidc_api/models/files/__init__.py,sha256=8BMTnUSHzUbz0lBeEQY6NvApxDD3GMWMduoVMos2g4Y,213
|
14
14
|
cidc_api/models/files/details.py,sha256=h6R0p_hi-ukHsO7HV-3Wukccp0zRLJ1Oie_JNA_7Pl0,62274
|
15
15
|
cidc_api/models/files/facets.py,sha256=0owlp-is2QJ7DemcsJ4VdlnN255NkkV1Cimg0VaXHpY,28967
|
16
16
|
cidc_api/shared/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
17
|
cidc_api/shared/auth.py,sha256=EzMpYAR_gN5x985hgFAXTd24xygyctqZ80Yp05Ph_HQ,9104
|
18
|
-
cidc_api/shared/emails.py,sha256=
|
18
|
+
cidc_api/shared/emails.py,sha256=TXKrga3A8rvaUKIH68ASmjkg9qMdFCWDf5HHxPvro5M,4892
|
19
19
|
cidc_api/shared/gcloud_client.py,sha256=7dDs0crLMJKdIp4IDSfrZBMB3h-zvWNieB81azoeLO4,33746
|
20
20
|
cidc_api/shared/jose.py,sha256=QO30uIhbYDwzPEWWJXz0PfyV7E1AZHReEZJUVT70UJY,1844
|
21
21
|
cidc_api/shared/rest_utils.py,sha256=LMfBpvJRjkfQjCzVXuhTTe4Foz4wlvaKg6QntyR-Hkc,6648
|
22
|
-
nci_cidc_api_modules-1.0.
|
23
|
-
nci_cidc_api_modules-1.0.
|
24
|
-
nci_cidc_api_modules-1.0.
|
25
|
-
nci_cidc_api_modules-1.0.
|
26
|
-
nci_cidc_api_modules-1.0.
|
22
|
+
nci_cidc_api_modules-1.1.0.dist-info/LICENSE,sha256=pNYWVTHaYonnmJyplmeAp7tQAjosmDpAWjb34jjv7Xs,1102
|
23
|
+
nci_cidc_api_modules-1.1.0.dist-info/METADATA,sha256=eoV-3nV3Dvp-1-IUkjxDou2lX1THb_7McxLDjGMkyFE,40806
|
24
|
+
nci_cidc_api_modules-1.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
25
|
+
nci_cidc_api_modules-1.1.0.dist-info/top_level.txt,sha256=rNiRzL0lJGi5Q9tY9uSoMdTbJ-7u5c_D2E86KA94yRA,9
|
26
|
+
nci_cidc_api_modules-1.1.0.dist-info/RECORD,,
|
File without changes
|
{nci_cidc_api_modules-1.0.29.dist-info → nci_cidc_api_modules-1.1.0.dist-info}/top_level.txt
RENAMED
File without changes
|