Skip to content

Commit 2fb8f26

Browse files
committed
README: Fix linting and minor errors
1 parent 4c68e87 commit 2fb8f26

File tree

1 file changed

+31
-29
lines changed

1 file changed

+31
-29
lines changed

README.rst

Lines changed: 31 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,24 @@
11
==================================================================
2-
Common workflow language tool description reference implementation
2+
Common Workflow Language tool description reference implementation
33
==================================================================
44

5-
CWL Conformance test: |Build Status|
6-
7-
Travis: |Unix Build Status|
5+
CWL conformance tests: |Build Status| Travis CI: |Unix Build Status|
86

97
.. |Unix Build Status| image:: https://img.shields.io/travis/common-workflow-language/cwltool/master.svg?label=unix%20build
108
:target: https://travis-ci.org/common-workflow-language/cwltool
119

1210
This is the reference implementation of the Common Workflow Language. It is
13-
intended to be feature complete and provide comprehensive validation of CWL
11+
intended to feature complete and provide comprehensive validation of CWL
1412
files as well as provide other tools related to working with CWL.
1513

16-
This is written and tested for Python 2.7.
14+
This is written and tested for Python ``2.7 and 3.x {x = 3, 4, 5, 6}``
1715

18-
The reference implementation consists of two packages. The "cwltool" package
16+
The reference implementation consists of two packages. The ``cwltool`` package
1917
is the primary Python module containing the reference implementation in the
20-
"cwltool" module and console executable by the same name.
18+
``cwltool`` module and console executable by the same name.
2119

22-
The "cwlref-runner" package is optional and provides an additional entry point
23-
under the alias "cwl-runner", which is the implementation-agnostic name for the
20+
The ``cwlref-runner`` package is optional and provides an additional entry point
21+
under the alias ``cwl-runner``, which is the implementation-agnostic name for the
2422
default CWL interpreter installed on a host.
2523

2624
Install
@@ -137,13 +135,17 @@ For this example, grab the test.json (and input file) from https://github.com/Ca
137135
Import as a module
138136
------------------
139137

140-
Add::
138+
Add
139+
140+
.. code:: python
141141
142142
import cwltool
143143
144144
to your script.
145145

146-
The easiest way to use cwltool to run a tool or workflow from Python is to use a Factory::
146+
The easiest way to use cwltool to run a tool or workflow from Python is to use a Factory
147+
148+
.. code:: python
147149
148150
import cwltool.factory
149151
fac = cwltool.factory.Factory()
@@ -202,7 +204,7 @@ for the plugin above, this is ``type`` and defines the plugin type. This paramet
202204
is required for all plugins. The available plugins and the parameters
203205
available for each are documented (incompletely) `here
204206
<https://docs.galaxyproject.org/en/latest/admin/dependency_resolvers.html>`__.
205-
Unfortunately, this documentation is in the context of Galaxy tool ``requirement`` s instead of CWL ``SoftwareRequirement`` s, but the concepts map fairly directly.
207+
Unfortunately, this documentation is in the context of Galaxy tool ``requirement`` s instead of CWL ``SoftwareRequirement``s, but the concepts map fairly directly.
206208
207209
cwltool is distributed with an example of such seqtk tool and sample corresponding
208210
job. It could executed from the cwltool root using a dependency resolvers
@@ -360,52 +362,52 @@ at the following links:
360362
- `Specifications - Implementation <https://github.com/galaxyproject/galaxy/commit/81d71d2e740ee07754785306e4448f8425f890bc>`__
361363
- `Initial cwltool Integration Pull Request <https://github.com/common-workflow-language/cwltool/pull/214>`__
362364

363-
Cwltool control flow
365+
CWL Tool Control Flow
364366
--------------------
365367

366368
Technical outline of how cwltool works internally, for maintainers.
367369

368-
#. Use CWL `load_tool()` to load document.
370+
#. Use CWL ``load_tool()`` to load document.
369371

370372
#. Fetches the document from file or URL
371373
#. Applies preprocessing (syntax/identifier expansion and normalization)
372374
#. Validates the document based on cwlVersion
373375
#. If necessary, updates the document to latest spec
374-
#. Constructs a Process object using `make_tool()` callback. This yields a
376+
#. Constructs a Process object using ``make_tool()``` callback. This yields a
375377
CommandLineTool, Workflow, or ExpressionTool. For workflows, this
376378
recursively constructs each workflow step.
377379
#. To construct custom types for CommandLineTool, Workflow, or
378-
ExpressionTool, provide a custom `make_tool()`
380+
ExpressionTool, provide a custom ``make_tool()``
379381

380-
#. Iterate on the `job()` method of the Process object to get back runnable jobs.
382+
#. Iterate on the ``job()`` method of the Process object to get back runnable jobs.
381383

382-
#. `job()` is a generator method (uses the Python iterator protocol)
383-
#. Each time the `job()` method is invoked in an iteration, it returns one
384-
of: a runnable item (an object with a `run()` method), `None` (indicating
384+
#. ``job()`` is a generator method (uses the Python iterator protocol)
385+
#. Each time the ``job()`` method is invoked in an iteration, it returns one
386+
of: a runnable item (an object with a ``run()`` method), ``None`` (indicating
385387
there is currently no work ready to run) or end of iteration (indicating
386388
the process is complete.)
387-
#. Invoke the runnable item by calling `run()`. This runs the tool and gets output.
389+
#. Invoke the runnable item by calling ``run()``. This runs the tool and gets output.
388390
#. Output of a process is reported by an output callback.
389-
#. `job()` may be iterated over multiple times. It will yield all the work
391+
#. ``job()`` may be iterated over multiple times. It will yield all the work
390392
that is currently ready to run and then yield None.
391393

392-
#. "Workflow" objects create a corresponding "WorkflowJob" and "WorkflowJobStep" objects to hold the workflow state for the duration of the job invocation.
394+
#. ``Workflow`` objects create a corresponding ``WorkflowJob`` and ``WorkflowJobStep`` objects to hold the workflow state for the duration of the job invocation.
393395

394396
#. The WorkflowJob iterates over each WorkflowJobStep and determines if the
395397
inputs the step are ready.
396398
#. When a step is ready, it constructs an input object for that step and
397-
iterates on the `job()` method of the workflow job step.
399+
iterates on the ``job()`` method of the workflow job step.
398400
#. Each runnable item is yielded back up to top level run loop
399401
#. When a step job completes and receives an output callback, the
400402
job outputs are assigned to the output of the workflow step.
401403
#. When all steps are complete, the intermediate files are moved to a final
402404
workflow output, intermediate directories are deleted, and the output
403405
callback for the workflow is called.
404406

405-
#. "CommandLineTool" job() objects yield a single runnable object.
407+
#. ``CommandLineTool`` job() objects yield a single runnable object.
406408

407-
#. The CommandLineTool `job()` method calls `makeJobRunner()` to create a
408-
`CommandLineJob` object
409+
#. The CommandLineTool ``job()`` method calls ``makeJobRunner()`` to create a
410+
``CommandLineJob`` object
409411
#. The job method configures the CommandLineJob object by setting public
410412
attributes
411413
#. The job method iterates over file and directories inputs to the
@@ -416,7 +418,7 @@ Technical outline of how cwltool works internally, for maintainers.
416418
#. Files are staged to targets paths using either Docker volume binds (when
417419
using containers) or symlinks (if not). This staging step enables files
418420
to be logically rearranged or renamed independent of their source layout.
419-
#. The run() method of CommandLineJob executes the command line tool or
421+
#. The ``run()`` method of CommandLineJob executes the command line tool or
420422
Docker container, waits for it to complete, collects output, and makes
421423
the output callback.
422424

0 commit comments

Comments
 (0)