1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a3b4e0950ae6/
Changeset: a3b4e0950ae6
User: greg
Date: 2014-04-28 21:35:41
Summary: Make checking for for migrated tools when starting the Galaxy server a config setting that defaults to True. This setting should generally be False only for development Galaxy environments that are often set up from scratch (with new db, etc) and migrated tools are not needed in the Galaxy tool panel. In those cases where this setting is False, starting a fresh Galaxy instance (with no checking for migrated tools) will be much faster.
Affected #: 3 files
diff -r ef1ed48f60a5d6592d148ec55ff2f50dc3587035 -r a3b4e0950ae60007af2efcc257a78be6dbe7ca7a lib/galaxy/app.py
--- a/lib/galaxy/app.py
+++ b/lib/galaxy/app.py
@@ -40,7 +40,8 @@
# Setup the database engine and ORM
config_file = kwargs.get( 'global_conf', {} ).get( '__file__', None )
- self._configure_models( check_migrate_databases=True, check_migrate_tools=True, config_file=config_file )
+ check_migrate_tools = self.config.check_migrate_tools
+ self._configure_models( check_migrate_databases=True, check_migrate_tools=check_migrate_tools, config_file=config_file )
# Manage installed tool shed repositories.
from tool_shed.galaxy_install import installed_repository_manager
diff -r ef1ed48f60a5d6592d148ec55ff2f50dc3587035 -r a3b4e0950ae60007af2efcc257a78be6dbe7ca7a lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -4,8 +4,12 @@
# absolute_import needed for tool_shed package.
from __future__ import absolute_import
-import sys, os, tempfile, re
-import logging, logging.config
+import os
+import re
+import sys
+import tempfile
+import logging
+import logging.config
import ConfigParser
from datetime import timedelta
from galaxy.web.formatting import expand_pretty_datetime_format
@@ -23,11 +27,14 @@
path = os.path.join( root, path )
return path
+
class ConfigurationError( Exception ):
pass
+
class Configuration( object ):
deprecated_options = ( 'database_file', )
+
def __init__( self, **kwargs ):
self.config_dict = kwargs
self.root = kwargs.get( 'root_dir', '.' )
@@ -87,6 +94,9 @@
self.user_section_filters = listify( kwargs.get( "user_tool_section_filters", [] ), do_strip=True )
self.tool_configs = [ resolve_path( p, self.root ) for p in listify( tcf ) ]
+ # Check for tools defined in the above non-shed tool configs (i.e., tool_conf.xml) tht have
+ # been migrated from the Galaxy code distribution to the Tool Shed.
+ self.check_migrate_tools = string_as_bool( kwargs.get( 'check_migrate_tools', True ) )
self.shed_tool_data_path = kwargs.get( "shed_tool_data_path", None )
if self.shed_tool_data_path:
self.shed_tool_data_path = resolve_path( self.shed_tool_data_path, self.root )
@@ -397,13 +407,16 @@
return rval
except ConfigParser.NoSectionError:
return {}
+
def get( self, key, default ):
return self.config_dict.get( key, default )
+
def get_bool( self, key, default ):
if key in self.config_dict:
return string_as_bool( self.config_dict[key] )
else:
return default
+
def check( self ):
paths_to_check = [ self.root, self.tool_path, self.tool_data_path, self.template_path ]
# Check that required directories exist
@@ -488,7 +501,6 @@
rval[ key ] = value
return rval
-
def configure_logging( config ):
"""
Allow some basic logging configuration to be read from ini file.
diff -r ef1ed48f60a5d6592d148ec55ff2f50dc3587035 -r a3b4e0950ae60007af2efcc257a78be6dbe7ca7a universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -136,6 +136,13 @@
# Tools can be locally developed or installed from Galaxy tool sheds.
#tool_config_file = tool_conf.xml,shed_tool_conf.xml
+# Enable / disable checking if any tools defined in the above non-shed tool_config_files
+# (i.e., tool_conf.xml) have been migrated from the Galaxy code distribution to the Tool
+# Shed. This setting should generally be set to False only for development Galaxy environments
+# that are often rebuilt from scratch where migrated tools do not need to be available in the
+# Galaxy tool panel. If the following setting remains commented, the default setting will be True.
+#check_migrate_tools = True
+
# Default path to the directory containing the tools defined in tool_conf.xml.
# Other tool config files must include the tool_path as an attribute in the <toolbox> tag.
#tool_path = tools
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/8ed5006bfc1f/
Changeset: 8ed5006bfc1f
User: dan
Date: 2014-04-28 21:12:13
Summary: Allow specifying a specific python version when using setup_virtualenv.
Affected #: 1 file
diff -r a4a71a03ed7a11ccea7d889bd566fb003932647b -r 8ed5006bfc1f67350834291bc81ace94312ad070 lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -1133,8 +1133,9 @@
with open( requirements_path, "w" ) as f:
f.write( requirements )
venv_directory = os.path.join( install_dir, "venv" )
+ python_cmd = action_dict[ 'python' ]
# TODO: Consider making --no-site-packages optional.
- setup_command = "python %s/virtualenv.py --no-site-packages '%s'" % (venv_src_directory, venv_directory)
+ setup_command = "%s %s/virtualenv.py --no-site-packages '%s'" % ( python_cmd, venv_src_directory, venv_directory )
# POSIXLY_CORRECT forces shell commands . and source to have the same
# and well defined behavior in bash/zsh.
activate_command = "POSIXLY_CORRECT=1; . %s" % os.path.join( venv_directory, "bin", "activate" )
@@ -1183,6 +1184,7 @@
# lxml==2.3.0</action>
## Manually specify contents of requirements.txt file to create dynamically.
action_dict[ 'requirements' ] = td_common_util.evaluate_template( action_elem.text or 'requirements.txt', install_dir )
+ action_dict[ 'python' ] = action_elem.get( 'python', 'python' )
return action_dict
class ShellCommand( RecipeStep ):
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/a4a71a03ed7a/
Changeset: a4a71a03ed7a
User: dan
Date: 2014-04-28 21:06:55
Summary: Fix directory variable name in setup_virtualenv.
Affected #: 1 file
diff -r 8877489b446d73aaad93cbb1569866a9b824ac5a -r a4a71a03ed7a11ccea7d889bd566fb003932647b lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/recipe/step_handler.py
@@ -1124,7 +1124,7 @@
log.debug( 'Unable to install virtualenv' )
return tool_dependency, None, None
requirements = action_dict[ 'requirements' ]
- if os.path.exists( os.path.join( dir, requirements ) ):
+ if os.path.exists( os.path.join( install_dir, requirements ) ):
# requirements specified as path to a file
requirements_path = requirements
else:
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.