diff --git a/changelog.md b/changelog.md index fa9396d6..37ab4074 100644 --- a/changelog.md +++ b/changelog.md @@ -8,6 +8,10 @@ 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/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 Added data_use_restriction field diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index 61e78cf6..d3bc5c0e 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 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 895d99c7..b9f28382 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -177,6 +177,37 @@ "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 dataset id.", + "type": "string", + "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." + } + }, + "if" : { + "properties": { + "data_use_restriction": { + "enum": [ + "GRU", + "GRU-NCU" + ] + } + } + }, + "then" : { + "required": ["duos_id"] + }, + "else" : { + "properties": { + "data_use_restriction" : { + "enum": ["NRES"] + }, + "duos_id" : { + "maxLength": 0 + } } } } diff --git a/json_schema/versions.json b/json_schema/versions.json index 9cc9a4d8..cfe177c8 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": { diff --git a/src/schema_linter.py b/src/schema_linter.py index f8095f12..96edd622 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