Skip to content

Commit

Permalink
Merge pull request #731 from hubmapconsortium/Derek-Furst/change-coll…
Browse files Browse the repository at this point in the history
…ections-creators-to-contributors

Derek furst/change collections creators to contributors
  • Loading branch information
yuanzhou authored Aug 30, 2024
2 parents 6782918 + a6d19fc commit 1bd33f4
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions bulk-registration/example-sample-registrations.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"}}
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"}}
2 changes: 1 addition & 1 deletion entity-api-spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'])
Expand Down
4 changes: 2 additions & 2 deletions src/schema/provenance_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/schema/schema_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 1bd33f4

Please sign in to comment.