diff ctd2galaxy.py @ 11:6dc768c94b79 draft

Uploaded
author holtgrewe
date Mon, 12 Aug 2013 10:42:35 -0400
parents 19597b57ada8
children
line wrap: on
line diff
--- a/ctd2galaxy.py	Mon Aug 12 10:31:58 2013 -0400
+++ b/ctd2galaxy.py	Mon Aug 12 10:42:35 2013 -0400
@@ -475,7 +475,7 @@
         if param_node.name.endswith('-file-ext'):
             return  # Skip if extension to override.
         args = {}
-        if param_node.tags and 'required' not in param_node.tags.split(','):
+        if not param_node.required:
             args['optional'] = 'true'  # false would be default
         if param_node.type_ == 'input-file':
             args['type'] = 'data'
@@ -542,7 +542,7 @@
             # The name of the variable that is used.
             var_name = '$' + ce.mapping_path.replace('-', '_').replace('.', '_')
             # Check whether it is optional.
-            optional = bool(ce.param_node.tags and 'required' not in ce.param_node.tags.split(','))
+            optional = not ce.param_node.required
             # Check whether it is a boolean.
             bool_param = False
             if ce.param_node.type_ == 'string' and ce.param_node.restrictions and \