1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7d021b926344/
changeset: 7d021b926344
user: natefoo
date: 2012-03-16 16:16:49
summary: Change the hardcoding of UCSC servers to a config file option, and remove the dependence on ucsc_display_sites, so any display server can be allowed. If you've modified your remoteuser.py, beware the merge.
affected #: 3 files
diff -r 143abc931cdb507bd1948b80c4078ce51e9e6386 -r 7d021b926344dc5b2766c6c634c5d7c54f2098e7 lib/galaxy/web/buildapp.py
--- a/lib/galaxy/web/buildapp.py
+++ b/lib/galaxy/web/buildapp.py
@@ -183,9 +183,9 @@
# upstream server
if asbool(conf.get( 'use_remote_user', False )):
from galaxy.web.framework.middleware.remoteuser import RemoteUser
- app = RemoteUser( app, maildomain=conf.get( 'remote_user_maildomain', None ),
- ucsc_display_sites=conf.get( 'ucsc_display_sites', [] ),
- admin_users=conf.get( 'admin_users', '' ).split( ',' ) )
+ app = RemoteUser( app, maildomain = conf.get( 'remote_user_maildomain', None ),
+ display_servers = util.listify( conf.get( 'display_servers', '' ) ),
+ admin_users = conf.get( 'admin_users', '' ).split( ',' ) )
log.debug( "Enabling 'remote user' middleware" )
# The recursive middleware allows for including requests in other
# requests or forwarding of requests, all on the server side.
diff -r 143abc931cdb507bd1948b80c4078ce51e9e6386 -r 7d021b926344dc5b2766c6c634c5d7c54f2098e7 lib/galaxy/web/framework/middleware/remoteuser.py
--- a/lib/galaxy/web/framework/middleware/remoteuser.py
+++ b/lib/galaxy/web/framework/middleware/remoteuser.py
@@ -35,42 +35,22 @@
</html>
"""
-UCSC_MAIN_SERVERS = (
- 'hgw1.cse.ucsc.edu',
- 'hgw2.cse.ucsc.edu',
- 'hgw3.cse.ucsc.edu',
- 'hgw4.cse.ucsc.edu',
- 'hgw5.cse.ucsc.edu',
- 'hgw6.cse.ucsc.edu',
- 'hgw7.cse.ucsc.edu',
- 'hgw8.cse.ucsc.edu',
-)
-UCSC_ARCHAEA_SERVERS = (
- 'lowepub.cse.ucsc.edu',
-)
-
class RemoteUser( object ):
- def __init__( self, app, maildomain=None, ucsc_display_sites=[], admin_users=[] ):
+ def __init__( self, app, maildomain=None, display_servers=None, admin_users=None ):
self.app = app
self.maildomain = maildomain
- self.allow_ucsc_main = False
- self.allow_ucsc_archaea = False
- self.admin_users = admin_users
- if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites:
- self.allow_ucsc_main = True
- if 'archaea' in ucsc_display_sites:
- self.allow_ucsc_archaea = True
+ self.display_servers = display_servers or []
+ self.admin_users = admin_users or []
def __call__( self, environ, start_response ):
- # Allow through UCSC if the UCSC display links are enabled
- if ( self.allow_ucsc_main or self.allow_ucsc_archaea ) and environ.has_key( 'REMOTE_ADDR' ):
+ # Allow display servers
+ if self.display_servers and environ.has_key( 'REMOTE_ADDR' ):
try:
host = socket.gethostbyaddr( environ[ 'REMOTE_ADDR' ] )[0]
except( socket.error, socket.herror, socket.gaierror, socket.timeout ):
# in the event of a lookup failure, deny access
host = None
- if ( self.allow_ucsc_main and host in UCSC_MAIN_SERVERS ) or \
- ( self.allow_ucsc_archaea and host in UCSC_ARCHAEA_SERVERS ):
- environ[ 'HTTP_REMOTE_USER' ] = 'ucsc_browser_display(a)example.org'
+ if host in self.display_servers:
+ environ[ 'HTTP_REMOTE_USER' ] = 'remote_display_server@%s' % ( self.maildomain or 'example.org' )
return self.app( environ, start_response )
# Apache sets REMOTE_USER to the string '(null)' when using the
# Rewrite* method for passing REMOTE_USER and a user is
diff -r 143abc931cdb507bd1948b80c4078ce51e9e6386 -r 7d021b926344dc5b2766c6c634c5d7c54f2098e7 universe_wsgi.ini.sample
--- a/universe_wsgi.ini.sample
+++ b/universe_wsgi.ini.sample
@@ -210,6 +210,20 @@
# GeneTrack servers: tool-data/shared/genetrack/genetrack_sites.txt
#genetrack_display_sites = main,test
+# If use_remote_user = True, display application servers will be denied access
+# to Galaxy and so displaying datasets in these sites will fail.
+# display_servers contains a list of hostnames which should be allowed to
+# bypass security to display datasets. Please be aware that there are security
+# implications if this is allowed. More details (including required changes to
+# the proxy server config) are available in the Apache proxy documentation on
+# the wiki.
+#
+# The list of servers in this sample config are for the UCSC Main, Test and
+# Archaea browsers, but the default if left commented is to not allow any
+# display sites to bypass security (you must uncomment the line below to allow
+# them).
+#display_servers = hgw1.cse.ucsc.edu,hgw2.cse.ucsc.edu,hgw3.cse.ucsc.edu,hgw4.cse.ucsc.edu,hgw…
+
# -- Next gen LIMS interface on top of existing Galaxy Sample/Request management code.
use_nglims = False
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/changeset/143abc931cdb/
changeset: 143abc931cdb
user: greg
date: 2012-03-15 19:12:59
summary: More fixes for handling mor ethan one non-shed tool anel config when installing tools migrated from the distrobution to the tool shed.
affected #: 4 files
diff -r d332e63b5367ed035dcaf6ee3aafed566200b617 -r 143abc931cdb507bd1948b80c4078ce51e9e6386 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -18,8 +18,7 @@
self.app = app
self.toolbox = self.app.toolbox
self.migrated_tools_config = migrated_tools_config
- # Get the local non-shed related tool panel config (the default name is tool_conf.xml). If the user has more than 1
- # non-shed tool panel config it could cause problems.
+ # Get the local non-shed related tool panel configs (there can be more than one, and the default name is tool_conf.xml).
self.proprietary_tool_confs = self.non_shed_tool_panel_configs
self.proprietary_tool_panel_elems = self.get_proprietary_tool_panel_elems( latest_migration_script_number )
# Set the location where the repositories will be installed by retrieving the tool_path setting from migrated_tools_config.
diff -r d332e63b5367ed035dcaf6ee3aafed566200b617 -r 143abc931cdb507bd1948b80c4078ce51e9e6386 lib/galaxy/tool_shed/migrate/check.py
--- a/lib/galaxy/tool_shed/migrate/check.py
+++ b/lib/galaxy/tool_shed/migrate/check.py
@@ -46,11 +46,11 @@
# New installations will not be missing tools, so we don't need to worry about them.
missing_tool_configs = []
else:
- tool_panel_config = get_non_shed_tool_panel_config( app )
- if tool_panel_config is None:
+ tool_panel_configs = get_non_shed_tool_panel_configs( app )
+ if tool_panel_configs:
+ missing_tool_configs = check_for_missing_tools( tool_panel_configs, latest_tool_migration_script_number )
+ else:
missing_tool_configs = []
- else:
- missing_tool_configs = check_for_missing_tools( tool_panel_config, latest_tool_migration_script_number )
config_arg = ''
if os.path.abspath( os.path.join( os.getcwd(), 'universe_wsgi.ini' ) ) != galaxy_config_file:
config_arg = ' -c %s' % galaxy_config_file.replace( os.path.abspath( os.getcwd() ), '.' )
@@ -62,13 +62,19 @@
if return_code != 0:
raise Exception( "Error attempting to update the value of migrate_tools.version: %s" % output )
elif missing_tool_configs:
+ if len( tool_panel_configs ) == 1:
+ plural = ''
+ tool_panel_config_file_names = tool_panel_configs[ 0 ]
+ else:
+ plural = 's'
+ tool_panel_config_file_names = ', '.join( tool_panel_configs )
msg = "\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
msg += "\n\nThe list of files at the end of this message refers to tools that are configured to load into the tool panel for\n"
msg += "this Galaxy instance, but have been removed from the Galaxy distribution. These tools can be automatically installed\n"
msg += "from the Galaxy tool shed at http://toolshed.g2.bx.psu.edu.\n\n"
msg += "To skip this process, attempt to start your Galaxy server again (e.g., sh run.sh or whatever you use). If you do this,\n"
msg += "be aware that these tools will no longer be available in your Galaxy tool panel, and entries for each of them should\n"
- msg += "be removed from your file named %s.\n\n" % tool_panel_config
+ msg += "be removed from your file%s named %s.\n\n" % ( plural, tool_panel_config_file_names )
msg += "CRITICAL NOTE IF YOU PLAN TO INSTALL\n"
msg += "The location in which the tool repositories will be installed is the value of the 'tool_path' attribute in the <tool>\n"
msg += 'tag of the file named ./migrated_tool_conf.xml (i.e., <toolbox tool_path="../shed_tools">). The default location\n'
@@ -84,7 +90,7 @@
msg += "After the installation process finishes, you can start your Galaxy server. As part of this installation process,\n"
msg += "entries for each of the following tool config files will be added to the file named ./migrated_tool_conf.xml, so these\n"
msg += "tools will continue to be loaded into your tool panel. Because of this, existing entries for these files should be\n"
- msg += "removed from your file named %s, but only after the installation process finishes.\n\n" % tool_panel_config
+ msg += "removed from your file%s named %s, but only after the installation process finishes.\n\n" % ( plural, tool_panel_config_file_names )
for i, missing_tool_config in enumerate( missing_tool_configs ):
msg += "%s\n" % missing_tool_config
# Should we do the following?
diff -r d332e63b5367ed035dcaf6ee3aafed566200b617 -r 143abc931cdb507bd1948b80c4078ce51e9e6386 lib/galaxy/tool_shed/migrate/common.py
--- a/lib/galaxy/tool_shed/migrate/common.py
+++ b/lib/galaxy/tool_shed/migrate/common.py
@@ -39,8 +39,9 @@
if name in migrated_tool_configs:
missing_tool_configs.append( name )
return missing_tool_configs
-def get_non_shed_tool_panel_config( app ):
- # Get the non-shed related tool panel config value from the Galaxy config - the default is tool_conf.xml.
+def get_non_shed_tool_panel_configs( app ):
+ # Get the non-shed related tool panel configs - there can be more than one, and the default is tool_conf.xml.
+ config_filenames = []
for config_filename in app.config.tool_configs:
# Any config file that includes a tool_path attribute in the root tag set like the following is shed-related.
# <toolbox tool_path="../shed_tools">
@@ -48,9 +49,8 @@
root = tree.getroot()
tool_path = root.get( 'tool_path', None )
if tool_path is None:
- # There will be a problem here if the user has defined 2 non-shed related configs.
- return config_filename
- return None
+ config_filenames.append( config_filename )
+ return config_filenames
class MigrateToolsApplication( object ):
"""Encapsulates the state of a basic Galaxy Universe application in order to initiate the Install Manager"""
def __init__( self, tools_migration_config ):
diff -r d332e63b5367ed035dcaf6ee3aafed566200b617 -r 143abc931cdb507bd1948b80c4078ce51e9e6386 scripts/migrate_tools/migrate_tools.py
--- a/scripts/migrate_tools/migrate_tools.py
+++ b/scripts/migrate_tools/migrate_tools.py
@@ -20,12 +20,14 @@
app = MigrateToolsApplication( sys.argv[ 1 ] )
non_shed_tool_confs = app.install_manager.proprietary_tool_confs
-msg = "\nThe installation process is finished. You should now remove entries for the installed tools from "
if len( non_shed_tool_confs ) == 1:
- msg += "your file named %s and start your Galaxy server." % non_shed_tool_conf
+ plural = ''
+ file_names = non_shed_tool_confs[ 0 ]
else:
+ plural = 's'
file_names = ', '.join( non_shed_tool_confs )
- msg += "your files named %s, and start your Galaxy server." % file_names
+msg = "\nThe installation process is finished. You should now remove entries for the installed tools from your file%s named\n" % plural
+msg += "%s and start your Galaxy server.\n" % file_names
print msg
app.shutdown()
sys.exit( 0 )
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/changeset/d332e63b5367/
changeset: d332e63b5367
user: jgoecks
date: 2012-03-15 18:28:47
summary: Ensure reference track does not scroll.
affected #: 1 file
diff -r 3b9be709d138197d8076f1d5790187c124e98955 -r d332e63b5367ed035dcaf6ee3aafed566200b617 static/scripts/trackster.js
--- a/static/scripts/trackster.js
+++ b/static/scripts/trackster.js
@@ -4238,7 +4238,7 @@
});
var ReferenceTrack = function (view) {
- TiledTrack.call(this, "reference", view, { content_div: view.top_labeltrack, resize: false }, {});
+ TiledTrack.call(this, view, { content_div: view.top_labeltrack, resize: false }, {});
view.reference_track = this;
this.left_offset = 200;
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/changeset/3b9be709d138/
changeset: 3b9be709d138
user: greg
date: 2012-03-15 16:47:46
summary: Use an odict instead of a dict when acquuiring elements for generating entries for the migrated_tools_conf.xml from the InstallManager, and handle multiple proprietary non-shed tool panel configs with the InstallManger.
affected #: 3 files
diff -r aafbc71077ec50054c0617bac3bf20443750885b -r 3b9be709d138197d8076f1d5790187c124e98955 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -6,6 +6,7 @@
from galaxy.tools import ToolSection
from galaxy.util.json import from_json_string, to_json_string
from galaxy.util.shed_util import *
+from galaxy.util.odict import odict
log = logging.getLogger( __name__ )
class InstallManager( object ):
@@ -19,7 +20,7 @@
self.migrated_tools_config = migrated_tools_config
# Get the local non-shed related tool panel config (the default name is tool_conf.xml). If the user has more than 1
# non-shed tool panel config it could cause problems.
- self.proprietary_tool_conf = self.non_shed_tool_panel_config
+ self.proprietary_tool_confs = self.non_shed_tool_panel_configs
self.proprietary_tool_panel_elems = self.get_proprietary_tool_panel_elems( latest_migration_script_number )
# Set the location where the repositories will be installed by retrieving the tool_path setting from migrated_tools_config.
tree = util.parse_xml( migrated_tools_config )
@@ -50,10 +51,11 @@
tool = self.toolbox.load_tool( full_path )
return generate_tool_guid( repository_clone_url, tool )
def get_proprietary_tool_panel_elems( self, latest_tool_migration_script_number ):
- # Parse self.proprietary_tool_conf (the default is tool_conf.xml) and generate a list of Elements that are either ToolSection elements
- # or Tool elements. These will be used to generate new entries in the migrated_tools_conf.xml file for the installed tools.
+ # Parse each config in self.proprietary_tool_confs (the default is tool_conf.xml) and generate a list of Elements that are
+ # either ToolSection elements or Tool elements. These will be used to generate new entries in the migrated_tools_conf.xml
+ # file for the installed tools.
tools_xml_file_path = os.path.abspath( os.path.join( 'scripts', 'migrate_tools', '%04d_tools.xml' % latest_tool_migration_script_number ) )
- # Parse the XML and load the file attributes for later checking against self.proprietary_tool_conf.
+ # Parse the XML and load the file attributes for later checking against the integrated elements from self.proprietary_tool_confs.
migrated_tool_configs = []
tree = util.parse_xml( tools_xml_file_path )
root = tree.getroot()
@@ -61,30 +63,31 @@
if elem.tag == 'repository':
for tool_elem in elem:
migrated_tool_configs.append( tool_elem.get( 'file' ) )
- # Parse self.proprietary_tool_conf and generate the list of tool panel Elements that contain them.
+ # Parse each file in self.proprietary_tool_confs and generate the integrated list of tool panel Elements that contain them.
tool_panel_elems = []
- tree = util.parse_xml( self.proprietary_tool_conf )
- root = tree.getroot()
- for elem in root:
- if elem.tag == 'tool':
- # Tools outside of sections.
- file_path = elem.get( 'file', None )
- if file_path:
- path, name = os.path.split( file_path )
- if name in migrated_tool_configs:
- if elem not in tool_panel_elems:
- tool_panel_elems.append( elem )
- elif elem.tag == 'section':
- # Tools contained in a section.
- for section_elem in elem:
- if section_elem.tag == 'tool':
- file_path = section_elem.get( 'file', None )
- if file_path:
- path, name = os.path.split( file_path )
- if name in migrated_tool_configs:
- # Append the section, not the tool.
- if elem not in tool_panel_elems:
- tool_panel_elems.append( elem )
+ for proprietary_tool_conf in self.proprietary_tool_confs:
+ tree = util.parse_xml( proprietary_tool_conf )
+ root = tree.getroot()
+ for elem in root:
+ if elem.tag == 'tool':
+ # Tools outside of sections.
+ file_path = elem.get( 'file', None )
+ if file_path:
+ path, name = os.path.split( file_path )
+ if name in migrated_tool_configs:
+ if elem not in tool_panel_elems:
+ tool_panel_elems.append( elem )
+ elif elem.tag == 'section':
+ # Tools contained in a section.
+ for section_elem in elem:
+ if section_elem.tag == 'tool':
+ file_path = section_elem.get( 'file', None )
+ if file_path:
+ path, name = os.path.split( file_path )
+ if name in migrated_tool_configs:
+ # Append the section, not the tool.
+ if elem not in tool_panel_elems:
+ tool_panel_elems.append( elem )
return tool_panel_elems
def get_containing_tool_sections( self, tool_config ):
"""
@@ -122,7 +125,7 @@
# updated to the desired changeset_revision before metadata is set because the process for setting metadata uses the repository files on disk.
# The values for the keys in each of the following dictionaries will be a list to allow for the same tool to be displayed in multiple places
# in the tool panel.
- tool_panel_dict_for_display = {}
+ tool_panel_dict_for_display = odict()
for tool_elem in repository_elem:
# The tool_elem looks something like this: <tool id="EMBOSS: antigenic1" version="5.0.0" file="emboss_antigenic.xml" />
tool_config = tool_elem.get( 'file' )
@@ -264,8 +267,9 @@
print "Error cloning repository '", name, "': ", str( tmp_stderr.read() )
tmp_stderr.close()
@property
- def non_shed_tool_panel_config( self ):
- # Get the non-shed related tool panel config value from the Galaxy config - the default is tool_conf.xml.
+ def non_shed_tool_panel_configs( self ):
+ # Get the non-shed related tool panel config file names from the Galaxy config - the default is tool_conf.xml.
+ config_filenames = []
for config_filename in self.app.config.tool_configs:
# Any config file that includes a tool_path attribute in the root tag set like the following is shed-related.
# <toolbox tool_path="../shed_tools">
@@ -274,8 +278,8 @@
tool_path = root.get( 'tool_path', None )
if tool_path is None:
# There will be a problem here if the user has defined 2 non-shed related configs.
- return config_filename
- return None
+ config_filenames.append( config_filename )
+ return config_filenames
def __get_url_from_tool_shed( self, tool_shed ):
# The value of tool_shed is something like: toolshed.g2.bx.psu.edu
# We need the URL to this tool shed, which is something like:
diff -r aafbc71077ec50054c0617bac3bf20443750885b -r 3b9be709d138197d8076f1d5790187c124e98955 lib/galaxy/tool_shed/migrate/common.py
--- a/lib/galaxy/tool_shed/migrate/common.py
+++ b/lib/galaxy/tool_shed/migrate/common.py
@@ -70,6 +70,7 @@
self.config = galaxy.config.Configuration( **galaxy_config_dict )
if self.config.database_connection is None:
self.config.database_connection = "sqlite:///%s?isolation_level=IMMEDIATE" % self.config.database
+ self.config.update_integrated_tool_panel = True
self.object_store = build_object_store_from_config( self.config )
# Setup the database engine and ORM
self.model = galaxy.model.mapping.init( self.config.file_path,
diff -r aafbc71077ec50054c0617bac3bf20443750885b -r 3b9be709d138197d8076f1d5790187c124e98955 scripts/migrate_tools/migrate_tools.py
--- a/scripts/migrate_tools/migrate_tools.py
+++ b/scripts/migrate_tools/migrate_tools.py
@@ -19,8 +19,13 @@
from galaxy.tool_shed.migrate.common import *
app = MigrateToolsApplication( sys.argv[ 1 ] )
-non_shed_tool_conf = app.install_manager.proprietary_tool_conf
-print "\nThe installation process is finished. You should now remove entries for the installed tools from"
-print "your file named %s and start your Galaxy server." % non_shed_tool_conf
+non_shed_tool_confs = app.install_manager.proprietary_tool_confs
+msg = "\nThe installation process is finished. You should now remove entries for the installed tools from "
+if len( non_shed_tool_confs ) == 1:
+ msg += "your file named %s and start your Galaxy server." % non_shed_tool_conf
+else:
+ file_names = ', '.join( non_shed_tool_confs )
+ msg += "your files named %s, and start your Galaxy server." % file_names
+print msg
app.shutdown()
sys.exit( 0 )
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/changeset/aafbc71077ec/
changeset: aafbc71077ec
user: greg
date: 2012-03-14 22:21:03
summary: Update the integrated_toon_conf.xml file only if a new config setting is True. This keeps things that start up the app (like functional tests) from updating the file.
affected #: 4 files
diff -r 3b1f0bb99b43924b869cfc0df626738f18d968fc -r aafbc71077ec50054c0617bac3bf20443750885b lib/galaxy/config.py
--- a/lib/galaxy/config.py
+++ b/lib/galaxy/config.py
@@ -70,6 +70,7 @@
self.hours_between_check = 12
except:
self.hours_between_check = 12
+ self.update_integrated_tool_panel = kwargs.get( "update_integrated_tool_panel", True )
self.tool_secret = kwargs.get( "tool_secret", "" )
self.id_secret = kwargs.get( "id_secret", "USING THE DEFAULT IS NOT SECURE!" )
self.set_metadata_externally = string_as_bool( kwargs.get( "set_metadata_externally", "False" ) )
diff -r 3b1f0bb99b43924b869cfc0df626738f18d968fc -r aafbc71077ec50054c0617bac3bf20443750885b lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -75,10 +75,12 @@
if self.integrated_tool_panel_config_has_contents:
# Load self.tool_panel based on the order in self.integrated_tool_panel.
self.load_tool_panel()
- # Always write the current in-memory integrated_tool_panel to the integrated_tool_panel.xml file.
- # This will cover cases where the Galaxy administrator manually edited one or more of the tool panel
- # config files, adding or removing locally developed tools or workflows.
- self.write_integrated_tool_panel_config_file()
+ if app.config.update_integrated_tool_panel:
+ # Write the current in-memory integrated_tool_panel to the integrated_tool_panel.xml file.
+ # This will cover cases where the Galaxy administrator manually edited one or more of the tool panel
+ # config files, adding or removing locally developed tools or workflows. The value of integrated_tool_panel
+ # will be False when things like functional tests are the caller.
+ self.write_integrated_tool_panel_config_file()
def init_tools( self, config_filename ):
"""
Read the configuration file and load each tool. The following tags are currently supported:
diff -r 3b1f0bb99b43924b869cfc0df626738f18d968fc -r aafbc71077ec50054c0617bac3bf20443750885b lib/galaxy/webapps/community/controllers/admin.py
--- a/lib/galaxy/webapps/community/controllers/admin.py
+++ b/lib/galaxy/webapps/community/controllers/admin.py
@@ -430,7 +430,6 @@
return trans.response.send_redirect( web.url_for( controller='repository',
action='browse_repositories',
**kwd ) )
- # Render the list view
return self.repository_metadata_list_grid( trans, **kwd )
@web.expose
@web.require_admin
@@ -504,7 +503,7 @@
else:
del kwd[ 'operation' ]
elif operation == 'delete':
- return self.mark_repository_deleted( trans, **kwd )
+ return self.delete_repository( trans, **kwd )
elif operation == "undelete":
return self.undelete_repository( trans, **kwd )
# The changeset_revision_select_field in the RepositoryListGrid performs a refresh_on_change
@@ -528,12 +527,13 @@
return self.repository_list_grid( trans, **kwd )
@web.expose
@web.require_admin
- def mark_repository_deleted( self, trans, **kwd ):
+ def delete_repository( self, trans, **kwd ):
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
status = params.get( 'status', 'done' )
id = kwd.get( 'id', None )
if id:
+ # Deleting multiple items is currently not allowed (allow_multiple=False), so there will only be 1 id.
ids = util.listify( id )
count = 0
deleted_repositories = ""
@@ -564,6 +564,7 @@
status = params.get( 'status', 'done' )
id = kwd.get( 'id', None )
if id:
+ # Undeleting multiple items is currently not allowed (allow_multiple=False), so there will only be 1 id.
ids = util.listify( id )
count = 0
undeleted_repositories = ""
diff -r 3b1f0bb99b43924b869cfc0df626738f18d968fc -r aafbc71077ec50054c0617bac3bf20443750885b scripts/functional_tests.py
--- a/scripts/functional_tests.py
+++ b/scripts/functional_tests.py
@@ -167,6 +167,7 @@
file_path = file_path,
new_file_path = new_file_path,
tool_path = tool_path,
+ update_integrated_tool_panel = False,
tool_config_file = tool_config_file,
datatype_converters_config_file = "datatype_converters_conf.xml.sample",
tool_parse_help = False,
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/changeset/7fe7059a78a3/
changeset: 7fe7059a78a3
user: greg
date: 2012-03-13 21:25:15
summary: When uploading a tarball to a tool shed repository, eliminate as many undesired directories (.svn, .git, .hg, .cvs) and files (hgrc, .hg_archival.txt, .DS_Store) as possible from the archive before committing the contents to the repository.
affected #: 1 file
diff -r 48b64ce958b4ed9ec28639c1057adc67f70ae016 -r 7fe7059a78a37323dc3e8efb832f5831be625dd8 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -8,6 +8,8 @@
log = logging.getLogger( __name__ )
+undesirable_dirs = [ '.hg', '.svn', '.git', '.cvs' ]
+undesirable_files = [ '.hg_archival.txt', 'hgrc', '.DS_Store' ]
# States for passing messages
SUCCESS, INFO, WARNING, ERROR = "done", "info", "warning", "error"
CHUNK_SIZE = 2**20 # 1Mb
@@ -92,14 +94,14 @@
tar = None
istar = False
if istar:
- ok, message, files_to_remove, content_alert_str = self.upload_tar( trans,
- repository,
- tar,
- uploaded_file,
- upload_point,
- remove_repo_files_not_in_tar,
- commit_message,
- new_repo_alert )
+ ok, message, files_to_remove, content_alert_str, undesirable_dirs_removed, undesirable_files_removed = self.upload_tar( trans,
+ repository,
+ tar,
+ uploaded_file,
+ upload_point,
+ remove_repo_files_not_in_tar,
+ commit_message,
+ new_repo_alert )
else:
if ( isgzip or isbz2 ) and uncompress_file:
uploaded_file_filename = self.uncompress( repository, uploaded_file_name, uploaded_file_filename, isgzip, isbz2 )
@@ -150,6 +152,9 @@
else:
uncompress_str = ' '
message = "The file '%s' has been successfully%suploaded to the repository." % ( uploaded_file_filename, uncompress_str )
+ if istar and ( undesirable_dirs_removed or undesirable_files_removed ):
+ items_removed = undesirable_dirs_removed + undesirable_files_removed
+ message += " %d undesirable items (.hg .svn .git directories, .DS_Store, hgrc files, etc) were removed from the archive." % items_removed
if istar and remove_repo_files_not_in_tar and files_to_remove:
if upload_point is not None:
message += " %d files were removed from the repository relative to the selected upload point '%s'." % ( len( files_to_remove ), upload_point )
@@ -206,7 +211,21 @@
full_path = os.path.abspath( os.path.join( repo_dir, upload_point ) )
else:
full_path = os.path.abspath( repo_dir )
- filenames_in_archive = [ tarinfo_obj.name for tarinfo_obj in tar.getmembers() ]
+ undesirable_dirs_removed = 0
+ undesirable_files_removed = 0
+ filenames_in_archive = []
+ for tarinfo_obj in tar.getmembers():
+ ok = os.path.basename( tarinfo_obj.name ) not in undesirable_files
+ if ok:
+ for file_path_item in tarinfo_obj.name.split( '/' ):
+ if file_path_item in undesirable_dirs:
+ undesirable_dirs_removed += 1
+ ok = False
+ break
+ else:
+ undesirable_files_removed += 1
+ if ok:
+ filenames_in_archive.append( tarinfo_obj.name )
filenames_in_archive = [ os.path.join( full_path, name ) for name in filenames_in_archive ]
# Extract the uploaded tar to the load_point within the repository hierarchy.
tar.extractall( path=full_path )
@@ -216,14 +235,15 @@
# We have a repository that is not new (it contains files), so discover
# those files that are in the repository, but not in the uploaded archive.
for root, dirs, files in os.walk( full_path ):
- if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0:
- if '.hg' in dirs:
- # Don't visit .hg directories - should be impossible since we don't
- # allow uploaded archives that contain .hg dirs, but just in case...
- dirs.remove( '.hg' )
- if 'hgrc' in files:
- # Don't include hgrc files in commit.
- files.remove( 'hgrc' )
+ if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0:
+ for undesirable_dir in undesirable_dirs:
+ if undesirable_dir in dirs:
+ dirs.remove( undesirable_dir )
+ undesirable_dirs_removed += 1
+ for undesirable_file in undesirable_files:
+ if undesirable_file in files:
+ files.remove( undesirable_file )
+ undesirable_files_removed += 1
for name in files:
full_name = os.path.join( root, name )
if full_name not in filenames_in_archive:
@@ -286,7 +306,7 @@
# See if the content of the change set was valid.
admin_only = len( repository.downloadable_revisions ) != 1
handle_email_alerts( trans, repository, content_alert_str=content_alert_str, new_repo_alert=new_repo_alert, admin_only=admin_only )
- return True, '', files_to_remove, content_alert_str
+ return True, '', files_to_remove, content_alert_str, undesirable_dirs_removed, undesirable_files_removed
def uncompress( self, repository, uploaded_file_name, uploaded_file_filename, isgzip, isbz2 ):
if isgzip:
self.__handle_gzip( repository, uploaded_file_name )
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/changeset/48b64ce958b4/
changeset: 48b64ce958b4
user: greg
date: 2012-03-12 20:30:37
summary: Fix for rerunning a tool where the correct id / version are available.
affected #: 1 file
diff -r b199460443afeb3023f1c160f23b2215ba42add4 -r 48b64ce958b4ed9ec28639c1057adc67f70ae016 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -246,9 +246,15 @@
if tool_id in self.tools_by_id:
tool = self.tools_by_id[ tool_id ]
if tool_version and tool.version == tool_version:
- return tool
+ if get_all_versions:
+ return [ tool ]
+ else:
+ return tool
else:
- return tool
+ if get_all_versions:
+ return [ tool ]
+ else:
+ return tool
tv = self.__get_tool_version( tool_id )
if tv:
tool_version_ids = tv.get_version_ids( self.app )
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/changeset/b199460443af/
changeset: b199460443af
user: greg
date: 2012-03-12 18:51:07
summary: Check potential tool config files to ensure they are text before attempting to load them in tool shed repositories, and a fix handling for tools contained in a repository that don't peoperly load into Galaxy because they are missing a required entry in the tool_data_table.conf file.
affected #: 6 files
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/tool_shed/migrate/check.py
--- a/lib/galaxy/tool_shed/migrate/check.py
+++ b/lib/galaxy/tool_shed/migrate/check.py
@@ -63,7 +63,7 @@
raise Exception( "Error attempting to update the value of migrate_tools.version: %s" % output )
elif missing_tool_configs:
msg = "\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
- msg += "\n\nThe list of files at the end of this message refer to tools that are configured to load into the tool panel for\n"
+ msg += "\n\nThe list of files at the end of this message refers to tools that are configured to load into the tool panel for\n"
msg += "this Galaxy instance, but have been removed from the Galaxy distribution. These tools can be automatically installed\n"
msg += "from the Galaxy tool shed at http://toolshed.g2.bx.psu.edu.\n\n"
msg += "To skip this process, attempt to start your Galaxy server again (e.g., sh run.sh or whatever you use). If you do this,\n"
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -2,6 +2,7 @@
from datetime import date, datetime, timedelta
from time import strftime
from galaxy import util
+from galaxy.datatypes.checkers import *
from galaxy.util.json import *
from galaxy.tools.search import ToolBoxSearch
from galaxy.model.orm import *
@@ -11,6 +12,7 @@
from elementtree.ElementTree import Element, SubElement
log = logging.getLogger( __name__ )
+
def add_to_shed_tool_config( app, shed_tool_conf_dict, elem_list ):
# A tool shed repository is being installed so change the shed_tool_conf file. Parse the config file to generate the entire list
# of config_elems instead of using the in-memory list since it will be a subset of the entire list if one or more repositories have
@@ -320,14 +322,15 @@
# Find all tool configs.
if name != 'datatypes_conf.xml' and name.endswith( '.xml' ):
full_path = os.path.abspath( os.path.join( root, name ) )
- try:
- tool = toolbox.load_tool( full_path )
- except Exception, e:
- tool = None
- if tool is not None:
- tool_config = os.path.join( root, name )
- guid = generate_tool_guid( repository_clone_url, tool )
- metadata_dict = generate_tool_metadata( tool_config, tool, repository_clone_url, metadata_dict )
+ if not ( check_binary( full_path ) or check_image( full_path ) or check_gzip( full_path )[ 0 ]
+ or check_bz2( full_path )[ 0 ] or check_zip( full_path ) ):
+ try:
+ tool = toolbox.load_tool( full_path )
+ except Exception, e:
+ tool = None
+ if tool is not None:
+ tool_config = os.path.join( root, name )
+ metadata_dict = generate_tool_metadata( tool_config, tool, repository_clone_url, metadata_dict )
# Find all exported workflows
elif name.endswith( '.ga' ):
relative_path = os.path.join( root, name )
@@ -642,10 +645,14 @@
repository_tools_tups = []
if 'tools' in metadata_dict:
for tool_dict in metadata_dict[ 'tools' ]:
- relative_path = tool_dict[ 'tool_config' ]
- guid = tool_dict[ 'guid' ]
- tool = app.toolbox.load_tool( os.path.abspath( relative_path ), guid=guid )
- repository_tools_tups.append( ( relative_path, guid, tool ) )
+ relative_path = tool_dict.get( 'tool_config', None )
+ guid = tool_dict.get( 'guid', None )
+ if relative_path and guid:
+ tool = app.toolbox.load_tool( os.path.abspath( relative_path ), guid=guid )
+ else:
+ tool = None
+ if tool:
+ repository_tools_tups.append( ( relative_path, guid, tool ) )
return repository_tools_tups
def get_tool_panel_config_tool_path_install_dir( app, repository ):
# Return shed-related tool panel config, the tool_path configured in it, and the relative path to the directory where the
@@ -745,6 +752,7 @@
missing_data_table_entry = True
break
if missing_data_table_entry:
+ sample_file = None
# The repository must contain a tool_data_table_conf.xml.sample file that includes all required entries for all tools in the repository.
for sample_file in sample_files:
head, tail = os.path.split( sample_file )
@@ -753,10 +761,10 @@
error, correction_msg = handle_sample_tool_data_table_conf_file( app, sample_file )
if error:
# TODO: Do more here than logging an exception.
- log.debug( exception_msg )
+ log.debug( correction_msg )
# Reload the tool into the local list of repository_tools_tups.
repository_tool = app.toolbox.load_tool( os.path.join( tool_path, tup_path ), guid=guid )
- repository_tools_tups[ index ] = ( tup_path, repository_tool )
+ repository_tools_tups[ index ] = ( tup_path, guid, repository_tool )
return repository_tools_tups
def handle_missing_index_file( app, tool_path, sample_files, repository_tools_tups ):
"""Inspect each tool to see if it has any input parameters that are dynamically generated select lists that depend on a .loc file."""
@@ -781,6 +789,46 @@
repository_tool = app.toolbox.load_tool( os.path.join( tool_path, tup_path ), guid=guid )
repository_tools_tups[ index ] = ( tup_path, guid, repository_tool )
return repository_tools_tups
+def handle_sample_tool_data_table_conf_file( app, filename ):
+ """
+ Parse the incoming filename and add new entries to the in-memory
+ app.tool_data_tables dictionary as well as appending them to the
+ shed's tool_data_table_conf.xml file on disk.
+ """
+ error = False
+ message = ''
+ try:
+ new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( filename )
+ except Exception, e:
+ message = str( e )
+ error = True
+ if not error:
+ # Add an entry to the end of the tool_data_table_conf.xml file.
+ tdt_config = "%s/tool_data_table_conf.xml" % app.config.root
+ if os.path.exists( tdt_config ):
+ # Make a backup of the file since we're going to be changing it.
+ today = date.today()
+ backup_date = today.strftime( "%Y_%m_%d" )
+ tdt_config_copy = '%s/tool_data_table_conf.xml_%s_backup' % ( app.config.root, backup_date )
+ shutil.copy( os.path.abspath( tdt_config ), os.path.abspath( tdt_config_copy ) )
+ # Write each line of the tool_data_table_conf.xml file, except the last line to a temp file.
+ fh = tempfile.NamedTemporaryFile( 'wb' )
+ tmp_filename = fh.name
+ fh.close()
+ new_tdt_config = open( tmp_filename, 'wb' )
+ for i, line in enumerate( open( tdt_config, 'rb' ) ):
+ if line.find( '</tables>' ) >= 0:
+ for new_table_elem in new_table_elems:
+ new_tdt_config.write( ' %s\n' % util.xml_to_string( new_table_elem ).rstrip( '\n' ) )
+ new_tdt_config.write( '</tables>\n' )
+ else:
+ new_tdt_config.write( line )
+ new_tdt_config.close()
+ shutil.move( tmp_filename, os.path.abspath( tdt_config ) )
+ else:
+ message = "The required file named tool_data_table_conf.xml does not exist in the Galaxy install directory."
+ error = True
+ return error, message
def handle_tool_dependencies( current_working_dir, repo_files_dir, repository_tools_tups ):
"""
Inspect each tool to see if it includes a "requirement" that refers to a fabric
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/web/base/controller.py
--- a/lib/galaxy/web/base/controller.py
+++ b/lib/galaxy/web/base/controller.py
@@ -2464,46 +2464,6 @@
id = trans.security.decode_id( id )
quota = trans.sa_session.query( trans.model.Quota ).get( id )
return quota
-def handle_sample_tool_data_table_conf_file( app, filename ):
- """
- Parse the incoming filename and add new entries to the in-memory
- app.tool_data_tables dictionary as well as appending them to the
- shed's tool_data_table_conf.xml file on disk.
- """
- error = False
- message = ''
- try:
- new_table_elems = app.tool_data_tables.add_new_entries_from_config_file( filename )
- except Exception, e:
- message = str( e )
- error = True
- if not error:
- # Add an entry to the end of the tool_data_table_conf.xml file.
- tdt_config = "%s/tool_data_table_conf.xml" % app.config.root
- if os.path.exists( tdt_config ):
- # Make a backup of the file since we're going to be changing it.
- today = date.today()
- backup_date = today.strftime( "%Y_%m_%d" )
- tdt_config_copy = '%s/tool_data_table_conf.xml_%s_backup' % ( app.config.root, backup_date )
- shutil.copy( os.path.abspath( tdt_config ), os.path.abspath( tdt_config_copy ) )
- # Write each line of the tool_data_table_conf.xml file, except the last line to a temp file.
- fh = tempfile.NamedTemporaryFile( 'wb' )
- tmp_filename = fh.name
- fh.close()
- new_tdt_config = open( tmp_filename, 'wb' )
- for i, line in enumerate( open( tdt_config, 'rb' ) ):
- if line.find( '</tables>' ) >= 0:
- for new_table_elem in new_table_elems:
- new_tdt_config.write( ' %s\n' % util.xml_to_string( new_table_elem ).rstrip( '\n' ) )
- new_tdt_config.write( '</tables>\n' )
- else:
- new_tdt_config.write( line )
- new_tdt_config.close()
- shutil.move( tmp_filename, os.path.abspath( tdt_config ) )
- else:
- message = "The required file named tool_data_table_conf.xml does not exist in the Galaxy install directory."
- error = True
- return error, message
def tool_shed_encode( val ):
if isinstance( val, dict ):
value = simplejson.dumps( val )
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -1,10 +1,12 @@
import os, string, socket, logging, simplejson, binascii
from time import strftime
from datetime import *
+from galaxy.datatypes.checkers import *
from galaxy.tools import *
from galaxy.util.json import from_json_string, to_json_string
from galaxy.util.hash_util import *
from galaxy.util.shed_util import copy_sample_loc_file, generate_datatypes_metadata, generate_tool_metadata, generate_workflow_metadata
+from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file
from galaxy.web.base.controller import *
from galaxy.webapps.community import model
from galaxy.model.orm import *
@@ -314,19 +316,21 @@
# Find all tool configs.
if name != 'datatypes_conf.xml' and name.endswith( '.xml' ):
full_path = os.path.abspath( os.path.join( root, name ) )
- try:
- tool = load_tool( trans, full_path )
- valid = True
- except Exception, e:
- valid = False
- invalid_files.append( ( name, str( e ) ) )
- if valid and tool is not None:
- can_set_metadata, invalid_files = check_tool_input_params( trans, name, tool, sample_files, invalid_files )
- if can_set_metadata:
- # Update the list of metadata dictionaries for tools in metadata_dict.
- tool_config = os.path.join( root, name )
- repository_clone_url = generate_clone_url( trans, id )
- metadata_dict = generate_tool_metadata( tool_config, tool, repository_clone_url, metadata_dict )
+ if not ( check_binary( full_path ) or check_image( full_path ) or check_gzip( full_path )[ 0 ]
+ or check_bz2( full_path )[ 0 ] or check_zip( full_path ) ):
+ try:
+ tool = load_tool( trans, full_path )
+ valid = True
+ except Exception, e:
+ valid = False
+ invalid_files.append( ( name, str( e ) ) )
+ if valid and tool is not None:
+ can_set_metadata, invalid_files = check_tool_input_params( trans, name, tool, sample_files, invalid_files )
+ if can_set_metadata:
+ # Update the list of metadata dictionaries for tools in metadata_dict.
+ tool_config = os.path.join( root, name )
+ repository_clone_url = generate_clone_url( trans, id )
+ metadata_dict = generate_tool_metadata( tool_config, tool, repository_clone_url, metadata_dict )
# Find all exported workflows
elif name.endswith( '.ga' ):
try:
@@ -381,22 +385,24 @@
fh = open( tmp_filename, 'w' )
fh.write( fctx.data() )
fh.close()
- try:
- tool = load_tool( trans, tmp_filename )
- valid = True
- except Exception, e:
- invalid_files.append( ( filename, str( e ) ) )
- valid = False
- if valid and tool is not None:
- # Update the list of metadata dictionaries for tools in metadata_dict. Note that filename
- # here is the relative path to the config file within the change set context, something
- # like filtering.xml, but when the change set was the repository tip, the value was
- # something like database/community_files/000/repo_1/filtering.xml. This shouldn't break
- # anything, but may result in a bit of confusion when maintaining the code / data over time.
- # IMPORTANT NOTE: Here we are assuming that since the current change set is not the repository
- # tip, we do not have to handle any .loc.sample files since they would have been handled previously.
- repository_clone_url = generate_clone_url( trans, id )
- metadata_dict = generate_tool_metadata( filename, tool, repository_clone_url, metadata_dict )
+ if not ( check_binary( tmp_filename ) or check_image( tmp_filename ) or check_gzip( tmp_filename )[ 0 ]
+ or check_bz2( tmp_filename )[ 0 ] or check_zip( tmp_filename ) ):
+ try:
+ tool = load_tool( trans, tmp_filename )
+ valid = True
+ except Exception, e:
+ invalid_files.append( ( filename, str( e ) ) )
+ valid = False
+ if valid and tool is not None:
+ # Update the list of metadata dictionaries for tools in metadata_dict. Note that filename
+ # here is the relative path to the config file within the change set context, something
+ # like filtering.xml, but when the change set was the repository tip, the value was
+ # something like database/community_files/000/repo_1/filtering.xml. This shouldn't break
+ # anything, but may result in a bit of confusion when maintaining the code / data over time.
+ # IMPORTANT NOTE: Here we are assuming that since the current change set is not the repository
+ # tip, we do not have to handle any .loc.sample files since they would have been handled previously.
+ repository_clone_url = generate_clone_url( trans, id )
+ metadata_dict = generate_tool_metadata( filename, tool, repository_clone_url, metadata_dict )
try:
os.unlink( tmp_filename )
except:
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/webapps/community/controllers/repository.py
--- a/lib/galaxy/webapps/community/controllers/repository.py
+++ b/lib/galaxy/webapps/community/controllers/repository.py
@@ -856,13 +856,15 @@
fh = open( tmp_filename, 'w' )
fh.write( fctx.data() )
fh.close()
- try:
- tool = load_tool( trans, tmp_filename )
- valid = True
- except:
- valid = False
- if valid and tool is not None:
- tool_guids.append( generate_tool_guid( trans, repository, tool ) )
+ if not ( check_binary( tmp_filename ) or check_image( tmp_filename ) or check_gzip( tmp_filename )[ 0 ]
+ or check_bz2( tmp_filename )[ 0 ] or check_zip( tmp_filename ) ):
+ try:
+ tool = load_tool( trans, tmp_filename )
+ valid = True
+ except:
+ valid = False
+ if valid and tool is not None:
+ tool_guids.append( generate_tool_guid( trans, repository, tool ) )
try:
os.unlink( tmp_filename )
except:
diff -r 02f55e34ccfeef865d5d0811664a1f95635ec609 -r b199460443afeb3023f1c160f23b2215ba42add4 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -3,6 +3,7 @@
from galaxy.model.orm import *
from galaxy.datatypes.checkers import *
from common import *
+from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file
from mercurial import hg, ui, commands
log = logging.getLogger( __name__ )
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.