1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1eb32dbab2c1/
changeset: 1eb32dbab2c1
user: greg
date: 2012-05-03 20:00:32
summary: Clarify host string value in community_wsgi.ini.
affected #: 1 file
diff -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 -r 1eb32dbab2c1a0bc308eb4d3a069fa55ff6ecb83 community_wsgi.ini.sample
--- a/community_wsgi.ini.sample
+++ b/community_wsgi.ini.sample
@@ -4,7 +4,12 @@
use = egg:Paste#http
port = 9009
+
+# The address on which to listen. By default, only listen to localhost (the tool shed will not
+# be accessible over the network). Use '0.0.0.0' to listen on all available network interfaces.
+#host = 0.0.0.0
host = 127.0.0.1
+
use_threadpool = true
threadpool_workers = 10
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/ea9f3c25a415/
changeset: ea9f3c25a415
user: greg
date: 2012-05-03 19:37:33
summary: Enhance sample file handling for installed tool shed repositories to handle more than just .loc.sample files in the tool-data directory.
affected #: 4 files
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/tool_shed/install_manager.py
--- a/lib/galaxy/tool_shed/install_manager.py
+++ b/lib/galaxy/tool_shed/install_manager.py
@@ -156,9 +156,15 @@
# Handle missing data table entries for tool parameters that are dynamically generated select lists.
repository_tools_tups = handle_missing_data_table_entry( self.app, self.tool_path, sample_files, repository_tools_tups )
# Handle missing index files for tool parameters that are dynamically generated select lists.
- repository_tools_tups = handle_missing_index_file( self.app, self.tool_path, sample_files, repository_tools_tups )
- # Handle tools that use fabric scripts to install dependencies.
- handle_tool_dependencies( current_working_dir, relative_install_dir, repository_tools_tups )
+ repository_tools_tups, sample_files_copied = handle_missing_index_file( self.app, self.tool_path, sample_files, repository_tools_tups )
+ # Copy remaining sample files included in the repository to the ~/tool-data directory of the local Galaxy instance.
+ copy_sample_files( self.app, sample_files, sample_files_copied=sample_files_copied )
+ if 'tool_dependencies_config' in metadata_dict:
+ # Install tool dependencies.
+ status, message = handle_tool_dependencies( self.app, repository_clone_url, metadata_dict[ 'tool_dependencies_config' ] )
+ if status != 'ok' and message:
+ print 'The following error occurred while installing tool dependencies:'
+ print message
add_to_tool_panel( self.app,
repository_name,
repository_clone_url,
@@ -215,7 +221,7 @@
ctx_rev )
if 'tools' in metadata_dict:
# Get the tool_versions from the tool shed for each tool in the installed change set.
- url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % \
+ url = '%s/repository/get_tool_versions?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % \
( tool_shed_url, tool_shed_repository.name, self.repository_owner, changeset_revision )
response = urllib2.urlopen( url )
text = response.read()
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -1,4 +1,4 @@
-import os, tempfile, shutil, subprocess, logging, string, urllib2
+import sys, os, tempfile, shutil, subprocess, logging, string, urllib2
from datetime import date, datetime, timedelta
from time import strftime, gmtime
from galaxy import util
@@ -7,6 +7,9 @@
from galaxy.tools.search import ToolBoxSearch
from galaxy.model.orm import *
+from galaxy import eggs
+import pkg_resources
+
pkg_resources.require( 'mercurial' )
from mercurial import ui, commands
@@ -215,7 +218,6 @@
# The value of proprietary_path must be an absolute path due to job_working_directory.
elem.attrib[ 'proprietary_path' ] = os.path.abspath( relative_head )
elem.attrib[ 'proprietary_datatype_module' ] = proprietary_datatype_module
-
sniffers = datatypes_config_root.find( 'sniffers' )
else:
sniffers = None
@@ -270,8 +272,7 @@
return tool_shed_url.rstrip( '/' )
def clone_repository( repository_clone_url, repository_file_dir, ctx_rev ):
"""
- Clone the repository up to the specified changeset_revision. No subsequent revisions will be present
- in the cloned repository.
+ Clone the repository up to the specified changeset_revision. No subsequent revisions will be present in the cloned repository.
"""
commands.clone( get_configured_ui(),
repository_clone_url,
@@ -279,17 +280,28 @@
pull=True,
noupdate=False,
rev=[ ctx_rev ] )
-def copy_sample_loc_file( app, filename ):
- """Copy xxx.loc.sample to ~/tool-data/xxx.loc.sample and ~/tool-data/xxx.loc"""
- head, sample_loc_file = os.path.split( filename )
- loc_file = sample_loc_file.replace( '.sample', '' )
- tool_data_path = os.path.abspath( app.config.tool_data_path )
+def copy_sample_file( app, filename, dest_path=None ):
+ """
+ Copy xxx.loc.sample to dest_path/xxx.loc.sample and dest_path/xxx.loc. The default value for dest_path is ~/tool-data.
+ """
+ if dest_path is None:
+ dest_path = os.path.abspath( app.config.tool_data_path )
+ sample_file_path, sample_file_name = os.path.split( filename )
+ copied_file = sample_file_name.replace( '.sample', '' )
# It's ok to overwrite the .sample version of the file.
- shutil.copy( os.path.abspath( filename ), os.path.join( tool_data_path, sample_loc_file ) )
- # Only create the .loc file if it does not yet exist. We don't
- # overwrite it in case it contains stuff proprietary to the local instance.
- if not os.path.exists( os.path.join( tool_data_path, loc_file ) ):
- shutil.copy( os.path.abspath( filename ), os.path.join( tool_data_path, loc_file ) )
+ shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, sample_file_name ) )
+ # Only create the .loc file if it does not yet exist. We don't overwrite it in case it contains stuff proprietary to the local instance.
+ if not os.path.exists( os.path.join( dest_path, copied_file ) ):
+ shutil.copy( os.path.abspath( filename ), os.path.join( dest_path, copied_file ) )
+def copy_sample_files( app, sample_files, sample_files_copied=None, dest_path=None ):
+ """
+ Copy all files to dest_path in the local Galaxy environment that have not already been copied. Those that have been copied
+ are contained in sample_files_copied. The default value for dest_path is ~/tool-data.
+ """
+ sample_files_copied = util.listify( sample_files_copied )
+ for filename in sample_files:
+ if filename not in sample_files_copied:
+ copy_sample_file( app, filename, dest_path=dest_path )
def create_repository_dict_for_proprietary_datatypes( tool_shed, name, owner, installed_changeset_revision, tool_dicts, converter_path=None, display_path=None ):
return dict( tool_shed=tool_shed,
repository_name=name,
@@ -336,7 +348,7 @@
tool_shed_url = get_url_from_repository_tool_shed( trans.app, repository )
return '%s/repos/%s/%s' % ( tool_shed_url, repository.owner, repository.name )
def generate_datatypes_metadata( datatypes_config, metadata_dict ):
- """Update the received metadata_dict with changes that have been applied to the received datatypes_config."""
+ """Update the received metadata_dict with information from the parsed datatypes_config."""
tree = ElementTree.parse( datatypes_config )
root = tree.getroot()
ElementInclude.include( root )
@@ -454,21 +466,9 @@
# Handle tool.requirements.
tool_requirements = []
for tr in tool.requirements:
- name=tr.name
- type=tr.type
- if type == 'fabfile':
- version = None
- fabfile = tr.fabfile
- method = tr.method
- else:
- version = tr.version
- fabfile = None
- method = None
- requirement_dict = dict( name=name,
- type=type,
- version=version,
- fabfile=fabfile,
- method=method )
+ requirement_dict = dict( name=tr.name,
+ type=tr.type,
+ version=tr.version )
tool_requirements.append( requirement_dict )
# Handle tool.tests.
tool_tests = []
@@ -732,7 +732,7 @@
break
return converter_path, display_path
def get_ctx_rev( tool_shed_url, name, owner, changeset_revision ):
- url = '%s/repository/get_ctx_rev?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy' % ( tool_shed_url, name, owner, changeset_revision )
+ url = '%s/repository/get_ctx_rev?name=%s&owner=%s&changeset_revision=%s&webapp=galaxy&no_reset=true' % ( tool_shed_url, name, owner, changeset_revision )
response = urllib2.urlopen( url )
ctx_rev = response.read()
response.close()
@@ -893,27 +893,27 @@
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."""
- missing_files_handled = []
+ sample_files_copied = []
for index, repository_tools_tup in enumerate( repository_tools_tups ):
tup_path, guid, repository_tool = repository_tools_tup
params_with_missing_index_file = repository_tool.params_with_missing_index_file
for param in params_with_missing_index_file:
options = param.options
- missing_head, missing_tail = os.path.split( options.missing_index_file )
- if missing_tail not in missing_files_handled:
+ missing_file_path, missing_file_name = os.path.split( options.missing_index_file )
+ if missing_file_name not in sample_files_copied:
# The repository must contain the required xxx.loc.sample file.
for sample_file in sample_files:
- sample_head, sample_tail = os.path.split( sample_file )
- if sample_tail == '%s.sample' % missing_tail:
- copy_sample_loc_file( app, sample_file )
+ sample_file_path, sample_file_name = os.path.split( sample_file )
+ if sample_file_name == '%s.sample' % missing_file_name:
+ copy_sample_file( app, sample_file )
if options.tool_data_table and options.tool_data_table.missing_index_file:
options.tool_data_table.handle_found_index_file( options.missing_index_file )
- missing_files_handled.append( missing_tail )
+ sample_files_copied.append( options.missing_index_file )
break
# 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, guid, repository_tool )
- return repository_tools_tups
+ return repository_tools_tups, sample_files_copied
def handle_sample_tool_data_table_conf_file( app, filename ):
"""
Parse the incoming filename and add new entries to the in-memory
@@ -1038,7 +1038,8 @@
# Load or deactivate proprietary datatype display applications
app.datatypes_registry.load_display_applications( installed_repository_dict=repository_dict, deactivate=deactivate )
def load_repository_contents( trans, repository_name, description, owner, changeset_revision, ctx_rev, tool_path, repository_clone_url,
- relative_install_dir, current_working_dir, tool_shed=None, tool_section=None, shed_tool_conf=None ):
+ relative_install_dir, current_working_dir, tool_shed=None, tool_section=None, shed_tool_conf=None,
+ install_tool_dependencies=False ):
"""Generate the metadata for the installed tool shed repository, among other things."""
# It is critical that the installed repository is updated to the desired changeset_revision before metadata is set because the
# process for setting metadata uses the repository files on disk. This method is called when an admin is installing a new repository
@@ -1063,8 +1064,9 @@
# Handle missing data table entries for tool parameters that are dynamically generated select lists.
repository_tools_tups = handle_missing_data_table_entry( trans.app, tool_path, sample_files, repository_tools_tups )
# Handle missing index files for tool parameters that are dynamically generated select lists.
- repository_tools_tups = handle_missing_index_file( trans.app, tool_path, sample_files, repository_tools_tups )
- # Handle tools that use fabric scripts to install dependencies.
+ repository_tools_tups, sample_files_copied = handle_missing_index_file( trans.app, tool_path, sample_files, repository_tools_tups )
+ # Copy remaining sample files included in the repository to the ~/tool-data directory of the local Galaxy instance.
+ copy_sample_files( trans.app, sample_files, sample_files_copied=sample_files_copied )
handle_tool_dependencies( current_working_dir, relative_install_dir, repository_tools_tups )
add_to_tool_panel( app=trans.app,
repository_name=repository_name,
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/webapps/community/controllers/common.py
--- a/lib/galaxy/webapps/community/controllers/common.py
+++ b/lib/galaxy/webapps/community/controllers/common.py
@@ -5,7 +5,7 @@
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, get_configured_ui, generate_datatypes_metadata, generate_tool_metadata, generate_workflow_metadata
+from galaxy.util.shed_util import copy_sample_file, get_configured_ui, generate_datatypes_metadata, generate_tool_metadata, generate_workflow_metadata
from galaxy.util.shed_util import handle_sample_tool_data_table_conf_file, to_html_escaped, to_html_str, update_repository
from galaxy.web.base.controller import *
from galaxy.webapps.community import model
@@ -209,13 +209,13 @@
if options.index_file or options.missing_index_file:
# Make sure the repository contains the required xxx.loc.sample file.
index_file = options.index_file or options.missing_index_file
- index_head, index_tail = os.path.split( index_file )
+ index_file_path, index_file_name = os.path.split( index_file )
sample_found = False
for sample_file in sample_files:
- sample_head, sample_tail = os.path.split( sample_file )
- if sample_tail == '%s.sample' % index_tail:
- copy_sample_loc_file( trans.app, sample_file )
- options.index_file = index_tail
+ sample_file_path, sample_file_name = os.path.split( sample_file )
+ if sample_file_name == '%s.sample' % index_file_name:
+ copy_sample_file( trans.app, sample_file )
+ options.index_file = index_file_name
options.missing_index_file = None
if options.tool_data_table:
options.tool_data_table.missing_index_file = None
@@ -224,7 +224,7 @@
if not sample_found:
can_set_metadata = False
correction_msg = "This file refers to a file named <b>%s</b>. " % str( index_file )
- correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( index_tail )
+ correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( index_file_name )
invalid_files.append( ( name, correction_msg ) )
return can_set_metadata, invalid_files
def new_tool_metadata_required( trans, id, metadata_dict ):
@@ -283,8 +283,7 @@
else:
# There is no saved repository metadata, so we need to create a new repository_metadata table record.
return True
- # The received metadata_dict includes no metadata for workflows, so a new repository_metadata table
- # record is not needed.
+ # The received metadata_dict includes no metadata for workflows, so a new repository_metadata table record is not needed.
return False
def generate_metadata_for_repository_tip( trans, id, ctx, changeset_revision, repo, repo_dir ):
"""
diff -r 71dfeecdd019554b5cccc047546ae26ed7b50afa -r ea9f3c25a41576216f3c328e3333ebdb55250ed1 lib/galaxy/webapps/community/controllers/upload.py
--- a/lib/galaxy/webapps/community/controllers/upload.py
+++ b/lib/galaxy/webapps/community/controllers/upload.py
@@ -139,9 +139,8 @@
if error:
message = '%s<br/>%s' % ( message, error_message )
if full_path.endswith( '.loc.sample' ):
- # Handle the special case where a xxx.loc.sample file is
- # being uploaded by copying it to ~/tool-data/xxx.loc.
- copy_sample_loc_file( trans.app, full_path )
+ # Handle the special case where a xxx.loc.sample file is being uploaded by copying it to ~/tool-data/xxx.loc.
+ copy_sample_file( trans.app, full_path )
# 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 )
@@ -295,9 +294,8 @@
if error:
return False, message, files_to_remove, content_alert_str
if filename_in_archive.endswith( '.loc.sample' ):
- # Handle the special case where a xxx.loc.sample file is
- # being uploaded by copying it to ~/tool-data/xxx.loc.
- copy_sample_loc_file( trans.app, filename_in_archive )
+ # Handle the special case where a xxx.loc.sample file is being uploaded by copying it to ~/tool-data/xxx.loc.
+ copy_sample_file( trans.app, filename_in_archive )
try:
commands.commit( repo.ui, repo, full_path, user=trans.user.username, message=commit_message )
except Exception, e:
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/c5f3e218266e/
changeset: c5f3e218266e
user: dan
date: 2012-05-02 23:04:33
summary: Update WormBase datasource tool to use WormBase 2.
affected #: 1 file
diff -r a781f132e259b60c417c674047535ac0a688b69d -r c5f3e218266e8b82cd509b9177461839c74971c3 tools/data_source/wormbase.xml
--- a/tools/data_source/wormbase.xml
+++ b/tools/data_source/wormbase.xml
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
-<tool name="Wormbase" id="wormbase" tool_type="data_source">
+<tool name="WormBase" id="wormbase" tool_type="data_source" version="1.0.1"><description>server</description><command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command>
- <inputs action="http://www.wormbase.org/db/seq/gbgff/c_elegans/" check_values="false" target="_top">
+ <inputs action="http://www.wormbase.org/tools/genome/gbrowse/c_elegans/" check_values="false" target="_top"><display>go to Wormbase server $GALAXY_URL</display><param name="GALAXY_URL" type="baseurl" value="/tool_runner?tool_id=wormbase" /></inputs>
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/a781f132e259/
changeset: a781f132e259
user: dan
date: 2012-05-02 17:47:04
summary: Fix typo in BAM slice tool.
affected #: 1 file
diff -r 926c93b412beaaff5579e6faa2d052768e9408d1 -r a781f132e259b60c417c674047535ac0a688b69d tools/samtools/samtools_slice_bam.xml
--- a/tools/samtools/samtools_slice_bam.xml
+++ b/tools/samtools/samtools_slice_bam.xml
@@ -20,7 +20,7 @@
<test><param name="input_bam" value="gatk/fake_phiX_reads_1.bam" ftype="bam" /><param name="input_interval" value="gatk/fake_phiX_variant_locations.bed" ftype="bed" />
- <output name="output_log" file="gatk/fake_phiX_reads_1.bam" ftype="bam" />
+ <output name="output_bam" file="gatk/fake_phiX_reads_1.bam" ftype="bam" /></test></tests><help>
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/49b5dc00dfb6/
changeset: 49b5dc00dfb6
user: greg
date: 2012-05-01 15:15:59
summary: Eliminate the fabfile/method type from ToolRequirement.
affected #: 1 file
diff -r 0090f9df64fd84a9fda73d12b816a7d4d044b822 -r 49b5dc00dfb6ef3bf0f4bb1f611db33042469181 lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -702,19 +702,13 @@
class ToolRequirement( object ):
"""
- Represents an external requirement that must be available for the tool to
- run (for example, a program, package, or library). Requirements can
- optionally assert a specific version, or reference a command to execute a
- fabric script. If fabric is used, the type is 'fabfile' and the version
- attribute is not used since the fabric script includes all necessary
- information for automatic dependency installation.
+ Represents an external requirement that must be available for the tool to run (for example, a program, package, or library).
+ Requirements can optionally assert a specific version.
"""
- def __init__( self, name=None, type=None, version=None, fabfile=None, method=None ):
+ def __init__( self, name=None, type=None, version=None ):
self.name = name
self.type = type
self.version = version
- self.fabfile = fabfile
- self.method = method
class ToolParallelismInfo(object):
"""
@@ -1339,19 +1333,8 @@
for requirement_elem in requirements_elem.findall( 'requirement' ):
name = util.xml_text( requirement_elem )
type = requirement_elem.get( "type", "package" )
- if type == 'fabfile':
- # The fabric script will include all necessary information for
- # automatically installing the tool dependencies.
- fabfile = requirement_elem.get( "fabfile" )
- method = requirement_elem.get( "method" )
- version = None
- else:
- # For backward compatibility, requirements tag sets should not require the
- # use of a fabric script.
- version = requirement_elem.get( "version" )
- fabfile = None
- method = None
- requirement = ToolRequirement( name=name, type=type, version=version, fabfile=fabfile, method=method )
+ version = requirement_elem.get( "version", None )
+ requirement = ToolRequirement( name=name, type=type, version=version )
self.requirements.append( requirement )
def check_workflow_compatible( self ):
"""
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.