cwl_utils.parser
================

.. py:module:: cwl_utils.parser


Submodules
----------

.. toctree::
   :maxdepth: 1

   /autoapi/cwl_utils/parser/cwl_v1_0/index
   /autoapi/cwl_utils/parser/cwl_v1_0_utils/index
   /autoapi/cwl_utils/parser/cwl_v1_1/index
   /autoapi/cwl_utils/parser/cwl_v1_1_utils/index
   /autoapi/cwl_utils/parser/cwl_v1_2/index
   /autoapi/cwl_utils/parser/cwl_v1_2_utils/index
   /autoapi/cwl_utils/parser/latest/index
   /autoapi/cwl_utils/parser/utils/index


Attributes
----------

.. autoapisummary::

   cwl_utils.parser.LoadingOptions
   cwl_utils.parser.Saveable
   cwl_utils.parser.InputParameter
   cwl_utils.parser.InputRecordField
   cwl_utils.parser.InputSchema
   cwl_utils.parser.OutputParameter
   cwl_utils.parser.OutputArraySchema
   cwl_utils.parser.OutputEnumSchema
   cwl_utils.parser.OutputRecordField
   cwl_utils.parser.OutputRecordSchema
   cwl_utils.parser.OutputSchema
   cwl_utils.parser.Workflow
   cwl_utils.parser.WorkflowTypes
   cwl_utils.parser.WorkflowInputParameter
   cwl_utils.parser.WorkflowOutputParameter
   cwl_utils.parser.WorkflowStep
   cwl_utils.parser.ScatterWorkflowStep
   cwl_utils.parser.LoopWorkflowStep
   cwl_utils.parser.WorkflowStepInput
   cwl_utils.parser.WorkflowStepOutput
   cwl_utils.parser.CommandLineTool
   cwl_utils.parser.CommandLineToolTypes
   cwl_utils.parser.CommandLineBinding
   cwl_utils.parser.CommandOutputBinding
   cwl_utils.parser.CommandInputParameter
   cwl_utils.parser.CommandOutputParameter
   cwl_utils.parser.CommandOutputRecordField
   cwl_utils.parser.ExpressionTool
   cwl_utils.parser.ExpressionToolOutputParameter
   cwl_utils.parser.DockerRequirement
   cwl_utils.parser.DockerRequirementTypes
   cwl_utils.parser.Process
   cwl_utils.parser.ProcessRequirement
   cwl_utils.parser.ProcessRequirementTypes
   cwl_utils.parser.SoftwareRequirement
   cwl_utils.parser.SoftwareRequirementTypes
   cwl_utils.parser.ArraySchema
   cwl_utils.parser.InputArraySchema
   cwl_utils.parser.InputArraySchemaTypes
   cwl_utils.parser.EnumSchema
   cwl_utils.parser.InputEnumSchema
   cwl_utils.parser.InputEnumSchemaTypes
   cwl_utils.parser.RecordSchema
   cwl_utils.parser.InputRecordSchema
   cwl_utils.parser.InputRecordSchemaTypes
   cwl_utils.parser.File
   cwl_utils.parser.SecondaryFileSchema
   cwl_utils.parser.Directory
   cwl_utils.parser.Dirent
   cwl_utils.parser.LoadContents


Exceptions
----------

.. autoapisummary::

   cwl_utils.parser.GraphTargetMissingException


Classes
-------

.. autoapisummary::

   cwl_utils.parser.NoType


Functions
---------

.. autoapisummary::

   cwl_utils.parser.cwl_version
   cwl_utils.parser.load_document_by_uri
   cwl_utils.parser.load_document
   cwl_utils.parser.load_document_by_string
   cwl_utils.parser.load_document_by_yaml
   cwl_utils.parser.save
   cwl_utils.parser.is_process
   cwl_utils.parser.version_split


Package Contents
----------------

.. py:exception:: GraphTargetMissingException

   Bases: :py:obj:`WorkflowException`

   .. autoapi-inheritance-diagram:: cwl_utils.parser.GraphTargetMissingException
      :parts: 1


   When a $graph is encountered and there is no target and no main/#main.


.. py:class:: NoType

   Bases: :py:obj:`abc.ABC`

   .. autoapi-inheritance-diagram:: cwl_utils.parser.NoType
      :parts: 1


   Helper class that provides a standard way to create an ABC using
   inheritance.


.. py:type:: LoadingOptions
   :canonical: cwl_v1_0.LoadingOptions | cwl_v1_1.LoadingOptions | cwl_v1_2.LoadingOptions


   Type union for a CWL v1.x LoadingOptions object.


.. py:type:: Saveable
   :canonical: cwl_v1_0.Saveable | cwl_v1_1.Saveable | cwl_v1_2.Saveable


   Type union for a CWL v1.x Saveable object.


.. py:type:: InputParameter
   :canonical: cwl_v1_0.InputParameter | cwl_v1_1.InputParameter | cwl_v1_2.InputParameter


   Type union for a CWL v1.x InputEnumSchema object.


.. py:type:: InputRecordField
   :canonical: cwl_v1_0.InputRecordField | cwl_v1_1.InputRecordField | cwl_v1_2.InputRecordField


   Type union for a CWL v1.x InputRecordSchema object.


.. py:type:: InputSchema
   :canonical: cwl_v1_0.InputSchema | cwl_v1_1.InputSchema | cwl_v1_2.InputSchema


   Type union for a CWL v1.x InputSchema object.


.. py:type:: OutputParameter
   :canonical: cwl_v1_0.OutputParameter | cwl_v1_1.OutputParameter | cwl_v1_2.OutputParameter


   Type union for a CWL v1.x OutputParameter object.


.. py:type:: OutputArraySchema
   :canonical: cwl_v1_0.OutputArraySchema | cwl_v1_1.OutputArraySchema | cwl_v1_2.OutputArraySchema


   Type union for a CWL v1.x OutputArraySchema object.


.. py:type:: OutputEnumSchema
   :canonical: cwl_v1_0.OutputEnumSchema | cwl_v1_1.OutputEnumSchema | cwl_v1_2.OutputEnumSchema


   Type union for a CWL v1.x OutputEnumSchema object.


.. py:type:: OutputRecordField
   :canonical: cwl_v1_0.OutputRecordField | cwl_v1_1.OutputRecordField | cwl_v1_2.OutputRecordField


   Type union for a CWL v1.x OutputRecordField object.


.. py:type:: OutputRecordSchema
   :canonical: cwl_v1_0.OutputRecordSchema | cwl_v1_1.OutputRecordSchema | cwl_v1_2.OutputRecordSchema


   Type union for a CWL v1.x OutputRecordSchema object.


.. py:type:: OutputSchema
   :canonical: cwl_v1_0.OutputSchema | cwl_v1_1.OutputSchema | cwl_v1_2.OutputSchema


   Type union for a CWL v1.x OutputSchema object.


.. py:type:: Workflow
   :canonical: cwl_v1_0.Workflow | cwl_v1_1.Workflow | cwl_v1_2.Workflow


.. py:data:: WorkflowTypes

   Type union for a CWL v1.x Workflow object.


.. py:type:: WorkflowInputParameter
   :canonical: cwl_v1_0.InputParameter | cwl_v1_1.WorkflowInputParameter | cwl_v1_2.WorkflowInputParameter


   Type union for a CWL v1.x WorkflowInputParameter object.


.. py:type:: WorkflowOutputParameter
   :canonical: cwl_v1_0.WorkflowOutputParameter | cwl_v1_1.WorkflowOutputParameter | cwl_v1_2.WorkflowOutputParameter


   Type union for a CWL v1.x WorkflowOutputParameter object.


.. py:type:: WorkflowStep
   :canonical: cwl_v1_0.WorkflowStep | cwl_v1_1.WorkflowStep | cwl_v1_2.WorkflowStep


   Type union for a CWL v1.x WorkflowStep object.


.. py:type:: ScatterWorkflowStep
   :canonical: cwl_v1_0.WorkflowStep | cwl_v1_1.WorkflowStep | cwl_v1_2.WorkflowStep


   Type union for a CWL v1.x ScatterWorkflowStep object.


.. py:type:: LoopWorkflowStep
   :canonical: NoType


   Type union for a CWL v1.x LoopWorkflowStep object.


.. py:type:: WorkflowStepInput
   :canonical: cwl_v1_0.WorkflowStepInput | cwl_v1_1.WorkflowStepInput | cwl_v1_2.WorkflowStepInput


   Type union for a CWL v1.x WorkflowStepInput object.


.. py:type:: WorkflowStepOutput
   :canonical: cwl_v1_0.WorkflowStepOutput | cwl_v1_1.WorkflowStepOutput | cwl_v1_2.WorkflowStepOutput


   Type union for a CWL v1.x WorkflowStepOutput object.


.. py:type:: CommandLineTool
   :canonical: cwl_v1_0.CommandLineTool | cwl_v1_1.CommandLineTool | cwl_v1_2.CommandLineTool


.. py:data:: CommandLineToolTypes

   Type union for a CWL v1.x CommandLineTool object.


.. py:type:: CommandLineBinding
   :canonical: cwl_v1_0.CommandLineBinding | cwl_v1_1.CommandLineBinding | cwl_v1_2.CommandLineBinding


   Type union for a CWL v1.x CommandLineBinding object.


.. py:type:: CommandOutputBinding
   :canonical: cwl_v1_0.CommandOutputBinding | cwl_v1_1.CommandOutputBinding | cwl_v1_2.CommandOutputBinding


   Type union for a CWL v1.x CommandOutputBinding object.


.. py:type:: CommandInputParameter
   :canonical: cwl_v1_0.CommandInputParameter | cwl_v1_1.CommandInputParameter | cwl_v1_2.CommandInputParameter


   Type union for a CWL v1.x CommandInputParameter object.


.. py:type:: CommandOutputParameter
   :canonical: cwl_v1_0.CommandOutputParameter | cwl_v1_1.CommandOutputParameter | cwl_v1_2.CommandOutputParameter


   Type union for a CWL v1.x CommandOutputParameter object.


.. py:type:: CommandOutputRecordField
   :canonical: cwl_v1_0.CommandOutputRecordField | cwl_v1_1.CommandOutputRecordField | cwl_v1_2.CommandOutputRecordField


   Type union for a CWL v1.x CommandOutputRecordField object.


.. py:type:: ExpressionTool
   :canonical: cwl_v1_0.ExpressionTool | cwl_v1_1.ExpressionTool | cwl_v1_2.ExpressionTool


   Type union for a CWL v1.x ExpressionTool object.


.. py:type:: ExpressionToolOutputParameter
   :canonical: cwl_v1_0.ExpressionToolOutputParameter | cwl_v1_1.ExpressionToolOutputParameter | cwl_v1_2.ExpressionToolOutputParameter


   Type union for a CWL v1.x ExpressionToolOutputParameter object.


.. py:type:: DockerRequirement
   :canonical: cwl_v1_0.DockerRequirement | cwl_v1_1.DockerRequirement | cwl_v1_2.DockerRequirement


.. py:data:: DockerRequirementTypes

   Type union for a CWL v1.x DockerRequirement object.


.. py:type:: Process
   :canonical: Workflow | CommandLineTool | ExpressionTool | cwl_v1_2.Operation


   Type Union for a CWL v1.x Process object.


.. py:type:: ProcessRequirement
   :canonical: cwl_v1_0.ProcessRequirement | cwl_v1_1.ProcessRequirement | cwl_v1_2.ProcessRequirement


   Type Union for a CWL v1.x ProcessRequirement object.


.. py:data:: ProcessRequirementTypes

.. py:type:: SoftwareRequirement
   :canonical: cwl_v1_0.SoftwareRequirement | cwl_v1_1.SoftwareRequirement | cwl_v1_2.SoftwareRequirement


.. py:data:: SoftwareRequirementTypes

   Type union for a CWL v1.x SoftwareRequirement object.


.. py:type:: ArraySchema
   :canonical: cwl_v1_0.ArraySchema | cwl_v1_1.ArraySchema | cwl_v1_2.ArraySchema


.. py:type:: InputArraySchema
   :canonical: cwl_v1_0.InputArraySchema | cwl_v1_1.InputArraySchema | cwl_v1_2.InputArraySchema


.. py:data:: InputArraySchemaTypes

   Type Union for a CWL v1.x ArraySchema object.


.. py:type:: EnumSchema
   :canonical: cwl_v1_0.EnumSchema | cwl_v1_1.EnumSchema | cwl_v1_2.EnumSchema


.. py:type:: InputEnumSchema
   :canonical: cwl_v1_0.InputEnumSchema | cwl_v1_1.InputEnumSchema | cwl_v1_2.InputEnumSchema


.. py:data:: InputEnumSchemaTypes

   Type Union for a CWL v1.x EnumSchema object.


.. py:type:: RecordSchema
   :canonical: cwl_v1_0.RecordSchema | cwl_v1_1.RecordSchema | cwl_v1_2.RecordSchema


.. py:type:: InputRecordSchema
   :canonical: cwl_v1_0.InputRecordSchema | cwl_v1_1.InputRecordSchema | cwl_v1_2.InputRecordSchema


.. py:data:: InputRecordSchemaTypes

   Type Union for a CWL v1.x RecordSchema object.


.. py:type:: File
   :canonical: cwl_v1_0.File | cwl_v1_1.File | cwl_v1_2.File


   Type Union for a CWL v1.x File object.


.. py:type:: SecondaryFileSchema
   :canonical: cwl_v1_1.SecondaryFileSchema | cwl_v1_2.SecondaryFileSchema


   Type Union for a CWL v1.x SecondaryFileSchema object.


.. py:type:: Directory
   :canonical: cwl_v1_0.Directory | cwl_v1_1.Directory | cwl_v1_2.Directory


   Type Union for a CWL v1.x Directory object.


.. py:type:: Dirent
   :canonical: cwl_v1_0.Dirent | cwl_v1_1.Dirent | cwl_v1_2.Dirent


   Type Union for a CWL v1.x Dirent object.


.. py:type:: LoadContents
   :canonical: cwl_v1_1.CommandInputParameter | cwl_v1_2.CommandInputParameter | cwl_v1_1.CommandOutputBinding | cwl_v1_2.CommandOutputBinding | cwl_v1_1.InputRecordField | cwl_v1_2.InputRecordField | cwl_v1_1.WorkflowInputParameter | cwl_v1_2.WorkflowInputParameter | cwl_v1_1.WorkflowStepInput | cwl_v1_2.WorkflowStepInput


   Type Union for a CWL v1.x LoadContents object.


.. py:function:: cwl_version(yaml)

   Return the cwlVersion of a YAML object.

   :param yaml: ruamel.yaml object for a CWL document

   :raises ValidationException: If `yaml` is not a MutableMapping.


.. py:function:: load_document_by_uri(path, loadingOptions = None, load_all = False)

   Load a CWL object from a URI or a path.


.. py:function:: load_document(doc, baseuri = None, loadingOptions = None, id_ = None, load_all = False)

   Load a CWL object from a serialized YAML string or a YAML object.


.. py:function:: load_document_by_string(string, uri, loadingOptions = None, id_ = None, load_all = False)

   Load a CWL object from a serialized YAML string.


.. py:function:: load_document_by_yaml(yaml, uri, loadingOptions = None, id_ = None, load_all = False)

   Load a CWL object from a YAML object.


.. py:function:: save(val, top = True, base_url = '', relative_uris = True)

   Convert a CWL Python object into a JSON/YAML serializable object.


.. py:function:: is_process(v)

   Test to see if the object is a CWL v1.x Python Process object.


.. py:function:: version_split(version)

   Split a cwlVersion value into its numerical components.


