|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466 |
- {
- "$schema": "http://json-schema.org/draft-07/schema#",
- "title": "dora-rs specification",
- "description": "Dataflow description",
- "type": "object",
- "required": [
- "nodes"
- ],
- "properties": {
- "nodes": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/Node"
- }
- }
- },
- "additionalProperties": true,
- "definitions": {
- "CustomNode": {
- "type": "object",
- "required": [
- "source"
- ],
- "properties": {
- "args": {
- "description": "Args for the executable.",
- "type": [
- "string",
- "null"
- ]
- },
- "build": {
- "type": [
- "string",
- "null"
- ]
- },
- "envs": {
- "description": "Environment variables for the custom nodes\n\nDeprecated, use outer-level `env` field instead.",
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": {
- "$ref": "#/definitions/EnvValue"
- }
- },
- "inputs": {
- "description": "Inputs for the nodes as a map from input ID to `node_id/output_id`.\n\ne.g.\n\ninputs:\n\nexample_input: example_node/example_output1",
- "default": {},
- "type": "object",
- "additionalProperties": true
- },
- "outputs": {
- "description": "List of output IDs.\n\ne.g.\n\noutputs:\n\n- output_1\n\n- output_2",
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/DataId"
- },
- "uniqueItems": true
- },
- "send_stdout_as": {
- "description": "Send stdout and stderr to another node",
- "type": [
- "string",
- "null"
- ]
- },
- "source": {
- "description": "Path of the source code\n\nIf you want to use a specific `conda` environment. Provide the python path within the source.\n\nsource: /home/peter/miniconda3/bin/python\n\nargs: some_node.py\n\nSource can match any executable in PATH.",
- "type": "string"
- }
- }
- },
- "DataId": {
- "type": "string"
- },
- "Duration": {
- "type": "object",
- "required": [
- "nanos",
- "secs"
- ],
- "properties": {
- "nanos": {
- "type": "integer",
- "format": "uint32",
- "minimum": 0.0
- },
- "secs": {
- "type": "integer",
- "format": "uint64",
- "minimum": 0.0
- }
- }
- },
- "EnvValue": {
- "anyOf": [
- {
- "type": "boolean"
- },
- {
- "type": "integer",
- "format": "uint64",
- "minimum": 0.0
- },
- {
- "type": "string"
- }
- ]
- },
- "Input": {
- "type": "object",
- "required": [
- "mapping"
- ],
- "properties": {
- "mapping": {
- "$ref": "#/definitions/InputMapping"
- },
- "queue_size": {
- "type": [
- "integer",
- "null"
- ],
- "format": "uint",
- "minimum": 0.0
- }
- },
- "additionalProperties": true
- },
- "InputMapping": {
- "oneOf": [
- {
- "type": "object",
- "required": [
- "Timer"
- ],
- "properties": {
- "Timer": {
- "type": "object",
- "required": [
- "interval"
- ],
- "properties": {
- "interval": {
- "$ref": "#/definitions/Duration"
- }
- }
- }
- },
- "additionalProperties": true
- },
- {
- "type": "object",
- "required": [
- "User"
- ],
- "properties": {
- "User": {
- "$ref": "#/definitions/UserInputMapping"
- }
- },
- "additionalProperties": true
- }
- ]
- },
- "Node": {
- "description": "Dora Node",
- "type": "object",
- "required": [
- "id"
- ],
- "properties": {
- "args": {
- "type": [
- "string",
- "null"
- ]
- },
- "build": {
- "type": [
- "string",
- "null"
- ]
- },
- "custom": {
- "anyOf": [
- {
- "$ref": "#/definitions/CustomNode"
- },
- {
- "type": "null"
- }
- ]
- },
- "description": {
- "description": "Description of the node",
- "type": [
- "string",
- "null"
- ]
- },
- "env": {
- "description": "Environment variables",
- "type": [
- "object",
- "null"
- ],
- "additionalProperties": {
- "$ref": "#/definitions/EnvValue"
- }
- },
- "id": {
- "description": "Node identifier",
- "allOf": [
- {
- "$ref": "#/definitions/NodeId"
- }
- ]
- },
- "inputs": {
- "default": {},
- "type": "object",
- "additionalProperties": true
- },
- "name": {
- "description": "Node name",
- "type": [
- "string",
- "null"
- ]
- },
- "operator": {
- "anyOf": [
- {
- "$ref": "#/definitions/SingleOperatorDefinition"
- },
- {
- "type": "null"
- }
- ]
- },
- "operators": {
- "type": [
- "array",
- "null"
- ],
- "items": {
- "$ref": "#/definitions/OperatorDefinition"
- }
- },
- "outputs": {
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/DataId"
- },
- "uniqueItems": true
- },
- "path": {
- "type": [
- "string",
- "null"
- ]
- },
- "send_stdout_as": {
- "type": [
- "string",
- "null"
- ]
- }
- },
- "additionalProperties": true
- },
- "NodeId": {
- "type": "string"
- },
- "OperatorDefinition": {
- "type": "object",
- "oneOf": [
- {
- "type": "object",
- "required": [
- "shared-library"
- ],
- "properties": {
- "shared-library": {
- "type": "string"
- }
- },
- "additionalProperties": true
- },
- {
- "type": "object",
- "required": [
- "python"
- ],
- "properties": {
-
- },
- "additionalProperties": true
- }
- ],
- "required": [
- "id"
- ],
- "properties": {
- "build": {
- "type": [
- "string",
- "null"
- ]
- },
- "description": {
- "type": [
- "string",
- "null"
- ]
- },
- "id": {
- "$ref": "#/definitions/OperatorId"
- },
- "inputs": {
- "default": {},
- "type": "object",
- "additionalProperties": true
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
- },
- "outputs": {
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/DataId"
- },
- "uniqueItems": true
- },
- "send_stdout_as": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- },
- "OperatorId": {
- "type": "string"
- },
- "PythonSource": {
- "type": "object",
- "required": [
- "source"
- ],
- "properties": {
- "conda_env": {
- "type": [
- "string",
- "null"
- ]
- },
- "source": {
- "type": "string"
- }
- },
- "additionalProperties": true
- },
- "SingleOperatorDefinition": {
- "type": "object",
- "oneOf": [
- {
- "type": "object",
- "required": [
- "shared-library"
- ],
- "properties": {
- "shared-library": {
- "type": "string"
- }
- },
- "additionalProperties": true
- },
- {
- "type": "object",
- "required": [
- "python"
- ],
- "properties": {
-
- },
- "additionalProperties": true
- }
- ],
- "properties": {
- "build": {
- "type": [
- "string",
- "null"
- ]
- },
- "description": {
- "type": [
- "string",
- "null"
- ]
- },
- "id": {
- "description": "ID is optional if there is only a single operator.",
- "anyOf": [
- {
- "$ref": "#/definitions/OperatorId"
- },
- {
- "type": "null"
- }
- ]
- },
- "inputs": {
- "default": {},
- "type": "object",
- "additionalProperties": true
- },
- "name": {
- "type": [
- "string",
- "null"
- ]
- },
- "outputs": {
- "default": [],
- "type": "array",
- "items": {
- "$ref": "#/definitions/DataId"
- },
- "uniqueItems": true
- },
- "send_stdout_as": {
- "type": [
- "string",
- "null"
- ]
- }
- }
- },
- "UserInputMapping": {
- "type": "object",
- "required": [
- "output",
- "source"
- ],
- "properties": {
- "output": {
- "$ref": "#/definitions/DataId"
- },
- "source": {
- "$ref": "#/definitions/NodeId"
- }
- }
- }
- }
- }
|