Skip to content

Commit a0c943a

Browse files
authored
Merge pull request #792 from hubmapconsortium/Derek-Furst/dataset-type-validation-bypass
Created a temporary override in dataset type validator for datasets t…
2 parents e13eb36 + 9c490d2 commit a0c943a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/schema/provenance_schema.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,6 @@ ENTITIES:
667667
description: "The activity that was performed."
668668
dataset_type:
669669
before_create_trigger: set_publication_dataset_type
670-
before_property_create_validators:
671-
- validate_recognized_dataset_type
672-
before_property_update_validators:
673-
- validate_recognized_dataset_type
674670
type: string
675671
generated: true
676672
immutable: true

src/schema/schema_validators.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ def validate_recognized_dataset_type(property_key, normalized_entity_type, reque
6868
# those square brackets are acceptable at the end of the string. Simply validate the start.
6969
proposed_dataset_type_prefix = re.sub(pattern='(\S)\s\[.*\]$', repl=r'\1', string=new_data_dict['dataset_type'])
7070
target_list = schema_manager.get_dataset_type_valueset_list()
71-
71+
# TODO This is a temporary bypass because the UBKG does not support publication as a dataset_type yet. Remove once its added
72+
target_list.append("Publication")
7273
if proposed_dataset_type_prefix not in target_list:
7374
raise ValueError(f"Proposed Dataset dataset_type '{proposed_dataset_type_prefix}'"
7475
f" is not recognized in the existing ontology."

0 commit comments

Comments
 (0)