common.json 4.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Experiment common components descriptor",
  "description": "This schema defines the components components used in of the Experiment",

  "definitions": {

    "datasets": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_-]*$": { "$ref": "#/definitions/dataset" }
      },
      "minProperties": 1,
      "uniqueItems": true,
      "additionalProperties": false
    },

    "blocks": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_-]*$": { "$ref": "#/definitions/block" }
      },
      "uniqueItems": true,
      "additionalProperties": false
    },

    "analyzers": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_-]*$": { "$ref": "#/definitions/analyzer" }
      },
      "minProperties": 1,
      "uniqueItems": true,
      "additionalProperties": false
    },

    "globals": {
      "type": "object",
      "properties": {
        "queue":  { "$ref": "#/definitions/queue" },
        "environment":  { "$ref": "#/definitions/environment" }
      },
      "patternProperties": {
44
        "^[a-zA-Z_][a-zA-Z0-9_-]*/[a-zA-Z_][a-zA-Z0-9_-]*/[0-9]+$": {
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
          "$ref": "#/definitions/parameter_set"
        }
      },
      "uniqueItems": true,
      "additionalProperties": false
    },

    "queue": {
      "type": "string"
    },

    "environment": {
      "type": "object",
      "properties": {
        "name": { "type": "string" },
        "version": { "type": "string" }
      },
      "required": [
        "name",
        "version"
      ],
      "additionalProperties": false
    },

    "slots": {
      "type": "integer",
      "minimum": 1,
      "exclusiveMinimum": false
    },

    "versioned_database": {
      "type": "string",
77
      "pattern": "^[a-zA-Z_][a-zA-Z0-9_-]+[a-zA-Z0-9]+/[0-9]+$"
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
    },

    "dataset": {
      "type": "object",
      "properties": {
        "set": { "$ref": "../database/1.json#/definitions/identifier" },
        "protocol": { "$ref": "../database/1.json#/definitions/protocol_name" },
        "database": { "$ref": "#/definitions/versioned_database" }
      },
      "required": [
        "set",
        "protocol",
        "database"
      ],
      "additionalProperties": false
    },

    "connection_map": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_]*$": {
          "$ref": "../toolchain/common.json#/definitions/identifier"
        }
      },
      "minProperties": 1,
      "uniqueItems": true,
      "additionalProperties": false
    },

    "block": {
      "type": "object",
      "properties": {
        "inputs": { "$ref": "#/definitions/connection_map" },
        "outputs": { "$ref": "#/definitions/connection_map" },
        "algorithm": { "$ref": "../common/1.json#/definitions/reference" },
        "parameters": { "$ref": "#/definitions/parameter_set" },
        "queue":  { "$ref": "#/definitions/queue" },
        "environment":  { "$ref": "#/definitions/environment" },
        "nb_slots": { "$ref": "#/definitions/slots" }
      },
      "required": [
        "inputs",
        "outputs",
        "algorithm"
      ],
      "additionalProperties": false
    },

    "analyzer": {
      "type": "object",
      "properties": {
        "inputs": { "$ref": "#/definitions/connection_map" },
        "algorithm": { "$ref": "../common/1.json#/definitions/reference" },
        "parameters": { "$ref": "#/definitions/parameter_set" },
        "queue":  { "$ref": "#/definitions/queue" },
        "environment":  { "$ref": "#/definitions/environment" },
        "nb_slots": { "$ref": "#/definitions/slots" }
      },
      "required": [
        "inputs",
        "algorithm"
      ],
      "additionalProperties": false
    },

    "parameter_set": {
      "type": "object",
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_-]*$": {
          "$ref": "../common/1.json#/definitions/value"
        }
      },
      "minProperties": 0,
      "uniqueItems": true,
      "additionalProperties": false
    }

  }

}