1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/3b38e670704f/ changeset: 3b38e670704f user: greg date: 2012-01-19 16:25:28 summary: Fix for generating workflow metadata and viewing workflows in tool shed repositories. affected #: 3 files diff -r ab1a5ab063ce2d5e4e2dfc5759b8714f4f8c2ef3 -r 3b38e670704ff3ce2a3f6b134508a43d008be28c lib/galaxy/webapps/community/controllers/workflow.py --- a/lib/galaxy/webapps/community/controllers/workflow.py +++ b/lib/galaxy/webapps/community/controllers/workflow.py @@ -160,7 +160,10 @@ changeset_revision = repository_metadata.changeset_revision metadata = repository_metadata.metadata workflow_name = decode( workflow_name ) - for workflow_dict in metadata[ 'workflows' ]: + # metadata[ 'workflows' ] is a list of tuples where each contained tuple is + # [ <relative path to the .ga file in the repository>, <exported workflow dict> ] + for workflow_tup in metadata[ 'workflows' ]: + workflow_dict = workflow_tup[1] if workflow_dict[ 'name' ] == workflow_name: break if 'tools' in metadata: diff -r ab1a5ab063ce2d5e4e2dfc5759b8714f4f8c2ef3 -r 3b38e670704ff3ce2a3f6b134508a43d008be28c templates/admin/tool_shed_repository/common.mako --- a/templates/admin/tool_shed_repository/common.mako +++ b/templates/admin/tool_shed_repository/common.mako @@ -56,6 +56,8 @@ <div style="clear: both"></div> %endif %if 'workflows' in metadata: + ## metadata[ 'workflows' ] is a list of tuples where each contained tuple is + ## [ <relative path to the .ga file in the repository>, <exported workflow dict> ] <div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%"> @@ -81,11 +83,8 @@ full_path = os.path.abspath( relative_path ) workflow_dict = workflow_tup[ 1 ] workflow_name = workflow_dict[ 'name' ] - if 'steps' in workflow_dict: - ## Initially steps were not stored in the metadata record. - steps = workflow_dict[ 'steps' ] - else: - steps = [] + ## Initially steps were not stored in the metadata record. + steps = workflow_dict.get( 'steps', [] ) format_version = workflow_dict[ 'format-version' ] annotation = workflow_dict[ 'annotation' ] %> diff -r ab1a5ab063ce2d5e4e2dfc5759b8714f4f8c2ef3 -r 3b38e670704ff3ce2a3f6b134508a43d008be28c templates/webapps/community/repository/common.mako --- a/templates/webapps/community/repository/common.mako +++ b/templates/webapps/community/repository/common.mako @@ -148,6 +148,8 @@ <div style="clear: both"></div> %endif %if 'workflows' in metadata: + ## metadata[ 'workflows' ] is a list of tuples where each contained tuple is + ## [ <relative path to the .ga file in the repository>, <exported workflow dict> ] <div class="form-row"><table width="100%"><tr bgcolor="#D8D8D8" width="100%"> @@ -157,7 +159,7 @@ </div><div style="clear: both"></div><div class="form-row"> - <% workflow_dicts = metadata[ 'workflows' ] %> + <% workflow_tups = metadata[ 'workflows' ] %><table class="grid"><tr><td><b>name</b></td> @@ -165,14 +167,13 @@ <td><b>format-version</b></td><td><b>annotation</b></td></tr> - %for workflow_dict in workflow_dicts: - <% + %for workflow_tup in workflow_tups: + <% + relative_path = workflow_tup[0] + workflow_dict = workflow_tup[1] workflow_name = workflow_dict[ 'name' ] - if 'steps' in workflow_dict: - ## Initially steps were not stored in the metadata record. - steps = workflow_dict[ 'steps' ] - else: - steps = [] + ## Initially steps were not stored in the metadata record. + steps = workflow_dict.get( 'steps', [] ) format_version = workflow_dict[ 'format-version' ] annotation = workflow_dict[ 'annotation' ] %> 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.