gxformat2.schema package¶
Submodules¶
gxformat2.schema.v19_09 module¶
-
class
gxformat2.schema.v19_09.
ArraySchema
(items: Any, type: Any, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
-
attrs
= frozenset({'items', 'type'})¶
-
-
class
gxformat2.schema.v19_09.
EnumSchema
(symbols: Any, type: Any, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
Define an enumerated type.
-
attrs
= frozenset({'symbols', 'type'})¶
-
-
class
gxformat2.schema.v19_09.
GalaxyWorkflow
(inputs: Any, outputs: Any, steps: Any, tags: Any, id: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, uuid: Optional[Any] = None, report: Optional[Any] = None, creator: Optional[Any] = None, license: Optional[Any] = None, release: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Process
,gxformat2.schema.v19_09.HasUUID
A Galaxy workflow description. This record corresponds to the description of a workflow that should be executable on a Galaxy server that includes the contained tool definitions.
The workflows API or the user interface of Galaxy instances that are of version 19.09 or newer should be able to import a document defining this record.
## A note about label field.
This is the name of the workflow in the Galaxy user interface. This is the mechanism that users will primarily identify the workflow using. Legacy support - this may also be called ‘name’ and Galaxy will consume the workflow document fine and treat this attribute correctly - however in order to validate against this workflow definition schema the attribute should be called label.
-
attrs
= frozenset({'steps', 'report', 'outputs', 'creator', 'id', 'license', 'doc', 'release', 'label', 'class', 'uuid', 'inputs', 'tags'})¶
-
-
class
gxformat2.schema.v19_09.
LoadingOptions
(fetcher: Optional[schema_salad.fetcher.Fetcher] = None, namespaces: Optional[Dict[str, str]] = None, schemas: Optional[List[str]] = None, fileuri: Optional[str] = None, copyfrom: Optional[LoadingOptions] = None, original_doc: Optional[Any] = None, addl_metadata: Optional[Dict[str, str]] = None, baseuri: Optional[str] = None, idx: Optional[MutableMapping[str, Tuple[Any, LoadingOptions]]] = None)[source]¶ Bases:
object
-
graph
¶ Generate a merged rdflib.Graph from all entries in self.schemas.
-
-
class
gxformat2.schema.v19_09.
Parameter
[source]¶ Bases:
gxformat2.schema.v19_09.Labeled
,gxformat2.schema.v19_09.Documented
,gxformat2.schema.v19_09.Identified
Define an input or output parameter to a process.
-
class
gxformat2.schema.v19_09.
Process
[source]¶ Bases:
gxformat2.schema.v19_09.Identified
,gxformat2.schema.v19_09.Labeled
,gxformat2.schema.v19_09.Documented
The base executable type in CWL is the Process object defined by the document. Note that the Process object is abstract and cannot be directly executed.
-
class
gxformat2.schema.v19_09.
RecordField
(name: Any, type: Any, doc: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Documented
A field of a record.
-
attrs
= frozenset({'name', 'doc', 'type'})¶
-
-
class
gxformat2.schema.v19_09.
RecordSchema
(type: Any, fields: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
-
attrs
= frozenset({'fields', 'type'})¶
-
-
class
gxformat2.schema.v19_09.
Report
(markdown: Any, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
Definition of an invocation report for this workflow. Currently the only field is ‘markdown’.
-
attrs
= frozenset({'markdown'})¶
-
-
class
gxformat2.schema.v19_09.
Saveable
[source]¶ Bases:
abc.ABC
Mark classes than have a save() and fromDoc() function.
-
class
gxformat2.schema.v19_09.
StepPosition
(top: Any, left: Any, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
This field specifies the location of the step’s node when rendered in the workflow editor.
-
attrs
= frozenset({'left', 'top'})¶
-
-
class
gxformat2.schema.v19_09.
ToolShedRepository
(changeset_revision: Any, name: Any, owner: Any, tool_shed: Any, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Saveable
-
attrs
= frozenset({'name', 'changeset_revision', 'tool_shed', 'owner'})¶
-
-
class
gxformat2.schema.v19_09.
WorkflowInputParameter
(type: Any, optional: Any, label: Optional[Any] = None, doc: Optional[Any] = None, id: Optional[Any] = None, default: Optional[Any] = None, position: Optional[Any] = None, format: Optional[Any] = None, collection_type: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.InputParameter
,gxformat2.schema.v19_09.HasStepPosition
-
attrs
= frozenset({'type', 'id', 'optional', 'doc', 'position', 'label', 'default', 'format', 'collection_type'})¶
-
-
class
gxformat2.schema.v19_09.
WorkflowOutputParameter
(label: Optional[Any] = None, doc: Optional[Any] = None, id: Optional[Any] = None, outputSource: Optional[Any] = None, type: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.OutputParameter
Describe an output parameter of a workflow. The parameter must be connected to one parameter defined in the workflow that will provide the value of the output parameter. It is legal to connect a WorkflowInputParameter to a WorkflowOutputParameter.
-
attrs
= frozenset({'type', 'id', 'doc', 'label', 'outputSource'})¶
-
-
class
gxformat2.schema.v19_09.
WorkflowStep
(out: Any, id: Optional[Any] = None, label: Optional[Any] = None, doc: Optional[Any] = None, position: Optional[Any] = None, tool_id: Optional[Any] = None, tool_shed_repository: Optional[Any] = None, tool_version: Optional[Any] = None, errors: Optional[Any] = None, uuid: Optional[Any] = None, in_: Optional[Any] = None, state: Optional[Any] = None, tool_state: Optional[Any] = None, type: Optional[Any] = None, run: Optional[Any] = None, runtime_inputs: Optional[Any] = None, when: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Identified
,gxformat2.schema.v19_09.Labeled
,gxformat2.schema.v19_09.Documented
,gxformat2.schema.v19_09.HasStepPosition
,gxformat2.schema.v19_09.ReferencesTool
,gxformat2.schema.v19_09.HasStepErrors
,gxformat2.schema.v19_09.HasUUID
This represents a non-input step a Galaxy Workflow.
# A note about state and tool_state fields.
Only one or the other should be specified. These are two ways to represent the “state” of a tool at this workflow step. Both are essentially maps from parameter names to parameter values.
tool_state is much more low-level and expects a flat dictionary with each value a JSON dump. Nested tool structures such as conditionals and repeats should have all their values in the JSON dumped string. In general tool_state may be present in workflows exported from Galaxy but shouldn’t be written by humans.
state can contained a typed map. Repeat values can be represented as YAML arrays. An alternative to representing state this way is defining inputs with default values.
-
attrs
= frozenset({'tool_shed_repository', 'tool_state', 'when', 'runtime_inputs', 'type', 'id', 'tool_id', 'doc', 'position', 'label', 'tool_version', 'errors', 'uuid', 'state', 'in', 'run', 'out'})¶
-
-
class
gxformat2.schema.v19_09.
WorkflowStepInput
(id: Optional[Any] = None, source: Optional[Any] = None, label: Optional[Any] = None, default: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Identified
,gxformat2.schema.v19_09.Sink
,gxformat2.schema.v19_09.Labeled
TODO:
-
attrs
= frozenset({'default', 'id', 'source', 'label'})¶
-
-
class
gxformat2.schema.v19_09.
WorkflowStepOutput
(id: Optional[Any] = None, add_tags: Optional[Any] = None, change_datatype: Optional[Any] = None, delete_intermediate_datasets: Optional[Any] = None, hide: Optional[Any] = None, remove_tags: Optional[Any] = None, rename: Optional[Any] = None, set_columns: Optional[Any] = None, extension_fields: Optional[Dict[str, Any]] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None)[source]¶ Bases:
gxformat2.schema.v19_09.Identified
Associate an output parameter of the underlying process with a workflow parameter. The workflow parameter (given in the id field) be may be used as a source to connect with input parameters of other workflow steps, or with an output parameter of the process.
A unique identifier for this workflow output parameter. This is the identifier to use in the source field of WorkflowStepInput to connect the output value to downstream parameters.
-
attrs
= frozenset({'set_columns', 'add_tags', 'id', 'hide', 'delete_intermediate_datasets', 'remove_tags', 'rename', 'change_datatype'})¶
-
-
gxformat2.schema.v19_09.
expand_url
(url, base_url, loadingOptions, scoped_id=False, vocab_term=False, scoped_ref=None)[source]¶
-
gxformat2.schema.v19_09.
load_document
(doc: Any, baseuri: Optional[str] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None) → Any[source]¶
-
gxformat2.schema.v19_09.
load_document_by_string
(string: Any, uri: str, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None) → Any[source]¶
-
gxformat2.schema.v19_09.
load_document_by_yaml
(yaml: Any, uri: str, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None) → Any[source]¶ Shortcut to load via a YAML object. yaml: must be from ruamel.yaml.main.YAML.load with preserve_quotes=True
-
gxformat2.schema.v19_09.
load_document_with_metadata
(doc: Any, baseuri: Optional[str] = None, loadingOptions: Optional[gxformat2.schema.v19_09.LoadingOptions] = None, addl_metadata_fields: Optional[MutableSequence[str]] = None) → Any[source]¶
-
gxformat2.schema.v19_09.
prefix_url
(url: str, namespaces: Dict[str, str]) → str[source]¶ Expand short forms into full URLs using the given namespace dictionary.
-
gxformat2.schema.v19_09.
save
(val: Any, top: bool = True, base_url: str = '', relative_uris: bool = True) → Union[MutableMapping[str, Any], MutableSequence[Any], int, float, bool, str, None][source]¶
-
gxformat2.schema.v19_09.
save_relative_uri
(uri: Any, base_url: str, scoped_id: bool, ref_scope: Optional[int], relative_uris: bool) → Any[source]¶ Convert any URI to a relative one, obeying the scoping rules.
-
gxformat2.schema.v19_09.
save_with_metadata
(val: Any, valLoadingOpts: gxformat2.schema.v19_09.LoadingOptions, top: bool = True, base_url: str = '', relative_uris: bool = True) → Union[MutableMapping[str, Any], MutableSequence[Any], int, float, bool, str, None][source]¶ Save and set $namespaces, $schemas, $base and any other metadata fields at the top level.
Module contents¶
Parsers for workflows dervied from schema-salad descriptions and codegen.
Python files in this package probably shouldn’t be modified manually. See build_schema.sh for more information.