Skip to content
This repository was archived by the owner on Jun 9, 2020. It is now read-only.

Commit 5fd96b5

Browse files
committed
add stdout as type for output
1 parent 2f458ef commit 5fd96b5

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

cwlgen/__init__.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from .import_cwl import parse_cwl
1919

2020
logging.basicConfig(level=logging.INFO)
21-
LOGGER = logging.getLogger(__name__)
21+
_LOGGER = logging.getLogger(__name__)
2222

2323

2424
# Function(s) ------------------------------
@@ -60,7 +60,8 @@ def __init__(self, tool_id=None, base_command=None, label=None, doc=None,
6060
are stored in lists which are initialized empty.
6161
'''
6262
if cwl_version not in CWL_VERSIONS:
63-
LOGGER.warning("CWL version is not recognized as a valid version.")
63+
_LOGGER.warning("CWL version {} is not recognized as a valid version.".format(cwl_version))
64+
_LOGGER.warning("CWL version is set up to {}.".format(DEF_VERSION))
6465
cwl_version = DEF_VERSION
6566
self.cwlVersion = cwl_version
6667
self.id = tool_id

cwlgen/elements.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
CWL_SHEBANG = "#!/usr/bin/env cwl-runner"
99
CWL_VERSIONS = ['draft-2', 'draft-3.dev1', 'draft-3.dev2', 'draft-3.dev3',
1010
'draft-3.dev4', 'draft-3.dev5', 'draft-3', 'draft-4.dev1',
11-
'draft-4.dev2', 'draft-4.dev3', 'v1.0.dev4', 'v1.0', None]
11+
'draft-4.dev2', 'draft-4.dev3', 'v1.0.dev4', 'v1.0']
1212
DEF_VERSION = 'v1.0'
1313
CWL_TYPE = ['null', 'boolean', 'int', 'long', 'float', 'double', 'string', 'File',
14-
'Directory', None]
14+
'Directory', 'stdout', None]
15+
DEF_TYPE = 'null'
1516

1617

1718
class Parameter(object):
@@ -40,8 +41,9 @@ def __init__(self, param_id, label=None, secondary_files=None, param_format=None
4041
:type param_type: STRING corresponding to CWLType
4142
'''
4243
if param_type not in CWL_TYPE:
43-
_LOGGER.warning("The type is incorrect for the parameter.")
44-
param_type = None
44+
_LOGGER.warning("The type {} is incorrect for the parameter.".format(param_type))
45+
_LOGGER.warning("type is set to {}.".format(DEF_TYPE))
46+
param_type = DEF_TYPE
4547
self.id = param_id
4648
self.label = label
4749
self.secondaryFiles = secondary_files

0 commit comments

Comments
 (0)