1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/315997fa7d2f/
Changeset: 315997fa7d2f
User: jmchilton
Date: 2014-05-30 23:12:40
Summary: All tool_data_table paths must now be declared with field name
"path"...
... or they will not work correctly with the LWR. This is making explicit a convention
that was already followed by all devteam tools. If need arises for multiple paths in the
same data table or there is an important tool out there that does not label it's paths
as "path" let me know and we can try to implement some XML markup in the
tool_data_table.xml file to declare these fields as paths.
Use new assumption to cleanup what LWR considers unstructured paths (unstructured paths is
no longer even a good name for this concept unfortunately).
Affected #: 2 files
diff -r 638dcaad4b8dcabf236d732af6f451a92cdcf2bc -r
315997fa7d2f060a33d72950579b6b518aa4cfb0
lib/galaxy/jobs/runners/lwr_client/path_mapper.py
--- a/lib/galaxy/jobs/runners/lwr_client/path_mapper.py
+++ b/lib/galaxy/jobs/runners/lwr_client/path_mapper.py
@@ -53,9 +53,6 @@
return remote_path
def check_for_arbitrary_rewrite(self, local_path):
- if not os.path.exists(local_path):
- return None, []
-
path = str(local_path) # Use false_path if needed.
action = self.action_mapper.action(path, path_type.UNSTRUCTURED)
if not action.staging_needed:
diff -r 638dcaad4b8dcabf236d732af6f451a92cdcf2bc -r
315997fa7d2f060a33d72950579b6b518aa4cfb0 lib/galaxy/tools/wrappers.py
--- a/lib/galaxy/tools/wrappers.py
+++ b/lib/galaxy/tools/wrappers.py
@@ -5,6 +5,15 @@
from logging import getLogger
log = getLogger( __name__ )
+# Fields in .log files corresponding to paths, must have one of the following
+# field names and all such fields are assumed to be paths. This is to allow
+# remote ComputeEnvironments (such as one used by LWR) determine what values to
+# rewrite or transfer...
+PATH_ATTRIBUTES = [ "path" ]
+# ... by default though - don't rewrite anything (if no ComputeEnviornment
+# defined or ComputeEnvironment doesn't supply a rewriter).
+DEFAULT_PATH_REWRITER = lambda x: x
+
class ToolParameterValueWrapper( object ):
"""
@@ -88,9 +97,6 @@
return getattr( self.value, key )
-DEFAULT_PATH_REWRITER = lambda x: x
-
-
class SelectToolParameterWrapper( ToolParameterValueWrapper ):
"""
Wraps a SelectTooParameter so that __str__ returns the selected value, but all other
@@ -112,7 +118,11 @@
def __getattr__( self, name ):
if name not in self._fields:
self._fields[ name ] = self._input.options.get_field_by_name_for_value(
name, self._value, None, self._other_values )
- return self._input.separator.join( map( self._path_rewriter, map( str,
self._fields[ name ] ) ) )
+ values = map( str, self._fields[ name ] )
+ if name in PATH_ATTRIBUTES:
+ # If we infer this is a path, rewrite it if needed.
+ values = map( self._path_rewriter, values )
+ return self._input.separator.join( values )
def __init__( self, input, value, app, other_values={}, path_rewriter=None ):
self.input = input
@@ -123,7 +133,9 @@
self.fields = self.SelectToolParameterFieldWrapper( input, value, other_values,
self._path_rewriter )
def __str__( self ):
- return self.input.to_param_dict_string( self.value,
other_values=self._other_values, value_map=self._path_rewriter )
+ # Assuming value is never a path - otherwise would need to pass
+ # along following argument value_map=self._path_rewriter.
+ return self.input.to_param_dict_string( self.value,
other_values=self._other_values )
def __getattr__( self, key ):
return getattr( self.input, key )
Repository URL:
https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from
bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.