dgbowl_schemas.tomato.payload_1_0 package

pydantic model dgbowl_schemas.tomato.payload_1_0.Payload

Bases: BaseModel

Show JSON schema
{
   "title": "Payload",
   "type": "object",
   "properties": {
      "version": {
         "const": "1.0",
         "enum": [
            "1.0"
         ],
         "title": "Version",
         "type": "string"
      },
      "settings": {
         "$ref": "#/$defs/Settings"
      },
      "sample": {
         "$ref": "#/$defs/Sample"
      },
      "method": {
         "items": {
            "$ref": "#/$defs/Task"
         },
         "title": "Method",
         "type": "array"
      }
   },
   "$defs": {
      "Output": {
         "additionalProperties": false,
         "description": "Provide the ``path`` and ``prefix`` for the final FAIR-data archive of the *job*.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            }
         },
         "title": "Output",
         "type": "object"
      },
      "Sample": {
         "additionalProperties": true,
         "description": "Additional attributes for each :class:`Sample` may be required, depending on the\nmethod within the payload.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "name"
         ],
         "title": "Sample",
         "type": "object"
      },
      "Settings": {
         "additionalProperties": false,
         "description": "Specification of *job* configuration for tomato.",
         "properties": {
            "unlock_when_done": {
               "default": false,
               "title": "Unlock When Done",
               "type": "boolean"
            },
            "verbosity": {
               "default": "WARNING",
               "enum": [
                  "DEBUG",
                  "INFO",
                  "WARNING",
                  "ERROR",
                  "CRITICAL"
               ],
               "title": "Verbosity",
               "type": "string"
            },
            "output": {
               "$ref": "#/$defs/Output"
            },
            "snapshot": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/Snapshot"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null
            }
         },
         "title": "Settings",
         "type": "object"
      },
      "Snapshot": {
         "additionalProperties": false,
         "description": "Provide the ``frequency``, ``path`` and ``prefix`` to configure the snapshotting\nfunctionality of tomato.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            },
            "frequency": {
               "default": 3600.0,
               "title": "Frequency",
               "type": "number"
            }
         },
         "title": "Snapshot",
         "type": "object"
      },
      "Task": {
         "additionalProperties": false,
         "description": "The :class:`Task` is a driver/device-independent abstraction describing the\nmeasurement steps. The driver-specific information for the :class:`Task` can be\nprovided via the ``technique`` parameter.",
         "properties": {
            "component_tag": {
               "title": "Component Tag",
               "type": "string"
            },
            "max_duration": {
               "title": "Max Duration",
               "type": "number"
            },
            "sampling_interval": {
               "title": "Sampling Interval",
               "type": "number"
            },
            "polling_interval": {
               "anyOf": [
                  {
                     "type": "integer"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Polling Interval"
            },
            "technique_name": {
               "title": "Technique Name",
               "type": "string"
            },
            "technique_params": {
               "anyOf": [
                  {
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Technique Params"
            }
         },
         "required": [
            "component_tag",
            "max_duration",
            "sampling_interval",
            "technique_name"
         ],
         "title": "Task",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "version",
      "sample",
      "method"
   ]
}

Config:
  • extra: str = forbid

Validators:
field version: Literal['1.0'] [Required]
Validated by:
field settings: Settings [Optional]

Additional configuration options for tomato.

Validated by:
field sample: Sample [Required]

Specification of the experimental sample.

Validated by:
field method: Sequence[Task] [Required]

A sequence of the experimental Tasks.

Validated by:
validator extract_samplefile  »  all fields

If samplefile is provided in values, parse the file as sample.

validator extract_methodfile  »  all fields

If methodfile is provided in values, parse the file as method.

Submodules

dgbowl_schemas.tomato.payload_1_0.sample module

pydantic model dgbowl_schemas.tomato.payload_1_0.sample.Sample

Bases: BaseModel

Additional attributes for each Sample may be required, depending on the method within the payload.

Show JSON schema
{
   "title": "Sample",
   "description": "Additional attributes for each :class:`Sample` may be required, depending on the\nmethod within the payload.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "type": "string"
      }
   },
   "additionalProperties": true,
   "required": [
      "name"
   ]
}

Config:
  • extra: str = allow

field name: str [Required]

sample name for matching with tomato pipelines

dgbowl_schemas.tomato.payload_1_0.settings module

pydantic model dgbowl_schemas.tomato.payload_1_0.settings.Settings

Bases: BaseModel

Specification of job configuration for tomato.

Show JSON schema
{
   "title": "Settings",
   "description": "Specification of *job* configuration for tomato.",
   "type": "object",
   "properties": {
      "unlock_when_done": {
         "default": false,
         "title": "Unlock When Done",
         "type": "boolean"
      },
      "verbosity": {
         "default": "WARNING",
         "enum": [
            "DEBUG",
            "INFO",
            "WARNING",
            "ERROR",
            "CRITICAL"
         ],
         "title": "Verbosity",
         "type": "string"
      },
      "output": {
         "$ref": "#/$defs/Output"
      },
      "snapshot": {
         "anyOf": [
            {
               "$ref": "#/$defs/Snapshot"
            },
            {
               "type": "null"
            }
         ],
         "default": null
      }
   },
   "$defs": {
      "Output": {
         "additionalProperties": false,
         "description": "Provide the ``path`` and ``prefix`` for the final FAIR-data archive of the *job*.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            }
         },
         "title": "Output",
         "type": "object"
      },
      "Snapshot": {
         "additionalProperties": false,
         "description": "Provide the ``frequency``, ``path`` and ``prefix`` to configure the snapshotting\nfunctionality of tomato.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            },
            "frequency": {
               "default": 3600.0,
               "title": "Frequency",
               "type": "number"
            }
         },
         "title": "Snapshot",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

pydantic model Output

Bases: BaseModel

Provide the path and prefix for the final FAIR-data archive of the job.

Show JSON schema
{
   "title": "Output",
   "description": "Provide the ``path`` and ``prefix`` for the final FAIR-data archive of the *job*.",
   "type": "object",
   "properties": {
      "path": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Path"
      },
      "prefix": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Prefix"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str | None = None
field prefix: str | None = None
pydantic model Snapshot

Bases: BaseModel

Provide the frequency, path and prefix to configure the snapshotting functionality of tomato.

Show JSON schema
{
   "title": "Snapshot",
   "description": "Provide the ``frequency``, ``path`` and ``prefix`` to configure the snapshotting\nfunctionality of tomato.",
   "type": "object",
   "properties": {
      "path": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Path"
      },
      "prefix": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Prefix"
      },
      "frequency": {
         "default": 3600.0,
         "title": "Frequency",
         "type": "number"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str | None = None
field prefix: str | None = None
field frequency: float = 3600.0
field unlock_when_done: bool = False

set pipeline as ready when job finishes successfully

field verbosity: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] = 'WARNING'
field output: Output [Optional]

Options for final FAIR data output.

field snapshot: Snapshot | None = None

Options for periodic snapshotting.

dgbowl_schemas.tomato.payload_1_0.task module

pydantic model dgbowl_schemas.tomato.payload_1_0.task.Task

Bases: BaseModel

The Task is a driver/device-independent abstraction describing the measurement steps. The driver-specific information for the Task can be provided via the technique parameter.

Show JSON schema
{
   "title": "Task",
   "description": "The :class:`Task` is a driver/device-independent abstraction describing the\nmeasurement steps. The driver-specific information for the :class:`Task` can be\nprovided via the ``technique`` parameter.",
   "type": "object",
   "properties": {
      "component_tag": {
         "title": "Component Tag",
         "type": "string"
      },
      "max_duration": {
         "title": "Max Duration",
         "type": "number"
      },
      "sampling_interval": {
         "title": "Sampling Interval",
         "type": "number"
      },
      "polling_interval": {
         "anyOf": [
            {
               "type": "integer"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Polling Interval"
      },
      "technique_name": {
         "title": "Technique Name",
         "type": "string"
      },
      "technique_params": {
         "anyOf": [
            {
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Technique Params"
      }
   },
   "additionalProperties": false,
   "required": [
      "component_tag",
      "max_duration",
      "sampling_interval",
      "technique_name"
   ]
}

Config:
  • extra: str = forbid

field component_tag: str [Required]

tag of the pipeline component on which this Method should run

field max_duration: float [Required]

the maximum duration of this Task, in seconds

field sampling_interval: float [Required]

the interval between measurements, in seconds

field polling_interval: int | None = None

the interval between polling for data, in seconds; defaults to the value in driver settings

field technique_name: str [Required]
field technique_params: Dict[str, Any] | None = None

a dict of additional parameters required to specify the experimental technique