Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds DUOS id field #1551

Merged
merged 8 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/jsonBrowser/type.md
Original file line number Diff line number Diff line change
Expand Up @@ -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._
Expand Down
31 changes: 31 additions & 0 deletions json_schema/type/project/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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{1,6}$",
idazucchi marked this conversation as resolved.
Show resolved Hide resolved
"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."
idazucchi marked this conversation as resolved.
Show resolved Hide resolved
}
},
"if" : {
"properties": {
"data_use_restriction": {
"enum": [
"GRU",
"GRU-NCU"
]
}
}
},
"then" : {
"required": ["duos_id"]
},
"else" : {
"properties": {
"data_use_restriction" : {
"enum": ["NRES"]
},
"duos_id" : {
"maxLength": 0
}
}
}
}
1 change: 1 addition & 0 deletions json_schema/update_log.csv
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Schema,Change type,Change message,Version,Date
type/project/project.json,major,"Adds DUOS id field. Fixes #1550",,
2 changes: 1 addition & 1 deletion src/schema_linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading