1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/502e3902ed9d/ changeset: 502e3902ed9d user: greg date: 2011-09-06 19:41:06 summary: Add new sample config to point to tools installed from a tool shed and add additional directories for checking/creating at startup. affected #: 3 files (681 bytes)
--- a/lib/galaxy/config.py Tue Sep 06 11:51:01 2011 -0400 +++ b/lib/galaxy/config.py Tue Sep 06 13:41:06 2011 -0400 @@ -5,7 +5,7 @@ import sys, os, tempfile import logging, logging.config import ConfigParser -from galaxy.util import string_as_bool, listify +from galaxy.util import string_as_bool, listify, parse_xml
from galaxy import eggs import pkg_resources @@ -172,10 +172,21 @@ else: return default def check( self ): + paths_to_check = [ self.root, self.tool_path, self.tool_data_path, self.template_path ] + # Look for any tool shed configs and retrieve the tool_path attribute from the <toolbox> tag. + for config_filename in self.tool_configs: + tree = parse_xml( config_filename ) + root = tree.getroot() + tool_path = root.get( 'tool_path' ) + if tool_path not in [ None, False ]: + paths_to_check.append( resolve_path( tool_path, self.root ) ) # Check that required directories exist - for path in self.root, self.tool_path, self.tool_data_path, self.template_path: - if not os.path.isdir( path ): - raise ConfigurationError("Directory does not exist: %s" % path ) + for path in paths_to_check: + if path not in [ None, False ] and not os.path.isdir( path ): + try: + os.makedirs( path ) + except Exception, e: + raise ConfigurationError( "Unable to create missing directory: %s\n%s" % ( path, e ) ) # Create the directories that it makes sense to create for path in self.file_path, \ self.new_file_path, \
--- a/run.sh Tue Sep 06 11:51:01 2011 -0400 +++ b/run.sh Tue Sep 06 13:41:06 2011 -0400 @@ -6,11 +6,13 @@ [ $? -ne 0 ] && exit 1
SAMPLES=" + datatypes_conf.xml.sample external_service_types_conf.xml.sample - datatypes_conf.xml.sample reports_wsgi.ini.sample + shed_tool_conf.xml.sample tool_conf.xml.sample tool_data_table_conf.xml.sample + tool_sheds_conf.xml.sample universe_wsgi.ini.sample tool-data/shared/ucsc/builds.txt.sample tool-data/*.sample
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.
galaxy-commits@lists.galaxyproject.org