Skip to content

Commit

Permalink
analysis.json fixed as per review with Mint team. simple_test.py upda…
Browse files Browse the repository at this point in the history
…ted to validate all json
  • Loading branch information
daniwelter committed Dec 13, 2017
2 parents 7d638e3 + 1c26aab commit 64802c2
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 34 deletions.
95 changes: 63 additions & 32 deletions json_schema/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"metadata_schema",
"tasks",
"inputs",
"outputs"
"outputs",
"core"
],
"additionalProperties": true,
"definitions": {
Expand All @@ -30,16 +31,38 @@
],
"type": "object",
"properties": {
"disk_size": "string",
"name": "string",
"zone": "string",
"log_err": "uri",
"start_time": "date-time",
"cpus": "int",
"log_out": "uri",
"stop_time": "date-time",
"memory": "string",
"docker_image": "string"
"disk_size": {
"type": "string"
},
"name": {
"type": "string"
},
"zone": {
"type": "string"
},
"log_err": {
"type": "string"
},
"start_time": {
"type": "string",
"format": "date-time"
},
"cpus": {
"type": "integer"
},
"log_out": {
"type": "string"
},
"stop_time": {
"type": "string",
"format": "date-time"
},
"memory": {
"type": "string"
},
"docker_image": {
"type": "string"
}
}
},
"parameter": {
Expand All @@ -50,9 +73,15 @@
],
"type": "object",
"properties": {
"checksum": "string",
"name": "string",
"value": "string"
"checksum": {
"type": "string"
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"file": {
Expand All @@ -64,9 +93,15 @@
],
"type": "object",
"properties": {
"checksum": "string",
"file_path": "uri",
"format": "string"
"checksum": {
"type": "string"
},
"file_path": {
"type": "string"
},
"format": {
"type": "string"
}
}
}
},
Expand All @@ -75,22 +110,18 @@
"properties": {
"inputs": {
"items": {
"type": {
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/parameter"
}
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/parameter"
},
"type": "array",
"description": "Input parameters used in the pipeline run, these can be files or string values (settings)."
},
"reference_bundle": {
"type": "uri",
"type": "string",
"description": "Bundle containing the reference used in running the pipeline."
},
"tasks": {
"items": {
"type": {
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/task"
}
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/task"
},
"type": "array",
"description": "Descriptions of tasks in the workflow."
Expand All @@ -100,35 +131,35 @@
"description": "A general description of the analysis."
},
"timestamp_stop_utc": {
"type": "date-time",
"type": "string",
"format": "date-time",
"description": "Terminal stop time of the full pipeline."
},
"input_bundles": {
"items": {
"type": "uri"
"type": "string"
},
"type": "array",
"description": "The input bundles used in this analysis run."
},
"outputs": {
"items": {
"type": {
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/file"
}
"$ref": "https://raw.githubusercontent.com/HumanCellAtlas/metadata-schema/4.5.0/json_schema/analysis.json#/definitions/file"
},
"type": "array",
"description": "Output generated by the pipeline run."
},
"analysis_id": {
"type": "number",
"type": "string",
"description": "A unique ID for this analysis."
},
"computational_method": {
"type": "uri",
"type": "string",
"description": "A URI to a versioned workflow and versioned execution environment in a GA4GH-compliant repository."
},
"timestamp_start_utc": {
"type": "date-time",
"type": "string",
"format": "date-time",
"description": "Initial start time of the full pipeline."
},
"core": {
Expand Down
3 changes: 1 addition & 2 deletions src/simple_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
Specific schema tests to follow.
"""

# a*.json skipped for now
schemas = glob.glob('../json_schema/' +"[b-z]*.json")
schemas = glob.glob('../json_schema/' +"[a-z]*.json")

for s in schemas:
print("Checking whether %s is a valid json schema" % s)
Expand Down

0 comments on commit 64802c2

Please sign in to comment.