-
Notifications
You must be signed in to change notification settings - Fork 32
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
Added data_access module for managed access data. Fixes #1535 #1537
Merged
Merged
Changes from 15 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
944efef
Added data_access module as a mandatory field. Fixes #1535
ESapenaVentura f467ce6
Added data_access module. Fixes #1535
ESapenaVentura 922e89a
Adds DUO codes to indicate data access type
idazucchi 0c21a7c
removes data access as project module
idazucchi 1f274ac
fix typo
idazucchi db354a9
removes new line
idazucchi 813d74a
renames to data use restriction
idazucchi 773a3fa
makes ontology id required
idazucchi 4682dbe
makes ontology id and label required
idazucchi 4a4c803
enforces the correct pairs of ontology labels and ids
idazucchi 70b5b1d
Merge branch 'esv-managedAccess-Issue1535' of https://github.com/Huma…
idazucchi 1587e07
fixes linting errors
idazucchi a946c53
treats NCU as a modifier for GRU and moved module to project
idazucchi 5e01ac7
updates log and version for project module
idazucchi 5607b71
updates field names
idazucchi 9ec18e2
data use restriction formatted as enum field with three letter labels
idazucchi 3b5e5bb
Update src/schema_linter.py
idazucchi 1fc0ae4
Apply suggestions from code review
idazucchi 8bd93a3
Merge branch 'staging' of https://github.com/HumanCellAtlas/metadata-…
idazucchi 33e7fb8
Ran release_prepare.py script.
idazucchi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Data use restriction for the project.", | ||
"additionalProperties": false, | ||
"required": [ | ||
"DUO_id", | ||
"DUO_label" | ||
], | ||
"title": "Data use restriction", | ||
"name": "data_use_restriction", | ||
"type": "object", | ||
"properties": { | ||
"describedBy": { | ||
"description": "The URL reference to the schema.", | ||
"type": "string", | ||
"pattern" : "^(http|https)://schema.(.*?)humancellatlas.org/module/project/(([0-9]{1,}.[0-9]{1,}.[0-9]{1,})|([a-zA-Z]*?))/data_use_restriction" | ||
}, | ||
"schema_version": { | ||
"description": "The version number of the schema in major.minor.patch format.", | ||
"type": "string", | ||
"pattern": "^[0-9]{1,}.[0-9]{1,}.[0-9]{1,}$", | ||
"example": "4.6.1" | ||
}, | ||
"DUO_id": { | ||
"description": "Type of data use restrictions associated with the project.", | ||
"type": "string", | ||
"enum": [ | ||
"DUO:0000004", | ||
"DUO:0000042", | ||
"DUO:0000042;DUO:0000046" | ||
], | ||
"user_friendly": "Data use conditions ontology ID", | ||
"guidelines": "Must be one of: DUO:0000004, DUO:0000042, DUO:0000042;DUO:0000046", | ||
"example": "DUO:0000004" | ||
}, | ||
"DUO_label": { | ||
"description": "Label corresponding to the data use restrictions ID associated with the project", | ||
"type": "string", | ||
"enum": [ | ||
"no restriction", | ||
"general research use", | ||
"general research use;non-commercial use only" | ||
], | ||
"user_friendly": "Data use conditions ontology label", | ||
"guidelines": "Must be one of: no restriction, general research use, general research use;non-commercial use only", | ||
"example": "no restriction" | ||
} | ||
}, | ||
|
||
"allOf": [ | ||
{ | ||
"if": { | ||
"properties": { | ||
"DUO_id": { "const": "DUO:0000004" } | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"DUO_label": { "const": "no restriction" } | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"DUO_id": { "const": "DUO:0000042" } | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"DUO_label": { "const": "general research use" } | ||
} | ||
} | ||
}, | ||
{ | ||
"if": { | ||
"properties": { | ||
"DUO_id": { "const": "DUO:0000042;DUO:0000046" } | ||
} | ||
}, | ||
"then": { | ||
"properties": { | ||
"DUO_label": { "const": "general research use;non-commercial use only" } | ||
} | ||
} | ||
} | ||
] | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
Schema,Change type,Change message,Version,Date | ||
type/project/project,major,"Added data_use_restriction field",, | ||
module/project/data_use_restriction,major,"Added data restriction type as project module",, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of a custom separator strikes me as hacky since it requires custom parsing on the consumer end. Multiplicity in JSON is natively handled as—I hesitate to bring this up again—arrays. You could still restrict the valid term combinations with
allOf
and requireDUO:0000004
.Alternatively, we could ditch the combination from the contributor form. I personally find it confusing and it makes for a simpler "radio button" form UI instead of the more complicated "only some checkbox combinations are valid" approach.