dgbowl_schemas.tomato.payload_2_2 package
- pydantic model dgbowl_schemas.tomato.payload_2_2.Payload
Bases:
BaseModelShow 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:
extract_methodfile»all fieldsextract_samplefile»all fields
- field version: Literal['2.2'] [Required]
- Validated by:
- validator extract_samplefile » all fields
If
samplefileis provided invalues, parse the file assample.
- validator extract_methodfile » all fields
If
methodfileis provided invalues, parse the file asmethod.
Submodules
dgbowl_schemas.tomato.payload_2_2.sample module
- pydantic model dgbowl_schemas.tomato.payload_2_2.sample.Sample
Bases:
BaseModelAdditional attributes for each
Samplemay 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
Sampleis to be treated as a parentSampleor not. ForSamplestreated as parent (the default), thePayloadshould result in the creation of a childSample, i.e. a “destructive experiment” which significantly affects sample state. Otherwise, theSamplecan still be considered to represent the sample after the completion of thePayload.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:
BaseModelSpecification 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:
BaseModelProvide the
pathandprefixfor 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:
BaseModelProvide the
interval,pathandprefixto 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'
dgbowl_schemas.tomato.payload_2_2.task module
- pydantic model dgbowl_schemas.tomato.payload_2_2.task.Task
Bases:
BaseModelThe
Taskis a driver/device-independent abstraction describing the measurement steps. The driver-specific information for theTaskcan be provided via thetechnique_nameandtask_paramsparameters.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
Taskshould run- 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-jobprocess, 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
Taskwill be executed- Validated by:
- field task_name: str | None = None
the (optional) name of the current
Task; can be used for triggering otherTaskin parallel to this one viastart_with_task_name- Validated by:
- field task_params: Dict[str, Any] | None [Optional]
a
dictof any additional parameters required to specify the experimental technique; the key-value pairs of thisdictwill be used as attr-val pairs by theset_attr()method of the component executing thisTask- Validated by:
- field start_with_task_name: str | None = None
the
task_nameof theTaskthat thisTaskshould be started in parallel with; when set, thisTaskwill wait for execution until aTaskwith the matchingtask_nameis started- Validated by:
- field stop_with_task_name: str | None = None
the
task_nameof theTaskthat, when started, will stop the execution of thisTask; when set, thisTaskwill execute normally, but if a aTaskwith the matchingtask_nameis started, thisTaskwill 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:
BaseModelAdditional attributes for each
Samplemay 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
Personin an ELN/LIMS so that the experimental data can be attributed properly.Note
This identifier is used to construct the
authorproperty within the RO-crate mechanism.