diff --git a/bulk-registration/example-sample-registrations.tsv b/bulk-registration/example-sample-registrations.tsv index 036255b7..033f74c7 100644 --- a/bulk-registration/example-sample-registrations.tsv +++ b/bulk-registration/example-sample-registrations.tsv @@ -4,7 +4,7 @@ f083597a5ebb0fae68c17b28bd5b3bc7 test_smpl_01 organ HT https://dx.doi.org/10.175 HBM854.MBMF.586 test_sample_2 biopsy https://dx.doi.org/10.17504/protocols.io.dkasfkkaadf another random comment a0572d23c12e18e963f5404292b3d153 test sample 3 blood 10.17504/protocols.io.adskfadfadf ff5180d5994eef2526629a710017874f test sample 4 FRESH_TISSUE 10.17504/protocols.io.mjeisdfasdf -2f9522d5462d7cc22a667417c6b80623 test sample 4a fresh_frozen_oct_block 10.17504/protocols.io.zujdiskshjy {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "creator": "Jeff Spraggins", "creator_first_name": "Jeff", "creator_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}} +2f9522d5462d7cc22a667417c6b80623 test sample 4a fresh_frozen_oct_block 10.17504/protocols.io.zujdiskshjy {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "contributor": "Jeff Spraggins", "contributor_first_name": "Jeff", "contributor_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}} a22c4514e7e40a641d1ea5cdcdb63582 test sample 5 fail invalid organ type fresh_frozen_oct_block LV 10.17504/protocols.io.kkdjdiudi HBM265.FCRT.233 test sample 6 fail bad organ code organ bad_code 10.17504/protocols.io.zsdfasdfadf ba906793fcba084898ac24e850d5a964 test sample 7 fail bad protocol fresh_frozen_oct_block 10.A7504/protocols.io.adskfadfadf If this were a real description you'd be finding out some relevant information now @@ -17,5 +17,5 @@ ffd96a39274136284f5x66c7730a4d98 test-sample-13-misformatted id gdna 10.17504/p 6b955ebeafe9c351831bc36aa086575f test-sample-14 fail incorrect source type gdna 10.17504/protocols.io.siaskasfadsf 75f837c40c1248e9d53cecf049dc88a6 test-sample-15 fail incorrect source type2 organ RK 10.17504/protocols.io.fiadsfiasdfadf fail test_sample_16 missing protocol biopsy -1222af1638d9bc176f393710cc8b2ebf fail test sample-16 invalid rui json fresh_frozen_oct_block 10.17504/protocols.io.ifjoijrlksfsdf { "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "creator": "Jeff Spraggins", "creator_first_name": "Jeff", "creator_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}}" -0cf6c31efb7463eb036d474369dfec11 fail test sample-17 organ with RUI info organ LK 10.17504/protocols.io.yeuiwwerwe {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "creator": "Jeff Spraggins", "creator_first_name": "Jeff", "creator_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}} \ No newline at end of file +1222af1638d9bc176f393710cc8b2ebf fail test sample-16 invalid rui json fresh_frozen_oct_block 10.17504/protocols.io.ifjoijrlksfsdf { "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "contributor": "Jeff Spraggins", "contributor_first_name": "Jeff", "contributor_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}}" +0cf6c31efb7463eb036d474369dfec11 fail test sample-17 organ with RUI info organ LK 10.17504/protocols.io.yeuiwwerwe {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084", "@type": "SpatialEntity", "label": "SpatialEntity for Male, Age 21, BMI 21.8", "contributor": "Jeff Spraggins", "contributor_first_name": "Jeff", "contributor_last_name": "Spraggins", "creation_date": "2/12/2020 9:48:13 AM", "ccf_annotations": [], "x_dimension": 23, "y_dimension": 18, "z_dimension": 5, "dimension_units": "millimeter", "placement": {"@context": "https://hubmapconsortium.github.io/hubmap-ontology/ccf-context.jsonld", "@id": "http://purl.org/ccf/0.5/c62cd431-dd48-4c1b-9c7b-ca4a683fe084_placement", "@type": "SpatialPlacement", "target": "http://purl.org/ccf/latest/ccf.owl#VHRightKidney", "placement_date": "2/12/2020 9:48:13 AM", "x_scaling": 1, "y_scaling": 1, "z_scaling": 1, "scaling_units": "ratio", "x_rotation": 0, "y_rotation": 0, "z_rotation": 247.9199981689453, "rotation_order": "XYZ", "rotation_units": "degree", "x_translation": -2.729999542236328, "y_translation": 33.220001220703125, "z_translation": -8.940000534057617, "translation_units": "millimeter"}} \ No newline at end of file diff --git a/entity-api-spec.yaml b/entity-api-spec.yaml index c93413b8..e51684c7 100644 --- a/entity-api-spec.yaml +++ b/entity-api-spec.yaml @@ -902,7 +902,7 @@ components: type: string readOnly: true description: "The url from the doi registry for this entity. e.g. https://doi.org/10.35079/hbm289.pcbm.487" - creators: + contributors: type: array items: $ref: '#/components/schemas/Person' diff --git a/src/app.py b/src/app.py index 8f5ef913..f32a099d 100644 --- a/src/app.py +++ b/src/app.py @@ -584,9 +584,9 @@ def _get_entity_visibility(normalized_entity_type, entity_dict): 'registered_doi' in entity_dict and \ 'doi_url' in entity_dict and \ 'contacts' in entity_dict and \ - 'creators' in entity_dict and \ + 'contributors' in entity_dict and \ len(entity_dict['contacts']) > 0 and \ - len(entity_dict['creators']) > 0: + len(entity_dict['contributors']) > 0: # Get the data_access_level for each Dataset in the Collection from Neo4j collection_dataset_statuses = schema_neo4j_queries.get_collection_datasets_statuses(neo4j_driver_instance ,entity_dict['uuid']) diff --git a/src/schema/provenance_schema.yaml b/src/schema/provenance_schema.yaml index 1cb3bc61..c5a747b6 100644 --- a/src/schema/provenance_schema.yaml +++ b/src/schema/provenance_schema.yaml @@ -240,8 +240,8 @@ ENTITIES: - halt_update_if_DOI_exists - halt_DOI_if_collection_missing_elements - halt_if_DOI_for_unpublished_dataset - # Creators and contacts are required for a Collection to be public - creators: + # Contributors and contacts are required for a Collection to be public + contributors: type: list indexed: true description: "See description in doi_properties section above" diff --git a/src/schema/schema_validators.py b/src/schema/schema_validators.py index 7ad9cb01..02028dd7 100644 --- a/src/schema/schema_validators.py +++ b/src/schema/schema_validators.py @@ -157,9 +157,9 @@ def halt_DOI_if_collection_missing_elements(property_key, normalized_entity_type if 'contacts' not in existing_data_dict: raise ValueError(f"Unable to modify existing {existing_data_dict['entity_type']}" f" {existing_data_dict['uuid']} for DOI because it has no contacts.") - if 'creators' not in existing_data_dict: + if 'contributors' not in existing_data_dict: raise ValueError(f"Unable to modify existing {existing_data_dict['entity_type']}" - f" {existing_data_dict['uuid']} for DOI because it has no creators.") + f" {existing_data_dict['uuid']} for DOI because it has no contributors.") # Count up other validations to check 'datasets', since a transient property """ diff --git a/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml b/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml index ab8ec463..e75b2935 100644 --- a/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml +++ b/src/schema_templating/example-yaml-templates/api-template-test/entity-Template.yaml @@ -855,7 +855,7 @@ x-ref-components: type: string readOnly: true description: "The url from the doi registry for this entity. e.g. https://doi.org/10.35079/hbm289.pcbm.487" - creators: + contributors: type: array items: $ref: '#/components/schemas/Person' diff --git a/src/schema_templating/example-yaml-templates/collections-schema.yaml b/src/schema_templating/example-yaml-templates/collections-schema.yaml index 6f8e7873..8b7e8140 100644 --- a/src/schema_templating/example-yaml-templates/collections-schema.yaml +++ b/src/schema_templating/example-yaml-templates/collections-schema.yaml @@ -53,7 +53,7 @@ Collection: type: string readOnly: true description: "The url from the doi registry for this entity. e.g. https://doi.org/10.35079/hbm289.pcbm.487" - creators: + contributors: type: array items: $ref: '#/components/schemas/Person' diff --git a/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml b/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml index 89f1efcd..8c4515cc 100644 --- a/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml +++ b/src/schema_templating/example-yaml-templates/entity-api-spec-TEMPLATE.yaml @@ -793,7 +793,7 @@ components: type: string readOnly: true description: "The url from the doi registry for this entity. e.g. https://doi.org/10.35079/hbm289.pcbm.487" - creators: + contributors: type: array items: $ref: '#/components/schemas/Person'