galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
December 2012
- 1 participants
- 142 discussions
commit/galaxy-central: greg: Enhancements to tool shed containers to enable features when tool shed repositories are installed in Galaxy.
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c159eafdf9d3/
changeset: c159eafdf9d3
user: greg
date: 2012-12-20 23:39:31
summary: Enhancements to tool shed containers to enable features when tool shed repositories are installed in Galaxy.
affected #: 5 files
diff -r 4971f90034e88ff9397adcc2cf406d20f09c2714 -r c159eafdf9d3e97e12b7c9db53509f13842c5b96 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -493,20 +493,29 @@
missing_tool_dependencies = {}
for td_key, val in all_tool_dependencies.items():
if td_key in [ 'set_environment' ]:
- for td_info_dict in val:
+ for index, td_info_dict in enumerate( val ):
name = td_info_dict[ 'name' ]
version = None
type = td_info_dict[ 'type' ]
- tool_dependency = get_tool_dependency_by_name_type_repository( trans, repository, name, type )
+ tool_dependency = get_tool_dependency_by_name_type_repository( trans, repository, name, type )
+ if tool_dependency:
+ td_info_dict[ 'status' ] = str( tool_dependency.status )
+ val[ index ] = td_info_dict
+ if tool_dependency.status == trans.model.ToolDependency.installation_status.INSTALLED:
+ tool_dependencies[ td_key ] = val
+ else:
+ missing_tool_dependencies[ td_key ] = val
else:
name = val[ 'name' ]
version = val[ 'version' ]
type = val[ 'type' ]
tool_dependency = get_tool_dependency_by_name_version_type_repository( trans, repository, name, version, type )
- if tool_dependency and tool_dependency.status == trans.model.ToolDependency.installation_status.INSTALLED:
- tool_dependencies[ td_key ] = val
- else:
- missing_tool_dependencies[ td_key ] = val
+ val[ 'status' ] = str( tool_dependency.status )
+ if tool_dependency:
+ if tool_dependency.status == trans.model.ToolDependency.installation_status.INSTALLED:
+ tool_dependencies[ td_key ] = val
+ else:
+ missing_tool_dependencies[ td_key ] = val
else:
tool_dependencies = None
missing_tool_dependencies = None
diff -r 4971f90034e88ff9397adcc2cf406d20f09c2714 -r c159eafdf9d3e97e12b7c9db53509f13842c5b96 lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -87,6 +87,12 @@
tool_dependencies=None,
valid_tools=None,
workflows=None )
+ # Some of the tool dependency folders will include links to display tool dependency information, and some of these links require the repository
+ # id. However we need to be careful because sometimes the repository object is None.
+ if repository:
+ repository_id = repository.id
+ else:
+ repository_id = None
lock = threading.Lock()
lock.acquire( True )
if tool_dependencies:
@@ -125,12 +131,26 @@
containers_dict[ 'repository_dependencies' ] = repository_dependencies_root_folder
# Tool dependencies container.
if tool_dependencies:
- folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id, tool_dependencies, for_galaxy=True )
+ # We only want to display the Status column if the tool_dependency is missing.
+ description = 'click the name to browse the dependency installation directory'
+ folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id,
+ tool_dependencies,
+ for_galaxy=True,
+ repository_id=repository_id ,
+ description=description,
+ display_status=False )
containers_dict[ 'tool_dependencies' ] = tool_dependencies_root_folder
# Missing tool dependencies container.
if missing_tool_dependencies:
- folder_id, missing_tool_dependencies_root_folder = \
- container_util.build_tool_dependencies_folder( folder_id, missing_tool_dependencies, label='Missing tool dependencies', for_galaxy=True )
+ description = 'click the name to install the missing dependency'
+ # We only want to display the Status column if the tool_dependency is missing.
+ folder_id, missing_tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id,
+ missing_tool_dependencies,
+ label='Missing tool dependencies',
+ for_galaxy=True,
+ repository_id=repository_id,
+ description=description,
+ display_status=True )
containers_dict[ 'missing_tool_dependencies' ] = missing_tool_dependencies_root_folder
# Valid tools container.
if valid_tools:
@@ -197,7 +217,12 @@
# Tool dependencies container.
if metadata and 'tool_dependencies' in metadata:
tool_dependencies = metadata[ 'tool_dependencies' ]
- folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id, tool_dependencies, for_galaxy=False )
+ folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id,
+ tool_dependencies,
+ for_galaxy=False,
+ repository_id=None,
+ description=None,
+ display_status=False )
containers_dict[ 'tool_dependencies' ] = tool_dependencies_root_folder
# Valid tools container.
if metadata and 'tools' in metadata:
@@ -2441,26 +2466,28 @@
return file_name
def to_safe_string( text, to_html=True ):
"""Translates the characters in text to an html string"""
- translated = []
- for c in text:
- if c in VALID_CHARS:
- translated.append( c )
- elif c in MAPPED_CHARS:
- translated.append( MAPPED_CHARS[ c ] )
- elif c in [ '\n' ]:
- if to_html:
- translated.append( '<br/>' )
+ if text:
+ translated = []
+ for c in text:
+ if c in VALID_CHARS:
+ translated.append( c )
+ elif c in MAPPED_CHARS:
+ translated.append( MAPPED_CHARS[ c ] )
+ elif c in [ '\n' ]:
+ if to_html:
+ translated.append( '<br/>' )
+ else:
+ translated.append( c )
+ elif c in [ '\r' ]:
+ continue
+ elif c in [ ' ', ' ' ]:
+ translated.append( c )
else:
- translated.append( c )
- elif c in [ '\r' ]:
- continue
- elif c in [ ' ', ' ' ]:
- translated.append( c )
- else:
- translated.append( '' )
- if to_html:
- str( markupsafe.escape( ''.join( translated ) ) )
- return ''.join( translated )
+ translated.append( '' )
+ if to_html:
+ str( markupsafe.escape( ''.join( translated ) ) )
+ return ''.join( translated )
+ return text
def tool_shed_from_repository_clone_url( repository_clone_url ):
return clean_repository_clone_url( repository_clone_url ).split( 'repos' )[ 0 ].rstrip( '/' )
def tool_shed_is_this_tool_shed( toolshed_base_url ):
diff -r 4971f90034e88ff9397adcc2cf406d20f09c2714 -r c159eafdf9d3e97e12b7c9db53509f13842c5b96 lib/galaxy/webapps/community/util/container_util.py
--- a/lib/galaxy/webapps/community/util/container_util.py
+++ b/lib/galaxy/webapps/community/util/container_util.py
@@ -71,12 +71,13 @@
class RepositoryDependency( object ):
"""Repository dependency object"""
- def __init__( self, id=None, toolshed=None, repository_name=None, repository_owner=None, changeset_revision=None ):
+ def __init__( self, id=None, toolshed=None, repository_name=None, repository_owner=None, changeset_revision=None, installation_status=None ):
self.id = id
self.toolshed = toolshed
self.repository_name = repository_name
self.repository_owner = repository_owner
self.changeset_revision = changeset_revision
+ self.installation_status = installation_status
@property
def listify( self ):
return [ self.toolshed, self.repository_name, self.repository_owner, self.changeset_revision ]
@@ -97,13 +98,15 @@
class ToolDependency( object ):
"""Tool dependency object"""
- def __init__( self, id=None, name=None, version=None, type=None, install_dir=None, readme=None ):
+ def __init__( self, id=None, name=None, version=None, type=None, install_dir=None, readme=None, installation_status=None, repository_id=None, ):
self.id = id
self.name = name
self.version = version
self.type = type
self.install_dir = install_dir
self.readme = readme
+ self.installation_status = installation_status
+ self.repository_id = repository_id
class Workflow( object ):
"""Workflow object"""
@@ -115,7 +118,7 @@
self.format_version = format_version
self.annotation = annotation
-def build_datatypes_folder( folder_id, datatypes, label='Datatypes' ):
+def build_datatypes_folder( folder_id, datatypes, label='Datatypes', description=None ):
"""Return a folder hierarchy containing datatypes."""
if datatypes:
datatype_id = 0
@@ -123,6 +126,8 @@
datatypes_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
folder = Folder( id=folder_id, key='datatypes', label=label, parent=datatypes_root_folder )
+ if description:
+ folder.description = description
datatypes_root_folder.folders.append( folder )
# Insert a header row.
datatype_id += 1
@@ -143,7 +148,7 @@
else:
datatypes_root_folder = None
return folder_id, datatypes_root_folder
-def build_invalid_tools_folder( folder_id, invalid_tool_configs, changeset_revision, repository=None, label='Invalid tools' ):
+def build_invalid_tools_folder( folder_id, invalid_tool_configs, changeset_revision, repository=None, label='Invalid tools', description=None ):
"""Return a folder hierarchy containing invalid tools."""
# TODO: Should we display invalid tools on the tool panel selection page when installing the repository into Galaxy?
if invalid_tool_configs:
@@ -152,6 +157,8 @@
invalid_tools_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
folder = Folder( id=folder_id, key='invalid_tools', label=label, parent=invalid_tools_root_folder )
+ if description:
+ folder.description = description
invalid_tools_root_folder.folders.append( folder )
for invalid_tool_config in invalid_tool_configs:
invalid_tool_id += 1
@@ -167,7 +174,7 @@
else:
invalid_tools_root_folder = None
return folder_id, invalid_tools_root_folder
-def build_readme_files_folder( folder_id, readme_files_dict, label='Readme files' ):
+def build_readme_files_folder( folder_id, readme_files_dict, label='Readme files', description=None ):
"""Return a folder hierarchy containing readme text files."""
if readme_files_dict:
multiple_readme_files = len( readme_files_dict ) > 1
@@ -177,6 +184,8 @@
if multiple_readme_files:
folder_id += 1
readme_files_folder = Folder( id=folder_id, key='readme_files', label=label, parent=readme_files_root_folder )
+ if description:
+ readme_files_folder.description = description
readme_files_root_folder.folders.append( readme_files_folder )
for readme_file_name, readme_file_text in readme_files_dict.items():
readme_id += 1
@@ -195,7 +204,7 @@
readme_files_root_folder = None
return folder_id, readme_files_root_folder
def build_repository_dependencies_folder( toolshed_base_url, repository_name, repository_owner, changeset_revision, folder_id, repository_dependencies,
- label='Repository dependencies' ):
+ label='Repository dependencies', description=None ):
"""Return a folder hierarchy containing repository dependencies."""
if repository_dependencies:
repository_dependency_id = 0
@@ -206,6 +215,8 @@
# Create the Repository dependencies folder and add it to the root folder.
repository_dependencies_folder_key = repository_dependencies[ 'root_key' ]
repository_dependencies_folder = Folder( id=folder_id, key=repository_dependencies_folder_key, label=label, parent=repository_dependencies_root_folder )
+ if description:
+ repository_dependencies_folder.description = description
del repository_dependencies[ 'root_key' ]
# The received repository_dependencies is a dictionary with keys: 'root_key', 'description', and one or more repository_dependency keys.
# We want the description value associated with the repository_dependencies_folder.
@@ -268,7 +279,8 @@
else:
tools_root_folder = None
return folder_id, tools_root_folder
-def build_tool_dependencies_folder( folder_id, tool_dependencies, label='Tool dependencies', for_galaxy=False ):
+def build_tool_dependencies_folder( folder_id, tool_dependencies, label='Installed tool dependencies', for_galaxy=False, repository_id=None, description=None,
+ display_status=False ):
"""Return a folder hierarchy containing tool dependencies."""
if tool_dependencies:
tool_dependency_id = 0
@@ -276,6 +288,8 @@
tool_dependencies_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
folder = Folder( id=folder_id, key='tool_dependencies', label=label, parent=tool_dependencies_root_folder )
+ if description:
+ folder.description = description
tool_dependencies_root_folder.folders.append( folder )
# Insert a header row.
tool_dependency_id += 1
@@ -285,12 +299,19 @@
name='Name',
version='Version',
type='Type',
- install_dir='Install directory' )
+ repository_id=repository_id )
+ if display_status:
+ tool_dependency.installation_status = 'Status'
+ else:
+ tool_dependency.install_dir = 'Install directory'
else:
tool_dependency = ToolDependency( id=tool_dependency_id,
name='Name',
version='Version',
- type='Type' )
+ type='Type',
+ repository_id=repository_id )
+ if display_status:
+ tool_dependency.installation_status = 'Status'
folder.tool_dependencies.append( tool_dependency )
for dependency_key, requirements_dict in tool_dependencies.items():
tool_dependency_id += 1
@@ -298,25 +319,37 @@
for set_environment_dict in requirements_dict:
name = set_environment_dict[ 'name' ]
type = set_environment_dict[ 'type' ]
+ if display_status:
+ installation_status = set_environment_dict[ 'status' ]
+ else:
+ installation_status = None
tool_dependency = ToolDependency( id=tool_dependency_id,
name=name,
- type=type )
+ type=type,
+ installation_status=installation_status,
+ repository_id=repository_id )
folder.tool_dependencies.append( tool_dependency )
else:
name = requirements_dict[ 'name' ]
version = requirements_dict[ 'version' ]
type = requirements_dict[ 'type' ]
install_dir = requirements_dict.get( 'install_dir', None )
+ if display_status:
+ installation_status = requirements_dict[ 'status' ]
+ else:
+ installation_status = None
tool_dependency = ToolDependency( id=tool_dependency_id,
name=name,
version=version,
type=type,
- install_dir=install_dir )
+ install_dir=install_dir,
+ installation_status=installation_status,
+ repository_id=repository_id )
folder.tool_dependencies.append( tool_dependency )
else:
tool_dependencies_root_folder = None
return folder_id, tool_dependencies_root_folder
-def build_workflows_folder( folder_id, workflows, repository_metadata, label='Workflows' ):
+def build_workflows_folder( folder_id, workflows, repository_metadata, label='Workflows', description=None ):
"""Return a folder hierarchy containing invalid tools."""
if workflows:
workflow_id = 0
@@ -324,6 +357,8 @@
workflows_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
folder = Folder( id=folder_id, key='workflows', label=label, parent=workflows_root_folder )
+ if description:
+ folder.description = description
workflows_root_folder.folders.append( folder )
# Insert a header row.
workflow_id += 1
diff -r 4971f90034e88ff9397adcc2cf406d20f09c2714 -r c159eafdf9d3e97e12b7c9db53509f13842c5b96 templates/webapps/community/repository/common.mako
--- a/templates/webapps/community/repository/common.mako
+++ b/templates/webapps/community/repository/common.mako
@@ -203,6 +203,12 @@
folder_label = str( folder.label )
if folder.datatypes:
col_span_str = 'colspan="4"'
+ elif folder.label == 'Missing tool dependencies':
+ if folder.description:
+ folder_label = "%s<i> - %s</i>" % ( folder_label, folder.description )
+ else:
+ folder_label = "%s<i> - this repository's tools require handling of these missing dependencies</i>" % folder_label
+ col_span_str = 'colspan="5"'
elif folder.label == 'Repository dependencies':
if folder.description:
folder_label = "%s<i> - %s</i>" % ( folder_label, folder.description )
@@ -217,8 +223,11 @@
elif folder.invalid_tools:
folder_label = "%s<i> - click the tool config file name to see why the tool is invalid</i>" % folder_label
elif folder.tool_dependencies:
- folder_label = "%s<i> - this repository's tools require handling of these dependencies</i>" % folder_label
- col_span_str = 'colspan="3"'
+ if folder.description:
+ folder_label = "%s<i> - %s</i>" % ( folder_label, folder.description )
+ else:
+ folder_label = "%s<i> - this repository's tools require handling of these dependencies</i>" % folder_label
+ col_span_str = 'colspan="4"'
elif folder.workflows:
col_span_str = 'colspan="4"'
%>
@@ -418,7 +427,24 @@
parent="${parent}"
%endif
id="libraryItem-${encoded_id}">
- <${cell_type} style="padding-left: ${pad+20}px;">${tool_dependency.name | h}</${cell_type}>
+ <${cell_type} style="padding-left: ${pad+20}px;">
+ %if row_is_header:
+ ${tool_dependency.name | h}
+ %elif tool_dependency.repository_id:
+ %if not tool_dependency.installation_status:
+ ## tool_dependency.installation_status will be None if the status value in the database is 'Installed'.
+ <a class="action-button" href="${h.url_for( controller='admin_toolshed', action='browse_tool_dependency', id=trans.security.encode_id( tool_dependency.id ), repository_id=trans.security.encode_id( tool_dependency.repository_id ) )}">
+ ${tool_dependency.name | h}
+ </a>
+ %else:
+ <a class="action-button" href="${h.url_for( controller='admin_toolshed', action='manage_tool_dependencies', id=trans.security.encode_id( tool_dependency.id ) )}">
+ ${tool_dependency.name}
+ </a>
+ %endif
+ %else:
+ ${tool_dependency.name | h}
+ %endif
+ </${cell_type}><${cell_type}><%
if tool_dependency.version:
@@ -432,6 +458,9 @@
%if tool_dependency.install_dir:
<${cell_type}>${tool_dependency.install_dir | h}</${cell_type}>
%endif
+ %if tool_dependency.installation_status not in [ 'Installed', None ]:
+ <${cell_type}>${tool_dependency.installation_status | h}</${cell_type}>
+ %endif
</tr><%
my_row = row_counter.count
diff -r 4971f90034e88ff9397adcc2cf406d20f09c2714 -r c159eafdf9d3e97e12b7c9db53509f13842c5b96 test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
--- a/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
+++ b/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
@@ -62,7 +62,9 @@
self.browse_tool_shed( url=self.url, strings_displayed=[ 'Test 0010 Repository With Tool Dependencies' ] )
category = test_db_util.get_category_by_name( 'Test 0010 Repository With Tool Dependencies' )
self.browse_category( category, strings_displayed=[ 'freebayes_0010' ] )
- self.preview_repository_in_tool_shed( 'freebayes_0010', common.test_user_1_name, strings_displayed=[ 'freebayes_0010', 'Valid tools', 'Tool dependencies' ] )
+ self.preview_repository_in_tool_shed( 'freebayes_0010', common.test_user_1_name, strings_displayed=[ 'freebayes_0010',
+ 'Valid tools',
+ 'Installed tool dependencies' ] )
def test_0015_install_freebayes_repository( self ):
'''Install the freebayes repository without installing tool dependencies.'''
strings_displayed=[ 'set your tool_dependency_dir', 'can be automatically installed', 'Set the tool_dependency_dir' ]
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
0
commit/galaxy-central: inithello: Fix server error when attempting to install a repository that has already been installed.
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/4971f90034e8/
changeset: 4971f90034e8
user: inithello
date: 2012-12-20 22:33:19
summary: Fix server error when attempting to install a repository that has already been installed.
affected #: 2 files
diff -r 3c4600ee9bdf65737f3c9e2bb77d6749102b98a3 -r 4971f90034e88ff9397adcc2cf406d20f09c2714 lib/galaxy/util/shed_util.py
--- a/lib/galaxy/util/shed_util.py
+++ b/lib/galaxy/util/shed_util.py
@@ -223,6 +223,7 @@
message += "You can get the latest updates for the repository using the <b>Get updates</b> option from the repository's "
message += "<b>Repository Actions</b> pop-up menu. "
if len( repo_info_dicts ) == 1:
+ created_or_updated_tool_shed_repositories.append( installed_tool_shed_repository )
return created_or_updated_tool_shed_repositories, all_repo_info_dicts, filtered_repo_info_dicts, message
else:
# A tool shed repository is being installed into a Galaxy instance for the first time. We may have the case where a repository
diff -r 3c4600ee9bdf65737f3c9e2bb77d6749102b98a3 -r 4971f90034e88ff9397adcc2cf406d20f09c2714 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -1138,6 +1138,7 @@
created_or_updated_tool_shed_repositories, repo_info_dicts, filtered_repo_info_dicts, message = \
shed_util.create_repository_dependency_objects( trans, tool_path, tool_shed_url, repo_info_dicts, reinstalling=False )
if message and len( repo_info_dicts ) == 1:
+ installed_tool_shed_repository = created_or_updated_tool_shed_repositories[ 0 ]
message+= 'Click <a href="%s">here</a> to manage the repository. ' % \
( web.url_for( controller='admin_toolshed', action='manage_repository', id=trans.security.encode_id( installed_tool_shed_repository.id ) ) )
return trans.response.send_redirect( web.url_for( controller='admin_toolshed',
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
0
commit/galaxy-central: carlfeberhard: functional tests, tags: fix test_005_add_tag_to_history to check for tag using get_tagging_elt_async; twilltestcase: add get_tags (get_tagging_elt_async)
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/3c4600ee9bdf/
changeset: 3c4600ee9bdf
user: carlfeberhard
date: 2012-12-20 21:20:42
summary: functional tests, tags: fix test_005_add_tag_to_history to check for tag using get_tagging_elt_async; twilltestcase: add get_tags (get_tagging_elt_async)
affected #: 2 files
diff -r 5d4372b6e2855a69758716fc20440071d3f19fbf -r 3c4600ee9bdf65737f3c9e2bb77d6749102b98a3 test/base/twilltestcase.py
--- a/test/base/twilltestcase.py
+++ b/test/base/twilltestcase.py
@@ -2474,3 +2474,6 @@
def add_tag( self, item_id, item_class, context, new_tag ):
self.visit_url( "%s/tag/add_tag_async?item_id=%s&item_class=%s&context=%s&new_tag=%s" % \
( self.url, item_id, item_class, context, new_tag ) )
+ def get_tags( self, item_id, item_class ):
+ self.visit_url( "%s/tag/get_tagging_elt_async?item_id=%s&item_class=%s" % \
+ ( self.url, item_id, item_class ) )
diff -r 5d4372b6e2855a69758716fc20440071d3f19fbf -r 3c4600ee9bdf65737f3c9e2bb77d6749102b98a3 test/functional/test_tags.py
--- a/test/functional/test_tags.py
+++ b/test/functional/test_tags.py
@@ -33,6 +33,7 @@
assert admin_user is not None, 'Problem retrieving user with email "test(a)bx.psu.edu" from the database'
global admin_user_private_role
admin_user_private_role = get_private_role( admin_user )
+
def test_005_add_tag_to_history( self ):
"""Testing adding a tag to a history"""
# Logged in as admin_user
@@ -45,7 +46,9 @@
'History',
'history.mako',
'hello' )
- self.check_history_for_string( 'tags : {"hello"' )
+ self.get_tags( self.security.encode_id( history1.id ), 'History' )
+ self.check_page_for_string( 'tags : {"hello": ""}' )
+
def test_010_add_tag_to_history_item( self ):
"""Testing adding a tag to a history item"""
# Logged in as admin_user
@@ -56,6 +59,7 @@
'edit_attributes.mako',
'goodbye' )
self.check_hda_attribute_info( 'tags : {"goodbye"' )
+
def test_999_reset_data_for_later_test_runs( self ):
"""Reseting data to enable later test runs to to be valid"""
# logged in as admin_user
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
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/690ea95aec34/
changeset: 690ea95aec34
user: inithello
date: 2012-12-20 21:14:13
summary: Fix error reinstalling a repository when repo_info_dict is missing from the parameters.
affected #: 1 file
diff -r 5f3a470e75017b36e3fe37e5343043c551b7a2cd -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -1374,7 +1374,6 @@
changeset_revision=tool_shed_repository.installed_changeset_revision )
else:
repository_dependencies = None
- repo = hg.repository( suc.get_configured_ui(), path=os.path.abspath( tool_shed_repository.repo_path( trans.app ) ) )
repo_info_dict = suc.create_repo_info_dict( trans=trans,
repository_clone_url=repository_clone_url,
changeset_revision=tool_shed_repository.installed_changeset_revision,
https://bitbucket.org/galaxy/galaxy-central/changeset/5d4372b6e285/
changeset: 5d4372b6e285
user: inithello
date: 2012-12-20 21:16:56
summary: Tool shed functional tests for reinstalling repositories and installing repositories with invalid tools.
affected #: 10 files
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/base/test_db_util.py
--- a/test/tool_shed/base/test_db_util.py
+++ b/test/tool_shed/base/test_db_util.py
@@ -16,8 +16,15 @@
sa_session.flush()
def get_all_repositories():
return sa_session.query( model.Repository ).all()
-def get_all_installed_repositories():
- return ga_session.query( galaxy.model.ToolShedRepository ).all()
+def get_all_installed_repositories( actually_installed=False ):
+ if actually_installed:
+ return ga_session.query( galaxy.model.ToolShedRepository ) \
+ .filter( and_( galaxy.model.ToolShedRepository.table.c.deleted == False,
+ galaxy.model.ToolShedRepository.table.c.uninstalled == False,
+ galaxy.model.ToolShedRepository.table.c.status == galaxy.model.ToolShedRepository.installation_status.INSTALLED ) ) \
+ .all()
+ else:
+ return ga_session.query( galaxy.model.ToolShedRepository ).all()
def get_category_by_name( name ):
return sa_session.query( model.Category ) \
.filter( model.Category.table.c.name == name ) \
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/base/twilltestcase.py
--- a/test/tool_shed/base/twilltestcase.py
+++ b/test/tool_shed/base/twilltestcase.py
@@ -196,6 +196,10 @@
tc.fv( "1", "selected_files_to_delete", ','.join( files_to_delete ) )
tc.submit( 'select_files_to_delete_button' )
self.check_for_strings( strings_displayed, strings_not_displayed )
+ def display_galaxy_browse_repositories_page( self, strings_displayed=[], strings_not_displayed=[] ):
+ url = '/admin_toolshed/browse_repositories'
+ self.visit_galaxy_url( url )
+ self.check_for_strings( strings_displayed, strings_not_displayed )
def display_installed_repository_manage_page( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ):
url = '/admin_toolshed/manage_repository?id=%s' % self.security.encode_id( installed_repository.id )
self.visit_galaxy_url( url )
@@ -392,7 +396,20 @@
tc.fv( "3", "allow_push", '+%s' % username )
tc.submit( 'user_access_button' )
self.check_for_strings( strings_displayed, strings_not_displayed )
- def install_repository( self, name, owner, category_name, install_tool_dependencies=False, changeset_revision=None, strings_displayed=[], strings_not_displayed=[], preview_strings_displayed=[] ):
+ def initiate_installation_process( self ):
+ html = self.last_page()
+ # Since the installation process is by necessity asynchronous, we have to get the parameters to 'manually' initiate the
+ # installation process. This regex will return the tool shed repository IDs in group(1), the encoded_kwd parameter in
+ # group(2), and the reinstalling flag in group(3) and pass them to the manage_repositories method in the Galaxy
+ # admin_toolshed controller.
+ install_parameters = re.search( 'initiate_repository_installation\( "([^"]+)", "([^"]+)", "([^"]+)" \);', html )
+ iri_ids = install_parameters.group(1)
+ encoded_kwd = install_parameters.group(2)
+ reinstalling = install_parameters.group(3)
+ url = '/admin_toolshed/manage_repositories?operation=install&tool_shed_repository_ids=%s&encoded_kwd=%s&reinstalling=%s' % \
+ ( iri_ids, encoded_kwd, reinstalling )
+ self.visit_galaxy_url( url )
+ def install_repository( self, name, owner, category_name, install_tool_dependencies=False, changeset_revision=None, strings_displayed=[], strings_not_displayed=[], preview_strings_displayed=[], **kwd ):
if test_db_util.get_installed_repository_by_name_owner( name, owner ) is not None:
return
self.browse_tool_shed( url=self.url )
@@ -406,27 +423,16 @@
( changeset_revision, repository_id, self.galaxy_url )
self.visit_url( url )
self.check_for_strings( strings_displayed, strings_not_displayed )
+ form = tc.browser.get_form( 'select_tool_panel_section' )
if 'install_tool_dependencies' in self.last_page():
- form = tc.browser.get_form( 'select_tool_panel_section' )
checkbox = form.find_control( id="install_tool_dependencies" )
checkbox.disabled = False
if install_tool_dependencies:
checkbox.selected = True
else:
checkbox.selected = False
- tc.submit( 'select_tool_panel_section_button' )
- html = self.last_page()
- # Since the installation process is by necessity asynchronous, we have to get the parameters to 'manually' initiate the
- # installation process. This regex will return the tool shed repository IDs in group(1), the encoded_kwd parameter in
- # group(2), and the reinstalling flag in group(3) and pass them to the manage_repositories method in the Galaxy
- # admin_toolshed controller.
- install_parameters = re.search( 'initiate_repository_installation\( "([^"]+)", "([^"]+)", "([^"]+)" \);', html )
- iri_ids = install_parameters.group(1)
- encoded_kwd = install_parameters.group(2)
- reinstalling = install_parameters.group(3)
- url = '/admin_toolshed/manage_repositories?operation=install&tool_shed_repository_ids=%s&encoded_kwd=%s&reinstalling=%s' % \
- ( iri_ids, encoded_kwd, reinstalling )
- self.visit_galaxy_url( url )
+ self.submit_form( 1, 'select_tool_panel_section_button', **kwd )
+ self.initiate_installation_process()
self.wait_for_repository_installation( repository, changeset_revision )
def load_invalid_tool_page( self, repository, tool_xml, changeset_revision, strings_displayed=[], strings_not_displayed=[] ):
url = '/repository/load_invalid_tool?repository_id=%s&tool_config=%s&changeset_revision=%s' % \
@@ -451,6 +457,12 @@
self.visit_url( '/repository/preview_tools_in_changeset?repository_id=%s&changeset_revision=%s' % \
( self.security.encode_id( repository.id ), changeset_revision ) )
self.check_for_strings( strings_displayed, strings_not_displayed )
+ def reinstall_repository( self, installed_repository ):
+ url = '/admin_toolshed/reinstall_repository?id=%s' % self.security.encode_id( installed_repository.id )
+ self.visit_galaxy_url( url )
+ self.initiate_installation_process()
+ tool_shed_repository = test_db_util.get_repository_by_name_and_owner( installed_repository.name, installed_repository.owner )
+ self.wait_for_repository_installation( tool_shed_repository, installed_repository.installed_changeset_revision )
def repository_is_new( self, repository ):
repo = hg.repository( ui.ui(), self.get_repo_path( repository ) )
tip_ctx = repo.changectx( repo.changelog.tip() )
@@ -495,6 +507,17 @@
def tip_has_metadata( self, repository ):
tip = self.get_repository_tip( repository )
return test_db_util.get_repository_metadata_by_repository_id_changeset_revision( repository.id, tip )
+ def uninstall_repository( self, installed_repository, remove_from_disk=True ):
+ url = '/admin_toolshed/deactivate_or_uninstall_repository?id=%s' % self.security.encode_id( installed_repository.id )
+ self.visit_galaxy_url( url )
+# form = tc.browser.get_form( 'deactivate_or_uninstall_repository' )
+ tc.fv ( 1, "remove_from_disk", '1' )
+# checkbox.readonly = False
+# if remove_from_disk:
+# checkbox.selected = True
+ tc.submit( 'deactivate_or_uninstall_repository_button' )
+ strings_displayed = [ 'has been uninstalled', 'The repository named' ]
+ self.check_for_strings( strings_displayed, strings_not_displayed=[] )
def update_installed_repository( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ):
url = '/admin_toolshed/check_for_updates?id=%s' % self.security.encode_id( installed_repository.id )
self.visit_galaxy_url( url )
@@ -521,15 +544,6 @@
self.reset_installed_repository_metadata( installed_repository )
new_metadata = installed_repository.metadata
assert metadata == new_metadata, 'Metadata for installed repository %s differs after metadata reset.' % name
- def verify_installed_repository_on_browse_page( self, installed_repository, strings_displayed=[], strings_not_displayed=[] ):
- url = '/admin_toolshed/browse_repositories'
- self.visit_galaxy_url( url )
- strings_displayed.extend( [ installed_repository.name,
- installed_repository.description,
- installed_repository.owner,
- installed_repository.tool_shed,
- installed_repository.installed_changeset_revision ] )
- self.check_for_strings( strings_displayed, strings_not_displayed )
def verify_installed_repository_data_table_entries( self, data_tables=[] ):
data_table = util.parse_xml( self.shed_tool_data_table_conf )
found = False
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_0070_invalid_tool.py
--- /dev/null
+++ b/test/tool_shed/functional/test_0070_invalid_tool.py
@@ -0,0 +1,53 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+repository_name = 'freebayes_0070'
+repository_description = "Galaxy's freebayes tool"
+repository_long_description = "Long description of Galaxy's freebayes tool"
+
+class TestFreebayesRepository( ShedTwillTestCase ):
+ '''Testing freebayes with tool data table entries, .loc files, and tool dependencies.'''
+ def test_0000_create_or_login_admin_user( self ):
+ """Create necessary user accounts and login as an admin user."""
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ test_user_1 = test_db_util.get_user( common.test_user_1_email )
+ assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ self.logout()
+ self.login( email=common.admin_email, username=common.admin_username )
+ admin_user = test_db_util.get_user( common.admin_email )
+ assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+ def test_0005_create_category( self ):
+ """Create a category for this test suite"""
+ self.create_category( name='Test 0070 Repository With Invalid Tool', description='Tests for a repository with an invalid tool.' )
+ def test_0010_create_test_repository_and_upload_tool_xml( self ):
+ '''Create and populate a freebayes repository. After this test, it should contain one valid tool and one invalid tool.'''
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ category = test_db_util.get_category_by_name( 'Test 0070 Repository With Invalid Tool' )
+ repository = self.get_or_create_repository( name=repository_name,
+ description=repository_description,
+ long_description=repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ 'freebayes/freebayes.xml',
+ valid_tools_only=False,
+ strings_displayed=[],
+ commit_message='Uploaded the tool xml.' )
+ self.upload_file( repository,
+ 'filtering/filtering_1.1.0.tar',
+ valid_tools_only=False,
+ strings_displayed=[],
+ commit_message='Uploaded the tool xml.',
+ remove_repo_files_not_in_tar='No' )
+ self.display_manage_repository_page( repository, strings_displayed=[ 'Valid tools', 'Invalid tools' ] )
+ changeset_revision = self.get_repository_tip( repository )
+ self.check_repository_tools_for_changeset_revision( repository, changeset_revision )
+ self.check_repository_invalid_tools_for_changeset_revision( repository,
+ changeset_revision,
+ strings_displayed=[ 'requires an entry' ],
+ strings_not_displayed=[] )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1000_install_basic_repository.py
--- a/test/tool_shed/functional/test_1000_install_basic_repository.py
+++ b/test/tool_shed/functional/test_1000_install_basic_repository.py
@@ -51,9 +51,17 @@
'''Load the preview page for the filtering_0000 repository in the tool shed.'''
self.preview_repository_in_tool_shed( 'filtering_0000', common.test_user_1_name, strings_displayed=[ 'filtering_0000', 'Valid tools' ] )
def test_0025_install_filtering_repository( self ):
- self.install_repository( 'filtering_0000', common.test_user_1_name, 'Test 0000 Basic Repository Features 1' )
+ self.install_repository( 'filtering_0000',
+ common.test_user_1_name,
+ 'Test 0000 Basic Repository Features 1',
+ new_tool_panel_section='test_1000' )
installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
- self.verify_installed_repository_on_browse_page( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
self.display_installed_repository_manage_page( installed_repository,
strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'Filter1' ] )
self.verify_tool_metadata_for_installed_repository( installed_repository )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
--- a/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
+++ b/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py
@@ -70,9 +70,15 @@
common.test_user_1_name,
'Test 0010 Repository With Tool Dependencies',
strings_displayed=strings_displayed,
- install_tool_dependencies=False )
+ install_tool_dependencies=False,
+ new_tool_panel_section='test_1010' )
installed_repository = test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name )
- self.verify_installed_repository_on_browse_page( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
self.display_installed_repository_manage_page( installed_repository,
strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'FreeBayes' ] )
self.check_installed_repository_tool_dependencies( installed_repository, dependencies_installed=False )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py
--- a/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py
+++ b/test/tool_shed/functional/test_1020_install_repository_with_repository_dependencies.py
@@ -65,9 +65,18 @@
self.preview_repository_in_tool_shed( 'emboss_0020', common.test_user_1_name, strings_displayed=[ 'emboss_0020', 'Valid tools' ] )
def test_0015_install_emboss_repository( self ):
'''Install the emboss repository without installing tool dependencies.'''
- self.install_repository( 'emboss_0020', common.test_user_1_name, 'Test 0020 Basic Repository Dependencies', install_tool_dependencies=False )
+ self.install_repository( 'emboss_0020',
+ common.test_user_1_name,
+ 'Test 0020 Basic Repository Dependencies',
+ install_tool_dependencies=False,
+ new_tool_panel_section='test_1020' )
installed_repository = test_db_util.get_installed_repository_by_name_owner( 'emboss_0020', common.test_user_1_name )
- self.verify_installed_repository_on_browse_page( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
self.display_installed_repository_manage_page( installed_repository,
strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'antigenic' ] )
self.check_installed_repository_tool_dependencies( installed_repository, dependencies_installed=False )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py
--- a/test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py
+++ b/test/tool_shed/functional/test_1030_install_repository_with_dependency_revisions.py
@@ -107,9 +107,15 @@
common.test_user_1_name,
'Test 0030 Repository Dependency Revisions',
changeset_revision=revisions[1],
- install_tool_dependencies=False )
+ install_tool_dependencies=False,
+ new_tool_panel_section='test_1030' )
installed_repository = test_db_util.get_installed_repository_by_name_owner( 'emboss_0030', common.test_user_1_name )
- self.verify_installed_repository_on_browse_page( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
self.display_installed_repository_manage_page( installed_repository,
strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'antigenic' ] )
self.check_installed_repository_tool_dependencies( installed_repository, dependencies_installed=False )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1070_invalid_tool.py
--- /dev/null
+++ b/test/tool_shed/functional/test_1070_invalid_tool.py
@@ -0,0 +1,80 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+repository_name = 'freebayes_0070'
+repository_description = "Galaxy's freebayes tool"
+repository_long_description = "Long description of Galaxy's freebayes tool"
+
+class TestFreebayesRepository( ShedTwillTestCase ):
+ '''Testing freebayes with tool data table entries, .loc files, and tool dependencies.'''
+ def test_0000_create_or_login_admin_user( self ):
+ """Create necessary user accounts and login as an admin user."""
+ self.galaxy_logout()
+ self.galaxy_login( email=common.admin_email, username=common.admin_username )
+ galaxy_admin_user = test_db_util.get_galaxy_user( common.admin_email )
+ assert galaxy_admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email
+ galaxy_admin_user_private_role = test_db_util.get_galaxy_private_role( galaxy_admin_user )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ test_user_1 = test_db_util.get_user( common.test_user_1_email )
+ assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ self.logout()
+ self.login( email=common.admin_email, username=common.admin_username )
+ admin_user = test_db_util.get_user( common.admin_email )
+ assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+ def test_0005_ensure_existence_of_repository_and_category( self ):
+ '''Create freebayes repository and upload only freebayes.xml. This should result in an error message and invalid tool.'''
+ self.create_category( name='Test 0070 Repository With Invalid Tool',
+ description='Tests for a repository with an invalid tool.' )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ category = test_db_util.get_category_by_name( 'Test 0070 Repository With Invalid Tool' )
+ repository = self.get_or_create_repository( name=repository_name,
+ description=repository_description,
+ long_description=repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ if self.repository_is_new( repository ):
+ self.upload_file( repository,
+ 'freebayes/freebayes.xml',
+ valid_tools_only=False,
+ commit_message='Uploaded the invalid tool xml.' )
+ self.upload_file( repository,
+ 'filtering/filtering_1.1.0.tar',
+ valid_tools_only=False,
+ commit_message='Uploaded the valid tool xml.',
+ remove_repo_files_not_in_tar='No' )
+ def test_0010_browse_tool_shed( self ):
+ """Browse the available tool sheds in this Galaxy instance and preview the freebayes repository."""
+ self.galaxy_logout()
+ self.galaxy_login( email=common.admin_email, username=common.admin_username )
+ self.browse_tool_shed( url=self.url, strings_displayed=[ 'Test 0070 Repository With Invalid Tool' ] )
+ category = test_db_util.get_category_by_name( 'Test 0070 Repository With Invalid Tool' )
+ self.browse_category( category, strings_displayed=[ repository_name ] )
+ self.preview_repository_in_tool_shed( repository_name, common.test_user_1_name, strings_displayed=[ repository_name ] )
+ def test_0015_install_freebayes_repository( self ):
+ '''Install the test repository without installing tool dependencies.'''
+ self.install_repository( repository_name,
+ common.test_user_1_name,
+ 'Test 0070 Repository With Invalid Tool',
+ install_tool_dependencies=False,
+ new_tool_panel_section='test_1070' )
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( repository_name, common.test_user_1_name )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
+ self.display_installed_repository_manage_page( installed_repository,
+ strings_displayed=[ 'simple expressions', 'Invalid tools' ],
+ strings_not_displayed=[ 'variant detector' ] )
+ self.verify_tool_metadata_for_installed_repository( installed_repository )
+ self.update_installed_repository( installed_repository, strings_displayed=[ "there are no updates available" ] )
+ assert 'invalid_tools' in installed_repository.metadata, 'No invalid tools were defined in %s.' % installed_repository.name
+ def test_0020_verify_installed_repository_metadata( self ):
+ '''Verify that resetting the metadata on an installed repository does not change the metadata.'''
+ self.verify_installed_repository_metadata_unchanged( repository_name, common.test_user_1_name )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1200_uninstall_and_reinstall_basic_repository.py
--- /dev/null
+++ b/test/tool_shed/functional/test_1200_uninstall_and_reinstall_basic_repository.py
@@ -0,0 +1,96 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+class BasicToolShedFeatures( ShedTwillTestCase ):
+ '''Test installing a basic repository.'''
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts."""
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ test_user_1 = test_db_util.get_user( common.test_user_1_email )
+ assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ self.logout()
+ self.login( email=common.admin_email, username=common.admin_username )
+ admin_user = test_db_util.get_user( common.admin_email )
+ assert admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+ self.galaxy_logout()
+ self.galaxy_login( email=common.admin_email, username=common.admin_username )
+ galaxy_admin_user = test_db_util.get_galaxy_user( common.admin_email )
+ assert galaxy_admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email
+ galaxy_admin_user_private_role = test_db_util.get_galaxy_private_role( galaxy_admin_user )
+ def test_0005_ensure_repositories_and_categories_exist( self ):
+ '''Create the 0000 category and upload the filtering repository to the tool shed, if necessary.'''
+ category = self.create_category( name='Test 0000 Basic Repository Features 1', description='Test 0000 Basic Repository Features 1' )
+ self.create_category( name='Test 0000 Basic Repository Features 2', description='Test 0000 Basic Repository Features 2' )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name='filtering_0000',
+ description="Galaxy's filtering tool",
+ long_description="Long description of Galaxy's filtering tool",
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ) )
+ if self.repository_is_new( repository ):
+ self.upload_file( repository, 'filtering/filtering_1.1.0.tar', commit_message="Uploaded filtering 1.1.0" )
+ self.upload_file( repository, 'filtering/filtering_0000.txt', commit_message="Uploaded readme for 1.1.0", remove_repo_files_not_in_tar='No' )
+ self.upload_file( repository, 'filtering/filtering_2.2.0.tar', commit_message="Uploaded filtering 2.2.0", remove_repo_files_not_in_tar='No' )
+ self.upload_file( repository, 'readme.txt', commit_message="Uploaded readme for 2.2.0", remove_repo_files_not_in_tar='No' )
+ def test_0010_install_filtering_repository( self ):
+ '''Install the filtering repository into the Galaxy instance.'''
+ self.galaxy_logout()
+ self.galaxy_login( email=common.admin_email, username=common.admin_username )
+ self.install_repository( 'filtering_0000',
+ common.test_user_1_name,
+ 'Test 0000 Basic Repository Features 1',
+ new_tool_panel_section='test_1000' )
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
+ def test_0015_uninstall_filtering_repository( self ):
+ '''Uninstall the filtering repository.'''
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
+ old_metadata = installed_repository.metadata
+ self.uninstall_repository( installed_repository, remove_from_disk=True )
+ strings_not_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed )
+ def test_0020_reinstall_filtering_repository( self ):
+ '''Reinstall the filtering repository.'''
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
+ self.reinstall_repository( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
+ self.display_installed_repository_manage_page( installed_repository,
+ strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'Filter1' ] )
+ self.verify_tool_metadata_for_installed_repository( installed_repository )
+ def test_0025_deactivate_filtering_repository( self ):
+ '''Deactivate the filtering repository without removing it from disk.'''
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
+ self.uninstall_repository( installed_repository, remove_from_disk=False )
+ strings_not_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_not_displayed=strings_not_displayed )
+ def test_0030_reactivate_filtering_repository( self ):
+ '''Reactivate the filtering repository and verify that it now shows up in the list of installed repositories.'''
+ installed_repository = test_db_util.get_installed_repository_by_name_owner( 'filtering_0000', common.test_user_1_name )
+ self.reinstall_repository( installed_repository )
+ strings_displayed = [ installed_repository.name,
+ installed_repository.description,
+ installed_repository.owner,
+ installed_repository.tool_shed,
+ installed_repository.installed_changeset_revision ]
+ self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
+ self.display_installed_repository_manage_page( installed_repository,
+ strings_displayed=[ 'Installed tool shed repository', 'Valid tools', 'Filter1' ] )
+ self.verify_tool_metadata_for_installed_repository( installed_repository )
diff -r 690ea95aec34dd0aaaba06f016d2468ea81f83e1 -r 5d4372b6e2855a69758716fc20440071d3f19fbf test/tool_shed/functional/test_1300_reset_all_metadata.py
--- a/test/tool_shed/functional/test_1300_reset_all_metadata.py
+++ b/test/tool_shed/functional/test_1300_reset_all_metadata.py
@@ -258,7 +258,7 @@
def test_0015_reset_metadata_on_all_repositories( self ):
'''Reset metadata on all repositories, then verify that it has not changed.'''
repository_metadata = dict()
- repositories = test_db_util.get_all_installed_repositories()
+ repositories = test_db_util.get_all_installed_repositories( actually_installed=True )
for repository in repositories:
repository_metadata[ self.security.encode_id( repository.id ) ] = repository.metadata
self.reset_metadata_on_selected_installed_repositories( repository_metadata.keys() )
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
0
commit/galaxy-central: greg: Fixes for handling tool dependency installation into a Galaxy instance.
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/5f3a470e7501/
changeset: 5f3a470e7501
user: greg
date: 2012-12-20 20:26:27
summary: Fixes for handling tool dependency installation into a Galaxy instance.
affected #: 2 files
diff -r 276c47b70c285fe9bee6aef86e65ca9463b661ae -r 5f3a470e75017b36e3fe37e5343043c551b7a2cd lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -79,7 +79,14 @@
invalid_tools, missing_tool_dependencies, readme_files_dict, repository_dependencies, tool_dependencies,
valid_tools, workflows ):
"""Return a dictionary of containers for the received repository's dependencies and readme files for display during installation to Galaxy."""
- containers_dict = dict( readme_files=None, repository_dependencies=None, tool_dependencies=None )
+ containers_dict = dict( datatypes=None,
+ invalid_tools=None,
+ missing_tool_dependencies=None,
+ readme_files=None,
+ repository_dependencies=None,
+ tool_dependencies=None,
+ valid_tools=None,
+ workflows=None )
lock = threading.Lock()
lock.acquire( True )
if tool_dependencies:
diff -r 276c47b70c285fe9bee6aef86e65ca9463b661ae -r 5f3a470e75017b36e3fe37e5343043c551b7a2cd lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -1258,17 +1258,6 @@
install_tool_dependencies_check_box = CheckboxField( 'install_tool_dependencies', checked=install_tool_dependencies_check_box_checked )
# Handle repository dependencies check box.
install_repository_dependencies_check_box = CheckboxField( 'install_repository_dependencies', checked=True )
- log.debug("PPPPP In prepare_for_install, containers_dict: %s" % str( containers_dict ))
- """
- PPPPP In prepare_for_install,
- containers_dict:
- {'repository_dependencies': None,
- 'missing_tool_dependencies': <galaxy.webapps.community.util.container_util.Folder object at 0x108a56f0>,
- 'readme_files': None,
- 'tool_dependencies': None}
- FAIL
-
- """
return trans.fill_template( '/admin/tool_shed_repository/select_tool_panel_section.mako',
encoded_repo_info_dicts=encoded_repo_info_dicts,
includes_tools=includes_tools,
@@ -1538,9 +1527,10 @@
valid_tools = metadata.get( 'tools', None )
workflows = metadata.get( 'workflows', None )
# All tool dependencies will be considered missing since we are reinstalling the repository.
- for td in tool_dependencies:
- missing_tool_dependencies.append( td )
- tool_dependencies = None
+ if tool_dependencies:
+ for td in tool_dependencies:
+ missing_tool_dependencies.append( td )
+ tool_dependencies = None
containers_dict = suc.build_repository_containers_for_galaxy( trans=trans,
toolshed_base_url=tool_shed_url,
repository_name=tool_shed_repository.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
0
commit/galaxy-central: carlfeberhard: expose_api: add Cache-Control response headers to prevent some browsers from caching api calls
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/276c47b70c28/
changeset: 276c47b70c28
user: carlfeberhard
date: 2012-12-20 19:42:45
summary: expose_api: add Cache-Control response headers to prevent some browsers from caching api calls
affected #: 1 file
diff -r 1073bded37116da144e4e292462346fb7b035bca -r 276c47b70c285fe9bee6aef86e65ca9463b661ae lib/galaxy/web/framework/__init__.py
--- a/lib/galaxy/web/framework/__init__.py
+++ b/lib/galaxy/web/framework/__init__.py
@@ -155,6 +155,8 @@
error_message = 'Your request did not appear to be valid JSON, please consult the API documentation'
return error
trans.response.set_content_type( "application/json" )
+ # send 'do not cache' headers to handle IE's caching of ajax get responses
+ trans.response.headers[ 'Cache-Control' ] = "max-age=0,no-cache,no-store"
# Perform api_run_as processing, possibly changing identity
if 'payload' in kwargs and 'run_as' in kwargs['payload']:
if not trans.user_can_do_run_as():
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
0
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1073bded3711/
changeset: 1073bded3711
user: carlfeberhard
date: 2012-12-20 18:35:09
summary: pack scripts
affected #: 3 files
diff -r a53fe9c9395621e0c9376ee7109274612f735cb9 -r 1073bded37116da144e4e292462346fb7b035bca static/scripts/packed/mvc/base-mvc.js
--- a/static/scripts/packed/mvc/base-mvc.js
+++ b/static/scripts/packed/mvc/base-mvc.js
@@ -1,1 +1,1 @@
-var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){return this.logger.log.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(a){return this.localizedStrings[a]||a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;function e(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this._save();return this},deleteKey:function(j){delete i[j];this._save();return this},_save:function(){return h._save()},toString:function(){return("StorageRecursionHelper("+i+")")}}}var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);jQuery.extend(f,{_save:function(h){return c(g,f.get())},destroy:function(){return a(g)},toString:function(){return"PersistantStorage("+g+")"}});return f};
\ No newline at end of file
+var BaseModel=Backbone.RelationalModel.extend({defaults:{name:null,hidden:false},show:function(){this.set("hidden",false)},hide:function(){this.set("hidden",true)},is_visible:function(){return !this.attributes.hidden}});var BaseView=Backbone.View.extend({initialize:function(){this.model.on("change:hidden",this.update_visible,this);this.update_visible()},update_visible:function(){if(this.model.attributes.hidden){this.$el.hide()}else{this.$el.show()}}});var LoggableMixin={logger:null,log:function(){if(this.logger){var a=this.logger.log;if(typeof this.logger.log=="object"){a=Function.prototype.bind.call(this.logger.log,this.logger)}return a.apply(this.logger,arguments)}return undefined}};var GalaxyLocalization=jQuery.extend({},{ALIAS_NAME:"_l",localizedStrings:{},setLocalizedString:function(b,a){var c=this;var d=function(f,e){if(f!==e){c.localizedStrings[f]=e}};if(jQuery.type(b)==="string"){d(b,a)}else{if(jQuery.type(b)==="object"){jQuery.each(b,function(e,f){d(e,f)})}else{throw ("Localization.setLocalizedString needs either a string or object as the first argument, given: "+b)}}},localize:function(a){return this.localizedStrings[a]||a},toString:function(){return"GalaxyLocalization"}});window[GalaxyLocalization.ALIAS_NAME]=function(a){return GalaxyLocalization.localize(a)};var PersistantStorage=function(g,d){if(!g){throw ("PersistantStorage needs storageKey argument")}d=d||{};var b=jQuery.jStorage.get,c=jQuery.jStorage.set,a=jQuery.jStorage.deleteKey;function e(i,h){i=i||{};h=h||null;return{get:function(j){if(j===undefined){return i}else{if(i.hasOwnProperty(j)){return(jQuery.type(i[j])==="object")?(new e(i[j],this)):(i[j])}}return undefined},set:function(j,k){i[j]=k;this._save();return this},deleteKey:function(j){delete i[j];this._save();return this},_save:function(){return h._save()},toString:function(){return("StorageRecursionHelper("+i+")")}}}var f={};data=b(g);if(data===null){data=jQuery.extend(true,{},d);c(g,data)}f=new e(data);jQuery.extend(f,{_save:function(h){return c(g,f.get())},destroy:function(){return a(g)},toString:function(){return"PersistantStorage("+g+")"}});return f};
\ No newline at end of file
diff -r a53fe9c9395621e0c9376ee7109274612f735cb9 -r 1073bded37116da144e4e292462346fb7b035bca static/scripts/packed/mvc/dataset/hda-model.js
--- a/static/scripts/packed/mvc/dataset/hda-model.js
+++ b/static/scripts/packed/mvc/dataset/hda-model.js
@@ -1,1 +1,1 @@
-var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"ok",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:true},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",this.get("id"),a,this.previous("state"),b)}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
+var HistoryDatasetAssociation=BaseModel.extend(LoggableMixin).extend({defaults:{history_id:null,model_class:"HistoryDatasetAssociation",hid:0,id:null,name:"(unnamed dataset)",state:"ok",data_type:null,file_size:0,file_ext:"",meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:true},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("history_id")+"/contents/"+this.get("id")},initialize:function(){this.log(this+".initialize",this.attributes);this.log("\tparent history_id: "+this.get("history_id"));if(!this.get("accessible")){this.set("state",HistoryDatasetAssociation.STATES.NOT_VIEWABLE)}this.on("change:state",function(b,a){this.log(this+" has changed state:",b,a);if(this.inReadyState()){this.trigger("state:ready",b,a,this.previous("state"))}})},isDeletedOrPurged:function(){return(this.get("deleted")||this.get("purged"))},isVisible:function(b,c){var a=true;if((!b)&&(this.get("deleted")||this.get("purged"))){a=false}if((!c)&&(!this.get("visible"))){a=false}return a},inReadyState:function(){var a=this.get("state");return((a===HistoryDatasetAssociation.STATES.OK)||(a===HistoryDatasetAssociation.STATES.EMPTY)||(a===HistoryDatasetAssociation.STATES.FAILED_METADATA)||(a===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(a===HistoryDatasetAssociation.STATES.DISCARDED)||(a===HistoryDatasetAssociation.STATES.ERROR))},hasData:function(){return(this.get("file_size")>0)},toString:function(){var a=this.get("id")||"";if(this.get("name")){a+=':"'+this.get("name")+'"'}return"HistoryDatasetAssociation("+a+")"}});HistoryDatasetAssociation.STATES={UPLOAD:"upload",QUEUED:"queued",PAUSED:"paused",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};var HDACollection=Backbone.Collection.extend(LoggableMixin).extend({model:HistoryDatasetAssociation,initialize:function(){},ids:function(){return this.map(function(a){return a.id})},getByHid:function(a){return _.first(this.filter(function(b){return b.get("hid")===a}))},hidToCollectionIndex:function(a){if(!a){return this.models.length}var d=this.models.length-1;for(var b=d;b>=0;b--){var c=this.at(b).get("hid");if(c==a){return b}if(c<a){return b+1}}return null},getVisible:function(a,b){return this.filter(function(c){return c.isVisible(a,b)})},getStateLists:function(){var a={};_.each(_.values(HistoryDatasetAssociation.STATES),function(b){a[b]=[]});this.each(function(b){a[b.get("state")].push(b.get("id"))});return a},running:function(){var a=[];this.each(function(b){if(!b.inReadyState()){a.push(b.get("id"))}});return a},update:function(a){this.log(this+"update:",a);if(!(a&&a.length)){return[]}var c=this,b=null;_.each(a,function(f,d){var e=c.get(f);if(e){e.fetch();b.push(e)}});return b},toString:function(){return("HDACollection()")}});
\ No newline at end of file
diff -r a53fe9c9395621e0c9376ee7109274612f735cb9 -r 1073bded37116da144e4e292462346fb7b035bca static/scripts/packed/mvc/history/history-panel.js
--- a/static/scripts/packed/mvc/history/history-panel.js
+++ b/static/scripts/packed/mvc/history/history-panel.js
@@ -1,1 +1,1 @@
-var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,events:{"click #history-tag":"loadAndDisplayTags"},initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this._setUpWebStorage(a.initiallyExpanded,a.show_deleted,a.show_hidden);this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.bind("change:hidden",this.render,this);this.model.hdas.bind("change:state",function(c,d,b){if((c.inReadyState())&&(!c.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(c.get("id"))}},this);this.hdaViews={};this.urls={}},_setUpWebStorage:function(b,a,c){this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(b){this.storage.set("exandedHdas",b)}if((a===true)||(a===false)){this.storage.set("show_deleted",a)}if((c===true)||(c===false)){this.storage.set("show_hidden",c)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log(this+" (init'd) storage:",this.storage.get())},add:function(a){this.render()},addAll:function(){this.render()},handleHdaDeletionChange:function(a){if(a.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(a.get("id"))}},removeHdaView:function(c,b){var a=this.hdaViews[c];if(!a){return}a.remove(b);delete this.hdaViews[c];if(_.isEmpty(this.hdaViews)){this.render()}},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this._renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b._setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},_renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates,logger:a.logger});a._setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},_setUpHdaListeners:function(b){var a=this;b.bind("body-expanded",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-collapsed",function(c){a.storage.get("expandedHdas").deleteKey(c)})},_setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(a.is(":hidden")){a.slideDown("fast")}},hideQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(!a.is(":hidden")){a.slideUp("fast")}},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryPanel("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
+var HistoryPanel=BaseView.extend(LoggableMixin).extend({el:"body.historyPage",HDAView:HDAEditView,events:{"click #history-tag":"loadAndDisplayTags"},initialize:function(a){if(a.logger){this.logger=this.model.logger=a.logger}this.log(this+".initialize:",a);if(!a.urlTemplates){throw (this+" needs urlTemplates on initialize")}if(!a.urlTemplates.history){throw (this+" needs urlTemplates.history on initialize")}if(!a.urlTemplates.hda){throw (this+" needs urlTemplates.hda on initialize")}this.urlTemplates=a.urlTemplates.history;this.hdaUrlTemplates=a.urlTemplates.hda;this._setUpWebStorage(a.initiallyExpanded,a.show_deleted,a.show_hidden);this.model.bind("change:nice_size",this.updateHistoryDiskSize,this);this.model.hdas.bind("add",this.add,this);this.model.hdas.bind("reset",this.addAll,this);this.model.hdas.bind("change:deleted",this.handleHdaDeletionChange,this);this.model.hdas.bind("state:ready",function(c,d,b){if((!c.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHdaView(c.get("id"))}},this);this.hdaViews={};this.urls={}},_setUpWebStorage:function(b,a,c){this.storage=new PersistantStorage("HistoryView."+this.model.get("id"),{expandedHdas:{},show_deleted:false,show_hidden:false});this.log(this+" (prev) storage:",JSON.stringify(this.storage.get(),null,2));if(b){this.storage.set("exandedHdas",b)}if((a===true)||(a===false)){this.storage.set("show_deleted",a)}if((c===true)||(c===false)){this.storage.set("show_hidden",c)}this.show_deleted=this.storage.get("show_deleted");this.show_hidden=this.storage.get("show_hidden");this.log(this+" (init'd) storage:",this.storage.get())},add:function(a){this.render()},addAll:function(){this.render()},handleHdaDeletionChange:function(a){if(a.get("deleted")&&!this.storage.get("show_deleted")){this.removeHdaView(a.get("id"))}},removeHdaView:function(c,b){var a=this.hdaViews[c];if(!a){return}a.remove(b);delete this.hdaViews[c];if(_.isEmpty(this.hdaViews)){this.render()}},render:function(){var b=this,d=b.toString()+".set-up",c=$("<div/>"),a=this.model.toJSON(),e=(this.$el.children().size()===0);a.urls=this._renderUrls(a);c.append(HistoryPanel.templates.historyPanel(a));c.find(".tooltip").tooltip({placement:"bottom"});if(!this.model.hdas.length||!this.renderItems(c.find("#"+this.model.get("id")+"-datasets"))){c.find("#emptyHistoryMessage").show()}$(b).queue(d,function(f){b.$el.fadeOut("fast",function(){f()})});$(b).queue(d,function(f){b.$el.html("");b.$el.append(c.children());b.$el.fadeIn("fast",function(){f()})});$(b).queue(d,function(f){this.log(b+" rendered:",b.$el);b._setUpBehaviours();if(e){b.trigger("rendered:initial")}else{b.trigger("rendered")}f()});$(b).dequeue(d);return this},_renderUrls:function(a){var b=this;b.urls={};_.each(this.urlTemplates,function(d,c){b.urls[c]=_.template(d,a)});return b.urls},renderItems:function(b){this.hdaViews={};var a=this,c=this.model.hdas.getVisible(this.storage.get("show_deleted"),this.storage.get("show_hidden"));_.each(c,function(f){var e=f.get("id"),d=a.storage.get("expandedHdas").get(e);a.hdaViews[e]=new a.HDAView({model:f,expanded:d,urlTemplates:a.hdaUrlTemplates,logger:a.logger});a._setUpHdaListeners(a.hdaViews[e]);b.prepend(a.hdaViews[e].render().$el)});return c.length},_setUpHdaListeners:function(b){var a=this;b.bind("body-expanded",function(c){a.storage.get("expandedHdas").set(c,true)});b.bind("body-collapsed",function(c){a.storage.get("expandedHdas").deleteKey(c)})},_setUpBehaviours:function(){if(!(this.model.get("user")&&this.model.get("user").email)){return}var a=this.$("#history-annotation-area");this.$("#history-annotate").click(function(){if(a.is(":hidden")){a.slideDown("fast")}else{a.slideUp("fast")}return false});async_save_text("history-name-container","history-name",this.urls.rename,"new_name",18);async_save_text("history-annotation-container","history-annotation",this.urls.annotate,"new_annotation",18,true,4)},updateHistoryDiskSize:function(){this.$el.find("#history-size").text(this.model.get("nice_size"))},showQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(a.is(":hidden")){a.slideDown("fast")}},hideQuotaMessage:function(){var a=this.$el.find("#quota-message-container");if(!a.is(":hidden")){a.slideUp("fast")}},toggleShowDeleted:function(){this.storage.set("show_deleted",!this.storage.get("show_deleted"));this.render();return this.storage.get("show_deleted")},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render();return this.storage.get("show_hidden")},collapseAllHdaBodies:function(){_.each(this.hdaViews,function(a){a.toggleBodyVisibility(null,false)});this.storage.set("expandedHdas",{})},loadAndDisplayTags:function(c){this.log(this+".loadAndDisplayTags",c);var d=this.$el.find("#history-tag-area"),b=d.find(".tag-elt");this.log("\t tagArea",d," tagElt",b);if(d.is(":hidden")){if(!jQuery.trim(b.html())){var a=this;$.ajax({url:a.urls.tag,error:function(){alert(_l("Tagging failed"))},success:function(e){b.html(e);b.find(".tooltip").tooltip();d.slideDown("fast")}})}else{d.slideDown("fast")}}else{d.slideUp("fast")}return false},toString:function(){var a=this.model.get("name")||"";return"HistoryPanel("+a+")"}});HistoryPanel.templates={historyPanel:Handlebars.templates["template-history-historyPanel"]};
\ No newline at end of file
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
0
commit/galaxy-central: carlfeberhard: base-mvc: fix to handle IE console methods being objects; history panel: handle workflow hide on finish using state:ready event
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/a53fe9c93956/
changeset: a53fe9c93956
user: carlfeberhard
date: 2012-12-20 18:25:09
summary: base-mvc: fix to handle IE console methods being objects; history panel: handle workflow hide on finish using state:ready event
affected #: 3 files
diff -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 -r a53fe9c9395621e0c9376ee7109274612f735cb9 static/scripts/mvc/base-mvc.js
--- a/static/scripts/mvc/base-mvc.js
+++ b/static/scripts/mvc/base-mvc.js
@@ -78,7 +78,11 @@
*/
log : function(){
if( this.logger ){
- return this.logger.log.apply( this.logger, arguments );
+ var log = this.logger.log;
+ if( typeof this.logger.log == 'object' ){
+ log = Function.prototype.bind.call( this.logger.log, this.logger );
+ }
+ return log.apply( this.logger, arguments );
}
return undefined;
}
diff -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 -r a53fe9c9395621e0c9376ee7109274612f735cb9 static/scripts/mvc/dataset/hda-model.js
--- a/static/scripts/mvc/dataset/hda-model.js
+++ b/static/scripts/mvc/dataset/hda-model.js
@@ -82,7 +82,7 @@
this.on( 'change:state', function( currModel, newState ){
this.log( this + ' has changed state:', currModel, newState );
if( this.inReadyState() ){
- this.trigger( 'state:ready', this.get( 'id' ), newState, this.previous( 'state' ), currModel );
+ this.trigger( 'state:ready', currModel, newState, this.previous( 'state' ) );
}
});
diff -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 -r a53fe9c9395621e0c9376ee7109274612f735cb9 static/scripts/mvc/history/history-panel.js
--- a/static/scripts/mvc/history/history-panel.js
+++ b/static/scripts/mvc/history/history-panel.js
@@ -5,55 +5,6 @@
Backbone.js implementation of history panel
TODO:
- refactoring on for_editing:
- uhoh: purge link in warning message in history_common.mako conditional on trans.app.config.allow_user_dataset_purge
- bug: rerun still doesn't take encoded ids
-
- anon user, mako template init:
- BUG: shouldn't have tag/anno buttons (on hdas)
- Check for user in hdaView somehow
-
- logged in, mako template:
- bug: rename not being changed locally - render() shows old name, refresh: new name
- TODO: editable text to MV, might also just use REST.update on history
- BUG: meter is not updating RELIABLY on change:nice_size
- BUG: am able to start upload even if over quota - 'runs' forever
- bug: quotaMeter bar rendering square in chrome
-
- from loadFromApi:
-
- fixed:
- BUG: not loading deleted datasets
- FIXED: history_contents, show: state_ids returns all ids now (incl. deleted)
- BUG: upload, history size, doesn't change
- FIXED: using change:nice_size to trigger re-render of history size
- BUG: delete uploading hda - now in state 'discarded'! ...new state to handle
- FIXED: handled state
- BUG: historyItem, error'd ds show display, download?
- FIXED: removed
- bug: loading hdas (alt_hist)
- FIXED: added anon user api request ( trans.user == None and trans.history.id == requested id )
- bug: quota meter not updating on upload/tool run
- FIXED: quotaMeter now listens for 'state:ready' from glx_history in alternate_history.mako
- bug: use of new HDACollection with event listener in init doesn't die...keeps reporting
- FIXED: change getVisible to return an array
- BUG: history, broken intial hist state (running, updater, etc.)
- ??: doesn't seem to happen anymore
- BUG: collapse all should remove all expanded from storage
- FIXED: hideAllItemBodies now resets storage.expandedItems
- BUG: historyItem, shouldn't allow tag, annotate, peek on purged datasets
- FIXED: ok state now shows only: info, rerun
- BUG: history?, some ids aren't returning encoded...
- FIXED:???
- BUG: history, showing deleted ds
- FIXED
- UGH: historyItems have to be decorated with history_ids (api/histories/:history_id/contents/:id)
- FIXED by adding history_id to history_contents.show
- BUG: history, if hist has err'd ds, hist has perm state 'error', updater on following ds's doesn't run
- FIXED by reordering history state from ds' states here and histories
- BUG: history, broken annotation on reload (can't get thru api (sets fine, tho))
- FIXED: get thru api for now
-
replication:
show_deleted/hidden:
use storage
@@ -61,9 +12,6 @@
need urls
change template
move histview fadein/out in render to app?
- don't draw body until it's first expand event
- localize all
- ?: render url templates on init or render?
?: history, annotation won't accept unicode
RESTful:
@@ -167,13 +115,11 @@
//TODO??: purged
//TODO??: could be more selective here
this.model.hdas.bind( 'change:deleted', this.handleHdaDeletionChange, this );
- this.model.hdas.bind( 'change:hidden', this.render, this );
// if an a hidden hda is created (gen. by a workflow), moves thru the updater to the ready state,
// then: remove it from the collection if the panel is set to NOT show hidden datasets
- this.model.hdas.bind( 'change:state', function( hda, newState, changedList ){
- if( ( hda.inReadyState() )
- && ( !hda.get( 'visible' ) )
+ this.model.hdas.bind( 'state:ready', function( hda, newState, oldState ){
+ if( ( !hda.get( 'visible' ) )
&& ( !this.storage.get( 'show_hidden' ) ) ){
this.removeHdaView( hda.get( 'id' ) );
}
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
0
commit/galaxy-central: greg: Fixes for handling tool dependencies and missing tool dependencies for installed tool shed repositories and tose being installed.
by Bitbucket 20 Dec '12
by Bitbucket 20 Dec '12
20 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/34b8a00ea301/
changeset: 34b8a00ea301
user: greg
date: 2012-12-20 16:44:45
summary: Fixes for handling tool dependencies and missing tool dependencies for installed tool shed repositories and tose being installed.
affected #: 3 files
diff -r 8c3ad449b21d996f9f0a877daf3f76dc29f3b39d -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -1749,14 +1749,31 @@
relative_install_dir = None
shed_config_dict = repository.get_shed_config_dict( app )
if not shed_config_dict:
- #just pick a semi-random shed config
+ # Just pick a semi-random shed config.
for shed_config_dict in app.toolbox.shed_tool_confs:
- if ( repository.dist_to_shed and shed_config_dict['config_filename'] == app.config.migrated_tools_config ) or ( not repository.dist_to_shed and shed_config_dict['config_filename'] != app.config.migrated_tools_config ):
+ if ( repository.dist_to_shed and shed_config_dict[ 'config_filename' ] == app.config.migrated_tools_config ) \
+ or ( not repository.dist_to_shed and shed_config_dict[ 'config_filename' ] != app.config.migrated_tools_config ):
break
shed_tool_conf = shed_config_dict[ 'config_filename' ]
tool_path = shed_config_dict[ 'tool_path' ]
relative_install_dir = partial_install_dir
return shed_tool_conf, tool_path, relative_install_dir
+def get_tool_path_by_shed_tool_conf_filename( trans, shed_tool_conf ):
+ """
+ Return the tool_path config setting for the received shed_tool_conf file by searching the tool box's in-memory list of shed_tool_confs for the
+ dictionary whose config_filename key has a value matching the received shed_tool_conf.
+ """
+ for shed_tool_conf_dict in trans.app.toolbox.shed_tool_confs:
+ config_filename = shed_tool_conf_dict[ 'config_filename' ]
+ if config_filename == shed_tool_conf:
+ tool_path = shed_tool_conf_dict[ 'tool_path' ]
+ break
+ else:
+ file_name = strip_path( config_filename )
+ if file_name == shed_tool_conf:
+ tool_path = shed_tool_conf_dict[ 'tool_path' ]
+ break
+ return tool_path
def get_tool_shed_repository_by_shed_name_owner_changeset_revision( app, tool_shed, name, owner, changeset_revision ):
# This method is used only in Galaxy, not the tool shed.
sa_session = app.model.context.current
diff -r 8c3ad449b21d996f9f0a877daf3f76dc29f3b39d -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -898,7 +898,7 @@
repository_dependencies_dict_for_display[ 'root_key' ] = root_key
repository_dependencies_dict_for_display[ root_key ] = rd_tups
repository_dependencies_dict_for_display[ 'description' ] = repository_dependencies[ 'description' ]
- all_tool_dependencies = metadata.get( 'tool_dependencies', None )
+ all_tool_dependencies = metadata.get( 'tool_dependencies', None )
tool_dependencies, missing_tool_dependencies = shed_util.get_installed_and_missing_tool_dependencies( trans, repository, all_tool_dependencies )
valid_tools = metadata.get( 'tools', None )
workflows = metadata.get( 'workflows', None )
@@ -1126,7 +1126,7 @@
if ( not includes_tools and not includes_repository_dependencies ) or \
( ( includes_tools or includes_repository_dependencies ) and kwd.get( 'select_tool_panel_section_button', False ) ):
install_repository_dependencies = CheckboxField.is_checked( install_repository_dependencies )
- if includes_tools:
+ if includes_tool_dependencies:
install_tool_dependencies = CheckboxField.is_checked( install_tool_dependencies )
shed_tool_conf = kwd[ 'shed_tool_conf' ]
else:
@@ -1134,17 +1134,7 @@
# If installing a repository that includes no tools, get the relative tool_path from the file to which the migrated_tools_config
# setting points.
shed_tool_conf = trans.app.config.migrated_tools_config
- # Get the tool path by searching the list of shed_tool_confs for the dictionary that contains the information about shed_tool_conf.
- for shed_tool_conf_dict in trans.app.toolbox.shed_tool_confs:
- config_filename = shed_tool_conf_dict[ 'config_filename' ]
- if config_filename == shed_tool_conf:
- tool_path = shed_tool_conf_dict[ 'tool_path' ]
- break
- else:
- file_name = suc.strip_path( config_filename )
- if file_name == shed_tool_conf:
- tool_path = shed_tool_conf_dict[ 'tool_path' ]
- break
+ tool_path = suc.get_tool_path_by_shed_tool_conf_filename( trans, shed_tool_conf )
created_or_updated_tool_shed_repositories, repo_info_dicts, filtered_repo_info_dicts, message = \
shed_util.create_repository_dependency_objects( trans, tool_path, tool_shed_url, repo_info_dicts, reinstalling=False )
if message and len( repo_info_dicts ) == 1:
@@ -1232,6 +1222,8 @@
raw_text = response.read()
response.close()
readme_files_dict = from_json_string( raw_text )
+ # Since we are installing a new repository, no tool dependencies will be considered "missing". Most of the repository contents
+ # are set to None since we don't yet know what they are.
containers_dict = suc.build_repository_containers_for_galaxy( trans=trans,
toolshed_base_url=tool_shed_url,
repository_name=name,
@@ -1247,7 +1239,13 @@
valid_tools=None,
workflows=None )
else:
- containers_dict = dict( readme_files_dict=None, repository_dependencies=None, tool_dependencies=None )
+ containers_dict = dict( datatypes=None,
+ invalid_tools=None,
+ readme_files_dict=None,
+ repository_dependencies=None,
+ tool_dependencies=None,
+ valid_tools=None,
+ workflows=None )
# Handle tool dependencies chack box.
if trans.app.config.tool_dependency_dir is None:
if includes_tool_dependencies:
@@ -1260,6 +1258,17 @@
install_tool_dependencies_check_box = CheckboxField( 'install_tool_dependencies', checked=install_tool_dependencies_check_box_checked )
# Handle repository dependencies check box.
install_repository_dependencies_check_box = CheckboxField( 'install_repository_dependencies', checked=True )
+ log.debug("PPPPP In prepare_for_install, containers_dict: %s" % str( containers_dict ))
+ """
+ PPPPP In prepare_for_install,
+ containers_dict:
+ {'repository_dependencies': None,
+ 'missing_tool_dependencies': <galaxy.webapps.community.util.container_util.Folder object at 0x108a56f0>,
+ 'readme_files': None,
+ 'tool_dependencies': None}
+ FAIL
+
+ """
return trans.fill_template( '/admin/tool_shed_repository/select_tool_panel_section.mako',
encoded_repo_info_dicts=encoded_repo_info_dicts,
includes_tools=includes_tools,
@@ -1456,6 +1465,7 @@
includes_repository_dependencies = True
else:
includes_repository_dependencies = False
+ includes_tool_dependencies = tool_shed_repository.includes_tool_dependencies
repo_info_dict = suc.create_repo_info_dict( trans=trans,
repository_clone_url=repository_clone_url,
changeset_revision=tool_shed_repository.installed_changeset_revision,
@@ -1527,6 +1537,10 @@
all_tool_dependencies )
valid_tools = metadata.get( 'tools', None )
workflows = metadata.get( 'workflows', None )
+ # All tool dependencies will be considered missing since we are reinstalling the repository.
+ for td in tool_dependencies:
+ missing_tool_dependencies.append( td )
+ tool_dependencies = None
containers_dict = suc.build_repository_containers_for_galaxy( trans=trans,
toolshed_base_url=tool_shed_url,
repository_name=tool_shed_repository.name,
@@ -1538,16 +1552,22 @@
missing_tool_dependencies=missing_tool_dependencies,
readme_files_dict=readme_files_dict,
repository_dependencies=repository_dependencies,
- tool_dependencies=tool_dependencies,
+ tool_dependencies=missing_tool_dependencies,
valid_tools=valid_tools,
workflows=workflows )
else:
- containers_dict = dict( readme_files_dict=None, repository_dependencies=None, tool_dependencies=None )
+ containers_dict = dict( datatypes=None,
+ invalid_tools=None,
+ readme_files_dict=None,
+ repository_dependencies=None,
+ tool_dependencies=None,
+ valid_tools=None,
+ workflows=None )
# Handle repository dependencies check box.
install_repository_dependencies_check_box = CheckboxField( 'install_repository_dependencies', checked=True )
# Handle tool dependencies check box.
if trans.app.config.tool_dependency_dir is None:
- if tool_shed_repository.includes_tool_dependencies:
+ if includes_tool_dependencies:
message += "Tool dependencies defined in this repository can be automatically installed if you set the value of your <b>tool_dependency_dir</b> "
message += "setting in your Galaxy config file (universe_wsgi.ini) and restart your Galaxy server before installing the repository. "
status = "warning"
diff -r 8c3ad449b21d996f9f0a877daf3f76dc29f3b39d -r 34b8a00ea3016fd09fd069bd48fbc5f52877ebf7 templates/webapps/community/repository/common.mako
--- a/templates/webapps/community/repository/common.mako
+++ b/templates/webapps/community/repository/common.mako
@@ -509,7 +509,7 @@
</div></div>
%endif
- %if repository_dependencies_root_folder or tool_dependencies_root_folder:
+ %if repository_dependencies_root_folder or tool_dependencies_root_folder or missing_tool_dependencies_root_folder:
<div class="toolForm"><div class="toolFormTitle">Dependencies of this repository</div><div class="toolFormBody">
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
0
commit/galaxy-central: greg: Fix for resintalling a single tool shed repository and fix for displaying the contents of an installed tool shed repository in Galaxy.
by Bitbucket 19 Dec '12
by Bitbucket 19 Dec '12
19 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/8c3ad449b21d/
changeset: 8c3ad449b21d
user: greg
date: 2012-12-20 01:39:50
summary: Fix for resintalling a single tool shed repository and fix for displaying the contents of an installed tool shed repository in Galaxy.
affected #: 2 files
diff -r ddff35a4a9ab3cf22dad10c3b413f919d8d68022 -r 8c3ad449b21d996f9f0a877daf3f76dc29f3b39d lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -80,69 +80,68 @@
valid_tools, workflows ):
"""Return a dictionary of containers for the received repository's dependencies and readme files for display during installation to Galaxy."""
containers_dict = dict( readme_files=None, repository_dependencies=None, tool_dependencies=None )
- if readme_files_dict or repository_dependencies or tool_dependencies:
- lock = threading.Lock()
- lock.acquire( True )
+ lock = threading.Lock()
+ lock.acquire( True )
+ if tool_dependencies:
+ # Add the install_dir attribute to the tool_dependencies.
+ tool_dependencies = add_installation_directories_to_tool_dependencies( trans,
+ repository_name,
+ repository_owner,
+ changeset_revision,
+ tool_dependencies )
+ try:
+ folder_id = 0
+ # Datatypes container.
+ if datatypes:
+ folder_id, datatypes_root_folder = container_util.build_datatypes_folder( folder_id, datatypes )
+ containers_dict[ 'datatypes' ] = datatypes_root_folder
+ # Invalid tools container.
+ if invalid_tools:
+ folder_id, invalid_tools_root_folder = container_util.build_invalid_tools_folder( folder_id,
+ invalid_tools,
+ changeset_revision,
+ repository=repository,
+ label='Invalid tools' )
+ containers_dict[ 'invalid_tools' ] = invalid_tools_root_folder
+ # Readme files container.
+ if readme_files_dict:
+ folder_id, readme_files_root_folder = container_util.build_readme_files_folder( folder_id, readme_files_dict )
+ containers_dict[ 'readme_files' ] = readme_files_root_folder
+ # Repository dependencies container.
+ if repository_dependencies:
+ folder_id, repository_dependencies_root_folder = container_util.build_repository_dependencies_folder( toolshed_base_url=toolshed_base_url,
+ repository_name=repository_name,
+ repository_owner=repository_owner,
+ changeset_revision=changeset_revision,
+ folder_id=folder_id,
+ repository_dependencies=repository_dependencies )
+ containers_dict[ 'repository_dependencies' ] = repository_dependencies_root_folder
+ # Tool dependencies container.
if tool_dependencies:
- # Add the install_dir attribute to the tool_dependencies.
- tool_dependencies = add_installation_directories_to_tool_dependencies( trans,
- repository_name,
- repository_owner,
- changeset_revision,
- tool_dependencies )
- try:
- folder_id = 0
- # Datatypes container.
- if datatypes:
- folder_id, datatypes_root_folder = container_util.build_datatypes_folder( folder_id, datatypes )
- containers_dict[ 'datatypes' ] = datatypes_root_folder
- # Invalid tools container.
- if invalid_tools:
- folder_id, invalid_tools_root_folder = container_util.build_invalid_tools_folder( folder_id,
- invalid_tools,
- changeset_revision,
- repository=repository,
- label='Invalid tools' )
- containers_dict[ 'invalid_tools' ] = invalid_tools_root_folder
- # Readme files container.
- if readme_files_dict:
- folder_id, readme_files_root_folder = container_util.build_readme_files_folder( folder_id, readme_files_dict )
- containers_dict[ 'readme_files' ] = readme_files_root_folder
- # Repository dependencies container.
- if repository_dependencies:
- folder_id, repository_dependencies_root_folder = container_util.build_repository_dependencies_folder( toolshed_base_url=toolshed_base_url,
- repository_name=repository_name,
- repository_owner=repository_owner,
- changeset_revision=changeset_revision,
- folder_id=folder_id,
- repository_dependencies=repository_dependencies )
- containers_dict[ 'repository_dependencies' ] = repository_dependencies_root_folder
- # Tool dependencies container.
- if tool_dependencies:
- folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id, tool_dependencies, for_galaxy=True )
- containers_dict[ 'tool_dependencies' ] = tool_dependencies_root_folder
- # Missing tool dependencies container.
- if missing_tool_dependencies:
- folder_id, missing_tool_dependencies_root_folder = \
- container_util.build_tool_dependencies_folder( folder_id, missing_tool_dependencies, label='Missing tool dependencies', for_galaxy=True )
- containers_dict[ 'missing_tool_dependencies' ] = missing_tool_dependencies_root_folder
- # Valid tools container.
- if valid_tools:
- folder_id, valid_tools_root_folder = container_util.build_tools_folder( folder_id,
- valid_tools,
- repository,
- changeset_revision,
- label='Valid tools',
- description='click the name to inspect the tool metadata' )
- containers_dict[ 'valid_tools' ] = valid_tools_root_folder
- # Workflows container.
- if workflows:
- folder_id, workflows_root_folder = container_util.build_workflows_folder( folder_id, workflows, repository_metadata, label='Workflows' )
- containers_dict[ 'workflows' ] = workflows_root_folder
- except Exception, e:
- log.debug( "Exception in build_repository_containers_for_galaxy: %s" % str( e ) )
- finally:
- lock.release()
+ folder_id, tool_dependencies_root_folder = container_util.build_tool_dependencies_folder( folder_id, tool_dependencies, for_galaxy=True )
+ containers_dict[ 'tool_dependencies' ] = tool_dependencies_root_folder
+ # Missing tool dependencies container.
+ if missing_tool_dependencies:
+ folder_id, missing_tool_dependencies_root_folder = \
+ container_util.build_tool_dependencies_folder( folder_id, missing_tool_dependencies, label='Missing tool dependencies', for_galaxy=True )
+ containers_dict[ 'missing_tool_dependencies' ] = missing_tool_dependencies_root_folder
+ # Valid tools container.
+ if valid_tools:
+ folder_id, valid_tools_root_folder = container_util.build_tools_folder( folder_id,
+ valid_tools,
+ repository,
+ changeset_revision,
+ label='Valid tools',
+ description='click the name to inspect the tool metadata' )
+ containers_dict[ 'valid_tools' ] = valid_tools_root_folder
+ # Workflows container.
+ if workflows:
+ folder_id, workflows_root_folder = container_util.build_workflows_folder( folder_id, workflows, repository_metadata, label='Workflows' )
+ containers_dict[ 'workflows' ] = workflows_root_folder
+ except Exception, e:
+ log.debug( "Exception in build_repository_containers_for_galaxy: %s" % str( e ) )
+ finally:
+ lock.release()
return containers_dict
def build_repository_containers_for_tool_shed( repository, changeset_revision, repository_dependencies, repository_metadata ):
"""Return a dictionary of containers for the received repository's dependencies and contents for display in the tool shed."""
diff -r ddff35a4a9ab3cf22dad10c3b413f919d8d68022 -r 8c3ad449b21d996f9f0a877daf3f76dc29f3b39d lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
--- a/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
+++ b/lib/galaxy/webapps/galaxy/controllers/admin_toolshed.py
@@ -1365,10 +1365,7 @@
ctx_rev = suc.get_ctx_rev( tool_shed_url, tool_shed_repository.name, tool_shed_repository.owner, tool_shed_repository.installed_changeset_revision )
repo_info_dicts = []
repo_info_dict = kwd.get( 'repo_info_dict', None )
- if repo_info_dict:
- # The repo_info_dict should be encoded.
- repo_info_dict = encoding_util.tool_shed_decode( repo_info_dict )
- else:
+ if not repo_info_dict:
# Entering this if block used to happen only if the tool_shed_repository does not include any valid tools. After repository dependencies
# were introduced, it may never happen, but we'll keep the block just in case.
if install_repository_dependencies:
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
0