commit/galaxy-central: greg: Filter out deprecated repositories when resetting metadata on repositories in the tool shed - resetting metadata on deprecated repositories is essential only for ensuring reproducibility.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/97d124fbe9fb/ Changeset: 97d124fbe9fb User: greg Date: 2014-01-08 22:26:51 Summary: Filter out deprecated repositories when resetting metadata on repositories in the tool shed - resetting metadata on deprecated repositories is essential only for ensuring reproducibility. Affected #: 1 file diff -r 626622be165b95acf40430ef309b92c1daa0b9ae -r 97d124fbe9fbbe2e7026b92db35e77e87e4ef435 lib/tool_shed/util/shed_util_common.py --- a/lib/tool_shed/util/shed_util_common.py +++ b/lib/tool_shed/util/shed_util_common.py @@ -865,9 +865,10 @@ def get_query_for_setting_metadata_on_repositories( trans, my_writable=False, order=True ): """ - Return a query containing repositories for resetting metadata. This method is called from both the Tool Shed and Galaxy. The - my_writable parameter is ignored unless called from the Tool Shed, and the order parameter is used for displaying the list of - repositories ordered alphabetically for display on a page. When called from wither the Tool Shed or Galaxy API, order is False. + Return a query containing repositories for resetting metadata. This method is called from both the + Tool Shed and Galaxy. The my_writable parameter is ignored unless called from the Tool Shed, and the + order parameter is used for displaying the list of repositories ordered alphabetically for display on + a page. When called from either the Tool Shed or Galaxy API, order is False. """ if trans.webapp.name == 'tool_shed': # When called from the Tool Shed API, the metadata is reset on all repositories of type tool_dependency_definition in addition @@ -876,7 +877,8 @@ username = trans.user.username clause_list = [] for repository in trans.sa_session.query( trans.model.Repository ) \ - .filter( trans.model.Repository.table.c.deleted == False ): + .filter( and_( trans.model.Repository.table.c.deleted == False, + trans.model.Repository.table.c.deprecated == False ) ): # Always reset metadata on all repositories of type tool_dependency_definition. if repository.type == rt_util.TOOL_DEPENDENCY_DEFINITION: clause_list.append( trans.model.Repository.table.c.id == repository.id ) @@ -903,12 +905,14 @@ else: if order: return trans.sa_session.query( trans.model.Repository ) \ - .filter( trans.model.Repository.table.c.deleted == False ) \ + .filter( and_( trans.model.Repository.table.c.deleted == False, + trans.model.Repository.table.c.deprecated == False ) ) \ .order_by( trans.model.Repository.table.c.name, trans.model.Repository.table.c.user_id ) else: return trans.sa_session.query( trans.model.Repository ) \ - .filter( trans.model.Repository.table.c.deleted == False ) + .filter( and_( trans.model.Repository.table.c.deleted == False, + trans.model.Repository.table.c.deprecated == False ) ) else: # We're in Galaxy. if order: 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.
participants (1)
-
commits-noreply@bitbucket.org