-
Notifications
You must be signed in to change notification settings - Fork 14
Analysis JSON schema #878
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
Closed
Closed
Analysis JSON schema #878
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
08d7877
add first draft of schema
mhabedan 60e448d
move test file and add schema test
mhabedan 5f6e5af
add jsonschema package to CI
mhabedan b49198a
fix schema path
mhabedan 27564c6
add optional field 'implementations_license'
mhabedan 0bddeb9
specify used default license
mhabedan f05c92a
make 'license' field consistent with hepdata-validator (https://githu…
mhabedan 51445c1
add tool_type field
mhabedan 503ff8f
rename 'tool_type' field to 'implementations_description'
mhabedan 0d972a9
add date_created to schema
mhabedan 9f204ba
introduce schema_version field
mhabedan f4dd175
more renames, add readme
mhabedan 698e8c5
correct url
mhabedan 34df6e1
include schema validation
mhabedan ab9fce0
Merge branch 'main' into analysisSchema
mhabedan 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 hidden or 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 hidden or 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,141 @@ | ||
| { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "$id": "https://hepdata.net/analyses/schemas/1.0.0/analyses_schema.json", | ||
| "title": "HEPData analysis tool schema", | ||
| "description": "A JSON schema for tracking implementations of HEPData analyses in different tools", | ||
| "type": "object", | ||
| "required": ["schema_version", "tool", "version", "date_created", "implementations_description", "url_templates", "analyses"], | ||
|
|
||
| "properties": { | ||
| "schema_version": { | ||
| "description": "The version of the JSON schema applying to this file", | ||
| "const": "1.0.0" | ||
| }, | ||
|
|
||
| "tool": { | ||
| "description": "The name of the tool used to implement the analyses", | ||
| "type": "string" | ||
| }, | ||
|
|
||
| "version": { | ||
| "description": "The version of the tool used to implement the analyses", | ||
| "type": "string" | ||
| }, | ||
|
|
||
| "date_created": { | ||
| "description": "The date at which the JSON file was created, formatted as RFC 3339, section 5.6 (https://json-schema.org/understanding-json-schema/reference/type#dates-and-times), e.g. 2018-11-13T20:20:39+00:00", | ||
| "type": "string", | ||
| "format": "date-time" | ||
| }, | ||
|
|
||
| "implementations_description": { | ||
| "description": "The type of information provided for the analyses by the tool", | ||
| "type": "string" | ||
| }, | ||
|
|
||
| "url_templates": { | ||
| "description": "Templates for URLs to the main repository and important other pages", | ||
| "type": "object", | ||
| "required": ["main_url"], | ||
|
|
||
| "properties": { | ||
| "main_url": { | ||
| "description": "The URL template for the main repository. Should contain e.g. a {name} placeholder for the analysis name.", | ||
| "type": "string" | ||
| }, | ||
| "val_url": { | ||
| "description": "The URL template for the validation page. Should contain e.g. a {name} placeholder for the analysis name.", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
|
|
||
| "analyses": { | ||
| "description": "The analyses implemented in the tool", | ||
| "type": "array", | ||
| "items": { | ||
| "type": "object", | ||
| "$ref": "#/$defs/Analysis", | ||
| "minItems": 1, | ||
| "uniqueItems": true | ||
| } | ||
| }, | ||
|
|
||
| "implementations_license": { | ||
| "description": "The license for the implementations of the analyses in the tool. Taken to be CC0 if not specified.", | ||
| "type": "object", | ||
| "required": ["name", "url"], | ||
| "additionalProperties": false, | ||
|
|
||
| "properties": { | ||
| "name": { | ||
| "description": "The name of the license", | ||
| "type": "string", | ||
| "maxLength": 256 | ||
| }, | ||
| "url": { | ||
| "description": "The URL to the license", | ||
| "type": "string", | ||
| "maxLength": 256 | ||
| }, | ||
| "description": { | ||
| "description": "A description of the license", | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
| }, | ||
|
|
||
| "$defs": { | ||
|
|
||
| "Analysis": { | ||
| "description": "An analysis, identified by the INSPIRE ID, implemented at least once in a tool", | ||
| "type": "object", | ||
| "required": ["inspire_id", "implementations"], | ||
|
|
||
| "properties": { | ||
| "inspire_id": { | ||
| "description": "The INSPIRE ID of the analysis", | ||
| "type": "number" | ||
| }, | ||
| "implementations":{ | ||
| "description": "The implementations of the analysis in the tool", | ||
| "type": "array", | ||
| "item": { | ||
| "type": "object", | ||
| "$ref": "#/$defs/Implementation", | ||
| "minItems": 1, | ||
| "uniqueItems": true | ||
| } | ||
| }, | ||
| "signature_type": { | ||
| "description": "The signature of the analysis, e.g. 'prompt', 'displaced'", | ||
| "type": "string" | ||
| }, | ||
| "pretty_name": { | ||
| "description": "A pretty name for the analysis", | ||
| "type": "string" | ||
| } | ||
| } | ||
| }, | ||
|
|
||
| "Implementation": { | ||
| "description": "An implementation of an analysis in a tool, giving the internal name to retrieve information", | ||
| "type": "object", | ||
| "required": ["name"], | ||
|
|
||
| "properties": { | ||
| "name": { | ||
| "description": "Internal name of the implementation", | ||
| "type": "string" | ||
| }, | ||
| "path": { | ||
| "description": "The path to the implementation in the tool", | ||
| "type": "string" | ||
| } | ||
| } | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.