From 402d5793c24481136eaabbd87ef88b3b43d2e07a Mon Sep 17 00:00:00 2001 From: maxsibilla Date: Thu, 9 Jan 2025 10:01:33 -0500 Subject: [PATCH] Adding new intended_source_type field with UBKG validation. Updating Atlas commons version --- src/app.py | 3 +++ src/requirements.txt | 4 ++-- src/schema/provenance_schema.yaml | 5 +++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index 0cdc381..8e064ed 100644 --- a/src/app.py +++ b/src/app.py @@ -5517,6 +5517,9 @@ def verify_ubkg_properties(json_data_dict): if 'intended_organ' in json_data_dict: compare_property_against_ubkg(ORGAN_TYPES, json_data_dict, 'intended_organ') + if 'intended_source_type' in json_data_dict: + compare_property_against_ubkg(SOURCE_TYPES, json_data_dict, 'intended_source_type') + def compare_property_list_against_ubkg(ubkg_dict, json_data_dict, field): good_fields = [] passes_ubkg_validation = True diff --git a/src/requirements.txt b/src/requirements.txt index 7d1ab8a..8d21468 100644 --- a/src/requirements.txt +++ b/src/requirements.txt @@ -11,7 +11,7 @@ nested-lookup==0.2.22 # The commons package requires requests>=2.22.0 and PyYAML>=5.3.1 requests==2.32.3 -PyYAML==5.4.1 +PyYAML==6.0 # Pinning specific version of neo4j neo4j==5.22.0 @@ -21,6 +21,6 @@ neo4j==5.22.0 # Default is main branch specified in docker-compose.development.yml if not set # git+https://github.com/hubmapconsortium/commons.git@${COMMONS_BRANCH}#egg=hubmap-commons hubmap-commons==2.1.18 -atlas-consortia-commons==1.0.10 +atlas-consortia-commons==1.1.0 deepdiff~=6.6.0 diff --git a/src/schema/provenance_schema.yaml b/src/schema/provenance_schema.yaml index f2cfd7d..f608bcc 100644 --- a/src/schema/provenance_schema.yaml +++ b/src/schema/provenance_schema.yaml @@ -1290,6 +1290,11 @@ ENTITIES: type: string description: 'The organ code representing the organ type that the data contained in the upload will be registered/associated with.' required_on_create: true + intended_source_type: + type: string + description: 'The source type that the data contained in the upload will be registered/associated with.' + required_on_create: true + ############################################# EPICollection ############################################# Epicollection: