Skip to content

Instantly share code, notes, and snippets.

@ltalirz
Created October 26, 2020 12:12
Show Gist options
  • Save ltalirz/7da3a1ff1f87118ada2dc6982ad86578 to your computer and use it in GitHub Desktop.
Save ltalirz/7da3a1ff1f87118ada2dc6982ad86578 to your computer and use it in GitHub Desktop.
Schema for metadata.json of AiiDA archive format v0.10
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "http://example.com/example.json",
"type": "object",
"title": "JSON schema for the metadata.json file of the AiiDA archive format",
"description": "The metadata.json stores information on the version of the archive format and how the archive file was created.",
"required": [
"export_version",
"aiida_version",
"all_fields_info",
"unique_identifiers",
"export_parameters"
],
"properties": {
"export_version": {
"$id": "#/properties/export_version",
"type": "string",
"const": "0.10",
"title": "AiiDA archive format version",
"description": "The archive format this file adheres to.",
"examples": [
"0.10"
]
},
"aiida_version": {
"$id": "#/properties/aiida_version",
"type": "string",
"title": "AiiDA version",
"description": "The AiiDA version used to create this archive file.",
"examples": [
"1.4.2"
]
},
"all_fields_info": {
"$id": "#/all_fields_info",
"type": "object",
"title": "Fields information",
"description": "Mapping between serialized representation of entities in the archive file and their representation in the AiiDA database. This information is determined by the AiiDA archive format version.",
"required": [
"User",
"Computer",
"Node",
"Group",
"Log",
"Comment"
],
"properties": {
"User": {
"$id": "#/properties/all_fields_info/properties/User",
"type": "object",
"title": "The User schema",
"examples": [
{
"last_name": {},
"first_name": {},
"institution": {},
"email": {}
}
],
"required": [
"last_name",
"first_name",
"institution",
"email"
],
"properties": {
"last_name": {
"$id": "#/properties/all_fields_info/properties/User/properties/last_name",
"type": "object",
"title": "The last_name schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"first_name": {
"$id": "#/properties/all_fields_info/properties/User/properties/first_name",
"type": "object",
"title": "The first_name schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"institution": {
"$id": "#/properties/all_fields_info/properties/User/properties/institution",
"type": "object",
"title": "The institution schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"email": {
"$id": "#/properties/all_fields_info/properties/User/properties/email",
"type": "object",
"title": "The email schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false
},
"Computer": {
"$id": "#/properties/all_fields_info/properties/Computer",
"type": "object",
"title": "The Computer schema",
"examples": [
{
"transport_type": {},
"hostname": {},
"description": {},
"scheduler_type": {},
"metadata": {},
"uuid": {},
"name": {}
}
],
"required": [
"transport_type",
"hostname",
"description",
"scheduler_type",
"metadata",
"uuid",
"name"
],
"properties": {
"transport_type": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/transport_type",
"type": "object",
"title": "The transport_type schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"hostname": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/hostname",
"type": "object",
"title": "The hostname schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"description": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/description",
"type": "object",
"title": "The description schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"scheduler_type": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/scheduler_type",
"type": "object",
"title": "The scheduler_type schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"metadata": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/metadata",
"type": "object",
"title": "The metadata schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"uuid": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/uuid",
"type": "object",
"title": "The uuid schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"name": {
"$id": "#/properties/all_fields_info/properties/Computer/properties/name",
"type": "object",
"title": "The name schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false
},
"Node": {
"$id": "#/properties/all_fields_info/properties/Node",
"type": "object",
"title": "The Node schema",
"examples": [
{
"ctime": {
"convert_type": "date"
},
"uuid": {},
"mtime": {
"convert_type": "date"
},
"node_type": {},
"label": {},
"user": {
"requires": "User",
"related_name": "dbnodes"
},
"dbcomputer": {
"requires": "Computer",
"related_name": "dbnodes"
},
"description": {},
"process_type": {}
}
],
"required": [
"ctime",
"uuid",
"mtime",
"node_type",
"label",
"user",
"dbcomputer",
"description",
"process_type"
],
"properties": {
"ctime": {
"$id": "#/properties/all_fields_info/properties/Node/properties/ctime",
"type": "object",
"title": "The ctime schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Node/properties/ctime/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"uuid": {
"$id": "#/properties/all_fields_info/properties/Node/properties/uuid",
"type": "object",
"title": "The uuid schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"mtime": {
"$id": "#/properties/all_fields_info/properties/Node/properties/mtime",
"type": "object",
"title": "The mtime schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Node/properties/mtime/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"node_type": {
"$id": "#/properties/all_fields_info/properties/Node/properties/node_type",
"type": "object",
"title": "The node_type schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"label": {
"$id": "#/properties/all_fields_info/properties/Node/properties/label",
"type": "object",
"title": "The label schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"user": {
"$id": "#/properties/all_fields_info/properties/Node/properties/user",
"type": "object",
"title": "The user schema",
"examples": [
{
"requires": "User",
"related_name": "dbnodes"
}
],
"required": [
"requires",
"related_name"
],
"properties": {
"requires": {
"$id": "#/properties/all_fields_info/properties/Node/properties/user/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"User"
]
},
"related_name": {
"$id": "#/properties/all_fields_info/properties/Node/properties/user/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dbnodes"
]
}
},
"additionalProperties": false
},
"dbcomputer": {
"$id": "#/properties/all_fields_info/properties/Node/properties/dbcomputer",
"type": "object",
"title": "The dbcomputer schema",
"examples": [
{
"requires": "Computer",
"related_name": "dbnodes"
}
],
"required": [
"requires",
"related_name"
],
"properties": {
"requires": {
"$id": "#/properties/all_fields_info/properties/Node/properties/dbcomputer/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"Computer"
]
},
"related_name": {
"$id": "#/properties/all_fields_info/properties/Node/properties/dbcomputer/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dbnodes"
]
}
},
"additionalProperties": false
},
"description": {
"$id": "#/properties/all_fields_info/properties/Node/properties/description",
"type": "object",
"title": "The description schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"process_type": {
"$id": "#/properties/all_fields_info/properties/Node/properties/process_type",
"type": "object",
"title": "The process_type schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false
},
"Group": {
"$id": "#/properties/all_fields_info/properties/Group",
"type": "object",
"title": "The Group schema",
"examples": [
{
"description": {},
"user": {
"related_name": "dbgroups",
"requires": "User"
},
"time": {
"convert_type": "date"
},
"type_string": {},
"uuid": {},
"label": {}
}
],
"required": [
"description",
"user",
"time",
"type_string",
"uuid",
"label"
],
"properties": {
"description": {
"$id": "#/properties/all_fields_info/properties/Group/properties/description",
"type": "object",
"title": "The description schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"user": {
"$id": "#/properties/all_fields_info/properties/Group/properties/user",
"type": "object",
"title": "The user schema",
"examples": [
{
"related_name": "dbgroups",
"requires": "User"
}
],
"required": [
"related_name",
"requires"
],
"properties": {
"related_name": {
"$id": "#/properties/all_fields_info/properties/Group/properties/user/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dbgroups"
]
},
"requires": {
"$id": "#/properties/all_fields_info/properties/Group/properties/user/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"User"
]
}
},
"additionalProperties": false
},
"time": {
"$id": "#/properties/all_fields_info/properties/Group/properties/time",
"type": "object",
"title": "The time schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Group/properties/time/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"type_string": {
"$id": "#/properties/all_fields_info/properties/Group/properties/type_string",
"type": "object",
"title": "The type_string schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"uuid": {
"$id": "#/properties/all_fields_info/properties/Group/properties/uuid",
"type": "object",
"title": "The uuid schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"label": {
"$id": "#/properties/all_fields_info/properties/Group/properties/label",
"type": "object",
"title": "The label schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
}
},
"additionalProperties": false
},
"Log": {
"$id": "#/properties/all_fields_info/properties/Log",
"type": "object",
"title": "The Log schema",
"examples": [
{
"uuid": {},
"time": {
"convert_type": "date"
},
"loggername": {},
"levelname": {},
"message": {},
"metadata": {},
"dbnode": {
"related_name": "dblogs",
"requires": "Node"
}
}
],
"required": [
"uuid",
"time",
"loggername",
"levelname",
"message",
"metadata",
"dbnode"
],
"properties": {
"uuid": {
"$id": "#/properties/all_fields_info/properties/Log/properties/uuid",
"type": "object",
"title": "The uuid schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"time": {
"$id": "#/properties/all_fields_info/properties/Log/properties/time",
"type": "object",
"title": "The time schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Log/properties/time/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"loggername": {
"$id": "#/properties/all_fields_info/properties/Log/properties/loggername",
"type": "object",
"title": "The loggername schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"levelname": {
"$id": "#/properties/all_fields_info/properties/Log/properties/levelname",
"type": "object",
"title": "The levelname schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"message": {
"$id": "#/properties/all_fields_info/properties/Log/properties/message",
"type": "object",
"title": "The message schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"metadata": {
"$id": "#/properties/all_fields_info/properties/Log/properties/metadata",
"type": "object",
"title": "The metadata schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"dbnode": {
"$id": "#/properties/all_fields_info/properties/Log/properties/dbnode",
"type": "object",
"title": "The dbnode schema",
"examples": [
{
"related_name": "dblogs",
"requires": "Node"
}
],
"required": [
"related_name",
"requires"
],
"properties": {
"related_name": {
"$id": "#/properties/all_fields_info/properties/Log/properties/dbnode/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dblogs"
]
},
"requires": {
"$id": "#/properties/all_fields_info/properties/Log/properties/dbnode/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"Node"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"Comment": {
"$id": "#/properties/all_fields_info/properties/Comment",
"type": "object",
"title": "The Comment schema",
"examples": [
{
"uuid": {},
"ctime": {
"convert_type": "date"
},
"mtime": {
"convert_type": "date"
},
"content": {},
"dbnode": {
"related_name": "dbcomments",
"requires": "Node"
},
"user": {
"related_name": "dbcomments",
"requires": "User"
}
}
],
"required": [
"uuid",
"ctime",
"mtime",
"content",
"dbnode",
"user"
],
"properties": {
"uuid": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/uuid",
"type": "object",
"title": "The uuid schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"ctime": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/ctime",
"type": "object",
"title": "The ctime schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/ctime/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"mtime": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/mtime",
"type": "object",
"title": "The mtime schema",
"examples": [
{
"convert_type": "date"
}
],
"required": [
"convert_type"
],
"properties": {
"convert_type": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/mtime/properties/convert_type",
"type": "string",
"title": "The convert_type schema",
"examples": [
"date"
]
}
},
"additionalProperties": false
},
"content": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/content",
"type": "object",
"title": "The content schema",
"examples": [
{}
],
"required": [],
"additionalProperties": false
},
"dbnode": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/dbnode",
"type": "object",
"title": "The dbnode schema",
"examples": [
{
"related_name": "dbcomments",
"requires": "Node"
}
],
"required": [
"related_name",
"requires"
],
"properties": {
"related_name": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/dbnode/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dbcomments"
]
},
"requires": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/dbnode/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"Node"
]
}
},
"additionalProperties": false
},
"user": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/user",
"type": "object",
"title": "The user schema",
"examples": [
{
"related_name": "dbcomments",
"requires": "User"
}
],
"required": [
"related_name",
"requires"
],
"properties": {
"related_name": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/user/properties/related_name",
"type": "string",
"title": "The related_name schema",
"examples": [
"dbcomments"
]
},
"requires": {
"$id": "#/properties/all_fields_info/properties/Comment/properties/user/properties/requires",
"type": "string",
"title": "The requires schema",
"examples": [
"User"
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
},
"additionalProperties": false
},
"unique_identifiers": {
"$id": "#/properties/unique_identifiers",
"type": "object",
"title": "Unique identifiers",
"description": "List of unique identifiers for each exported entity.",
"examples": [
{
"User": "email",
"Computer": "uuid",
"Node": "uuid",
"Group": "uuid",
"Log": "uuid",
"Comment": "uuid"
}
],
"required": [
"User",
"Computer",
"Node",
"Group",
"Log",
"Comment"
],
"properties": {
"User": {
"$id": "#/properties/unique_identifiers/properties/User",
"type": "string",
"title": "The User schema",
"examples": [
"email"
]
},
"Computer": {
"$id": "#/properties/unique_identifiers/properties/Computer",
"type": "string",
"title": "The Computer schema",
"examples": [
"uuid"
]
},
"Node": {
"$id": "#/properties/unique_identifiers/properties/Node",
"type": "string",
"title": "The Node schema",
"examples": [
"uuid"
]
},
"Group": {
"$id": "#/properties/unique_identifiers/properties/Group",
"type": "string",
"title": "The Group schema",
"examples": [
"uuid"
]
},
"Log": {
"$id": "#/properties/unique_identifiers/properties/Log",
"type": "string",
"title": "The Log schema",
"examples": [
"uuid"
]
},
"Comment": {
"$id": "#/properties/unique_identifiers/properties/Comment",
"type": "string",
"title": "The Comment schema",
"examples": [
"uuid"
]
}
},
"additionalProperties": false
},
"export_parameters": {
"$id": "#/properties/export_parameters",
"type": "object",
"title": "Export parameters",
"description": "Parameters provided by the user when exporting creating the archive file.",
"required": [
"graph_traversal_rules",
"entities_starting_set",
"include_comments",
"include_logs"
],
"properties": {
"graph_traversal_rules": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules",
"type": "object",
"title": "The graph_traversal_rules schema",
"description": "An explanation about the purpose of this instance.",
"required": [
"input_calc_forward",
"input_calc_backward",
"create_forward",
"create_backward",
"return_forward",
"return_backward",
"input_work_forward",
"input_work_backward",
"call_calc_forward",
"call_calc_backward",
"call_work_forward",
"call_work_backward"
],
"properties": {
"input_calc_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/input_calc_forward",
"type": "boolean",
"title": "The input_calc_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
false
]
},
"input_calc_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/input_calc_backward",
"type": "boolean",
"title": "The input_calc_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"create_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/create_forward",
"type": "boolean",
"title": "The create_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"create_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/create_backward",
"type": "boolean",
"title": "The create_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"return_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/return_forward",
"type": "boolean",
"title": "The return_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"return_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/return_backward",
"type": "boolean",
"title": "The return_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
false
]
},
"input_work_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/input_work_forward",
"type": "boolean",
"title": "The input_work_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
false
]
},
"input_work_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/input_work_backward",
"type": "boolean",
"title": "The input_work_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"call_calc_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/call_calc_forward",
"type": "boolean",
"title": "The call_calc_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"call_calc_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/call_calc_backward",
"type": "boolean",
"title": "The call_calc_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"call_work_forward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/call_work_forward",
"type": "boolean",
"title": "The call_work_forward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"call_work_backward": {
"$id": "#/properties/export_parameters/properties/graph_traversal_rules/properties/call_work_backward",
"type": "boolean",
"title": "The call_work_backward schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
}
},
"additionalProperties": false
},
"entities_starting_set": {
"$id": "#/properties/export_parameters/properties/entities_starting_set",
"type": "object",
"title": "The entities_starting_set schema",
"description": "An explanation about the purpose of this instance.",
"examples": [
{
"Group": [
"762010ee-37a2-4421-a5f3-5a181dc0631f"
]
}
],
"required": [
"Group"
],
"properties": {
"Group": {
"$id": "#/properties/export_parameters/properties/entities_starting_set/properties/Group",
"type": "array",
"title": "The Group schema",
"description": "An explanation about the purpose of this instance.",
"examples": [
[
"762010ee-37a2-4421-a5f3-5a181dc0631f"
]
],
"additionalItems": true,
"items": {
"$id": "#/properties/export_parameters/properties/entities_starting_set/properties/Group/items",
"anyOf": [
{
"$id": "#/properties/export_parameters/properties/entities_starting_set/properties/Group/items/anyOf/0",
"type": "string",
"title": "The first anyOf schema",
"description": "An explanation about the purpose of this instance.",
"examples": [
"762010ee-37a2-4421-a5f3-5a181dc0631f"
]
}
]
}
}
},
"additionalProperties": false
},
"include_comments": {
"$id": "#/properties/export_parameters/properties/include_comments",
"type": "boolean",
"title": "The include_comments schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
},
"include_logs": {
"$id": "#/properties/export_parameters/properties/include_logs",
"type": "boolean",
"title": "The include_logs schema",
"description": "An explanation about the purpose of this instance.",
"default": false,
"examples": [
true
]
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment