dgbowl_schemas.tomato.payload_0_2 package

pydantic model dgbowl_schemas.tomato.payload_0_2.Payload

Bases: BaseModel

Show JSON schema
{
   "title": "Payload",
   "type": "object",
   "properties": {
      "version": {
         "const": "0.2",
         "title": "Version",
         "type": "string"
      },
      "tomato": {
         "$ref": "#/$defs/Tomato"
      },
      "sample": {
         "$ref": "#/$defs/Sample"
      },
      "method": {
         "items": {
            "$ref": "#/$defs/Method"
         },
         "title": "Method",
         "type": "array"
      }
   },
   "$defs": {
      "Method": {
         "additionalProperties": true,
         "description": "The :class:`Method` schema is completely *device*- and ``technique``- dependent,\nwith extra arguments required by each ``technique`` defined by each device driver.",
         "properties": {
            "device": {
               "title": "Device",
               "type": "string"
            },
            "technique": {
               "title": "Technique",
               "type": "string"
            }
         },
         "required": [
            "device",
            "technique"
         ],
         "title": "Method",
         "type": "object"
      },
      "Output": {
         "additionalProperties": false,
         "description": "Provide the ``path`` and ``prefix`` for the final FAIR-data archive of the *job*.",
         "properties": {
            "path": {
               "default": null,
               "title": "Path",
               "type": "string"
            },
            "prefix": {
               "default": null,
               "title": "Prefix",
               "type": "string"
            }
         },
         "title": "Output",
         "type": "object"
      },
      "Sample": {
         "additionalProperties": true,
         "description": "Additional attributes for each :class:`Sample` may be required, depending on the\n:class:`Method` type.",
         "properties": {
            "name": {
               "title": "Name",
               "type": "string"
            }
         },
         "required": [
            "name"
         ],
         "title": "Sample",
         "type": "object"
      },
      "Snapshot": {
         "additionalProperties": false,
         "description": "Provide the ``frequency``, ``path`` and ``prefix`` to configure the snapshotting\nfunctionality of tomato.",
         "properties": {
            "path": {
               "default": null,
               "title": "Path",
               "type": "string"
            },
            "prefix": {
               "default": null,
               "title": "Prefix",
               "type": "string"
            },
            "frequency": {
               "default": 3600,
               "title": "Frequency",
               "type": "integer"
            }
         },
         "title": "Snapshot",
         "type": "object"
      },
      "Tomato": {
         "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": "Tomato",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "version",
      "sample",
      "method"
   ]
}

Config:
  • extra: str = forbid

Validators:
field version: Literal['0.2'] [Required]
Validated by:
field tomato: Tomato [Optional]

Additional configuration options for tomato.

Validated by:
field sample: Sample [Required]

Specification of the experimental sample.

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

A sequence of the experimental methods.

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.

update()

Submodules

dgbowl_schemas.tomato.payload_0_2.method module

pydantic model dgbowl_schemas.tomato.payload_0_2.method.Method

Bases: BaseModel

The Method schema is completely device- and technique- dependent, with extra arguments required by each technique defined by each device driver.

Show JSON schema
{
   "title": "Method",
   "description": "The :class:`Method` schema is completely *device*- and ``technique``- dependent,\nwith extra arguments required by each ``technique`` defined by each device driver.",
   "type": "object",
   "properties": {
      "device": {
         "title": "Device",
         "type": "string"
      },
      "technique": {
         "title": "Technique",
         "type": "string"
      }
   },
   "additionalProperties": true,
   "required": [
      "device",
      "technique"
   ]
}

Config:
  • extra: str = allow

field device: str [Required]

tag of the device within a tomato pipeline

field technique: str [Required]

name of the technique, must be listed in the capabilities of the device

dgbowl_schemas.tomato.payload_0_2.sample module

pydantic model dgbowl_schemas.tomato.payload_0_2.sample.Sample

Bases: BaseModel

Additional attributes for each Sample may be required, depending on the Method type.

Show JSON schema
{
   "title": "Sample",
   "description": "Additional attributes for each :class:`Sample` may be required, depending on the\n:class:`Method` type.",
   "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_0_2.tomato module

pydantic model dgbowl_schemas.tomato.payload_0_2.tomato.Tomato

Bases: BaseModel

Specification of job configuration for tomato.

Show JSON schema
{
   "title": "Tomato",
   "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": {
               "default": null,
               "title": "Path",
               "type": "string"
            },
            "prefix": {
               "default": null,
               "title": "Prefix",
               "type": "string"
            }
         },
         "title": "Output",
         "type": "object"
      },
      "Snapshot": {
         "additionalProperties": false,
         "description": "Provide the ``frequency``, ``path`` and ``prefix`` to configure the snapshotting\nfunctionality of tomato.",
         "properties": {
            "path": {
               "default": null,
               "title": "Path",
               "type": "string"
            },
            "prefix": {
               "default": null,
               "title": "Prefix",
               "type": "string"
            },
            "frequency": {
               "default": 3600,
               "title": "Frequency",
               "type": "integer"
            }
         },
         "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": {
         "default": null,
         "title": "Path",
         "type": "string"
      },
      "prefix": {
         "default": null,
         "title": "Prefix",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str = None
field prefix: str = 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": {
         "default": null,
         "title": "Path",
         "type": "string"
      },
      "prefix": {
         "default": null,
         "title": "Prefix",
         "type": "string"
      },
      "frequency": {
         "default": 3600,
         "title": "Frequency",
         "type": "integer"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str = None
field prefix: str = None
field frequency: int = 3600
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.