1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/a88d39b19b01/
changeset: a88d39b19b01
user: greg
date: 2011-09-23 20:27:29
summary: Correct the message displayed when index files are missing under certain circumstances in the tool shed.
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/webapps/community/controllers/common.py Fri Sep 23 13:51:55 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/common.py Fri Sep 23 14:27:29 2011 -0400
@@ -426,8 +426,12 @@
exception_items = exception_msg.split()
missing_file_items = exception_items[7].split( '/' )
missing_file = missing_file_items[-1].rstrip( '\'' )
+ if missing_file.endswith( '.loc' ):
+ sample_ext = '%s.sample' % missing_file
+ else:
+ sample_ext = missing_file
correction_msg = "This file refers to a missing file <b>%s</b>. " % str( missing_file )
- correction_msg += "Upload a file named <b>%s</b> to the repository to correct this error." % missing_file
+ correction_msg += "Upload a file named <b>%s</b> to the repository to correct this error." % sample_ext
else:
correction_msg = exception_msg
message += "<b>%s</b> - %s<br/>" % ( tool_file, correction_msg )
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 changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/dc4a8297d0ab/
changeset: dc4a8297d0ab
user: greg
date: 2011-09-23 19:51:55
summary: Make sure dymanically generated select list options exist before checking for missing dependencies.
affected #: 3 files (-1 bytes)
--- a/lib/galaxy/web/base/controller.py Fri Sep 23 13:49:33 2011 -0400
+++ b/lib/galaxy/web/base/controller.py Fri Sep 23 13:51:55 2011 -0400
@@ -2447,23 +2447,24 @@
# If the tool refers to .loc files or requires an entry in the
# tool_data_table_conf.xml, make sure all requirements exist.
options = input_param.dynamic_options or input_param.options
- if options.missing_tool_data_table_name:
- # The repository must contain a tool_data_table_conf.xml.sample file.
- for sample_file in sample_files:
- head, tail = os.path.split( sample_file )
- if tail == 'tool_data_table_conf.xml.sample':
- error, correction_msg = handle_sample_tool_data_table_conf_file( trans, sample_file )
- if error:
- log.debug( exception_msg )
- break
- if options.missing_index_file:
- missing_head, missing_tail = os.path.split( options.missing_index_file )
- # 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( trans, sample_file )
- break
+ if options:
+ if options.missing_tool_data_table_name:
+ # The repository must contain a tool_data_table_conf.xml.sample file.
+ for sample_file in sample_files:
+ head, tail = os.path.split( sample_file )
+ if tail == 'tool_data_table_conf.xml.sample':
+ error, correction_msg = handle_sample_tool_data_table_conf_file( trans, sample_file )
+ if error:
+ log.debug( exception_msg )
+ break
+ if options.missing_index_file:
+ missing_head, missing_tail = os.path.split( options.missing_index_file )
+ # 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( trans, sample_file )
+ break
# At this point, we need to lstrip tool_path from relative_path.
tup_path = relative_path.replace( tool_path, '' ).lstrip( '/' )
repository_tools_tups.append( ( tup_path, repository_tool ) )
--- a/lib/galaxy/webapps/community/controllers/common.py Fri Sep 23 13:49:33 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/common.py Fri Sep 23 13:51:55 2011 -0400
@@ -175,39 +175,40 @@
# If the tool refers to .loc files or requires an entry in the
# tool_data_table_conf.xml, make sure all requirements exist.
options = input_param.dynamic_options or input_param.options
- if options.missing_tool_data_table_name:
- # See if the repository contains a tool_data_table_conf.xml.sample file.
- sample_found = False
- for sample_file in sample_files:
- head, tail = os.path.split( sample_file )
- if tail == 'tool_data_table_conf.xml.sample':
- sample_found = True
- error, correction_msg = handle_sample_tool_data_table_conf_file( trans, sample_file )
- if error:
- can_set_metadata = False
- invalid_files.append( ( tail, correction_msg ) )
- break
- if not sample_found:
- can_set_metadata = False
- correction_msg = "This file requires an entry in the tool_data_table_conf.xml file. "
- correction_msg += "Upload a file named tool_data_table_conf.xml.sample to the repository "
- correction_msg += "that includes the required entry to resolve this issue.<br/>"
- invalid_files.append( ( name, correction_msg ) )
- elif options.missing_index_file:
- missing_head, missing_tail = os.path.split( options.missing_index_file )
- # See if the repository contains the required xxx.loc.sample file.
- sample_found = False
- 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( trans, sample_file )
- sample_found = True
- break
- if not sample_found:
- can_set_metadata = False
- correction_msg = "This file refers to a missing file <b>%s</b>. " % str( options.missing_index_file )
- correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( missing_tail )
- invalid_files.append( ( name, correction_msg ) )
+ if options:
+ if options.missing_tool_data_table_name:
+ # See if the repository contains a tool_data_table_conf.xml.sample file.
+ sample_found = False
+ for sample_file in sample_files:
+ head, tail = os.path.split( sample_file )
+ if tail == 'tool_data_table_conf.xml.sample':
+ sample_found = True
+ error, correction_msg = handle_sample_tool_data_table_conf_file( trans, sample_file )
+ if error:
+ can_set_metadata = False
+ invalid_files.append( ( tail, correction_msg ) )
+ break
+ if not sample_found:
+ can_set_metadata = False
+ correction_msg = "This file requires an entry in the tool_data_table_conf.xml file. "
+ correction_msg += "Upload a file named tool_data_table_conf.xml.sample to the repository "
+ correction_msg += "that includes the required entry to resolve this issue.<br/>"
+ invalid_files.append( ( name, correction_msg ) )
+ elif options.missing_index_file:
+ missing_head, missing_tail = os.path.split( options.missing_index_file )
+ # See if the repository contains the required xxx.loc.sample file.
+ sample_found = False
+ 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( trans, sample_file )
+ sample_found = True
+ break
+ if not sample_found:
+ can_set_metadata = False
+ correction_msg = "This file refers to a missing file <b>%s</b>. " % str( options.missing_index_file )
+ correction_msg += "Upload a file named <b>%s.sample</b> to the repository to correct this error." % str( missing_tail )
+ invalid_files.append( ( name, correction_msg ) )
return can_set_metadata, invalid_files
def generate_tool_metadata( trans, id, changeset_revision, tool_config, tool, metadata_dict ):
"""
--- a/templates/tool_form.mako Fri Sep 23 13:49:33 2011 -0400
+++ b/templates/tool_form.mako Fri Sep 23 13:51:55 2011 -0400
@@ -257,12 +257,13 @@
# If the tool refers to .loc files or requires an entry in the
# tool_data_table_conf.xml, make sure all requirements exist.
options = input_param.dynamic_options or input_param.options
- if options.missing_tool_data_table_name:
- message = "Data table named '%s' is required by tool but not configured" % options.missing_tool_data_table_name
- break
- if options.missing_index_file:
- message = "Index file named '%s' is required by tool but not availble" % options.missing_index_file
- break
+ if options:
+ if options.missing_tool_data_table_name:
+ message = "Data table named '%s' is required by tool but not configured" % options.missing_tool_data_table_name
+ break
+ if options.missing_index_file:
+ message = "Index file named '%s' is required by tool but not availble" % options.missing_index_file
+ break
# Handle calculating the redirect url for the special case where we have nginx proxy
# upload and need to do url_for on the redirect portion of the tool action.
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 changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/915fd558d77b/
changeset: 915fd558d77b
user: greg
date: 2011-09-23 17:32:08
summary: Render an error message on the tool form when the loaded tool includes a dynamically generated select list that is either missing an entry in the tool_data_table_conf.xml file or is missing an index file.
affected #: 1 file (-1 bytes)
--- a/templates/tool_form.mako Fri Sep 23 11:29:45 2011 -0400
+++ b/templates/tool_form.mako Fri Sep 23 11:32:08 2011 -0400
@@ -247,15 +247,35 @@
<br/>
%endif
-## handle calculating the redict url for the special case where we have nginx proxy
-## upload and need to do url_for on the redirect portion of the tool action
<%
+ # Render an error message if a dynamically generated select list is missing a required
+ # index file or entry in the tool_data_table_conf.xml file.
+ from galaxy.tools.parameters.basic import SelectToolParameter
+ message = ""
+ for input_param in tool.input_params:
+ if isinstance( input_param, SelectToolParameter ) and input_param.is_dynamic:
+ # If the tool refers to .loc files or requires an entry in the
+ # tool_data_table_conf.xml, make sure all requirements exist.
+ options = input_param.dynamic_options or input_param.options
+ if options.missing_tool_data_table_name:
+ message = "Data table named '%s' is required by tool but not configured" % options.missing_tool_data_table_name
+ break
+ if options.missing_index_file:
+ message = "Index file named '%s' is required by tool but not availble" % options.missing_index_file
+ break
+
+ # Handle calculating the redirect url for the special case where we have nginx proxy
+ # upload and need to do url_for on the redirect portion of the tool action.
try:
tool_url = h.url_for(tool.action)
except AttributeError:
assert len(tool.action) == 2
tool_url = tool.action[0] + h.url_for(tool.action[1])
%>
+%if message:
+ <div class="errormessage">${message}</div>
+ <br/>
+%endif
<div class="toolForm" id="${tool.id}">
%if tool.has_multiple_pages:
<div class="toolFormTitle">${tool.name} (step ${tool_state.page+1} of ${tool.npages})</div>
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 changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/172a1891f751/
changeset: 172a1891f751
user: greg
date: 2011-09-23 17:29:45
summary: Fix for installing tools from a clones tool shed repository to a local Galaxy instance where tool includes a dynamically generated select list parmater that uses both an index file and a tool-data_table_conf.xml entry.
affected #: 1 file (-1 bytes)
--- a/lib/galaxy/web/base/controller.py Fri Sep 23 11:01:37 2011 -0400
+++ b/lib/galaxy/web/base/controller.py Fri Sep 23 11:29:45 2011 -0400
@@ -2456,7 +2456,7 @@
if error:
log.debug( exception_msg )
break
- elif options.missing_index_file:
+ if options.missing_index_file:
missing_head, missing_tail = os.path.split( options.missing_index_file )
# The repository must contain the required xxx.loc.sample file.
for sample_file in sample_files:
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.