dgbowl_schemas.tomato.payload_2_2 package

pydantic model dgbowl_schemas.tomato.payload_2_2.Payload

Bases: BaseModel

Show JSON schema
{
   "title": "Payload",
   "type": "object",
   "properties": {
      "version": {
         "const": "2.2",
         "title": "Version",
         "type": "string"
      },
      "settings": {
         "$ref": "#/$defs/Settings"
      },
      "user": {
         "$ref": "#/$defs/User"
      },
      "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"
            },
            "repositories": {
               "default": [
                  "default"
               ],
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "null"
                     }
                  ]
               },
               "title": "Repositories",
               "type": "array"
            }
         },
         "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": {
            "identifier": {
               "title": "Identifier",
               "type": "string"
            },
            "sample_is_parent": {
               "default": true,
               "title": "Sample Is Parent",
               "type": "boolean"
            }
         },
         "required": [
            "identifier"
         ],
         "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 ``interval``, ``path`` and ``prefix`` to configure\nthe snapshotting functionality of tomato.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            },
            "interval": {
               "default": 3600.0,
               "title": "Interval",
               "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 :obj:`technique_name` and :obj:`task_params` parameters.",
         "properties": {
            "component_role": {
               "title": "Component Role",
               "type": "string"
            },
            "max_duration": {
               "title": "Max Duration",
               "type": "number"
            },
            "sampling_interval": {
               "title": "Sampling Interval",
               "type": "number"
            },
            "polling_interval": {
               "anyOf": [
                  {
                     "type": "number"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Polling Interval"
            },
            "technique_name": {
               "title": "Technique Name",
               "type": "string"
            },
            "task_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Task Name"
            },
            "task_params": {
               "anyOf": [
                  {
                     "additionalProperties": true,
                     "type": "object"
                  },
                  {
                     "type": "null"
                  }
               ],
               "title": "Task Params"
            },
            "start_with_task_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Start With Task Name"
            },
            "stop_with_task_name": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Stop With Task Name"
            }
         },
         "required": [
            "component_role",
            "max_duration",
            "sampling_interval",
            "technique_name"
         ],
         "title": "Task",
         "type": "object"
      },
      "User": {
         "additionalProperties": true,
         "description": "Additional attributes for each :class:`Sample` may be required, depending on the\nmethod within the payload.",
         "properties": {
            "identifier": {
               "title": "Identifier",
               "type": "string"
            }
         },
         "required": [
            "identifier"
         ],
         "title": "User",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "version",
      "user",
      "sample",
      "method"
   ]
}

Config:
  • extra: str = forbid

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

Additional configuration options for tomato.

Validated by:
field user: User [Required]

Specification of the user running the payload.

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.

validator validate_task_names  »  method

Submodules

dgbowl_schemas.tomato.payload_2_2.sample module

pydantic model dgbowl_schemas.tomato.payload_2_2.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": {
      "identifier": {
         "title": "Identifier",
         "type": "string"
      },
      "sample_is_parent": {
         "default": true,
         "title": "Sample Is Parent",
         "type": "boolean"
      }
   },
   "additionalProperties": true,
   "required": [
      "identifier"
   ]
}

Config:
  • extra: str = allow

field identifier: str [Required]

Sample identifier for matching with tomato pipelines. This should be the unique sample ID from an ELN/LIMS so that the experimental data can be uploaded directly.

field sample_is_parent: bool = True

Indicates whether the current Sample is to be treated as a parent Sample or not. For Samples treated as parent (the default), the Payload should result in the creation of a child Sample, i.e. a “destructive experiment” which significantly affects sample state. Otherwise, the Sample can still be considered to represent the sample after the completion of the Payload.

Note

This setting will affect how RO-crates are used to upload the tomato output.

dgbowl_schemas.tomato.payload_2_2.settings module

pydantic model dgbowl_schemas.tomato.payload_2_2.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"
            },
            "repositories": {
               "default": [
                  "default"
               ],
               "items": {
                  "anyOf": [
                     {
                        "type": "string"
                     },
                     {
                        "type": "null"
                     }
                  ]
               },
               "title": "Repositories",
               "type": "array"
            }
         },
         "title": "Output",
         "type": "object"
      },
      "Snapshot": {
         "additionalProperties": false,
         "description": "Provide the ``interval``, ``path`` and ``prefix`` to configure\nthe snapshotting functionality of tomato.",
         "properties": {
            "path": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Path"
            },
            "prefix": {
               "anyOf": [
                  {
                     "type": "string"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "title": "Prefix"
            },
            "interval": {
               "default": 3600.0,
               "title": "Interval",
               "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"
      },
      "repositories": {
         "default": [
            "default"
         ],
         "items": {
            "anyOf": [
               {
                  "type": "string"
               },
               {
                  "type": "null"
               }
            ]
         },
         "title": "Repositories",
         "type": "array"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str | None = None
field prefix: str | None = None
field repositories: list[Optional[str]] = ['default']
pydantic model Snapshot

Bases: BaseModel

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

Show JSON schema
{
   "title": "Snapshot",
   "description": "Provide the ``interval``, ``path`` and ``prefix`` to configure\nthe snapshotting functionality 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"
      },
      "interval": {
         "default": 3600.0,
         "title": "Interval",
         "type": "number"
      }
   },
   "additionalProperties": false
}

Config:
  • extra: str = forbid

field path: str | None = None
field prefix: str | None = None
field interval: 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_2_2.task module

pydantic model dgbowl_schemas.tomato.payload_2_2.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_name and task_params parameters.

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 :obj:`technique_name` and :obj:`task_params` parameters.",
   "type": "object",
   "properties": {
      "component_role": {
         "title": "Component Role",
         "type": "string"
      },
      "max_duration": {
         "title": "Max Duration",
         "type": "number"
      },
      "sampling_interval": {
         "title": "Sampling Interval",
         "type": "number"
      },
      "polling_interval": {
         "anyOf": [
            {
               "type": "number"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Polling Interval"
      },
      "technique_name": {
         "title": "Technique Name",
         "type": "string"
      },
      "task_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Task Name"
      },
      "task_params": {
         "anyOf": [
            {
               "additionalProperties": true,
               "type": "object"
            },
            {
               "type": "null"
            }
         ],
         "title": "Task Params"
      },
      "start_with_task_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Start With Task Name"
      },
      "stop_with_task_name": {
         "anyOf": [
            {
               "type": "string"
            },
            {
               "type": "null"
            }
         ],
         "default": null,
         "title": "Stop With Task Name"
      }
   },
   "additionalProperties": false,
   "required": [
      "component_role",
      "max_duration",
      "sampling_interval",
      "technique_name"
   ]
}

Config:
  • extra: str = forbid

Validators:
field component_role: str [Required]

role of the pipeline component on which this Task should run

Validated by:
field max_duration: float [Required]

the maximum duration of this Task, in seconds

Validated by:
field sampling_interval: float [Required]

the interval between measurements, in seconds

Validated by:
field polling_interval: float | None = None

the interval between polling for data by the tomato-job process, in seconds; defaults to the value in driver settings

Validated by:
field technique_name: str [Required]

the name of the technique; has to match one of the capabilities of the component on which this Task will be executed

Validated by:
field task_name: str | None = None

the (optional) name of the current Task; can be used for triggering other Task in parallel to this one via start_with_task_name

Validated by:
field task_params: Dict[str, Any] | None [Optional]

a dict of any additional parameters required to specify the experimental technique; the key-value pairs of this dict will be used as attr-val pairs by the set_attr() method of the component executing this Task

Validated by:
field start_with_task_name: str | None = None

the task_name of the Task that this Task should be started in parallel with; when set, this Task will wait for execution until a Task with the matching task_name is started

Validated by:
field stop_with_task_name: str | None = None

the task_name of the Task that, when started, will stop the execution of this Task; when set, this Task will execute normally, but if a a Task with the matching task_name is started, this Task will be stopped

Validated by:
validator task_names_cannot_be_same  »  all fields
validator convert_str_to_seconds  »  max_duration, sampling_interval, polling_interval

dgbowl_schemas.tomato.payload_2_2.user module

pydantic model dgbowl_schemas.tomato.payload_2_2.user.User

Bases: BaseModel

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

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

Config:
  • extra: str = allow

field identifier: str [Required]

User identifier for matching annotating the user running this payload. This should be the unique ID of the Person in an ELN/LIMS so that the experimental data can be attributed properly.

Note

This identifier is used to construct the author property within the RO-crate mechanism.