1 new changeset in galaxy-central:
http://bitbucket.org/galaxy/galaxy-central/changeset/3ed860e47dcf/
changeset: 3ed860e47dcf
user: greg
date: 2011-06-16 20:55:21
summary: Change the Galaxy tool shed search feature on the Categories grid to search Repository names and descriptions rather than Category names and descriptions. The ability to search Category names and descriptions has been eliminated. Resolves issue # 480.
affected #: 5 files (2.9 KB)
--- a/lib/galaxy/webapps/community/controllers/admin.py Thu Jun 16 12:27:57 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/admin.py Thu Jun 16 14:55:21 2011 -0400
@@ -323,7 +323,6 @@
group_list_grid = GroupListGrid()
manage_category_list_grid = ManageCategoryListGrid()
repository_list_grid = RepositoryListGrid()
- category_list_grid = CategoryListGrid()
@web.expose
@web.require_admin
@@ -368,21 +367,13 @@
return self.repository_list_grid( trans, **kwd )
@web.expose
@web.require_admin
- def browse_categories( self, trans, **kwd ):
- if 'operation' in kwd:
- operation = kwd[ 'operation' ].lower()
- if operation in [ "repositories_by_category", "repositories_by_user" ]:
- # Eliminate the current filters if any exist.
- for k, v in kwd.items():
- if k.startswith( 'f-' ):
- del kwd[ k ]
- return trans.response.send_redirect( web.url_for( controller='admin',
- action='browse_repositories',
- **kwd ) )
- return self.category_list_grid( trans, **kwd )
- @web.expose
- @web.require_admin
def manage_categories( self, trans, **kwd ):
+ if 'f-free-text-search' in kwd:
+ # Trick to enable searching repository name, description from the CategoryListGrid.
+ # What we've done is rendered the search box for the RepositoryListGrid on the grid.mako
+ # template for the CategoryListGrid. See ~/templates/webapps/community/category/grid.mako.
+ # Since we are searching repositories and not categories, redirect to browse_repositories().
+ return self.browse_repositories( trans, **kwd )
if 'operation' in kwd:
operation = kwd['operation'].lower()
if operation == "create":
--- a/lib/galaxy/webapps/community/controllers/repository.py Thu Jun 16 12:27:57 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/repository.py Thu Jun 16 14:55:21 2011 -0400
@@ -25,7 +25,6 @@
VALID_REPOSITORYNAME_RE = re.compile( "^[a-z0-9\_]+$" )
class CategoryListGrid( grids.Grid ):
- # TODO rename this class to be categoryListGrid when we eliminate all the tools stuff.
class NameColumn( grids.TextColumn ):
def get_value( self, trans, grid, category ):
return category.name
@@ -66,11 +65,6 @@
model_class=model.Repository,
attach_popup=False )
]
- columns.append( grids.MulticolFilterColumn( "Search category name, description",
- cols_to_filter=[ columns[0], columns[1] ],
- key="free-text-search",
- visible=False,
- filterable="standard" ) )
# Override these
global_actions = []
@@ -185,6 +179,12 @@
return trans.fill_template( '/webapps/community/index.mako', message=message, status=status )
@web.expose
def browse_categories( self, trans, **kwd ):
+ if 'f-free-text-search' in kwd:
+ # Trick to enable searching repository name, description from the CategoryListGrid.
+ # What we've done is rendered the search box for the RepositoryListGrid on the grid.mako
+ # template for the CategoryListGrid. See ~/templates/webapps/community/category/grid.mako.
+ # Since we are searching repositories and not categories, redirect to browse_repositories().
+ return self.browse_repositories( trans, **kwd )
if 'operation' in kwd:
operation = kwd['operation'].lower()
if operation in [ "repositories_by_category", "repositories_by_user" ]:
@@ -337,9 +337,9 @@
return "Repository names must contain only lower-case letters, numbers and underscore '_'."
return ''
def __add_hgweb_config_entry( self, trans, repository, repository_path ):
- # Add an entry in the hgweb.config file for a new repository. This enables calls to repository.repo_path.
- # An entry looks something like: repos/test/mira_assembler = database/community_files/000/repo_123.
- # TODO: I believe this can be done via ui.updateconfig(), but I haven't confirmed this...
+ # Add an entry in the hgweb.config file for a new repository.
+ # An entry looks something like:
+ # repos/test/mira_assembler = database/community_files/000/repo_123.
hgweb_config = "%s/hgweb.config" % trans.app.config.root
entry = "repos/%s/%s = %s" % ( repository.user.username, repository.name, repository_path.lstrip( './' ) )
if os.path.exists( hgweb_config ):
@@ -405,9 +405,9 @@
status = params.get( 'status', 'done' )
repository = get_repository( trans, id )
repo = hg.repository( ui.ui(), repository.repo_path )
- # TODO: Our current support for browsing a repository requires copies of the
- # repository files to be in the repository root directory. We do the following
- # to ensure the latest files are being browsed.
+ # Our current support for browsing a repository requires copies of the
+ # repository files to be in the repository root directory. We do the
+ # following to ensure the latest files are being browsed.
current_working_dir = os.getcwd()
repo_dir = repository.repo_path
os.chdir( repo_dir )
@@ -627,10 +627,8 @@
return trans.response.send_redirect( download_url )
@web.json
def open_folder( self, trans, repository_id, key ):
- # TODO: The tool shed includes a repository source file browser, which currently depends upon
- # copies of the hg repository file store in the repo_path for browsing. We need to figure
- # out how to use the mercurial api to browse repository contents so we don't need these copied
- # files ( not bad now, but hwen the tools shed includes data indexes, not good ).
+ # The tool shed includes a repository source file browser, which currently depends upon
+ # copies of the hg repository file store in the repo_path for browsing.
# Avoid caching
trans.response.headers['Pragma'] = 'no-cache'
trans.response.headers['Expires'] = '0'
--- a/lib/galaxy/webapps/community/controllers/upload.py Thu Jun 16 12:27:57 2011 -0400
+++ b/lib/galaxy/webapps/community/controllers/upload.py Thu Jun 16 14:55:21 2011 -0400
@@ -161,6 +161,8 @@
cloned_repo_dir = os.path.join( tmp_archive_dir, 'repo_%d' % repository.id )
return tmp_dir, cloned_repo_dir
def __hg_push( self, trans, repository, file_data, commit_message, current_working_dir, cloned_repo_dir, repo_dir, tmp_dir ):
+ repo = hg.repository( ui.ui(), repo_dir )
+ tip = repo.changectx( "tip" )
# We want these change sets to be associated with the owner of the repository, so we'll
# set the HGUSER environment variable accordingly.
os.environ[ 'HGUSER' ] = trans.user.username
@@ -182,7 +184,10 @@
os.system( 'hg update > /dev/null 2>&1' )
os.chdir( current_working_dir )
shutil.rmtree( tmp_dir )
- message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
+ if tip != repo.changectx( "tip" ):
+ message = "The file '%s' has been successfully uploaded to the repository." % file_data.filename
+ else:
+ message = 'No changes in uploaded files.'
trans.response.send_redirect( web.url_for( controller='repository',
action='browse_repository',
message=message,
--- a/templates/webapps/community/admin/index.mako Thu Jun 16 12:27:57 2011 -0400
+++ b/templates/webapps/community/admin/index.mako Thu Jun 16 14:55:21 2011 -0400
@@ -43,7 +43,7 @@
<div class="page-container" style="padding: 10px;"><div class="toolMenu"><div class="toolSectionList">
- <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_categories', webapp='community' )}">Browse by category</a></div>
+ <div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='repository', action='browse_categories', webapp='community' )}">Browse by category</a></div><div class="toolTitle"><a target="galaxy_main" href="${h.url_for( controller='admin', action='browse_repositories', webapp='community' )}">Browse all repositories</a></div><div class="toolSectionTitle">
Categories
--- a/templates/webapps/community/category/grid.mako Thu Jun 16 12:27:57 2011 -0400
+++ b/templates/webapps/community/category/grid.mako Thu Jun 16 14:55:21 2011 -0400
@@ -1,1 +1,63 @@
-<%inherit file="/grid_base.mako"/>
+<%namespace file="/display_common.mako" import="render_message" />
+<%namespace file="/grid_base.mako" import="*" />
+<%namespace file="/grid_common.mako" import="*" />
+<%inherit file="/grid_base.mako" />
+
+## Render grid header.
+<%def name="render_grid_header( grid, repo_grid, render_title=True)">
+ <div class="grid-header">
+ %if render_title:
+ ${grid_title()}
+ %endif
+ %if grid.global_actions:
+ <ul class="manage-table-actions">
+ %if len( grid.global_actions ) < 4:
+ %for action in grid.global_actions:
+ <li><a class="action-button" href="${h.url_for( **action.url_args )}">${action.label}</a></li>
+ %endfor
+ %else:
+ <li><a class="action-button" id="action-8675309-popup" class="menubutton">Actions</a></li>
+ <div popupmenu="action-8675309-popup">
+ %for action in grid.global_actions:
+ <a class="action-button" href="${h.url_for( **action.url_args )}">${action.label}</a>
+ %endfor
+ </div>
+ %endif
+ </ul>
+ %endif
+ ${render_grid_filters( repo_grid )}
+ </div>
+</%def>
+
+<%def name="make_grid( grid, repo_grid )">
+ <div class="loading-elt-overlay"></div>
+ <table>
+ <tr>
+ <td width="75%">${self.render_grid_header( grid, repo_grid )}</td>
+ <td></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td width="100%" id="grid-message" valign="top">${render_message( message, status )}</td>
+ <td></td>
+ <td></td>
+ </tr>
+ </table>
+ ${render_grid_table( grid, show_item_checkboxes )}
+</%def>
+
+<%def name="grid_body( grid )">
+ <%
+ from galaxy.webapps.community.controllers.repository import RepositoryListGrid
+ repo_grid = RepositoryListGrid()
+ %>
+ ${self.make_grid( grid, repo_grid )}
+</%def>
+
+<%def name="center_panel()">
+ <div style="overflow: auto; height: 100%">
+ <div class="page-container" style="padding: 10px;">
+ ${self.grid_body( grid )}
+ </div>
+ </div>
+</%def>
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/fde1780c27a2/
changeset: fde1780c27a2
user: dannon
date: 2011-06-16 17:26:07
summary: Patch from Jim Johnson enhancing format="input" handling in workflows. Fixes bitbucket issue 582
affected #: 1 file (743 bytes)
--- a/lib/galaxy/workflow/modules.py Thu Jun 16 10:54:29 2011 -0400
+++ b/lib/galaxy/workflow/modules.py Thu Jun 16 11:26:07 2011 -0400
@@ -247,8 +247,20 @@
return data_inputs
def get_data_outputs( self ):
data_outputs = []
+ data_inputs = None
for name, tool_output in self.tool.outputs.iteritems():
- formats = [ tool_output.format ]
+ if tool_output.format_source != None:
+ formats = [ 'input' ] # default to special name "input" which remove restrictions on connections
+ if data_inputs == None:
+ data_inputs = self.get_data_inputs()
+ # find the input parameter referenced by format_source
+ for di in data_inputs:
+ # input names come prefixed with conditional and repeat names separated by '|'
+ # remove prefixes when comparing with format_source
+ if di['name'] != None and di['name'].split('|')[-1] == tool_output.format_source:
+ formats = di['extensions']
+ else:
+ formats = [ tool_output.format ]
for change_elem in tool_output.change_format:
for when_elem in change_elem.findall( 'when' ):
format = when_elem.get( 'format', None )
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/6e1576c83456/
changeset: 6e1576c83456
user: greg
date: 2011-06-16 16:54:29
summary: Add the ability to include field values (in addition to field names ) when defining sample form rows by importing from a csv file. The csv file must be in the following format: the [:FieldValue] is optional, the named form field will contain the value after the ':' if included.
SampleName,DataLibraryName,FolderName,HistoryName,WorkflowName,Field1Name:Field1Value,Field2Name:Field2Value...
affected #: 2 files (596 bytes)
--- a/lib/galaxy/web/controllers/requests_common.py Thu Jun 16 10:22:31 2011 -0400
+++ b/lib/galaxy/web/controllers/requests_common.py Thu Jun 16 10:54:29 2011 -0400
@@ -1049,8 +1049,9 @@
status=status )
def __import_samples( self, trans, cntrller, request, displayable_sample_widgets, libraries, workflows, **kwd ):
"""
- Reads the samples csv file and imports all the samples. The format of the csv file is:
- SampleName,DataLibraryName,DataLibraryFolderName,HistoryName,WorkflowName,Field1Name,Field2Name...
+ Reads the samples csv file and imports all the samples. The csv file must be in the following format. The [:FieldValue]
+ is optional, the form field will contain the value after the ':' if included.
+ SampleName,DataLibraryName,DataLibraryFolderName,HistoryName,WorkflowName,Field1Name:Field1Value,Field2Name:Field2Value...
"""
params = util.Params( kwd )
current_user_roles = trans.get_current_user_roles()
@@ -1123,7 +1124,13 @@
field_values = {}
field_names = row[5:]
for field_name in field_names:
- field_values[ field_name ] = ''
+ if field_name.find( ':' ) >= 0:
+ field_list = field_name.split( ':' )
+ field_name = field_list[0]
+ field_value = field_list[1]
+ else:
+ field_value = ''
+ field_values[ field_name ] = field_value
displayable_sample_widgets.append( dict( id=None,
name=row[0],
bar_code='',
--- a/templates/requests/common/add_samples.mako Thu Jun 16 10:22:31 2011 -0400
+++ b/templates/requests/common/add_samples.mako Thu Jun 16 10:54:29 2011 -0400
@@ -117,8 +117,9 @@
<input type="file" name="file_data" /><input type="submit" name="import_samples_button" value="Import samples"/><div class="toolParamHelp" style="clear: both;">
- The csv file must be in the following format:<br/>
- SampleName,DataLibraryName,DataLibraryFolderName,HistoryName,WorkflowName,Field1Name,Field2Name...
+ The csv file must be in the following format.<br/>
+ The [:FieldValue] is optional, the named form field will contain the value after the ':' if included.<br/>
+ SampleName,DataLibraryName,FolderName,HistoryName,WorkflowName,Field1Name:Field1Value,Field2Name:Field2Value...
</div></div></form>
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/dc8216f1fbfd/
changeset: dc8216f1fbfd
user: jgoecks
date: 2011-06-16 15:39:09
summary: Add support for global operations to grid framework. Thanks Brad Chapman. Fixes #387
affected #: 2 files (836 bytes)
--- a/lib/galaxy/web/framework/helpers/grids.py Wed Jun 15 17:36:38 2011 -0400
+++ b/lib/galaxy/web/framework/helpers/grids.py Thu Jun 16 09:39:09 2011 -0400
@@ -702,7 +702,8 @@
class GridOperation( object ):
def __init__( self, label, key=None, condition=None, allow_multiple=True, allow_popup=True,
- target=None, url_args=None, async_compatible=False, confirm=None ):
+ target=None, url_args=None, async_compatible=False, confirm=None,
+ global_operation=None ):
self.label = label
self.key = key
self.allow_multiple = allow_multiple
@@ -713,6 +714,11 @@
self.async_compatible = async_compatible
# if 'confirm' is set, then ask before completing the operation
self.confirm = confirm
+ # specify a general operation that acts on the full grid
+ # this should be a function returning a dictionary with parameters
+ # to pass to the URL, similar to GridColumn links:
+ # global_operation=(lambda: dict(operation="download")
+ self.global_operation = global_operation
def get_url_args( self, item ):
if self.url_args:
temp = dict( self.url_args )
--- a/templates/grid_base.mako Wed Jun 15 17:36:38 2011 -0400
+++ b/templates/grid_base.mako Thu Jun 16 09:39:09 2011 -0400
@@ -1013,5 +1013,20 @@
</td></tr>
%endif
+ %if len([o for o in grid.operations if o.global_operation]) > 0:
+ <tr>
+ <td colspan="100">
+ %for operation in grid.operations:
+ %if operation.global_operation:
+ <%
+ link = operation.global_operation()
+ href = url( **link )
+ %>
+ <a class="action-button" href="${href}">${operation.label}</a>
+ %endif
+ %endfor
+ </td>
+ </tr>
+ %endif
</%def>
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/ea2fec8ff044/
changeset: ea2fec8ff044
user: richard_burhans
date: 2011-06-15 23:16:23
summary: uncommented genome diversity tools
affected #: 1 file (104 bytes)
--- a/tool_conf.xml.sample Wed Jun 15 17:10:51 2011 -0400
+++ b/tool_conf.xml.sample Wed Jun 15 17:16:23 2011 -0400
@@ -412,21 +412,12 @@
<tool file="human_genome_variation/hilbertvis.xml" /><tool file="human_genome_variation/freebayes.xml" /></section>
-<!--
- This section can be uncommented on test, but the tools are not ready
- for main.
--->
-
-<!--
-
<section name="Genome Diversity" id="gd"><tool file="genome_diversity/extract_primers.xml" /><tool file="genome_diversity/select_snps.xml" /><tool file="genome_diversity/select_restriction_enzymes.xml" /><tool file="genome_diversity/extract_flanking_dna.xml" /></section>
--->
-
<section name="VCF Tools" id="vcf_tools"><tool file="vcf_tools/intersect.xml" /><tool file="vcf_tools/annotate.xml" />
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.