cwltool.checker
===============

.. py:module:: cwltool.checker

.. autoapi-nested-parse::

   Static checking of CWL workflow connectivity.



Functions
---------

.. autoapisummary::

   cwltool.checker.check_types
   cwltool.checker.merge_flatten_type
   cwltool.checker.can_assign_src_to_sink
   cwltool.checker.missing_subset
   cwltool.checker.static_checker
   cwltool.checker.circular_dependency_checker
   cwltool.checker.get_dependency_tree
   cwltool.checker.processDFS
   cwltool.checker.get_step_id
   cwltool.checker.is_conditional_step
   cwltool.checker.is_all_output_method_loop_step
   cwltool.checker.loop_checker


Module Contents
---------------

.. py:function:: check_types(srctype, sinktype, linkMerge, pickValue, valueFrom)

   Check if the source and sink types are correct.

   :raises WorkflowException: If there is an unrecognized linkMerge type


.. py:function:: merge_flatten_type(src)

   Return the merge flattened type of the source type.


.. py:function:: can_assign_src_to_sink(src, sink, strict = False)

   Check for identical type specifications, ignoring extra keys like inputBinding.

   In non-strict comparison, at least one source type must match one sink type,
   except for 'null'.
   In strict comparison, all source types must match at least one sink type.

   :param src: admissible source types
   :param sink: admissible sink types


.. py:function:: missing_subset(fullset, subset)

   Calculate the items missing from the fullset given the subset.


.. py:function:: static_checker(workflow_inputs, workflow_outputs, step_inputs, step_outputs, param_to_step)

   Check if all source and sink types of a workflow are compatible before run time.

   :raises ValidationException: If any incompatibilities are detected.


.. py:function:: circular_dependency_checker(step_inputs)

   Check if a workflow has circular dependency.

   :raises ValidationException: If a circular dependency is detected.


.. py:function:: get_dependency_tree(step_inputs)

   Get the dependency tree in the form of adjacency list.


.. py:function:: processDFS(adjacency, traversal_path, processed, cycles)

   Perform depth first search.


.. py:function:: get_step_id(field_id)

   Extract step id from either input or output fields.


.. py:function:: is_conditional_step(param_to_step, parm_id)

   Return True if the step given by the parm_id is a conditional step.


.. py:function:: is_all_output_method_loop_step(param_to_step, parm_id)

   Check if a step contains a `loop` directive with `all_iterations` outputMethod.


.. py:function:: loop_checker(steps)

   Check `loop` compatibility with other directives.

   :raises ValidationException: If there is an incompatible combination between `loop` and `scatter`.


