Skip to content

Commit 42b465a

Browse files
committed
just local resolver for now
1 parent 428504e commit 42b465a

File tree

2 files changed

+33
-18
lines changed

2 files changed

+33
-18
lines changed

README.rst

+31-5
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,43 @@ The reference implementation consists of two packages. The "cwltool" package
1414
is the primary Python module containing the reference implementation in the
1515
"cwltool" module and console executable by the same name.
1616

17-
The "cwl-runner" package is optional and provides an additional entry point
17+
The "cwlref-runner" package is optional and provides an additional entry point
1818
under the alias "cwl-runner", which is the implementation-agnostic name for the
1919
default CWL interpreter installed on a host.
2020

2121
Install
2222
-------
2323

24-
Installing the official package from PyPi (will install "cwltool" package as well)::
24+
Installing the official package from PyPi (will install "cwltool" package as
25+
well)::
2526

2627
pip install cwlref-runner
2728

28-
Or from source::
29+
If installling alongside another CWL implementation then::
30+
31+
pip instal cwltool
32+
33+
To install from source::
2934

3035
git clone https://github.com/common-workflow-language/cwltool.git
3136
cd cwltool && python setup.py install
32-
cd cwlref-runner && python setup.py install
37+
cd cwlref-runner && python setup.py install # co-installing? skip this
38+
39+
Remember, if co-installing multiple CWL implementations then you need to
40+
maintain which implementation ``cwl-runner`` points to via a symbolic file
41+
system link or [another facility](https://wiki.debian.org/DebianAlternatives).
3342

3443
Run on the command line
3544
-----------------------
3645

3746
Simple command::
3847

39-
cwl-runner [tool] [job]
48+
cwl-runner [tool-or-workflow-description] [input-job-settings]
49+
50+
Or if you have multiple CWL implementations installed and you want to override
51+
the default cwl-runner use::
52+
53+
cwltool [tool-or-workflow-description] [input-job-settings]
4054

4155
Import as a module
4256
----------------
@@ -60,3 +74,15 @@ and ``--tmp-outdir-prefix`` to somewhere under ``/Users``::
6074

6175
.. |Build Status| image:: https://ci.commonwl.org/buildStatus/icon?job=cwltool-conformance
6276
:target: https://ci.commonwl.org/job/cwltool-conformance/
77+
78+
Tool or workflow loading from remote or local locations
79+
-------------------------------------------------------
80+
81+
``cwltool`` can run tool and workflow descriptions on both local and remote
82+
systems via its support for HTTP[S] URLs.
83+
84+
Input job files and Workflow steps (via the `run` directive) can reference CWL
85+
documents using absolute or relative local filesytem paths. If a relative path
86+
is referenced and that document isn't found in the current directory then the
87+
following locations will be searched:
88+
http://www.commonwl.org/v1.0/CommandLineTool.html#Discovering_CWL_documents_on_a_local_filesystem

cwltool/resolver.py

+2-13
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,9 @@ def resolve_local(document_loader, uri):
2222
return ("file://%s.cwl" % s)
2323
return None
2424

25-
def resolve_ga4gh_tool(document_loader, uri):
26-
ds = "https://staging.dockstore.org:8443/api/ga4gh/v1/tools/%s/versions/master/plain-CWL/descriptor" % urllib.quote(uri, "")
27-
print ds
28-
try:
29-
resp = document_loader.session.head(ds)
30-
resp.raise_for_status()
31-
return ds
32-
except Exception:
33-
pass
34-
return None
35-
3625
def tool_resolver(document_loader, uri):
37-
for r in [resolve_local, resolve_ga4gh_tool]:
26+
for r in [resolve_local]:
3827
ret = r(document_loader, uri)
3928
if ret is not None:
4029
return ret
41-
return uri
30+
return "file://" + os.path.abspath(uri)

0 commit comments

Comments
 (0)