1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/7e820c43d641/
Changeset: 7e820c43d641
User: Dave Bouvier
Date: 2013-05-24 17:26:19
Summary: Enhance the install and test framework to support testing a single changeset revision of a repository. This defaults to testing all repositories and changeset revisions determined to be installable and testable.
Affected #: 1 file
diff -r cf574a68a1f95524b9412e0944ee2cd705a63ce5 -r 7e820c43d641d784d73526637e3d55ede5f8327e test/install_and_test_tool_shed_repositories/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/functional_tests.py
@@ -145,7 +145,15 @@
else:
galaxy_encode_secret = os.environ[ 'GALAXY_INSTALL_TEST_SECRET' ]
-
+testing_single_repository = {}
+if 'repository_name' in os.environ and 'repository_owner' in os.environ:
+ testing_single_repository[ 'name' ] = os.environ[ 'repository_name' ]
+ testing_single_repository[ 'owner' ] = os.environ[ 'repository_owner' ]
+ if 'repository_revision' in os.environ:
+ testing_single_repository[ 'changeset_revision' ] = os.environ[ 'repository_revision' ]
+ else:
+ testing_single_repository[ 'changeset_revision' ] = None
+
class ReportResults( Plugin ):
'''Simple Nose plugin to record the IDs of all tests run, regardless of success.'''
name = "reportresults"
@@ -308,6 +316,19 @@
skipped_previous = ' and metadata revisions that are not the most recent'
else:
skipped_previous = ''
+ if testing_single_repository:
+ log.info( 'Testing single repository with name %s and owner %s.',
+ testing_single_repository[ 'name' ],
+ testing_single_repository[ 'owner' ])
+ for repository_to_install in detailed_repository_list:
+ if repository_to_install[ 'name' ] == testing_single_repository[ 'name' ] \
+ and repository_to_install[ 'owner' ] == testing_single_repository[ 'owner' ]:
+ if testing_single_repository[ 'changeset_revision' ] is None:
+ return [ repository_to_install ]
+ else:
+ if testing_single_repository[ 'changeset_revision' ] == repository_to_install[ 'changeset_revision' ]:
+ return [ repository_to_install ]
+ return []
log.info( 'After removing deleted repositories%s from the list, %d remain to be tested.', skipped_previous, repositories_tested )
return detailed_repository_list
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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/08b05ff1c7cf/
Changeset: 08b05ff1c7cf
Branch: next-stable
User: Dave Bouvier
Date: 2013-05-23 21:49:46
Summary: Fix of environment variables being set in set_environment_for_install, but not being propagated to set_environment actions.
Affected #: 1 file
diff -r 5ee2362aff09f103891075c218f7474a662e569b -r 08b05ff1c7cfaad179d25970df0b740da282550e lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -22,6 +22,7 @@
log = logging.getLogger( __name__ )
+CMD_SEPARATOR = '__CMD_SEP__'
INSTALLATION_LOG = 'INSTALLATION.log'
VIRTUALENV_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz'
@@ -49,6 +50,29 @@
return output
return output.return_code
+def handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, set_prior_environment_commands ):
+ env_var_value = env_var_dict[ 'value' ]
+ if '$ENV[' in env_var_value and ']' in env_var_value:
+ # Pull out the name of the environment variable to populate.
+ inherited_env_var_name = env_var_value.split( '[' )[1].split( ']' )[0]
+ to_replace = '$ENV[%s]' % inherited_env_var_name
+ # Build a command line that outputs CMD_SEPARATOR + environment variable value + CMD_SEPARATOR.
+ set_prior_environment_commands.extend( [ "echo '%s'" % CMD_SEPARATOR, 'echo $%s' % inherited_env_var_name, "echo '%s'" % CMD_SEPARATOR ] )
+ command = ' ; '.join( set_prior_environment_commands )
+ # Run the command and capture the output.
+ command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True )
+ # And extract anything between the two instances of CMD_SEPARATOR.
+ environment_variable_value = command_return.split( CMD_SEPARATOR )[1].split( CMD_SEPARATOR )[0].strip( '\n' )
+ if environment_variable_value:
+ log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, environment_variable_value )
+ env_var_value = env_var_value.replace( to_replace, environment_variable_value )
+ else:
+ # If the return is empty, replace the original $ENV[] with nothing, to avoid any shell misparsings later on.
+ log.error( 'Environment variable %s not found, removing from set_environment.', inherited_env_var_name )
+ env_var_value = env_var_value.replace( to_replace, '$%s' % inherited_env_var_name )
+ env_var_dict[ 'value' ] = env_var_value
+ return env_var_dict
+
def install_virtualenv( app, venv_dir ):
if not os.path.exists( venv_dir ):
with make_tmp_dir() as work_dir:
@@ -149,10 +173,18 @@
destination_dir=os.path.join( action_dict[ 'destination' ] ) )
elif action_type == 'set_environment':
# Currently the only action supported in this category is "environment_variable".
+ # Build a command line from the prior_installation_required, in case an environment variable is referenced
+ # in the set_environment action.
+ cmds = []
+ for env_shell_file_path in env_shell_file_paths:
+ for i, env_setting in enumerate( open( env_shell_file_path ) ):
+ cmds.append( env_setting.strip( '\n' ) )
env_var_dicts = action_dict[ 'environment_variable' ]
for env_var_dict in env_var_dicts:
- cmd = common_util.create_or_update_env_shell_file( install_dir, env_var_dict )
- return_code = handle_command( app, tool_dependency, install_dir, cmd )
+ # Check for the presence of the $ENV[] key string and populate it if possible.
+ env_var_dict = handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, cmds )
+ env_command = common_util.create_or_update_env_shell_file( install_dir, env_var_dict )
+ return_code = handle_command( app, tool_dependency, install_dir, env_command )
if return_code:
return
elif action_type == 'set_environment_for_install':
https://bitbucket.org/galaxy/galaxy-central/commits/cf574a68a1f9/
Changeset: cf574a68a1f9
User: Dave Bouvier
Date: 2013-05-23 21:50:34
Summary: Merged in next-stable.
Affected #: 1 file
diff -r 681e2c7658482d6148fad734c5080c164efae8b7 -r cf574a68a1f95524b9412e0944ee2cd705a63ce5 lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -22,6 +22,7 @@
log = logging.getLogger( __name__ )
+CMD_SEPARATOR = '__CMD_SEP__'
INSTALLATION_LOG = 'INSTALLATION.log'
VIRTUALENV_URL = 'https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz'
@@ -49,6 +50,29 @@
return output
return output.return_code
+def handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, set_prior_environment_commands ):
+ env_var_value = env_var_dict[ 'value' ]
+ if '$ENV[' in env_var_value and ']' in env_var_value:
+ # Pull out the name of the environment variable to populate.
+ inherited_env_var_name = env_var_value.split( '[' )[1].split( ']' )[0]
+ to_replace = '$ENV[%s]' % inherited_env_var_name
+ # Build a command line that outputs CMD_SEPARATOR + environment variable value + CMD_SEPARATOR.
+ set_prior_environment_commands.extend( [ "echo '%s'" % CMD_SEPARATOR, 'echo $%s' % inherited_env_var_name, "echo '%s'" % CMD_SEPARATOR ] )
+ command = ' ; '.join( set_prior_environment_commands )
+ # Run the command and capture the output.
+ command_return = handle_command( app, tool_dependency, install_dir, command, return_output=True )
+ # And extract anything between the two instances of CMD_SEPARATOR.
+ environment_variable_value = command_return.split( CMD_SEPARATOR )[1].split( CMD_SEPARATOR )[0].strip( '\n' )
+ if environment_variable_value:
+ log.info( 'Replacing %s with %s in env.sh for this repository.', to_replace, environment_variable_value )
+ env_var_value = env_var_value.replace( to_replace, environment_variable_value )
+ else:
+ # If the return is empty, replace the original $ENV[] with nothing, to avoid any shell misparsings later on.
+ log.error( 'Environment variable %s not found, removing from set_environment.', inherited_env_var_name )
+ env_var_value = env_var_value.replace( to_replace, '$%s' % inherited_env_var_name )
+ env_var_dict[ 'value' ] = env_var_value
+ return env_var_dict
+
def install_virtualenv( app, venv_dir ):
if not os.path.exists( venv_dir ):
with make_tmp_dir() as work_dir:
@@ -149,10 +173,18 @@
destination_dir=os.path.join( action_dict[ 'destination' ] ) )
elif action_type == 'set_environment':
# Currently the only action supported in this category is "environment_variable".
+ # Build a command line from the prior_installation_required, in case an environment variable is referenced
+ # in the set_environment action.
+ cmds = []
+ for env_shell_file_path in env_shell_file_paths:
+ for i, env_setting in enumerate( open( env_shell_file_path ) ):
+ cmds.append( env_setting.strip( '\n' ) )
env_var_dicts = action_dict[ 'environment_variable' ]
for env_var_dict in env_var_dicts:
- cmd = common_util.create_or_update_env_shell_file( install_dir, env_var_dict )
- return_code = handle_command( app, tool_dependency, install_dir, cmd )
+ # Check for the presence of the $ENV[] key string and populate it if possible.
+ env_var_dict = handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, cmds )
+ env_command = common_util.create_or_update_env_shell_file( install_dir, env_var_dict )
+ return_code = handle_command( app, tool_dependency, install_dir, env_command )
if return_code:
return
elif action_type == 'set_environment_for_install':
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.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/966fbc93c483/
Changeset: 966fbc93c483
Branch: next-stable
User: dan
Date: 2013-05-23 17:11:37
Summary: Fix for TabularToolDataTable.get_column_name_list() when value column is overloaded by e.g. name.
Affected #: 1 file
diff -r 064ea784eae74cdb7b4ac0319ec0aa13ee55fcbd -r 966fbc93c483970092b677f17886e86060941093 lib/galaxy/tools/data/__init__.py
--- a/lib/galaxy/tools/data/__init__.py
+++ b/lib/galaxy/tools/data/__init__.py
@@ -297,9 +297,12 @@
found_column = False
for name, index in self.columns.iteritems():
if index == i:
- rval.append( name )
+ if not found_column:
+ rval.append( name )
+ elif name == 'value':
+ #the column named 'value' always has priority over other named columns
+ rval[ -1 ] = name
found_column = True
- break
if not found_column:
rval.append( None )
return rval
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.