diff --git a/changelog.md b/changelog.md index 28b2299d..86c44a92 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,14 @@ and (starting with v4.0.0) this project adheres to [Semantic Versioning](http:// ## [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 + ### [type/protocol/analysis/analysis_protocol.json - v10.2.0] - 2024-02-05 ### Added Added gene_annotation_version field in analysis_protocol Fixes#1543 diff --git a/docs/jsonBrowser/type.md b/docs/jsonBrowser/type.md index efd3ce45..10cb73e4 100644 --- a/docs/jsonBrowser/type.md +++ b/docs/jsonBrowser/type.md @@ -327,6 +327,8 @@ insdc_study_accessions | An International Nucleotide Sequence Database Collabora biostudies_accessions | A BioStudies study accession. | array | no | | BioStudies accession | | S-EXMP1; S-HCAS33 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 | no | | 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 4213b4aa..53dcfec5 100644 --- a/json_schema/type/project/project.json +++ b/json_schema/type/project/project.json @@ -164,6 +164,49 @@ "type": "integer", "example": "10000; 2100000", "user_friendly": "Estimated cell count" + }, + "data_use_restriction": { + "description": "Data use restrictions that apply to the project.", + "type": "string", + "enum": [ + "NRES", + "GRU", + "GRU-NCU" + ], + "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 8f47b78e..cfe177c8 100644 --- a/json_schema/versions.json +++ b/json_schema/versions.json @@ -1,5 +1,5 @@ { - "last_update_date": "2024-02-05T16:10:39Z", + "last_update_date": "2024-03-15T11:43:55Z", "version_numbers": { "core": { "biomaterial": { @@ -110,7 +110,7 @@ "process": "9.2.0" }, "project": { - "project": "17.1.1" + "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