From 065087e9d792ae33b3dbe46af2266d530263f1bf Mon Sep 17 00:00:00 2001 From: idazucchi Date: Fri, 8 Mar 2024 19:02:50 +0000 Subject: [PATCH 1/8] adds DUOS id field --- docs/jsonBrowser/type.md | 1 + json_schema/type/project/project.json | 24 ++++++++++++++++++++++++ json_schema/update_log.csv | 1 + 3 files changed, 26 insertions(+) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index 61e78cf62..c7a88d740 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,6 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU +DUOS_id | A DUOS study accession. | array | no | | DUOS id | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index 895d99c73..a453a9ed1 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -177,6 +177,30 @@ "user_friendly": "Data use restriction", "guidelines": "Must be one of: NRES, GRU, GRU-NCU. The use restriction codes are based on the DUO ontology where NRES corresponds to DUO:0000004, GRU corresponds to DUO:0000042, GRU-NCU corresponds to a combination of DUO:0000042 and DUO:0000046", "example": "GRU" + }, + "DUOS_id": { + "description": "A DUOS study accession.", + "type": "array", + "items": { + "type": "string", + "pattern": "^DUOS-\\d{1,6}$" + }, + "example": "DUOS-000108; DUOS-000114", + "user_friendly": "DUOS id", + "guidelines": "Managed access projects are registered in DUOS to regulate access. If the project is managed access record the corresponding DUOS id here." + } + }, + "if" : { + "properties": { + "data_use_restriction": { + "enum": [ + "GRU", + "GRU-NCU" + ] + } } + }, + "then" : { + "required": ["DUOS_id"] } } diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 3231ff199..d201704a4 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1 +1,2 @@ Schema,Change type,Change message,Version,Date +type/project/project.json,major,"Adds DUOS id field. Fixes #1550",, \ No newline at end of file From 342096bc833338e9924d27c33be4b2ae7755f425 Mon Sep 17 00:00:00 2001 From: idazucchi Date: Mon, 11 Mar 2024 17:41:03 +0000 Subject: [PATCH 2/8] disallow DUOS id for data_use_restriction=NRES --- docs/jsonBrowser/type.md | 2 +- json_schema/type/project/project.json | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index c7a88d740..b001495ef 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,7 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU -DUOS_id | A DUOS study accession. | array | no | | DUOS id | | DUOS-000108; DUOS-000114 +DUOS_id | A DUOS study accession. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index a453a9ed1..831cbfc49 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -180,11 +180,8 @@ }, "DUOS_id": { "description": "A DUOS study accession.", - "type": "array", - "items": { - "type": "string", - "pattern": "^DUOS-\\d{1,6}$" - }, + "type": "string", + "pattern": "^DUOS-\\d{1,6}$", "example": "DUOS-000108; DUOS-000114", "user_friendly": "DUOS id", "guidelines": "Managed access projects are registered in DUOS to regulate access. If the project is managed access record the corresponding DUOS id here." @@ -202,5 +199,15 @@ }, "then" : { "required": ["DUOS_id"] + }, + "else" : { + "properties": { + "data_use_restriction" : { + "enum": ["NRES"] + }, + "DUOS_id" : { + "maxLength": 0 + } + } } } From 3fc52564c5ad98f681baee315759e3153deaa62e Mon Sep 17 00:00:00 2001 From: idazucchi Date: Tue, 12 Mar 2024 12:00:24 +0000 Subject: [PATCH 3/8] fix description --- docs/jsonBrowser/type.md | 2 +- json_schema/type/project/project.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index b001495ef..70a0225fd 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,7 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU -DUOS_id | A DUOS study accession. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 +DUOS_id | A DUOS dataset id. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index 831cbfc49..c67ff6e0e 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -179,7 +179,7 @@ "example": "GRU" }, "DUOS_id": { - "description": "A DUOS study accession.", + "description": "A DUOS dataset id.", "type": "string", "pattern": "^DUOS-\\d{1,6}$", "example": "DUOS-000108; DUOS-000114", From e5734f10e6820eb017d8952e45a27c1d94557e4a Mon Sep 17 00:00:00 2001 From: idazucchi Date: Tue, 12 Mar 2024 12:10:18 +0000 Subject: [PATCH 4/8] add if cycle keywords to linting --- src/schema_linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schema_linter.py b/src/schema_linter.py index f8095f122..96edd6226 100644 --- a/src/schema_linter.py +++ b/src/schema_linter.py @@ -16,7 +16,7 @@ required_schema_fields = ['$schema', 'description', 'additionalProperties', 'title', 'name', 'type', 'properties'] -allowed_schema_fields = ['$schema', 'description', 'additionalProperties', 'required', 'title', 'name', 'type', 'properties', 'definitions', 'dependencies'] +allowed_schema_fields = ['$schema', 'description', 'additionalProperties', 'required', 'title', 'name', 'type', 'properties', 'definitions', 'dependencies', 'if', 'then', 'else'] # Properties From 26932dbf5901a71a0ed244a1f6cc18d87337a1c4 Mon Sep 17 00:00:00 2001 From: idazucchi Date: Tue, 12 Mar 2024 12:16:00 +0000 Subject: [PATCH 5/8] lowercase to comply with linting --- docs/jsonBrowser/type.md | 2 +- json_schema/type/project/project.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index 70a0225fd..df0b95012 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,7 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU -DUOS_id | A DUOS dataset id. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 +duos_id | A DUOS dataset id. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index c67ff6e0e..f44e6a940 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -178,7 +178,7 @@ "guidelines": "Must be one of: NRES, GRU, GRU-NCU. The use restriction codes are based on the DUO ontology where NRES corresponds to DUO:0000004, GRU corresponds to DUO:0000042, GRU-NCU corresponds to a combination of DUO:0000042 and DUO:0000046", "example": "GRU" }, - "DUOS_id": { + "duos_id": { "description": "A DUOS dataset id.", "type": "string", "pattern": "^DUOS-\\d{1,6}$", @@ -198,14 +198,14 @@ } }, "then" : { - "required": ["DUOS_id"] + "required": ["duos_id"] }, "else" : { "properties": { "data_use_restriction" : { "enum": ["NRES"] }, - "DUOS_id" : { + "duos_id" : { "maxLength": 0 } } From f92d8c5d927453517dd53128c3043ac4ae22aa73 Mon Sep 17 00:00:00 2001 From: idazucchi Date: Fri, 15 Mar 2024 09:56:38 +0000 Subject: [PATCH 6/8] apply suggestions from PR --- docs/jsonBrowser/type.md | 2 +- json_schema/type/project/project.json | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index df0b95012..d3bc5c0ed 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -328,7 +328,7 @@ biostudies_accessions | A BioStudies study accession. | array | no | | BioStudi funders | Funding source(s) supporting the project. | array | yes | [See module funder](module.md#funder) | Funding source(s) | | estimated_cell_count | An estimated number of cells in this project | integer | no | | Estimated cell count | | 10000; 2100000 data_use_restriction | Data use restrictions that apply to the project. | string | yes | | Data use restriction | NRES, GRU, GRU-NCU | GRU -duos_id | A DUOS dataset id. | string | no | | DUOS id | | DUOS-000108; DUOS-000114 +duos_id | A DUOS dataset id. | string | no | | DUOS ID | | DUOS-000108; DUOS-000114 ## Specimen from organism _Information about the specimen that was collected from the donor organism._ diff --git a/json_schema/type/project/project.json b/json_schema/type/project/project.json index f44e6a940..b9f283828 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -181,10 +181,10 @@ "duos_id": { "description": "A DUOS dataset id.", "type": "string", - "pattern": "^DUOS-\\d{1,6}$", + "pattern": "^DUOS-\\d{6}$", "example": "DUOS-000108; DUOS-000114", - "user_friendly": "DUOS id", - "guidelines": "Managed access projects are registered in DUOS to regulate access. If the project is managed access record the corresponding DUOS id here." + "user_friendly": "DUOS ID", + "guidelines": "Managed access projects are registered in DUOS to regulate access. If the project is managed access record the corresponding DUOS ID here." } }, "if" : { From ff3bbc13e7ea9ddf1cbfc202911f10cd53823958 Mon Sep 17 00:00:00 2001 From: idazucchi Date: Fri, 15 Mar 2024 11:41:23 +0000 Subject: [PATCH 7/8] Fix update log --- 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 d201704a4..558b24f01 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,2 +1,2 @@ Schema,Change type,Change message,Version,Date -type/project/project.json,major,"Adds DUOS id field. Fixes #1550",, \ No newline at end of file +type/project/project.json,major,"Added DUOS id field. Fixes #1550",, From 3f241ae823c1503915a490e77611bfbe88a9d1ad Mon Sep 17 00:00:00 2001 From: idazucchi Date: Fri, 15 Mar 2024 11:45:53 +0000 Subject: [PATCH 8/8] Ran release_prepare.py script. --- changelog.md | 6 +++++- json_schema/update_log.csv | 1 - json_schema/versions.json | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog.md b/changelog.md index fa9396d64..96224de74 100644 --- a/changelog.md +++ b/changelog.md @@ -6,7 +6,11 @@ Starting after v5.0.0 release, updates will be declared for schemas independentl and (starting with v4.0.0) this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). Unreleased changes may be indicated under the `Unreleased` heading. ## [Unreleased](https://github.com/HumanCellAtlas/metadata-schema/tree/staging) -## [Released](https://github.com/HumanCellAtlas/metadata-schema/) + +### [type/project/project.json - v19.0.0] - 2024-03-15 +### Added +Added DUOS id field. Fixes #1550 + ### [type/project/project.json - v18.0.0] - 2024-03-04 ### Added diff --git a/json_schema/update_log.csv b/json_schema/update_log.csv index 558b24f01..3231ff199 100644 --- a/json_schema/update_log.csv +++ b/json_schema/update_log.csv @@ -1,2 +1 @@ Schema,Change type,Change message,Version,Date -type/project/project.json,major,"Added DUOS id field. Fixes #1550",, diff --git a/json_schema/versions.json b/json_schema/versions.json index 9cc9a4d8d..cfe177c84 100644 --- a/json_schema/versions.json +++ b/json_schema/versions.json @@ -1,5 +1,5 @@ { - "last_update_date": "2024-03-04T14:00:53Z", + "last_update_date": "2024-03-15T11:43:55Z", "version_numbers": { "core": { "biomaterial": { @@ -110,7 +110,7 @@ "process": "9.2.0" }, "project": { - "project": "18.0.0" + "project": "19.0.0" }, "protocol": { "analysis": {