From 3fb3a4652bd755899db8e695c60852e0ff790740 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Wed, 6 Nov 2024 16:57:31 +0000 Subject: [PATCH 01/12] Add dissociation solution, time and temperature fields. --- .../dissociation_protocol.json | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index 3a87aad3a..e3afbc7bb 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -55,6 +55,55 @@ "$ref": "module/process/purchased_reagents.json" }, "user_friendly": "Protocol reagents" + }, + "digestion_time": { + "description": "Time of digestion of the specimen.", + "type": "integer", + "example": "2; 5; 10", + "user_friendly": "Digestion time" + }, + "digestion_time_unit": { + "description": "The unit in which the digestion time is expressed.", + "type": "object", + "$ref": "module/ontology/time_unit_ontology.json", + "user_friendly": "Digestion time unit" + }, + "digestion_temperature": { + "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature)", + "pattern": "\\d+|frozen|cold|room temperature|warm", + "type": "string", + "example": "4; 37.5; cold", + "user_friendly": "Digestion temperature" + }, + "digestion_solution": { + "description": "Enzyme(s) or reagent(s) of the solution that was used for the digestion of the specimen.", + "type": "array", + "items": { + "type": "string", + "enum": [ + "Citric-acid based", + "Detergent-based", + "Lysis buffer", + "Collagenase", + "Collagenase A", + "Collagenase B", + "Collagenase complex", + "Collagenase D", + "Collagenase I", + "Collagenase II", + "Collagenase IV", + "Dispase", + "Dispase II", + "DNAse", + "DNAse I", + "Elastase", + "Liberase", + "Protease", + "Trypsin-like", + "Trypsin" + ] + }, + "user_friendly": "Digestion solution" } } } From da456686da035f1beb7db72599306af50da75b31 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:53:17 +0200 Subject: [PATCH 02/12] Add dissociation fields - init commit --- docs/jsonBrowser/type.md | 6 +++++- .../dissociation_protocol.json | 12 ++++++------ json_schema/update_log.csv | 5 +++++ 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index 5a181e708..0ee3d6e75 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -190,7 +190,11 @@ schema_type | The type of the metadata schema entity. | string | yes | | | pro provenance | Provenance information provided by the system. | object | no | [See provenance](.md#provenance) | | | protocol_core | Core protocol-level information. | object | yes | [See core protocol_core](core.md#protocol-core) | Protocol core | | method | How cells or organelles were dissociated. | object | yes | [See module process_type_ontology](module.md#process-type-ontology) | Dissociation method | | -reagents | A list of purchased reagents used in this protocol. | array | no | [See module purchased_reagents](module.md#purchased-reagents) | Protocol reagents | | +reagents | A list of purchased reagents used in this protocol. | array | no | [See module purchased_reagents](module.md#purchased-reagents) | Purchased reagents | | +digestion_time | Time of digestion of the specimen. | integer | no | | Digestion time | | 2; 5; 10 +digestion_time_unit | The unit in which the digestion time is expressed. | object | no | [See module time_unit_ontology](module.md#time-unit-ontology) | Digestion time unit | | +digestion_temperature | Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature). | string | no | | Digestion temperature | | 4; 37; cold +digestion_solution | Enzyme(s) or reagent(s) of the solution that was used for the digestion of the specimen. | array | no | | Digestion solution | Citric-acid based, Detergent-based, Lysis buffer, Collagenase, Collagenase A, Collagenase B, Collagenase complex, Collagenase D, Collagenase I, Collagenase II, Collagenase IV, Dispase, Dispase II, DNAse, DNAse I, Elastase, Liberase, Protease, Trypsin, Trypsin-like | ## iPSC induction protocol _Information about how a biomaterial is treated to become an induced pluripotent stem cell._ diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index e3afbc7bb..f21ff4b55 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -54,7 +54,7 @@ "type": "object", "$ref": "module/process/purchased_reagents.json" }, - "user_friendly": "Protocol reagents" + "user_friendly": "Purchased reagents" }, "digestion_time": { "description": "Time of digestion of the specimen.", @@ -69,10 +69,10 @@ "user_friendly": "Digestion time unit" }, "digestion_temperature": { - "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature)", - "pattern": "\\d+|frozen|cold|room temperature|warm", + "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature).", + "pattern": "\\d+(\\.\\d+)|frozen|cold|room temperature|warm", "type": "string", - "example": "4; 37.5; cold", + "example": "4; 37; cold", "user_friendly": "Digestion temperature" }, "digestion_solution": { @@ -99,8 +99,8 @@ "Elastase", "Liberase", "Protease", - "Trypsin-like", - "Trypsin" + "Trypsin", + "Trypsin-like" ] }, "user_friendly": "Digestion solution" diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 3231ff199..de80d6269 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1 +1,6 @@ Schema,Change type,Change message,Version,Date +type/protocol/biomaterial_collection/dissociation_protocol,minor,Change of user_friendly name of reagent field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_time field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_time_unit field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_temperature field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_solution field,, From 8a31c751971347fe53fbf7d6fb0fbc615c78f6ec Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:51:30 +0200 Subject: [PATCH 03/12] Updated log message --- json_schema/update_log.csv | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index de80d6269..ada2da410 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,6 +1,6 @@ Schema,Change type,Change message,Version,Date -type/protocol/biomaterial_collection/dissociation_protocol,minor,Change of user_friendly name of reagent field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_time field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_time_unit field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_temperature field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Add digestion_solution field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Changed of user_friendly name of reagent field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time_unit field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_temperature field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_solution field,, From 95952dda8df168e56338420156efc4b7c4546a44 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:18:53 +0200 Subject: [PATCH 04/12] Fix pattern for digestion_temperature --- .../biomaterial_collection/dissociation_protocol.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index f21ff4b55..b6fbcf07d 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -57,7 +57,7 @@ "user_friendly": "Purchased reagents" }, "digestion_time": { - "description": "Time of digestion of the specimen.", + "description": "Time of digestion of the specimen.", "type": "integer", "example": "2; 5; 10", "user_friendly": "Digestion time" @@ -70,7 +70,7 @@ }, "digestion_temperature": { "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature).", - "pattern": "\\d+(\\.\\d+)|frozen|cold|room temperature|warm", + "pattern": "\\d+(\\.\\d+)?|frozen|cold|room temperature|warm", "type": "string", "example": "4; 37; cold", "user_friendly": "Digestion temperature" From a2ba381aa67dd99c463d2309e55d6751e28e314d Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:41:31 +0200 Subject: [PATCH 05/12] Fix digestion_temperature regex Co-authored-by: ESapenaVentura <38617863+ESapenaVentura@users.noreply.github.com> --- .../protocol/biomaterial_collection/dissociation_protocol.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index b6fbcf07d..47f2260eb 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -70,7 +70,7 @@ }, "digestion_temperature": { "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature).", - "pattern": "\\d+(\\.\\d+)?|frozen|cold|room temperature|warm", + "pattern": "^(\\d+(\\.\\d+)?|frozen|cold|room temperature|warm)$", "type": "string", "example": "4; 37; cold", "user_friendly": "Digestion temperature" From 34ddf3976c390b3b33ac6b06c89f1c6d62b0e5e2 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:42:23 +0200 Subject: [PATCH 06/12] Update update_log.csv Co-authored-by: ESapenaVentura <38617863+ESapenaVentura@users.noreply.github.com> --- json_schema/update_log.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index ada2da410..1e878f6fd 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,5 +1,5 @@ Schema,Change type,Change message,Version,Date -type/protocol/biomaterial_collection/dissociation_protocol,minor,Changed of user_friendly name of reagent field,, +type/protocol/biomaterial_collection/dissociation_protocol,minor,Changed user_friendly name of reagent field,, type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time field,, type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time_unit field,, type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_temperature field,, From 2f88dc140daf09bfdee56b27c8201eda6a7a247d Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Tue, 7 Jan 2025 17:42:47 +0200 Subject: [PATCH 07/12] Updated digestion solution enum --- .../biomaterial_collection/dissociation_protocol.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index 47f2260eb..94ef16410 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -84,23 +84,23 @@ "Citric-acid based", "Detergent-based", "Lysis buffer", + "Accutase", "Collagenase", "Collagenase A", - "Collagenase B", - "Collagenase complex", "Collagenase D", "Collagenase I", "Collagenase II", "Collagenase IV", "Dispase", "Dispase II", - "DNAse", "DNAse I", "Elastase", + "Hyaluronidase", "Liberase", + "Papain", "Protease", - "Trypsin", - "Trypsin-like" + "TrypLE", + "Trypsin" ] }, "user_friendly": "Digestion solution" From 0944f6e8822792c178664b558de41afd2e651677 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:32:30 +0200 Subject: [PATCH 08/12] Replace pattern with union of types for digestion_temperature --- docs/jsonBrowser/type.md | 4 ++-- .../dissociation_protocol.json | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index 10b276193..77630e94b 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -193,8 +193,8 @@ method | How cells or organelles were dissociated. | object | yes | [See module reagents | A list of purchased reagents used in this protocol. | array | no | [See module purchased_reagents](module.md#purchased-reagents) | Purchased reagents | | digestion_time | Time of digestion of the specimen. | integer | no | | Digestion time | | 2; 5; 10 digestion_time_unit | The unit in which the digestion time is expressed. | object | no | [See module time_unit_ontology](module.md#time-unit-ontology) | Digestion time unit | | -digestion_temperature | Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature). | string | no | | Digestion temperature | | 4; 37; cold -digestion_solution | Enzyme(s) or reagent(s) of the solution that was used for the digestion of the specimen. | array | no | | Digestion solution | Citric-acid based, Detergent-based, Lysis buffer, Collagenase, Collagenase A, Collagenase B, Collagenase complex, Collagenase D, Collagenase I, Collagenase II, Collagenase IV, Dispase, Dispase II, DNAse, DNAse I, Elastase, Liberase, Protease, Trypsin, Trypsin-like | +digestion_temperature | Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature). | number or string | no | | Digestion temperature | frozen, cold, room temperature, warm | 4; 37; cold +digestion_solution | Enzyme(s) or reagent(s) of the solution that was used for the digestion of the specimen. | array | no | | Digestion solution | Citric-acid based, Detergent-based, Lysis buffer, Accutase, Collagenase, Collagenase A, Collagenase D, Collagenase I, Collagenase II, Collagenase IV, Dispase, Dispase II, DNAse I, Elastase, Hyaluronidase, Liberase, Papain, Protease, TrypLE, Trypsin | ## iPSC induction protocol _Information about how a biomaterial is treated to become an induced pluripotent stem cell._ diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index 94ef16410..540618fe1 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -70,8 +70,15 @@ }, "digestion_temperature": { "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature).", - "pattern": "^(\\d+(\\.\\d+)?|frozen|cold|room temperature|warm)$", - "type": "string", + "anyOf": [ + { + "type": "number" + }, + { + "type": "string", + "enum": ["frozen", "cold", "room temperature", "warm"] + } + ], "example": "4; 37; cold", "user_friendly": "Digestion temperature" }, @@ -101,7 +108,7 @@ "Protease", "TrypLE", "Trypsin" - ] + ] }, "user_friendly": "Digestion solution" } From 3ecb035f5b48901fd1404e6e3111f55804040d15 Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Wed, 8 Jan 2025 14:33:06 +0200 Subject: [PATCH 09/12] Allow union of types in scripts --- src/human_readable_json.py | 11 +++++++++++ src/schema_linter.py | 12 ++++++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/human_readable_json.py b/src/human_readable_json.py index d16c12eae..2a0c7c3e3 100644 --- a/src/human_readable_json.py +++ b/src/human_readable_json.py @@ -116,6 +116,17 @@ def generateMarkdown(self, schemas, entity_type): # if link is not "": # print(schema["title"] + "\t "+ property + "\t"+ link) + + # add type values if anyOf values are there + anyOf_types = [t['type'] for t in schema['properties'][property]['anyOf'] if 'type' in t.keys()] if 'anyOf' in schema['properties'][property].keys() else [] + schema['properties'][property]['type'] = ' or '.join(anyOf_types) if 'type' not in schema['properties'][property].keys() else schema['properties'][property]['type'] + anyOf_enum = [] + if 'anyOf' in schema['properties'][property].keys(): + for t in schema['properties'][property]['anyOf']: + if 'enum' in t.keys(): + anyOf_enum.extend(t['enum']) + if anyOf_enum: + schema['properties'][property]['enum'] = anyOf_enum if 'enum' not in schema['properties'][property].keys() else schema['properties'][property]['enum'] if "enum" in schema["properties"][property]: enum_values = ", ".join(str(enum) for enum in schema["properties"][property]["enum"]) diff --git a/src/schema_linter.py b/src/schema_linter.py index 762dae047..796aa9cb1 100644 --- a/src/schema_linter.py +++ b/src/schema_linter.py @@ -31,7 +31,7 @@ # Property attributes -property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'bionetworks'] +property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'anyOf', 'bionetworks'] ontology_attributes = ['graph_restriction', 'ontologies', 'classes', 'relations', 'direct', 'include_self'] @@ -138,12 +138,16 @@ def lintSchema(self, path, ols_api): if 'user_friendly' not in properties[property].keys() and property not in ['schema_version', 'schema_type', 'describedBy', 'provenance']: if schema_filename not in ['links']: errors.append(schema_filename + ".json: Keyword `user_friendly` missing from property `" + property + "`.") - + # Property must contain type attribute - if 'type' not in properties[property].keys(): + anyOf_types = [t['type'] for t in properties[property]['anyOf'] if 'type' in t.keys()] if \ + 'anyOf' in properties[property].keys() else [] + if 'type' not in properties[property].keys() and not anyOf_types: errors.append(schema_filename + ".json: Keyword `type` missing from property `" + property + "`.") else: + # assign type value to the property key + properties[property]['type'] = anyOf_types if 'type' not in properties[property].keys() else properties[property]['type'] # change property to list to test all values of array properties[property]['type'] = properties[property]['type'] if isinstance(properties[property]['type'], list) else [properties[property]['type']] @@ -151,7 +155,7 @@ def lintSchema(self, path, ols_api): # type attribute must be set to one of the valid JSON types if property_type not in ["string", "number", "boolean", "array", "object", "integer", "null"]: errors.append(schema_filename + ".json: Type `" + property_type + "` is not a valid JSON type.") - + # Property of type array must contain the attribute items if property_type == "array" and 'items' not in properties[property].keys(): errors.append(schema_filename + ".json: Property `" + property + "` is type array but doesn't contain items.") From 3bb5d31e70db643826da6c18fc5f2b3ff0e6499c Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Fri, 10 Jan 2025 10:37:56 +0200 Subject: [PATCH 10/12] Replaced anyOf with oneOf in digestion_temperature type --- .../dissociation_protocol.json | 2 +- src/human_readable_json.py | 18 +++++++++--------- src/schema_linter.py | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json index 540618fe1..76159dd55 100644 --- a/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json +++ b/json_schema/type/protocol/biomaterial_collection/dissociation_protocol.json @@ -70,7 +70,7 @@ }, "digestion_temperature": { "description": "Temperature of digestion in Celsius or in general terms (i.e. cold, warm, room temperature).", - "anyOf": [ + "oneOf": [ { "type": "number" }, diff --git a/src/human_readable_json.py b/src/human_readable_json.py index 2a0c7c3e3..16cf2754f 100644 --- a/src/human_readable_json.py +++ b/src/human_readable_json.py @@ -117,16 +117,16 @@ def generateMarkdown(self, schemas, entity_type): # if link is not "": # print(schema["title"] + "\t "+ property + "\t"+ link) - # add type values if anyOf values are there - anyOf_types = [t['type'] for t in schema['properties'][property]['anyOf'] if 'type' in t.keys()] if 'anyOf' in schema['properties'][property].keys() else [] - schema['properties'][property]['type'] = ' or '.join(anyOf_types) if 'type' not in schema['properties'][property].keys() else schema['properties'][property]['type'] - anyOf_enum = [] - if 'anyOf' in schema['properties'][property].keys(): - for t in schema['properties'][property]['anyOf']: + # add type values if oneOf values are there + oneOf_types = [t['type'] for t in schema['properties'][property]['oneOf'] if 'type' in t.keys()] if 'oneOf' in schema['properties'][property].keys() else [] + schema['properties'][property]['type'] = ' or '.join(oneOf_types) if 'type' not in schema['properties'][property].keys() else schema['properties'][property]['type'] + oneOf_enum = [] + if 'oneOf' in schema['properties'][property].keys(): + for t in schema['properties'][property]['oneOf']: if 'enum' in t.keys(): - anyOf_enum.extend(t['enum']) - if anyOf_enum: - schema['properties'][property]['enum'] = anyOf_enum if 'enum' not in schema['properties'][property].keys() else schema['properties'][property]['enum'] + oneOf_enum.extend(t['enum']) + if oneOf_enum: + schema['properties'][property]['enum'] = oneOf_enum if 'enum' not in schema['properties'][property].keys() else schema['properties'][property]['enum'] if "enum" in schema["properties"][property]: enum_values = ", ".join(str(enum) for enum in schema["properties"][property]["enum"]) diff --git a/src/schema_linter.py b/src/schema_linter.py index 796aa9cb1..70c484286 100644 --- a/src/schema_linter.py +++ b/src/schema_linter.py @@ -31,7 +31,7 @@ # Property attributes -property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'anyOf', 'bionetworks'] +property_attributes = ['description', 'type', 'pattern', 'example', 'enum', '$ref', 'user_friendly', 'items', 'guidelines', 'format', 'comment', 'maximum', 'minimum', 'oneOf', 'oneOf', 'bionetworks'] ontology_attributes = ['graph_restriction', 'ontologies', 'classes', 'relations', 'direct', 'include_self'] @@ -140,14 +140,14 @@ def lintSchema(self, path, ols_api): errors.append(schema_filename + ".json: Keyword `user_friendly` missing from property `" + property + "`.") # Property must contain type attribute - anyOf_types = [t['type'] for t in properties[property]['anyOf'] if 'type' in t.keys()] if \ - 'anyOf' in properties[property].keys() else [] - if 'type' not in properties[property].keys() and not anyOf_types: + oneOf_types = [t['type'] for t in properties[property]['oneOf'] if 'type' in t.keys()] if \ + 'oneOf' in properties[property].keys() else [] + if 'type' not in properties[property].keys() and not oneOf_types: errors.append(schema_filename + ".json: Keyword `type` missing from property `" + property + "`.") else: # assign type value to the property key - properties[property]['type'] = anyOf_types if 'type' not in properties[property].keys() else properties[property]['type'] + properties[property]['type'] = oneOf_types if 'type' not in properties[property].keys() else properties[property]['type'] # change property to list to test all values of array properties[property]['type'] = properties[property]['type'] if isinstance(properties[property]['type'], list) else [properties[property]['type']] From 7f07cc9d0ed2de0dfc1ee1631e775b7d9f7d96ba Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Tue, 21 Jan 2025 10:16:16 +0000 Subject: [PATCH 11/12] Ran release_prepare.py script. --- changelog.md | 20 ++++++++++++++++++++ json_schema/update_log.csv | 5 ----- json_schema/versions.json | 4 ++-- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/changelog.md b/changelog.md index c2a4d4557..344f5c36f 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,26 @@ and (starting with v4.0.0) this project adheres to [Semantic Versioning](http:// ## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging) +### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.3.0] - 2025-01-21 +### Changed +Changed user_friendly name of reagent field + +### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.4.0] - 2025-01-21 +### Added +Added optional digestion_time field + +### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.5.0] - 2025-01-21 +### Added +Added optional digestion_time_unit field + +### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.6.0] - 2025-01-21 +### Added +Added optional digestion_temperature field + +### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.7.0] - 2025-01-21 +### Added +Added optional digestion_solution field + ## [Released](https://github.com/HumanCellAtlas/metadata-schema/) ### [module/project/hca_bionetwork.json - v2.0.0] - 2025-01-20 diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 1e878f6fd..3231ff199 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,6 +1 @@ Schema,Change type,Change message,Version,Date -type/protocol/biomaterial_collection/dissociation_protocol,minor,Changed user_friendly name of reagent field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_time_unit field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_temperature field,, -type/protocol/biomaterial_collection/dissociation_protocol,minor,Added optional digestion_solution field,, diff --git a/json_schema/versions.json b/json_schema/versions.json index cddbef5e2..62299a6e2 100644 --- a/json_schema/versions.json +++ b/json_schema/versions.json @@ -1,5 +1,5 @@ { - "last_update_date": "2025-01-20T10:24:12Z", + "last_update_date": "2025-01-21T10:14:27Z", "version_numbers": { "core": { "biomaterial": { @@ -124,7 +124,7 @@ "aggregate_generation_protocol": "2.1.0", "collection_protocol": "9.2.0", "differentiation_protocol": "2.2.0", - "dissociation_protocol": "6.2.0", + "dissociation_protocol": "6.7.0", "enrichment_protocol": "3.1.0", "ipsc_induction_protocol": "3.2.0", "treatment_protocol": "1.0.0" From 256e587dde99f6343dce1b03d231c81fcdac262f Mon Sep 17 00:00:00 2001 From: Arsenios Chatzigeorgiou <49944135+arschat@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:06:25 +0000 Subject: [PATCH 12/12] Release from staging to master 2025-01-21. --- changelog.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 344f5c36f..cc0403f82 100644 --- a/changelog.md +++ b/changelog.md @@ -7,6 +7,8 @@ and (starting with v4.0.0) this project adheres to [Semantic Versioning](http:// ## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging) +## [Released](https://github.com/HumanCellAtlas/metadata-schema/) + ### [type/protocol/biomaterial_collection/dissociation_protocol.json - v6.3.0] - 2025-01-21 ### Changed Changed user_friendly name of reagent field @@ -27,8 +29,6 @@ Added optional digestion_temperature field ### Added Added optional digestion_solution field -## [Released](https://github.com/HumanCellAtlas/metadata-schema/) - ### [module/project/hca_bionetwork.json - v2.0.0] - 2025-01-20 ### Changed Changed enum value in hca_bionetwork.name. Fix #1600