コード例 #1
0
 def callback(input, value, prefixed_name, prefixed_label):
     replacement = None
     if isinstance(input, DataToolParameter):
         if connections is None or prefixed_name in input_connections_by_name:
             if input.multiple:
                 replacement = [] if not connections else [
                     DummyDataset() for conn in connections
                 ]
             else:
                 replacement = DummyDataset()
     return replacement
コード例 #2
0
ファイル: modules.py プロジェクト: msGenDev/Yeps-EURAC
 def item_callback(trans, key, input, value, error, old_value, context):
     # Dummy value for Data parameters
     if isinstance(input, DataToolParameter):
         return DummyDataset(), None
     # Deal with build/runtime (does not apply to Data parameters)
     if key == make_buildtime_key:
         return input.get_initial_value(trans, context), None
     elif isinstance(old_value, RuntimeValue):
         return old_value, None
     elif key == make_runtime_key:
         return RuntimeValue(), None
     else:
         return value, error
コード例 #3
0
 def item_callback( trans, key, input, value, error, old_value, context ):
     # Dummy value for Data parameters
     if isinstance( input, DataToolParameter ):
         return DummyDataset(), None
     # Deal with build/runtime (does not apply to Data parameters)
     if key == make_buildtime_key:
         return input.get_initial_value( trans, context ), None
     elif isinstance( old_value, RuntimeValue ):
         return old_value, None
     elif key == make_runtime_key:
         return RuntimeValue(), None
     elif isinstance(value, basestring) and re.search("\$\{.+?\}", str(value)):
         # Workflow Parameter Replacement, so suppress error from going to the workflow level.
         return value, None
     else:
         return value, error
コード例 #4
0
 def callback( input, value, prefixed_name, prefixed_label ):
     if isinstance( input, DataToolParameter ):
         if connections is None or prefixed_name in input_connections_by_name:
             return DummyDataset()