cwltool.builder
===============

.. py:module:: cwltool.builder

.. autoapi-nested-parse::

   Command line builder.



Attributes
----------

.. autoapisummary::

   cwltool.builder.INPUT_OBJ_VOCAB


Classes
-------

.. autoapisummary::

   cwltool.builder.Builder


Functions
---------

.. autoapisummary::

   cwltool.builder.content_limit_respected_read_bytes
   cwltool.builder.content_limit_respected_read
   cwltool.builder.substitute


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

.. py:data:: INPUT_OBJ_VOCAB
   :type:  Dict[str, str]

.. py:function:: content_limit_respected_read_bytes(f)

   Read a file as bytes, respecting the :py:data:`~cwltool.utils.CONTENT_LIMIT`.

   :param f: file handle
   :returns: the file contents
   :raises WorkflowException: if the file is too large


.. py:function:: content_limit_respected_read(f)

   Read a file as a string, respecting the :py:data:`~cwltool.utils.CONTENT_LIMIT`.

   :param f: file handle
   :returns: the file contents
   :raises WorkflowException: if the file is too large


.. py:function:: substitute(value, replace)

   Perform CWL SecondaryFilesDSL style substitution.


.. py:class:: Builder(job, files, bindings, schemaDefs, names, requirements, hints, resources, mutation_manager, formatgraph, make_fs_access, fs_access, job_script_provider, timeout, debug, js_console, force_docker_pull, loadListing, outdir, tmpdir, stagedir, cwlVersion, container_engine)

   Bases: :py:obj:`cwltool.utils.HasReqsHints`

   .. autoapi-inheritance-diagram:: cwltool.builder.Builder
      :parts: 1


   Helper class to construct a command line from a CWL CommandLineTool.


   .. py:method:: build_job_script(commands)


   .. py:method:: bind_input(schema, datum, discover_secondaryFiles, lead_pos = None, tail_pos = None)

      Bind an input object to the command line.

      :raises ValidationException: in the event of an invalid type union
      :raises WorkflowException: if a CWL Expression ("position", "required",
        "pattern", "format") evaluates to the wrong type or if a required
        secondary file is missing



   .. py:method:: tostr(value)

      Represent an input parameter as a string.

      :raises WorkflowException: if the item is a File or Directory and the
        "path" is missing.



   .. py:method:: generate_arg(binding)


   .. py:method:: do_eval(ex, context = None, recursive = False, strip_whitespace = True)


