nci-cidc-api-modules 1.0.33__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.
@@ -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
@@ -1121,7 +1121,14 @@ class TrialMetadata(CommonColumns):
1121
1121
 
1122
1122
  @staticmethod
1123
1123
  def validate_metadata_json(metadata_json: dict) -> dict:
1124
- errs = trial_metadata_validator.iter_error_messages(metadata_json)
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)
1125
1132
  messages = list(f"'metadata_json': {err}" for err in errs)
1126
1133
  if messages:
1127
1134
  raise ValidationMultiError(messages)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nci_cidc_api_modules
3
- Version: 1.0.33
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
@@ -28,7 +28,7 @@ Requires-Dist: python-dotenv==0.10.3
28
28
  Requires-Dist: requests==2.32.3
29
29
  Requires-Dist: jinja2==3.1.5
30
30
  Requires-Dist: certifi==2024.7.4
31
- Requires-Dist: nci-cidc-schemas==0.26.38
31
+ Requires-Dist: nci-cidc-schemas==0.27.00
32
32
  Dynamic: description
33
33
  Dynamic: description-content-type
34
34
  Dynamic: home-page
@@ -6,9 +6,9 @@ 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=Wp4b53vwOqSlOIaoAYGlI1p8ZfXRXmVJ6MLcsvzq0LA,31664
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=r23jzbZx_ZG-7ZDdwv3dLic_Wl-m1W5gnqeJjX_ocMg,126260
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
@@ -19,8 +19,8 @@ cidc_api/shared/emails.py,sha256=TXKrga3A8rvaUKIH68ASmjkg9qMdFCWDf5HHxPvro5M,489
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.33.dist-info/LICENSE,sha256=pNYWVTHaYonnmJyplmeAp7tQAjosmDpAWjb34jjv7Xs,1102
23
- nci_cidc_api_modules-1.0.33.dist-info/METADATA,sha256=T7DUYF57gM5y5mAfal_QVWDqwv3EAbHOqOZ-spj_3Tg,40807
24
- nci_cidc_api_modules-1.0.33.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
25
- nci_cidc_api_modules-1.0.33.dist-info/top_level.txt,sha256=rNiRzL0lJGi5Q9tY9uSoMdTbJ-7u5c_D2E86KA94yRA,9
26
- nci_cidc_api_modules-1.0.33.dist-info/RECORD,,
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,,