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: carlfeberhard: history panel: fix download popup for uploaded files with meta files (bam) by moving url rendering from initialize to render; pack scripts
by Bitbucket 06 Dec '12
by Bitbucket 06 Dec '12
06 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/7b791a48be76/
changeset: 7b791a48be76
user: carlfeberhard
date: 2012-12-06 22:33:18
summary: history panel: fix download popup for uploaded files with meta files (bam) by moving url rendering from initialize to render; pack scripts
affected #: 5 files
diff -r 78a3508c456296bd7bd578f5c8dd121d7206fef8 -r 7b791a48be76604324f23445293d55948f789dde static/scripts/mvc/dataset/hda-base.js
--- a/static/scripts/mvc/dataset/hda-base.js
+++ b/static/scripts/mvc/dataset/hda-base.js
@@ -35,12 +35,9 @@
this._render_showParamsButton
];
- // render urlTemplates (gen. provided by GalaxyPaths) to urls
- //TODO:?? render urls here or in render()?
+ // cache urlTemplates (gen. provided by GalaxyPaths) to urls
if( !attributes.urlTemplates ){ throw( 'HDAView needs urlTemplates on initialize' ); }
- /** web controller urls for functions relating to this hda. These
- * are rendered from urlTemplates using the model data. */
- this.urls = this._renderUrls( attributes.urlTemplates, this.model.toJSON() );
+ this.urlTemplates = attributes.urlTemplates;
/** is the body of this hda view expanded/not. */
this.expanded = attributes.expanded || false;
@@ -52,6 +49,61 @@
//}, this );
},
+ // ......................................................................... RENDER MAIN
+ /** Render this HDA, set up ui.
+ * @fires rendered:ready when rendered and NO running HDAs
+ * @fires rendered when rendered and running HDAs
+ * @fires rendered:initial on first render with running HDAs
+ * @fires rendered:initial:ready when first rendered and NO running HDAs
+ * @returns {Object} this HDABaseView
+ */
+ render : function(){
+ var view = this,
+ id = this.model.get( 'id' ),
+ state = this.model.get( 'state' ),
+ itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ),
+ initialRender = ( this.$el.children().size() === 0 );
+
+ this.$el.attr( 'id', 'historyItemContainer-' + id );
+
+ /** web controller urls for functions relating to this hda.
+ * These are rendered from urlTemplates using the model data. */
+ this.urls = this._renderUrls( this.urlTemplates, this.model.toJSON() );
+
+ itemWrapper
+ .addClass( 'historyItemWrapper' ).addClass( 'historyItem' )
+ .addClass( 'historyItem-' + state );
+
+ itemWrapper.append( this._render_warnings() );
+ itemWrapper.append( this._render_titleBar() );
+ this.body = $( this._render_body() );
+ itemWrapper.append( this.body );
+
+ //TODO: move to own function: setUpBehaviours
+ // we can potentially skip this step and call popupmenu directly on the download button
+ make_popup_menus( itemWrapper );
+
+ // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.)
+ itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' });
+
+ // transition...
+ this.$el.fadeOut( 'fast', function(){
+ view.$el.children().remove();
+ view.$el.append( itemWrapper ).fadeIn( 'fast', function(){
+ view.log( view + ' rendered:', view.$el );
+
+ var renderedEventName = 'rendered';
+ if( initialRender ){
+ renderedEventName += ':initial';
+ } else if( view.model.inReadyState() ){
+ renderedEventName += ':ready';
+ }
+ view.trigger( renderedEventName );
+ });
+ });
+ return this;
+ },
+
/** render the urls for this hda using the model data and the url templates from initialize.
* @param {Object} urlTemplates a map (or nested map) of underscore templates (currently, anyhoo)
* @param {Object} modelJson data from the model
@@ -71,6 +123,7 @@
//TODO: should be a better (gen.) way to handle this case
if( urlKey === 'meta_download' ){
urls[ urlKey ] = hdaView._renderMetaDownloadUrls( urlTemplateOrObj, modelJson );
+
} else {
try {
urls[ urlKey ] = _.template( urlTemplateOrObj, modelJson );
@@ -100,57 +153,6 @@
});
},
- // ......................................................................... RENDER MAIN
- /** Render this HDA, set up ui.
- * @fires rendered:ready when rendered and NO running HDAs
- * @fires rendered when rendered and running HDAs
- * @fires rendered:initial on first render with running HDAs
- * @fires rendered:initial:ready when first rendered and NO running HDAs
- * @returns {Object} this HDABaseView
- */
- render : function(){
- var view = this,
- id = this.model.get( 'id' ),
- state = this.model.get( 'state' ),
- itemWrapper = $( '<div/>' ).attr( 'id', 'historyItem-' + id ),
- initialRender = ( this.$el.children().size() === 0 );
-
- this.$el.attr( 'id', 'historyItemContainer-' + id );
-
- itemWrapper
- .addClass( 'historyItemWrapper' ).addClass( 'historyItem' )
- .addClass( 'historyItem-' + state );
-
- itemWrapper.append( this._render_warnings() );
- itemWrapper.append( this._render_titleBar() );
- this.body = $( this._render_body() );
- itemWrapper.append( this.body );
-
- //TODO: move to own function: setUpBehaviours
- // we can potentially skip this step and call popupmenu directly on the download button
- make_popup_menus( itemWrapper );
-
- // set up canned behavior on children (bootstrap, popupmenus, editable_text, etc.)
- itemWrapper.find( '.tooltip' ).tooltip({ placement : 'bottom' });
-
- // transition...
- this.$el.fadeOut( 'fast', function(){
- view.$el.children().remove();
- view.$el.append( itemWrapper ).fadeIn( 'fast', function(){
- view.log( view + ' rendered:', view.$el );
-
- var renderedEventName = 'rendered';
- if( initialRender ){
- renderedEventName += ':initial';
- } else if( view.model.inReadyState() ){
- renderedEventName += ':ready';
- }
- view.trigger( renderedEventName );
- });
- });
- return this;
- },
-
// ................................................................................ RENDER titlebar
/** Render any hda warnings including: is deleted, is purged, is hidden.
* (including links to further actions (undelete, etc.))
diff -r 78a3508c456296bd7bd578f5c8dd121d7206fef8 -r 7b791a48be76604324f23445293d55948f789dde static/scripts/packed/mvc/dataset/hda-base.js
--- a/static/scripts/packed/mvc/dataset/hda-base.js
+++ b/static/scripts/packed/mvc/dataset/hda-base.js
@@ -1,1 +1,1 @@
-var HDABaseView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urls=this._renderUrls(a.urlTemplates,this.model.toJSON());this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},_renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b._renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b._renderMetaDownloadUrls(e,a)}else{c[f]=_.template(e,a)}}});return c},_renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.PAUSED:this._render_body_paused(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+state+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(a){a.append($("<div>"+_l("Job is paused. Use the history menu to unpause")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayApps());a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-expanded",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-collapsed",b.model.get("id"))})}},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};
\ No newline at end of file
+var HDABaseView=BaseView.extend(LoggableMixin).extend({tagName:"div",className:"historyItemContainer",initialize:function(a){this.log(this+".initialize:",a);this.defaultPrimaryActionButtonRenderers=[this._render_showParamsButton];if(!a.urlTemplates){throw ("HDAView needs urlTemplates on initialize")}this.urlTemplates=a.urlTemplates;this.expanded=a.expanded||false;this.model.bind("change",this.render,this)},render:function(){var b=this,e=this.model.get("id"),c=this.model.get("state"),a=$("<div/>").attr("id","historyItem-"+e),d=(this.$el.children().size()===0);this.$el.attr("id","historyItemContainer-"+e);this.urls=this._renderUrls(this.urlTemplates,this.model.toJSON());a.addClass("historyItemWrapper").addClass("historyItem").addClass("historyItem-"+c);a.append(this._render_warnings());a.append(this._render_titleBar());this.body=$(this._render_body());a.append(this.body);make_popup_menus(a);a.find(".tooltip").tooltip({placement:"bottom"});this.$el.fadeOut("fast",function(){b.$el.children().remove();b.$el.append(a).fadeIn("fast",function(){b.log(b+" rendered:",b.$el);var f="rendered";if(d){f+=":initial"}else{if(b.model.inReadyState()){f+=":ready"}}b.trigger(f)})});return this},_renderUrls:function(d,a){var b=this,c={};_.each(d,function(e,f){if(_.isObject(e)){c[f]=b._renderUrls(e,a)}else{if(f==="meta_download"){c[f]=b._renderMetaDownloadUrls(e,a)}else{try{c[f]=_.template(e,a)}catch(g){throw (b+"._renderUrls error: "+g+"\n rendering:"+e+"\n with "+JSON.stringify(a))}}}});return c},_renderMetaDownloadUrls:function(b,a){return _.map(a.meta_files,function(c){return{url:_.template(b,{id:a.id,file_type:c.file_type}),file_type:c.file_type}})},_render_warnings:function(){return $(jQuery.trim(HDABaseView.templates.messages(this.model.toJSON())))},_render_titleBar:function(){var a=$('<div class="historyItemTitleBar" style="overflow: hidden"></div>');a.append(this._render_titleButtons());a.append('<span class="state-icon"></span>');a.append(this._render_titleLink());return a},_render_titleButtons:function(){var a=$('<div class="historyItemButtons"></div>');a.append(this._render_displayButton());return a},_render_displayButton:function(){if((!this.model.inReadyState())||(this.model.get("state")===HistoryDatasetAssociation.STATES.NOT_VIEWABLE)||(!this.model.get("accessible"))){this.displayButton=null;return null}var a={icon_class:"display",target:"galaxy_main"};if(this.model.get("purged")){a.enabled=false;a.title=_l("Cannot display datasets removed from disk")}else{a.title=_l("Display data in browser");a.href=this.urls.display}this.displayButton=new IconButtonView({model:new IconButton(a)});return this.displayButton.render().$el},_render_titleLink:function(){return $(jQuery.trim(HDABaseView.templates.titleLink(_.extend(this.model.toJSON(),{urls:this.urls}))))},_render_hdaSummary:function(){var a=_.extend(this.model.toJSON(),{urls:this.urls});return HDABaseView.templates.hdaSummary(a)},_render_primaryActionButtons:function(c){var a=this,b=$("<div/>").attr("id","primary-actions-"+this.model.get("id"));_.each(c,function(d){b.append(d.call(a))});return b},_render_downloadButton:function(){if(this.model.get("purged")||!this.model.hasData()){return null}var a=HDABaseView.templates.downloadLinks(_.extend(this.model.toJSON(),{urls:this.urls}));return $(a)},_render_showParamsButton:function(){this.showParamsButton=new IconButtonView({model:new IconButton({title:_l("View details"),href:this.urls.show_params,target:"galaxy_main",icon_class:"information"})});return this.showParamsButton.render().$el},_render_displayApps:function(){if(!this.model.hasData()){return null}var a=$("<div/>").addClass("display-apps");if(!_.isEmpty(this.model.get("display_types"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_types")}))}if(!_.isEmpty(this.model.get("display_apps"))){a.append(HDABaseView.templates.displayApps({displayApps:this.model.get("display_apps")}))}return a},_render_peek:function(){if(!this.model.get("peek")){return null}return $("<div/>").append($("<pre/>").attr("id","peek"+this.model.get("id")).addClass("peek").append(this.model.get("peek")))},_render_body:function(){var a=$("<div/>").attr("id","info-"+this.model.get("id")).addClass("historyItemBody").attr("style","display: block");switch(this.model.get("state")){case HistoryDatasetAssociation.STATES.NOT_VIEWABLE:this._render_body_not_viewable(a);break;case HistoryDatasetAssociation.STATES.UPLOAD:this._render_body_uploading(a);break;case HistoryDatasetAssociation.STATES.PAUSED:this._render_body_paused(a);break;case HistoryDatasetAssociation.STATES.QUEUED:this._render_body_queued(a);break;case HistoryDatasetAssociation.STATES.RUNNING:this._render_body_running(a);break;case HistoryDatasetAssociation.STATES.ERROR:this._render_body_error(a);break;case HistoryDatasetAssociation.STATES.DISCARDED:this._render_body_discarded(a);break;case HistoryDatasetAssociation.STATES.SETTING_METADATA:this._render_body_setting_metadata(a);break;case HistoryDatasetAssociation.STATES.EMPTY:this._render_body_empty(a);break;case HistoryDatasetAssociation.STATES.FAILED_METADATA:this._render_body_failed_metadata(a);break;case HistoryDatasetAssociation.STATES.OK:this._render_body_ok(a);break;default:a.append($('<div>Error: unknown dataset state "'+this.model.get("state")+'".</div>'))}a.append('<div style="clear: both"></div>');if(this.expanded){a.show()}else{a.hide()}return a},_render_body_not_viewable:function(a){a.append($("<div>"+_l("You do not have permission to view dataset")+".</div>"))},_render_body_uploading:function(a){a.append($("<div>"+_l("Dataset is uploading")+"</div>"))},_render_body_queued:function(a){a.append($("<div>"+_l("Job is waiting to run")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_paused:function(a){a.append($("<div>"+_l("Job is paused. Use the history menu to unpause")+".</div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_running:function(a){a.append("<div>"+_l("Job is currently running")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_error:function(a){if(!this.model.get("purged")){a.append($("<div>"+this.model.get("misc_blurb")+"</div>"))}a.append((_l("An error occurred running this job")+": <i>"+$.trim(this.model.get("misc_info"))+"</i>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers.concat([this._render_downloadButton])))},_render_body_discarded:function(a){a.append("<div>"+_l("The job creating this dataset was cancelled before completion")+".</div>");a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_setting_metadata:function(a){a.append($("<div>"+_l("Metadata is being auto-detected")+".</div>"))},_render_body_empty:function(a){a.append($("<div>"+_l("No data")+": <i>"+this.model.get("misc_blurb")+"</i></div>"));a.append(this._render_primaryActionButtons(this.defaultPrimaryActionButtonRenderers))},_render_body_failed_metadata:function(a){a.append($(HDABaseView.templates.failedMetadata(this.model.toJSON())));this._render_body_ok(a)},_render_body_ok:function(a){a.append(this._render_hdaSummary());if(this.model.isDeletedOrPurged()){a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));return}a.append(this._render_primaryActionButtons([this._render_downloadButton,this._render_showParamsButton]));a.append('<div class="clear"/>');a.append(this._render_displayApps());a.append(this._render_peek())},events:{"click .historyItemTitle":"toggleBodyVisibility"},toggleBodyVisibility:function(c,a){var b=this,d=this.$el.find(".historyItemBody");a=(a===undefined)?(!d.is(":visible")):(a);if(a){d.slideDown("fast",function(){b.trigger("body-expanded",b.model.get("id"))})}else{d.slideUp("fast",function(){b.trigger("body-collapsed",b.model.get("id"))})}},remove:function(){},toString:function(){var a=(this.model)?(this.model+""):("(no model)");return"HDABaseView("+a+")"}});HDABaseView.templates={warningMsg:Handlebars.templates["template-warningmessagesmall"],messages:Handlebars.templates["template-hda-warning-messages"],titleLink:Handlebars.templates["template-hda-titleLink"],hdaSummary:Handlebars.templates["template-hda-hdaSummary"],downloadLinks:Handlebars.templates["template-hda-downloadLinks"],failedMetadata:Handlebars.templates["template-hda-failedMetadata"],displayApps:Handlebars.templates["template-hda-displayApps"]};
\ No newline at end of file
diff -r 78a3508c456296bd7bd578f5c8dd121d7206fef8 -r 7b791a48be76604324f23445293d55948f789dde 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:"",state:"",data_type:null,file_size:0,meta_files:[],misc_blurb:"",misc_info:"",deleted:false,purged:false,visible:false,accessible:false},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.NEW)||(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})},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 b=this;_.each(a,function(e,c){var d=b.get(e);d.fetch()})},toString:function(){return("HDACollection("+this.ids().join(",")+")")}});
\ 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",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.NEW)||(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})},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 78a3508c456296bd7bd578f5c8dd121d7206fef8 -r 7b791a48be76604324f23445293d55948f789dde static/scripts/packed/mvc/history/history-model.js
--- a/static/scripts/packed/mvc/history/history-model.js
+++ b/static/scripts/packed/mvc/history/history-model.js
@@ -1,1 +1,1 @@
-var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.hdas.update(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},4000)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server.")+"\n"+e)}})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"});
\ No newline at end of file
+var History=BaseModel.extend(LoggableMixin).extend({defaults:{id:"",name:"",state:"",diskSize:0,deleted:false,annotation:null,message:null},urlRoot:"api/histories/",url:function(){return"api/histories/"+this.get("id")},initialize:function(a,b){this.log(this+".initialize:",a,b);this.hdas=new HDACollection();if(b&&b.length){this.hdas.reset(b);this.checkForUpdates()}},loadFromApi:function(a,c){var b=this;b.attributes.id=a;jQuery.when(jQuery.ajax("api/users/current"),b.fetch()).then(function(e,d){b.attributes.user=e[0];b.trigger("loaded:user",e[0]);b.trigger("loaded",d[0])}).then(function(){jQuery.ajax(b.url()+"/contents?"+jQuery.param({ids:b.hdaIdsFromStateIds().join(",")})).success(function(d){b.hdas.reset(d);b.checkForUpdates();b.trigger("loaded:hdas",d);if(c){callback(b)}})})},hdaIdsFromStateIds:function(){return _.reduce(_.values(this.get("state_ids")),function(b,a){return b.concat(a)})},checkForUpdates:function(a){if(this.hdas.running().length){this.stateUpdater()}else{this.trigger("ready")}return this},stateUpdater:function(){var c=this,a=this.get("state"),b=this.get("state_ids");jQuery.ajax("api/histories/"+this.get("id")).success(function(d){c.set(d);c.log("current history state:",c.get("state"),"(was)",a,"new size:",c.get("nice_size"));var e=[];_.each(_.keys(d.state_ids),function(g){var f=_.difference(d.state_ids[g],b[g]);e=e.concat(f)});if(e.length){c.updateHdas(e)}if((c.get("state")===HistoryDatasetAssociation.STATES.RUNNING)||(c.get("state")===HistoryDatasetAssociation.STATES.QUEUED)){setTimeout(function(){c.stateUpdater()},History.UPDATE_DELAY)}else{c.trigger("ready")}}).error(function(f,d,e){if(!((f.readyState===0)&&(f.status===0))){alert(_l("Error getting history updates from the server.")+"\n"+e)}})},updateHdas:function(b){var a=this;jQuery.ajax({url:this.url()+"/contents?"+jQuery.param({ids:b.join(",")}),error:function(f,c,d){var e="ERROR updating hdas from api history contents:";a.log(e,b,f,c,d);alert(e+b.join(","))},success:function(d,c,f){a.log(a+".updateHdas, success:",d,c,f);var e=[];_.each(d,function(h,i){var g=a.hdas.get(h.id);if(g){a.log("found existing model in list for id "+h.id+", updating...:");g.set(h)}else{a.log("NO existing model for id "+h.id+", creating...:");modelsToAdd.push(h)}});if(e.length){a.addHdas(e)}}})},addHdas:function(a){var b=this;_.each(a,function(c,d){var e=b.hdas.hidToCollectionIndex(c.hid);c.history_id=b.get("id");b.hdas.add(new HistoryDatasetAssociation(c),{at:e})})},toString:function(){var a=(this.get("name"))?(","+this.get("name")):("");return"History("+this.get("id")+a+")"}});History.UPDATE_DELAY=4000;var HistoryCollection=Backbone.Collection.extend(LoggableMixin).extend({model:History,urlRoot:"api/histories"});
\ No newline at end of file
diff -r 78a3508c456296bd7bd578f5c8dd121d7206fef8 -r 7b791a48be76604324f23445293d55948f789dde 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){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.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.storage:",this.storage.get());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("(init'd) this.storage:",this.storage.get())},add:function(a){},addAll:function(){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});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()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},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){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:state",function(c,d,b){if((c.inReadyState())&&(!c.get("visible"))&&(!this.storage.get("show_hidden"))){this.removeHda(c)}},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.storage:",this.storage.get());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("(init'd) this.storage:",this.storage.get())},add:function(a){this.render()},addAll:function(){this.render()},removeHda:function(a,c){var b=this.hdaViews[a.get("id")];b.$el.fadeOut("fast",function(){b.$el.remove();if(c){c()}});this.model.hdas.remove(a)},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});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()},toggleShowHidden:function(){this.storage.set("show_hidden",!this.storage.get("show_hidden"));this.render()},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
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/801e7cf8227f/
changeset: 801e7cf8227f
user: dan
date: 2012-12-06 22:26:02
summary: Fix for text area formbuilder when None is provided for size.
affected #: 1 file
diff -r 449f0ed92b4621093d2e1b38dee5894f2a9b959e -r 801e7cf8227fd2b9294a6140d0580b3c78f705fe lib/galaxy/web/form_builder.py
--- a/lib/galaxy/web/form_builder.py
+++ b/lib/galaxy/web/form_builder.py
@@ -67,8 +67,10 @@
>>> print TextArea( "bins", size="4x5", value="default" ).get_html()
<textarea name="bins" rows="4" cols="5">default</textarea>
"""
- def __init__( self, name, size="5x25", value=None ):
+ _DEFAULT_SIZE = "5x25"
+ def __init__( self, name, size=None, value=None ):
self.name = name
+ size = size or self._DEFAULT_SIZE
self.size = size.split("x")
self.rows = int(self.size[0])
self.cols = int(self.size[-1])
https://bitbucket.org/galaxy/galaxy-central/changeset/78a3508c4562/
changeset: 78a3508c4562
user: dan
date: 2012-12-06 22:26:02
summary: Fix for error reporting link due to client-side history change (id is now encoded id).
affected #: 1 file
diff -r 801e7cf8227fd2b9294a6140d0580b3c78f705fe -r 78a3508c456296bd7bd578f5c8dd121d7206fef8 lib/galaxy/webapps/galaxy/controllers/dataset.py
--- a/lib/galaxy/webapps/galaxy/controllers/dataset.py
+++ b/lib/galaxy/webapps/galaxy/controllers/dataset.py
@@ -168,7 +168,12 @@
@web.expose
def errors( self, trans, id ):
- hda = trans.sa_session.query( model.HistoryDatasetAssociation ).get( id )
+ try:
+ hda = trans.sa_session.query( model.HistoryDatasetAssociation ).get( id )
+ except:
+ hda = None
+ if not hda:
+ hda = trans.sa_session.query( model.HistoryDatasetAssociation ).get( trans.security.decode_id( id ) )
if not hda or not self._can_access_dataset( trans, hda ):
return trans.show_error_message( "Either this dataset does not exist or you do not have permission to access it." )
return trans.fill_template( "dataset/errors.mako", hda=hda )
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: jgoecks: When creating a new visualization for a dataset, default to dataset's dbkey.
by Bitbucket 06 Dec '12
by Bitbucket 06 Dec '12
06 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/449f0ed92b46/
changeset: 449f0ed92b46
user: jgoecks
date: 2012-12-06 22:13:56
summary: When creating a new visualization for a dataset, default to dataset's dbkey.
affected #: 1 file
diff -r e20afb791a6685c40440743a5973ff17ba90e875 -r 449f0ed92b4621093d2e1b38dee5894f2a9b959e lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -691,25 +691,33 @@
Display browser for the visualization denoted by id and add the datasets listed in `dataset_ids`.
"""
+ # Get dataset to add.
+ new_dataset_id = kwargs.get( "dataset_id", None )
+
# Set up new browser if no id provided.
if not id:
+ # Use dbkey from dataset to be added or from incoming parameter.
+ dbkey = None
+ if new_dataset_id:
+ dbkey = self.get_dataset( trans, new_dataset_id ).dbkey
+ if dbkey == '?':
+ dbkey = kwargs.get( "dbkey", None )
+
return trans.fill_template( "tracks/browser.mako", config={},
- add_dataset=kwargs.get("dataset_id", None),
- default_dbkey=kwargs.get("dbkey", None) )
+ add_dataset=new_dataset_id,
+ default_dbkey=dbkey )
# Display saved visualization.
vis = self.get_visualization( trans, id, check_ownership=False, check_accessible=True )
viz_config = self.get_visualization_config( trans, vis )
- # Get new dataset if specified.
- new_dataset = kwargs.get("dataset_id", None)
'''
FIXME:
if new_dataset is not None:
if trans.security.decode_id(new_dataset) in [ d["dataset_id"] for d in viz_config.get("tracks") ]:
new_dataset = None # Already in browser, so don't add
'''
- return trans.fill_template( 'tracks/browser.mako', config=viz_config, add_dataset=new_dataset )
+ return trans.fill_template( 'tracks/browser.mako', config=viz_config, add_dataset=new_dataset_id )
@web.expose
def circster( self, trans, id=None, hda_ldda=None, dataset_id=None, dbkey=None ):
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/galaxy-central: jgoecks: Add needed imports that went away after removing 'import *'
by Bitbucket 06 Dec '12
by Bitbucket 06 Dec '12
06 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/e20afb791a66/
changeset: e20afb791a66
user: jgoecks
date: 2012-12-06 20:38:49
summary: Add needed imports that went away after removing 'import *'
affected #: 2 files
diff -r c0b5edcce53c541c8eaf3a2f80390c84b1f721fb -r e20afb791a6685c40440743a5973ff17ba90e875 lib/galaxy/webapps/galaxy/controllers/page.py
--- a/lib/galaxy/webapps/galaxy/controllers/page.py
+++ b/lib/galaxy/webapps/galaxy/controllers/page.py
@@ -1,4 +1,4 @@
-from sqlalchemy import desc
+from sqlalchemy import desc, and_
from galaxy import model, web
from galaxy.web import error, url_for
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
diff -r c0b5edcce53c541c8eaf3a2f80390c84b1f721fb -r e20afb791a6685c40440743a5973ff17ba90e875 lib/galaxy/webapps/galaxy/controllers/visualization.py
--- a/lib/galaxy/webapps/galaxy/controllers/visualization.py
+++ b/lib/galaxy/webapps/galaxy/controllers/visualization.py
@@ -1,10 +1,11 @@
from __future__ import absolute_import
-from sqlalchemy import desc
+from sqlalchemy import desc, or_, and_
from galaxy import model, web
from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings
from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesVisualizationMixin
from galaxy.web.framework.helpers import time_ago, grids, iff
+from galaxy.util.json import from_json_string
from galaxy.util.sanitize_html import sanitize_html
from galaxy.visualization.genomes import decode_dbkey
from galaxy.visualization.genome.visual_analytics import get_dataset_job
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: Add care in handling information retrieved from the tool shed by Galaxy.
by Bitbucket 06 Dec '12
by Bitbucket 06 Dec '12
06 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/c0b5edcce53c/
changeset: c0b5edcce53c
user: greg
date: 2012-12-06 15:38:14
summary: Add care in handling information retrieved from the tool shed by Galaxy.
affected #: 1 file
diff -r 9cf72c86ee4f37c9035cdc30912b4f33a0f6b3bb -r c0b5edcce53c541c8eaf3a2f80390c84b1f721fb 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
@@ -1099,7 +1099,12 @@
filtered_repo_info_dicts = []
for repo_info_dict in repo_info_dicts:
for name, repo_info_tuple in repo_info_dict.items():
- description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
+ # Take care in handling the repo_info_tuple as it evolves over time as new features are introduced.
+ if len( repo_info_tuple ) == 6:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple
+ repository_dependencies = None
+ elif len( repo_info_tuple ) == 7:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
clone_dir = os.path.join( tool_path, self.generate_tool_path( repository_clone_url, changeset_revision ) )
relative_install_dir = os.path.join( clone_dir, name )
# Make sure the repository was not already installed.
@@ -1208,7 +1213,11 @@
repo_info_dict = repo_info_dicts[ 0 ]
name = repo_info_dict.keys()[ 0 ]
repo_info_tuple = repo_info_dict[ name ]
- description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
+ if len( repo_info_tuple ) == 6:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple
+ repository_dependencies = None
+ elif len( repo_info_tuple ) == 7:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
url = url_join( tool_shed_url,
'repository/get_readme_files?name=%s&owner=%s&changeset_revision=%s' % \
( name, repository_owner, changeset_revision ) )
@@ -1396,7 +1405,11 @@
# Handle case where the repository was previously installed using an older changeset_revsion, but later the repository was updated
# in the tool shed and now we're trying to install the latest changeset revision of the same repository instead of updating the one
# that was previously installed. We'll look in the database instead of on disk since the repository may be uninstalled.
- description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
+ if len( repo_info_tuple ) == 6:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, tool_dependencies = repo_info_tuple
+ repository_dependencies = None
+ elif len( repo_info_tuple ) == 7:
+ description, repository_clone_url, changeset_revision, ctx_rev, repository_owner, repository_dependencies, tool_dependencies = repo_info_tuple
tool_shed = get_tool_shed_from_clone_url( repository_clone_url )
# Get all previous change set revisions from the tool shed for the repository back to, but excluding, the previous valid changeset
# revision to see if it was previously installed using one of them.
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: A few fixes for retriveingdictionary entries and a few enhancements to the tool shed containers.
by Bitbucket 05 Dec '12
by Bitbucket 05 Dec '12
05 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/9cf72c86ee4f/
changeset: 9cf72c86ee4f
user: greg
date: 2012-12-06 00:14:10
summary: A few fixes for retriveingdictionary entries and a few enhancements to the tool shed containers.
affected #: 3 files
diff -r 75a97c971d36599955f67384b6f36ca73a80dd2e -r 9cf72c86ee4f37c9035cdc30912b4f33a0f6b3bb lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -819,7 +819,6 @@
"""Generate a repository dependencies dictionary based on valid information defined in the received repository_dependencies_config."""
repository_dependencies_tups = []
error_message = ''
- config_file_name = strip_path( repository_dependencies_config )
try:
# Make sure we're looking at a valid repository_dependencies.xml file.
tree = util.parse_xml( repository_dependencies_config )
@@ -838,15 +837,13 @@
changeset_revision = repository_elem.attrib[ 'changeset_revision' ]
user = None
repository = None
- # Repository dependencies are currentlhy supported only within a single tool shed.
if tool_shed_is_this_tool_shed( toolshed ):
try:
user = sa_session.query( app.model.User ) \
.filter( app.model.User.table.c.username == owner ) \
.one()
except Exception, e:
- error_message = "Invalid owner %s defined for repository %s in config file %s. " % ( owner, name, config_file_name )
- error_message += "Repository dependencies will be ignored."
+ error_message = "Invalid owner %s defined for repository %s. Repository dependencies will be ignored." % ( owner, name )
log.debug( error_message )
return metadata_dict, error_message
if user:
@@ -856,8 +853,7 @@
app.model.Repository.table.c.user_id == user.id ) ) \
.first()
except:
- error_message = "Invalid name %s or owner %s defined for repository in config file %s. " % ( name, owner, config_file_name )
- error_message += "Repository dependencies will be ignored."
+ error_message = "Invalid name %s or owner %s defined for repository. Repository dependencies will be ignored." % ( name, owner )
log.debug( error_message )
return metadata_dict, error_message
if repository:
@@ -865,16 +861,19 @@
if repository_dependencies_tup not in repository_dependencies_tups:
repository_dependencies_tups.append( repository_dependencies_tup )
else:
- error_message = "Invalid name %s or owner %s defined for repository in config file %s. " % ( name, owner, config_file_name )
- error_message += "Repository dependencies will be ignored."
+ error_message = "Invalid name %s or owner %s defined for repository. Repository dependencies will be ignored." % ( name, owner )
log.debug( error_message )
return metadata_dict, error_message
else:
- # We have an invalid repository owner defined for an entry in repository_dependencies.xml.
- config_file_name = strip_path( repository_dependencies_config )
- error_message = "Invalid username %s defined for owner of repository %s in config file %s. Repository dependencies will be ignored." % ( owner, name, config_file_name )
+ error_message = "Invalid owner %s defined for owner of repository %s. Repository dependencies will be ignored." % ( owner, name )
log.debug( error_message )
- return metadata_dict, error_message
+ return metadata_dict, error_message
+ else:
+ # Repository dependencies are currentlhy supported within a single tool shed.
+ error_message = "Invalid tool shed %s defined for repository %s. " % ( toolshed, name )
+ error_message += "Repository dependencies are currently supported within a single tool shed, so your definition will be ignored."
+ log.debug( error_message )
+ return metadata_dict, error_message
if repository_dependencies_tups:
repository_dependencies_dict = dict( description=root.get( 'description' ),
repository_dependencies=repository_dependencies_tups )
diff -r 75a97c971d36599955f67384b6f36ca73a80dd2e -r 9cf72c86ee4f37c9035cdc30912b4f33a0f6b3bb 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
@@ -7,10 +7,11 @@
class Folder( object ):
"""Container object."""
- def __init__( self, id=None, key=None, label=None ):
+ def __init__( self, id=None, key=None, label=None, parent=None ):
self.id = id
self.key = key
self.label = label
+ self.parent = parent
self.description = None
self.datatypes = []
self.folders = []
@@ -25,8 +26,18 @@
if folder == contained_folder:
return index, contained_folder
return 0, None
+ def contains_repository_dependency( self, repository_dependency ):
+ listified_repository_dependency = repository_dependency.listify
+ for contained_repository_dependency in self.repository_dependencies:
+ if contained_repository_dependency.listify == listified_repository_dependency:
+ return True
+ return False
def remove_repository_dependency( self, repository_dependency ):
- self.repository_dependencies.remove( repository_dependency )
+ listified_repository_dependency = repository_dependency.listify
+ for contained_repository_dependency in self.repository_dependencies:
+ if contained_repository_dependency.listify == listified_repository_dependency:
+ self.repository_dependencies.remove( contained_repository_dependency )
+
class Datatype( object ):
"""Datatype object"""
def __init__( self, id=None, extension=None, type=None, mimetype=None, subclass=None ):
@@ -102,9 +113,9 @@
if datatypes:
datatype_id = 0
folder_id += 1
- datatypes_root_folder = Folder( id=folder_id, key='root', label='root' )
+ 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 )
+ folder = Folder( id=folder_id, key='datatypes', label=label, parent=datatypes_root_folder )
datatypes_root_folder.folders.append( folder )
# Insert a header row.
datatype_id += 1
@@ -131,9 +142,9 @@
if invalid_tool_configs:
invalid_tool_id = 0
folder_id += 1
- invalid_tools_root_folder = Folder( id=folder_id, key='root', label='root' )
+ 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 )
+ folder = Folder( id=folder_id, key='invalid_tools', label=label, parent=invalid_tools_root_folder )
invalid_tools_root_folder.folders.append( folder )
for invalid_tool_config in invalid_tool_configs:
invalid_tool_id += 1
@@ -155,24 +166,22 @@
multiple_readme_files = len( readme_files_dict ) > 1
readme_id = 0
folder_id += 1
- readme_files_root_folder = Folder( id=folder_id, key='root', label='root' )
+ readme_files_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
if multiple_readme_files:
folder_id += 1
- readme_files_folder = Folder( id=folder_id, key='readme_files', label=label )
+ readme_files_folder = Folder( id=folder_id, key='readme_files', label=label, parent=readme_files_root_folder )
readme_files_root_folder.folders.append( readme_files_folder )
for readme_file_name, readme_file_text in readme_files_dict.items():
readme_id += 1
- readme = ReadMe( id=readme_id,
- name=readme_file_name,
- text=readme_file_text )
+ readme = ReadMe( id=readme_id, name=readme_file_name, text=readme_file_text )
if multiple_readme_files:
folder_id += 1
- folder = Folder( id=folder_id, key=readme.name, label=readme.name )
+ folder = Folder( id=folder_id, key=readme.name, label=readme.name, parent=readme_files_folder )
folder.readme_files.append( readme )
readme_files_folder.folders.append( folder )
else:
folder_id += 1
- readme_files_folder = Folder( id=folder_id, key='readme_files', label=readme.name )
+ readme_files_folder = Folder( id=folder_id, key='readme_files', label=readme.name, parent=readme_files_root_folder )
readme_files_folder.readme_files.append( readme )
readme_files_root_folder.folders.append( readme_files_folder )
else:
@@ -185,11 +194,11 @@
repository_dependency_id = 0
folder_id += 1
# Create the root folder.
- repository_dependencies_root_folder = Folder( id=folder_id, key='root', label='root' )
+ repository_dependencies_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
# 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 )
+ repository_dependencies_folder = Folder( id=folder_id, key=repository_dependencies_folder_key, label=label, parent=repository_dependencies_root_folder )
# The received repository_dependencies is a dictionary with a single 'description' key, and one or more repository_dependency keys.
# We want the description value associated with the repository_dependencies_folder.
repository_dependencies_folder.description = repository_dependencies.get( 'description', None )
@@ -203,7 +212,7 @@
# Create a new folder.
folder_id += 1
label = generate_repository_dependencies_folder_label_from_key( repository_name, repository_owner, changeset_revision, key )
- folder = Folder( id=folder_id, key=key, label=label )
+ folder = Folder( id=folder_id, key=key, label=label, parent=repository_dependencies_folder )
for repository_dependency_tup in val:
toolshed, name, owner, changeset_revision = repository_dependency_tup
# Create a new repository_dependency.
@@ -218,8 +227,8 @@
if not get_folder( repository_dependencies_folder, key ):
# Insert the folder into the list.
repository_dependencies_folder.folders.append( folder )
- # Remove repository_dependencies that are also folders.
- remove_unwanted_repository_dependencies( repository_dependencies_folder )
+ # Remove repository_dependencies that are also folders, and coerce empty folders into repository dependencies.
+ prune_repository_dependencies( repository_dependencies_folder, repository_dependencies_folder )
else:
repository_dependencies_root_folder = None
return folder_id, repository_dependencies_root_folder
@@ -228,9 +237,9 @@
if tool_dicts:
tool_id = 0
folder_id += 1
- tools_root_folder = Folder( id=folder_id, key='root', label='root' )
+ tools_root_folder = Folder( id=folder_id, key='root', label='root', parent=None )
folder_id += 1
- folder = Folder( id=folder_id, key='tools', label=label )
+ folder = Folder( id=folder_id, key='tools', label=label, parent=tools_root_folder )
tools_root_folder.folders.append( folder )
# Insert a header row.
tool_id += 1
@@ -272,9 +281,9 @@
if tool_dependencies:
tool_dependency_id = 0
folder_id += 1
- tool_dependencies_root_folder = Folder( id=folder_id, key='root', label='root' )
+ 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 )
+ folder = Folder( id=folder_id, key='tool_dependencies', label=label, parent=tool_dependencies_root_folder )
tool_dependencies_root_folder.folders.append( folder )
# Insert a header row.
tool_dependency_id += 1
@@ -320,9 +329,9 @@
if workflows:
workflow_id = 0
folder_id += 1
- workflows_root_folder = Folder( id=folder_id, key='root', label='root' )
+ 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 )
+ folder = Folder( id=folder_id, key='workflows', label=label, parent=workflows_root_folder )
workflows_root_folder.folders.append( folder )
# Insert a header row.
workflow_id += 1
@@ -388,10 +397,19 @@
def key_is_current_repositorys_key( repository_name, repository_owner, changeset_revision, key ):
toolshed_base_url, key_name, key_owner, key_changeset_revision = get_components_from_key( key )
return repository_name == key_name and repository_owner == key_owner and changeset_revision == key_changeset_revision
-def remove_unwanted_repository_dependencies( folder ):
+def prune_folder( folder, repository_dependency, key ):
+ if get_folder( folder, key ):
+ folder.remove_repository_dependency( repository_dependency )
+ for sub_folder in folder.folders:
+ prune_folder( sub_folder, repository_dependency, key )
+def prune_repository_dependencies( folder, root_folder ):
+ """Remove repository_dependencies that are also folders, and coerce empty folders into repository dependencies."""
+ remove_repository_dependencies( folder, root_folder )
+ for sub_folder in folder.folders:
+ prune_repository_dependencies( sub_folder, root_folder )
+def remove_repository_dependencies( folder, root_folder ):
for repository_dependency in folder.repository_dependencies:
toolshed, name, owner, changeset_revision = repository_dependency.listify
key = generate_repository_dependencies_key_for_repository( toolshed, name, owner, changeset_revision )
- if get_folder( folder, key ):
- folder.remove_repository_dependency( repository_dependency )
+ prune_folder( root_folder, repository_dependency, key )
\ No newline at end of file
diff -r 75a97c971d36599955f67384b6f36ca73a80dd2e -r 9cf72c86ee4f37c9035cdc30912b4f33a0f6b3bb 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
@@ -1066,10 +1066,10 @@
raw_text = response.read()
response.close()
repo_information_dict = from_json_string( raw_text )
- includes_tools = util.string_as_bool( repo_information_dict[ 'includes_tools' ] )
- includes_repository_dependencies = util.string_as_bool( repo_information_dict[ 'includes_repository_dependencies' ] )
- includes_tool_dependencies = util.string_as_bool( repo_information_dict[ 'includes_tool_dependencies' ] )
- encoded_repo_info_dicts = util.listify( repo_information_dict[ 'repo_info_dicts' ] )
+ includes_tools = util.string_as_bool( repo_information_dict.get( 'includes_tools', False ) )
+ includes_repository_dependencies = util.string_as_bool( repo_information_dict.get( 'includes_repository_dependencies', False ) )
+ includes_tool_dependencies = util.string_as_bool( repo_information_dict.get( 'includes_tool_dependencies', False ) )
+ encoded_repo_info_dicts = util.listify( repo_information_dict.get( 'repo_info_dicts', [] ) )
repo_info_dicts = [ tool_shed_decode( encoded_repo_info_dict ) for encoded_repo_info_dict in encoded_repo_info_dicts ]
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 ) ):
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
05 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/75a97c971d36/
changeset: 75a97c971d36
user: natefoo
date: 2012-12-05 23:50:23
summary: Allow matching in tool_handlers and tool_runners on toolshed guid, toolshed guid minus version, and based (old) id. Matching occurs in that order (more specific IDs override less specific ones).
affected #: 1 file
diff -r 42a6e3f82c0d2c5ec5bd4af1fca3bac125ffe9c9 -r 75a97c971d36599955f67384b6f36ca73a80dd2e lib/galaxy/tools/__init__.py
--- a/lib/galaxy/tools/__init__.py
+++ b/lib/galaxy/tools/__init__.py
@@ -993,17 +993,24 @@
else:
self.parallelism = None
# Set job handler(s). Each handler is a dict with 'url' and, optionally, 'params'.
- self_id = self.id.lower()
+ self_ids = [ self.id.lower() ]
+ if self.old_id != self.id:
+ # Handle toolshed guids
+ self_ids = [ self.id.lower(), self.id.lower().rsplit('/',1)[0], self.old_id.lower() ]
self.job_handlers = [ { "name" : name } for name in self.app.config.default_job_handlers ]
# Set custom handler(s) if they're defined.
- if self_id in self.app.config.tool_handlers:
- self.job_handlers = self.app.config.tool_handlers[ self_id ]
+ for self_id in self_ids:
+ if self_id in self.app.config.tool_handlers:
+ self.job_handlers = self.app.config.tool_handlers[ self_id ]
+ break
# Set job runner(s). Each runner is a dict with 'url' and, optionally, 'params'.
# Set job runner to the cluster default
self.job_runners = [ { "url" : self.app.config.default_cluster_job_runner } ]
# Set custom runner(s) if they're defined.
- if self_id in self.app.config.tool_runners:
- self.job_runners = self.app.config.tool_runners[ self_id ]
+ for self_id in self_ids:
+ if self_id in self.app.config.tool_runners:
+ self.job_runners = self.app.config.tool_runners[ self_id ]
+ break
# Is this a 'hidden' tool (hidden in tool menu)
self.hidden = util.xml_text(root, "hidden")
if self.hidden: self.hidden = util.string_as_bool(self.hidden)
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/8ea1787b037b/
changeset: 8ea1787b037b
user: inithello
date: 2012-12-05 20:36:20
summary: More tool shed functional test enhancements.
affected #: 21 files
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/base/common.py
--- /dev/null
+++ b/test/tool_shed/base/common.py
@@ -0,0 +1,15 @@
+admin_user = None
+admin_user_private_role = None
+admin_email = 'test(a)bx.psu.edu'
+admin_username = 'admin-user'
+
+test_user_1 = None
+test_user_1_private_role = None
+test_user_1_email = 'test-1(a)bx.psu.edu'
+test_user_1_name = 'user1'
+
+new_repository_dependencies_xml = '''<?xml version="1.0"?>
+<repositories>
+ <repository toolshed="${toolshed_url}" name="${repository_name}" owner="${owner}" changeset_revision="${changeset_revision}" />
+</repositories>
+'''
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/base/twilltestcase.py
--- a/test/tool_shed/base/twilltestcase.py
+++ b/test/tool_shed/base/twilltestcase.py
@@ -1,6 +1,7 @@
from base.twilltestcase import *
from galaxy.webapps.community.util.hgweb_config import *
from test_db_util import *
+from common import *
import string
from galaxy import eggs
@@ -137,6 +138,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_manage_repository_page( self, repository, strings_displayed=[], strings_not_displayed=[] ):
+ url = '/repository/manage_repository?id=%s' % self.security.encode_id( repository.id )
+ self.visit_url( url )
+ self.check_for_strings( strings_displayed, strings_not_displayed )
def display_repository_clone_page( self, owner_name, repository_name, strings_displayed=[], strings_not_displayed=[] ):
url = '/repos/%s/%s' % ( owner_name, repository_name )
self.visit_url( url )
@@ -204,6 +209,15 @@
else:
string = string.replace( character, replacement )
return string
+ def generate_repository_dependency_xml( self, repository, xml_filename ):
+ changeset_revision = self.get_repository_tip( repository )
+ template_parser = string.Template( new_repository_dependencies_xml )
+ repository_dependency_xml = template_parser.safe_substitute( toolshed_url=self.url,
+ owner=repository.user.username,
+ repository_name=repository.name,
+ changeset_revision=changeset_revision )
+ # Save the generated xml to test-data/emboss_5/repository_dependencies.xml.
+ file( xml_filename, 'w' ).write( repository_dependency_xml )
def get_latest_repository_metadata_for_repository( self, repository ):
# TODO: This will not work as expected. Fix it.
return repository.metadata_revisions[ 0 ]
@@ -279,10 +293,6 @@
( self.security.encode_id( repository.id ), tool_xml_path, changeset_revision )
self.visit_url( url )
self.check_for_strings( strings_displayed, strings_not_displayed )
- def display_manage_repository_page( self, repository, strings_displayed=[], strings_not_displayed=[] ):
- url = '/repository/manage_repository?id=%s' % self.security.encode_id( repository.id )
- self.visit_url( url )
- self.check_for_strings( strings_displayed, strings_not_displayed )
def revoke_write_access( self, repository, username ):
url = '/repository/manage_repository?user_access_button=Remove&id=%s&remove_auth=%s' % \
( self.security.encode_id( repository.id ), username )
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/functional/test_0000_basic_repository_features.py
--- a/test/tool_shed/functional/test_0000_basic_repository_features.py
+++ b/test/tool_shed/functional/test_0000_basic_repository_features.py
@@ -1,16 +1,6 @@
from tool_shed.base.twilltestcase import *
from tool_shed.base.test_db_util import *
-admin_user = None
-admin_user_private_role = None
-admin_email = 'test(a)bx.psu.edu'
-admin_username = 'admin-user'
-
-test_user_1 = None
-test_user_1_private_role = None
-test_user_1_email = 'test-1(a)bx.psu.edu'
-test_user_1_name = 'user1'
-
repository_name = 'filtering'
repository_description = "Galaxy's filtering tool"
repository_long_description = "Long description of Galaxy's filtering tool"
@@ -60,7 +50,7 @@
def test_0030_upload_filtering_1_1_0( self ):
"""Upload filtering_1.1.0.tar to the repository"""
repository = get_repository_by_name_and_owner( repository_name, admin_username )
- self.upload_file( repository, 'filtering_1.1.0.tar', commit_message="Uploaded filtering 1.1.0" )
+ self.upload_file( repository, 'filtering/filtering_1.1.0.tar', commit_message="Uploaded filtering 1.1.0" )
def test_0035_verify_repository( self ):
'''Display basic repository pages'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
@@ -102,7 +92,7 @@
'''Upload filtering.txt file associated with tool version 1.1.0.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
- 'filtering.txt',
+ 'filtering/filtering.txt',
commit_message="Uploaded filtering.txt",
uncompress_file='No',
remove_repo_files_not_in_tar='No' )
@@ -110,7 +100,7 @@
def test_0055_upload_filtering_test_data( self ):
'''Upload filtering test data.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
- self.upload_file( repository, 'filtering_test_data.tar', commit_message="Uploaded filtering test data", remove_repo_files_not_in_tar='No' )
+ self.upload_file( repository, 'filtering/filtering_test_data.tar', commit_message="Uploaded filtering test data", remove_repo_files_not_in_tar='No' )
self.display_repository_file_contents( repository=repository,
filename='1.bed',
filepath='test-data',
@@ -121,7 +111,7 @@
'''Upload filtering version 2.2.0'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
- 'filtering_2.2.0.tar',
+ 'filtering/filtering_2.2.0.tar',
commit_message="Uploaded filtering 2.2.0",
remove_repo_files_not_in_tar='No' )
def test_0065_verify_filtering_repository( self ):
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
--- a/test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
+++ b/test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
@@ -1,16 +1,6 @@
from tool_shed.base.twilltestcase import *
from tool_shed.base.test_db_util import *
-admin_user = None
-admin_user_private_role = None
-admin_email = 'test(a)bx.psu.edu'
-admin_username = 'admin-user'
-
-test_user_1 = None
-test_user_1_private_role = None
-test_user_1_email = 'test-1(a)bx.psu.edu'
-test_user_1_name = 'user1'
-
repository_name = 'freebayes'
repository_description = "Galaxy's freebayes tool"
repository_long_description = "Long description of Galaxy's freebayes tool"
@@ -24,11 +14,11 @@
admin_user = get_user( admin_email )
assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
admin_user_private_role = get_private_role( admin_user )
- def test_0005_create_categories( self ):
- """Create categories"""
+ def test_0005_create_category( self ):
+ """Create SNP Analysis category."""
self.create_category( 'SNP Analysis', 'Tools for single nucleotide polymorphism data such as WGA' )
- def test_0005_create_freebayes_repository_and_upload_tool_xml( self ):
- '''Upload freebayes.xml without tool_data_table_conf.xml.sample. This should result in an error and invalid tool.'''
+ def test_0010_create_freebayes_repository_and_upload_tool_xml( self ):
+ '''Create freebayes repository and upload freebayes.xml without tool_data_table_conf.xml.sample. This should result in an error message and invalid tool.'''
self.create_repository( repository_name,
repository_description,
repository_long_description=repository_long_description,
@@ -45,38 +35,42 @@
self.check_repository_invalid_tools_for_changeset_revision( repository,
tip,
strings_displayed=[ 'requires an entry', 'tool_data_table_conf.xml' ] )
- def test_0010_upload_missing_tool_data_table_conf_file( self ):
+ def test_0015_upload_missing_tool_data_table_conf_file( self ):
'''Upload the missing tool_data_table_conf.xml.sample file to the repository.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
'freebayes/tool_data_table_conf.xml.sample',
+ valid_tools_only=False,
strings_displayed=[],
commit_message='Uploaded the tool data table sample file.' )
- def test_0015_upload_missing_sample_loc_file( self ):
+ self.display_manage_repository_page( repository, strings_displayed=[ 'Invalid tools' ], strings_not_displayed=[ 'Valid tools' ] )
+ tip = self.get_repository_tip( repository )
+ self.check_repository_invalid_tools_for_changeset_revision( repository,
+ tip,
+ strings_displayed=[ 'refers to a file', 'sam_fa_indices.loc' ] )
+ def test_0020_upload_missing_sample_loc_file( self ):
'''Upload the missing sam_fa_indices.loc.sample file to the repository.'''
- # Freebayes does not generate an error when the loc file is missing.
- # TODO: Generate a test case for that situation.
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
'freebayes/sam_fa_indices.loc.sample',
strings_displayed=[],
commit_message='Uploaded tool data table .loc file.' )
- def test_0020_upload_invalid_tool_dependency_xml( self ):
+ def test_0025_upload_invalid_tool_dependency_xml( self ):
'''Upload tool_dependencies.xml defining version 0.9.5 of the freebayes package.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
- os.path.join( 'freebayes', 'invalid_deps', 'tool_dependencies.xml' ),
+ os.path.join( 'freebayes', 'invalid_tool_dependencies', 'tool_dependencies.xml' ),
strings_displayed=[ 'Name, version and type from a tool requirement tag does not match' ],
commit_message='Uploaded invalid tool dependency XML.' )
- def test_0025_upload_valid_tool_dependency_xml( self ):
+ def test_0030_upload_valid_tool_dependency_xml( self ):
'''Upload tool_dependencies.xml defining version 0.9.4_9696d0ce8a962f7bb61c4791be5ce44312b81cf8 of the freebayes package.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.upload_file( repository,
os.path.join( 'freebayes', 'tool_dependencies.xml' ),
commit_message='Uploaded valid tool dependency XML.' )
- def test_0030_verify_tool_dependencies( self ):
+ def test_0035_verify_tool_dependencies( self ):
'''Verify that the uploaded tool_dependencies.xml specifies the correct package versions.'''
repository = get_repository_by_name_and_owner( repository_name, admin_username )
self.display_manage_repository_page( repository,
- strings_displayed=[ 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18', 'Valid tools' ],
- strings_not_displayed=[ 'Invalid tools' ] )
+ strings_displayed=[ 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18', 'Valid tools' ],
+ strings_not_displayed=[ 'Invalid tools' ] )
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/functional/test_0020_basic_repository_dependencies.py
--- /dev/null
+++ b/test/tool_shed/functional/test_0020_basic_repository_dependencies.py
@@ -0,0 +1,71 @@
+from tool_shed.base.twilltestcase import *
+from tool_shed.base.test_db_util import *
+
+datatypes_repository_name = 'emboss_datatypes'
+datatypes_repository_description = "Galaxy applicable data formats used by Emboss tools."
+datatypes_repository_long_description = "Galaxy applicable data formats used by Emboss tools. This repository contains no tools."
+
+emboss_repository_name = 'emboss_5'
+emboss_repository_description = 'Galaxy wrappers for Emboss version 5.0.0 tools'
+emboss_repository_long_description = 'Galaxy wrappers for Emboss version 5.0.0 tools'
+
+class TestBasicRepositoryDependencies( ShedTwillTestCase ):
+ '''Testing emboss 5 with repository dependencies.'''
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts and login as an admin user."""
+ self.logout()
+ self.login( email=admin_email, username=admin_username )
+ admin_user = get_user( admin_email )
+ assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
+ admin_user_private_role = get_private_role( admin_user )
+ self.logout()
+ self.login( email=test_user_1_email, username=test_user_1_name )
+ test_user_1 = get_user( test_user_1_email )
+ assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % regular_email
+ test_user_1_private_role = get_private_role( test_user_1 )
+ def test_0005_create_category( self ):
+ """Create Sequence Analysis category"""
+ self.logout()
+ self.login( email=admin_email, username=admin_username )
+ self.create_category( 'Sequence Analysis', 'Tools for performing Protein and DNA/RNA analysis' )
+ def test_0010_create_emboss_datatypes_repository_and_upload_tarball( self ):
+ '''Create and populate the emboss_datatypes repository.'''
+ self.logout()
+ self.login( email=test_user_1_email, username=test_user_1_name )
+ self.create_repository( datatypes_repository_name,
+ datatypes_repository_description,
+ repository_long_description=datatypes_repository_long_description,
+ categories=[ 'Sequence Analysis' ],
+ strings_displayed=[] )
+ repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
+ self.upload_file( repository, 'emboss/datatypes/datatypes_conf.xml', commit_message='Uploaded datatypes_conf.xml.' )
+ def test_0015_verify_datatypes_in_datatypes_repository( self ):
+ '''Verify that the emboss_datatypes repository contains datatype entries.'''
+ repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
+ self.display_manage_repository_page( repository, strings_displayed=[ 'Datatypes', 'equicktandem', 'hennig86', 'vectorstrip' ] )
+ def test_0020_create_emboss_5_repository_and_upload_files( self ):
+ '''Create and populate the emboss_5 repository.'''
+ self.create_repository( emboss_repository_name,
+ emboss_repository_description,
+ repository_long_description=emboss_repository_long_description,
+ categories=[ 'Text Manipulation' ],
+ strings_displayed=[] )
+ repository = get_repository_by_name_and_owner( emboss_repository_name, test_user_1_name )
+ self.upload_file( repository, 'emboss/5/emboss.tar', commit_message='Uploaded emboss_5.tar' )
+ def test_0025_generate_and_upload_repository_dependencies_xml( self ):
+ '''Generate and upload the repository_dependencies.xml file'''
+ repository = get_repository_by_name_and_owner( emboss_repository_name, test_user_1_name )
+ datatypes_repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
+ self.generate_repository_dependency_xml( datatypes_repository, self.get_filename( 'emboss/5/repository_dependencies.xml' ) )
+ self.upload_file( repository, 'emboss/5/repository_dependencies.xml', commit_message='Uploaded repository_dependencies.xml' )
+ def test_0030_verify_emboss_5_repository_dependency_on_emboss_datatypes( self ):
+ '''Verify that the emboss_5 repository now depends on the emboss_datatypes repository with correct name, owner, and changeset revision.'''
+ repository = get_repository_by_name_and_owner( emboss_repository_name, test_user_1_name )
+ datatypes_repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
+ changeset_revision = self.get_repository_tip( datatypes_repository )
+ strings_displayed = [ datatypes_repository_name, test_user_1_name, changeset_revision, 'Repository dependencies' ]
+ self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
+ def test_0035_cleanup( self ):
+ '''Clean up generated test data.'''
+ if os.path.exists( self.get_filename( 'emboss/5/repository_dependencies.xml' ) ):
+ os.remove( self.get_filename( 'emboss/5/repository_dependencies.xml' ) )
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/functional/test_0020_emboss_repository_dependencies.py
--- a/test/tool_shed/functional/test_0020_emboss_repository_dependencies.py
+++ /dev/null
@@ -1,95 +0,0 @@
-from tool_shed.base.twilltestcase import *
-from tool_shed.base.test_db_util import *
-
-admin_user = None
-admin_user_private_role = None
-admin_email = 'test(a)bx.psu.edu'
-admin_username = 'admin-user'
-
-test_user_1 = None
-test_user_1_private_role = None
-test_user_1_email = 'test-1(a)bx.psu.edu'
-test_user_1_name = 'user1'
-
-datatypes_repository_name = 'emboss_datatypes'
-datatypes_repository_description = "Galaxy applicable data formats used by Emboss tools."
-datatypes_repository_long_description = "Galaxy applicable data formats used by Emboss tools. This repository contains no tools."
-
-emboss_repository_name = 'emboss_5'
-emboss_repository_description = 'Galaxy wrappers for Emboss version 5.0.0 tools'
-emboss_repository_long_description = 'Galaxy wrappers for Emboss version 5.0.0 tools'
-
-new_repository_dependencies_xml = '''<?xml version="1.0"?>
-<repositories>
- <repository toolshed="${toolshed_url}" name="${repository_name}" owner="${owner}" changeset_revision="${changeset_revision}" />
-</repositories>
-'''
-
-class TestEmbossRepositoryDependencies( ShedTwillTestCase ):
- '''Testing emboss 5 with repository dependencies.'''
- def test_0000_initiate_users( self ):
- """Create necessary user accounts and login as an admin user."""
- self.logout()
- self.login( email=admin_email, username=admin_username )
- admin_user = get_user( admin_email )
- assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
- admin_user_private_role = get_private_role( admin_user )
- self.logout()
- self.login( email=test_user_1_email, username=test_user_1_name )
- test_user_1 = get_user( test_user_1_email )
- assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % regular_email
- test_user_1_private_role = get_private_role( test_user_1 )
- def test_0005_create_categories( self ):
- """Create categories"""
- self.logout()
- self.login( email=admin_email, username=admin_username )
- self.create_category( 'Sequence Analysis', 'Tools for performing Protein and DNA/RNA analysis' )
- def test_0010_create_emboss_datatypes_repository_and_upload_tarball( self ):
- '''Create the emboss_datatypes repository and upload the tarball.'''
- self.logout()
- self.login( email=test_user_1_email, username=test_user_1_name )
- self.create_repository( datatypes_repository_name,
- datatypes_repository_description,
- repository_long_description=datatypes_repository_long_description,
- categories=[ 'Sequence Analysis' ],
- strings_displayed=[] )
- repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
- self.upload_file( repository,
- 'emboss_5/datatypes_conf.xml',
- commit_message='Uploaded datatypes_conf.xml.' )
- def test_0015_verify_datatypes_in_datatypes_repository( self ):
- '''Verify that the emboss_datatypes repository contains datatype entries.'''
- repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
- self.display_manage_repository_page( repository, strings_displayed=[ 'Datatypes', 'equicktandem', 'hennig86', 'vectorstrip' ] )
- def test_0020_generate_repository_dependencies_xml( self ):
- '''Generate the repository_dependencies.xml file for the emboss_5 repository.'''
- datatypes_repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
- changeset_revision = self.get_repository_tip( datatypes_repository )
- template_parser = string.Template( new_repository_dependencies_xml )
- repository_dependency_xml = template_parser.safe_substitute( toolshed_url=self.url,
- owner=test_user_1_name,
- repository_name=datatypes_repository.name,
- changeset_revision=changeset_revision )
- # Save the generated xml to test-data/emboss_5/repository_dependencies.xml.
- file( self.get_filename( 'emboss_5/repository_dependencies.xml' ), 'w' ).write( repository_dependency_xml )
- def test_0025_create_emboss_5_repository_and_upload_files( self ):
- '''Create the emboss_5 repository and upload a tool tarball, then generate and upload repository_dependencies.xml.'''
- self.create_repository( emboss_repository_name,
- emboss_repository_description,
- repository_long_description=emboss_repository_long_description,
- categories=[ 'Text Manipulation' ],
- strings_displayed=[] )
- repository = get_repository_by_name_and_owner( emboss_repository_name, test_user_1_name )
- self.upload_file( repository, 'emboss_5/emboss_5.tar', commit_message='Uploaded emboss_5.tar' )
- self.upload_file( repository, 'emboss_5/repository_dependencies.xml', commit_message='Uploaded repository_dependencies.xml' )
- def test_0030_verify_emboss_5_repository_dependency_on_emboss_datatypes( self ):
- '''Verify that the emboss_5 repository now depends on the emboss_datatypes repository with correct name, owner, and changeset revision.'''
- repository = get_repository_by_name_and_owner( emboss_repository_name, test_user_1_name )
- datatypes_repository = get_repository_by_name_and_owner( datatypes_repository_name, test_user_1_name )
- changeset_revision = self.get_repository_tip( datatypes_repository )
- strings_displayed = [ datatypes_repository_name, test_user_1_name, changeset_revision, 'Repository dependencies' ]
- self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
- def test_0035_cleanup( self ):
- '''Clean up generated test data.'''
- if os.path.exists( self.get_filename( 'emboss_5/repository_dependencies.xml' ) ):
- os.remove( self.get_filename( 'emboss_5/repository_dependencies.xml' ) )
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/emboss/5/emboss.tar
Binary file test/tool_shed/test_data/emboss/5/emboss.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/emboss/6/emboss.tar
Binary file test/tool_shed/test_data/emboss/6/emboss.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/emboss/datatypes/datatypes_conf.xml
--- /dev/null
+++ b/test/tool_shed/test_data/emboss/datatypes/datatypes_conf.xml
@@ -0,0 +1,101 @@
+<?xml version="1.0"?>
+<datatypes>
+ <registration>
+ <datatype extension="acedb" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="asn1" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="btwisted" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="cai" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="charge" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="checktrans" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="chips" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="clustal" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="codata" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="codcmp" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="coderet" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="compseq" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="cpgplot" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="cpgreport" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="cusp" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="cut" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="dan" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="dbmotif" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="diffseq" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="digest" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="dreg" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="einverted" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="embl" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="epestfind" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="equicktandem" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="est2genome" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="etandem" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="excel" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="feattable" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="fitch" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="freak" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="fuzznuc" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="fuzzpro" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="fuzztran" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="garnier" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="gcg" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="geecee" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="genbank" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="helixturnhelix" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="hennig86" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="hmoment" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="ig" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="isochore" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="jackknifer" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="jackknifernon" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="markx0" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="markx1" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="markx10" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="markx2" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="markx3" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="match" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="mega" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="meganon" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="motif" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="msf" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="nametable" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="ncbi" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="needle" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="newcpgreport" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="newcpgseek" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="nexus" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="nexusnon" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="noreturn" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="pair" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="palindrome" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="pepcoil" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="pepinfo" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="pepstats" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="phylip" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="phylipnon" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="pir" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="polydot" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="preg" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="prettyseq" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="primersearch" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="regions" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="score" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="selex" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="seqtable" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="showfeat" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="showorf" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="simple" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="sixpack" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="srs" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="srspair" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="staden" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="strider" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="supermatcher" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="swiss" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="syco" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="table" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="tagseq" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="textsearch" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="vectorstrip" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="wobble" type="galaxy.datatypes.data:Text" subclass="True"/>
+ <datatype extension="wordcount" type="galaxy.datatypes.data:Text" subclass="True"/>
+ </registration>
+</datatypes>
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/emboss_5/datatypes_conf.xml
--- a/test/tool_shed/test_data/emboss_5/datatypes_conf.xml
+++ /dev/null
@@ -1,101 +0,0 @@
-<?xml version="1.0"?>
-<datatypes>
- <registration>
- <datatype extension="acedb" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="asn1" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="btwisted" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="cai" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="charge" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="checktrans" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="chips" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="clustal" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="codata" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="codcmp" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="coderet" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="compseq" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="cpgplot" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="cpgreport" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="cusp" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="cut" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="dan" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="dbmotif" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="diffseq" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="digest" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="dreg" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="einverted" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="embl" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="epestfind" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="equicktandem" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="est2genome" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="etandem" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="excel" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="feattable" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="fitch" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="freak" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="fuzznuc" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="fuzzpro" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="fuzztran" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="garnier" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="gcg" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="geecee" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="genbank" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="helixturnhelix" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="hennig86" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="hmoment" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="ig" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="isochore" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="jackknifer" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="jackknifernon" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="markx0" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="markx1" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="markx10" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="markx2" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="markx3" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="match" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="mega" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="meganon" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="motif" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="msf" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="nametable" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="ncbi" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="needle" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="newcpgreport" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="newcpgseek" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="nexus" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="nexusnon" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="noreturn" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="pair" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="palindrome" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="pepcoil" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="pepinfo" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="pepstats" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="phylip" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="phylipnon" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="pir" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="polydot" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="preg" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="prettyseq" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="primersearch" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="regions" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="score" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="selex" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="seqtable" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="showfeat" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="showorf" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="simple" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="sixpack" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="srs" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="srspair" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="staden" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="strider" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="supermatcher" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="swiss" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="syco" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="table" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="tagseq" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="textsearch" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="vectorstrip" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="wobble" type="galaxy.datatypes.data:Text" subclass="True"/>
- <datatype extension="wordcount" type="galaxy.datatypes.data:Text" subclass="True"/>
- </registration>
-</datatypes>
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/emboss_5/emboss_5.tar
Binary file test/tool_shed/test_data/emboss_5/emboss_5.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering.txt
--- a/test/tool_shed/test_data/filtering.txt
+++ /dev/null
@@ -1,1 +0,0 @@
-Readme file for filtering 1.1.0
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering/filtering.txt
--- /dev/null
+++ b/test/tool_shed/test_data/filtering/filtering.txt
@@ -0,0 +1,1 @@
+Readme file for filtering 1.1.0
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering/filtering_1.1.0.tar
Binary file test/tool_shed/test_data/filtering/filtering_1.1.0.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering/filtering_2.2.0.tar
Binary file test/tool_shed/test_data/filtering/filtering_2.2.0.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering/filtering_test_data.tar
Binary file test/tool_shed/test_data/filtering/filtering_test_data.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering_1.1.0.tar
Binary file test/tool_shed/test_data/filtering_1.1.0.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering_2.2.0.tar
Binary file test/tool_shed/test_data/filtering_2.2.0.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/filtering_test_data.tar
Binary file test/tool_shed/test_data/filtering_test_data.tar has changed
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/freebayes/invalid_deps/tool_dependencies.xml
--- a/test/tool_shed/test_data/freebayes/invalid_deps/tool_dependencies.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
- <package name="freebayes" version="0.9.5">
- <install version="1.0">
- <actions>
- <action type="shell_command">git clone --recursive git://github.com/ekg/freebayes.git</action>
- <action type="shell_command">git reset --hard 9696d0ce8a962f7bb61c4791be5ce44312b81cf8</action>
- <action type="shell_command">make</action>
- <action type="move_directory_files">
- <source_directory>bin</source_directory>
- <destination_directory>$INSTALL_DIR/bin</destination_directory>
- </action>
- <action type="set_environment">
- <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
- </action>
- </actions>
- </install>
- <readme>
-FreeBayes requires g++ and the standard C and C++ development libraries.
-Additionally, cmake is required for building the BamTools API.
- </readme>
- </package>
- <package name="samtools" version="0.2.15">
- <install version="1.0">
- <actions>
- <action type="download_by_url">http://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1…</action>
- <action type="shell_command">sed -i .bak -e 's/-lcurses/-lncurses/g' Makefile</action>
- <action type="shell_command">make</action>
- <action type="move_file">
- <source>samtools</source>
- <destination>$INSTALL_DIR/bin</destination>
- </action>
- <action type="move_file">
- <source>misc/maq2sam-long</source>
- <destination>$INSTALL_DIR/bin</destination>
- </action>
- <action type="set_environment">
- <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
- </action>
- </actions>
- </install>
- <readme>
-Compiling SAMtools requires the ncurses and zlib development libraries.
- </readme>
- </package>
-</tool_dependency>
diff -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 test/tool_shed/test_data/freebayes/invalid_tool_dependencies/tool_dependencies.xml
--- /dev/null
+++ b/test/tool_shed/test_data/freebayes/invalid_tool_dependencies/tool_dependencies.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<tool_dependency>
+ <package name="freebayes" version="0.9.5">
+ <install version="1.0">
+ <actions>
+ <action type="shell_command">git clone --recursive git://github.com/ekg/freebayes.git</action>
+ <action type="shell_command">git reset --hard 9696d0ce8a962f7bb61c4791be5ce44312b81cf8</action>
+ <action type="shell_command">make</action>
+ <action type="move_directory_files">
+ <source_directory>bin</source_directory>
+ <destination_directory>$INSTALL_DIR/bin</destination_directory>
+ </action>
+ <action type="set_environment">
+ <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+ </action>
+ </actions>
+ </install>
+ <readme>
+FreeBayes requires g++ and the standard C and C++ development libraries.
+Additionally, cmake is required for building the BamTools API.
+ </readme>
+ </package>
+ <package name="samtools" version="0.2.15">
+ <install version="1.0">
+ <actions>
+ <action type="download_by_url">http://sourceforge.net/projects/samtools/files/samtools/0.1.18/samtools-0.1…</action>
+ <action type="shell_command">sed -i .bak -e 's/-lcurses/-lncurses/g' Makefile</action>
+ <action type="shell_command">make</action>
+ <action type="move_file">
+ <source>samtools</source>
+ <destination>$INSTALL_DIR/bin</destination>
+ </action>
+ <action type="move_file">
+ <source>misc/maq2sam-long</source>
+ <destination>$INSTALL_DIR/bin</destination>
+ </action>
+ <action type="set_environment">
+ <environment_variable name="PATH" action="prepend_to">$INSTALL_DIR/bin</environment_variable>
+ </action>
+ </actions>
+ </install>
+ <readme>
+Compiling SAMtools requires the ncurses and zlib development libraries.
+ </readme>
+ </package>
+</tool_dependency>
https://bitbucket.org/galaxy/galaxy-central/changeset/42a6e3f82c0d/
changeset: 42a6e3f82c0d
user: inithello
date: 2012-12-05 20:37:48
summary: Fix error in tool xml dynamic options parsing.
affected #: 1 file
diff -r 8ea1787b037bf957535d39ab1c834a241bb2a5e5 -r 42a6e3f82c0d2c5ec5bd4af1fca3bac125ffe9c9 lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -8,6 +8,7 @@
from galaxy.webapps.community.util.container_util import *
from galaxy.datatypes.checkers import *
from galaxy.model.orm import *
+from galaxy.tools.parameters import dynamic_options
from galaxy import eggs
import pkg_resources
@@ -249,7 +250,7 @@
if isinstance( input_param, parameters.basic.SelectToolParameter ) and input_param.is_dynamic:
# If the tool refers to .loc files or requires an entry in the tool_data_table_conf.xml, make sure all requirements exist.
options = input_param.dynamic_options or input_param.options
- if options:
+ if options and isinstance( options, dynamic_options.DynamicOptions ):
if options.tool_data_table or options.missing_tool_data_table_name:
# Make sure the repository contains a tool_data_table_conf.xml.sample file.
sample_tool_data_table_conf = get_config_from_disk( 'tool_data_table_conf.xml.sample', repo_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: greg: Handle invalid repository dependency definitions.
by Bitbucket 05 Dec '12
by Bitbucket 05 Dec '12
05 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1b6819e4598d/
changeset: 1b6819e4598d
user: greg
date: 2012-12-05 17:46:36
summary: Handle invalid repository dependency definitions.
affected #: 2 files
diff -r 1b8fd73e2a5464fd2caab261dbf10017f119185d -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 lib/galaxy/util/shed_util_common.py
--- a/lib/galaxy/util/shed_util_common.py
+++ b/lib/galaxy/util/shed_util_common.py
@@ -618,7 +618,7 @@
message = ''
if not displaying_invalid_tool:
if metadata_dict:
- message += "Metadata was defined for some items in revision '%s'. " % str( repository.tip( trans.app ) )
+ message += "Metadata may have been defined for some items in revision '%s'. " % str( repository.tip( trans.app ) )
message += "Correct the following problems if necessary and reset metadata.%s" % new_line
else:
message += "Metadata cannot be defined for revision '%s' so this revision cannot be automatically " % str( repository.tip( trans.app ) )
@@ -719,7 +719,9 @@
# See if we have a repository dependencies defined.
if name == 'repository_dependencies.xml':
path_to_repository_dependencies_config = os.path.join( root, name )
- metadata_dict = generate_repository_dependency_metadata( path_to_repository_dependencies_config, metadata_dict )
+ metadata_dict, error_message = generate_repository_dependency_metadata( app, path_to_repository_dependencies_config, metadata_dict )
+ if error_message:
+ invalid_file_tups.append( ( name, error_message ) )
# See if we have one or more READ_ME files.
elif name.lower() in readme_file_names:
relative_path_to_readme = get_relative_path_to_repository_file( root,
@@ -812,29 +814,71 @@
if requirements_dict:
tool_dependencies_dict[ dependency_key ] = requirements_dict
return tool_dependencies_dict
-def generate_repository_dependency_metadata( repository_dependencies_config, metadata_dict ):
+def generate_repository_dependency_metadata( app, repository_dependencies_config, metadata_dict ):
+ """Generate a repository dependencies dictionary based on valid information defined in the received repository_dependencies_config."""
repository_dependencies_tups = []
+ error_message = ''
+ config_file_name = strip_path( repository_dependencies_config )
try:
# Make sure we're looking at a valid repository_dependencies.xml file.
tree = util.parse_xml( repository_dependencies_config )
root = tree.getroot()
is_valid = root.tag == 'repositories'
except Exception, e:
- log.debug( "Error parsing %s, exception: %s" % ( repository_dependencies_config, str( e ) ) )
+ error_message = "Error parsing %s, exception: %s" % ( repository_dependencies_config, str( e ) )
+ log.debug( error_message )
is_valid = False
if is_valid:
+ sa_session = app.model.context.current
for repository_elem in root.findall( 'repository' ):
- repository_dependencies_tup = ( repository_elem.attrib[ 'toolshed' ],
- repository_elem.attrib[ 'name' ],
- repository_elem.attrib[ 'owner'],
- repository_elem.attrib[ 'changeset_revision' ] )
- if repository_dependencies_tup not in repository_dependencies_tups:
- repository_dependencies_tups.append( repository_dependencies_tup )
+ toolshed = repository_elem.attrib[ 'toolshed' ]
+ name = repository_elem.attrib[ 'name' ]
+ owner = repository_elem.attrib[ 'owner']
+ changeset_revision = repository_elem.attrib[ 'changeset_revision' ]
+ user = None
+ repository = None
+ # Repository dependencies are currentlhy supported only within a single tool shed.
+ if tool_shed_is_this_tool_shed( toolshed ):
+ try:
+ user = sa_session.query( app.model.User ) \
+ .filter( app.model.User.table.c.username == owner ) \
+ .one()
+ except Exception, e:
+ error_message = "Invalid owner %s defined for repository %s in config file %s. " % ( owner, name, config_file_name )
+ error_message += "Repository dependencies will be ignored."
+ log.debug( error_message )
+ return metadata_dict, error_message
+ if user:
+ try:
+ repository = sa_session.query( app.model.Repository ) \
+ .filter( and_( app.model.Repository.table.c.name == name,
+ app.model.Repository.table.c.user_id == user.id ) ) \
+ .first()
+ except:
+ error_message = "Invalid name %s or owner %s defined for repository in config file %s. " % ( name, owner, config_file_name )
+ error_message += "Repository dependencies will be ignored."
+ log.debug( error_message )
+ return metadata_dict, error_message
+ if repository:
+ repository_dependencies_tup = ( toolshed, name, owner, changeset_revision )
+ if repository_dependencies_tup not in repository_dependencies_tups:
+ repository_dependencies_tups.append( repository_dependencies_tup )
+ else:
+ error_message = "Invalid name %s or owner %s defined for repository in config file %s. " % ( name, owner, config_file_name )
+ error_message += "Repository dependencies will be ignored."
+ log.debug( error_message )
+ return metadata_dict, error_message
+ else:
+ # We have an invalid repository owner defined for an entry in repository_dependencies.xml.
+ config_file_name = strip_path( repository_dependencies_config )
+ error_message = "Invalid username %s defined for owner of repository %s in config file %s. Repository dependencies will be ignored." % ( owner, name, config_file_name )
+ log.debug( error_message )
+ return metadata_dict, error_message
if repository_dependencies_tups:
repository_dependencies_dict = dict( description=root.get( 'description' ),
repository_dependencies=repository_dependencies_tups )
metadata_dict[ 'repository_dependencies' ] = repository_dependencies_dict
- return metadata_dict
+ return metadata_dict, error_message
def generate_tool_dependency_metadata( app, repository, tool_dependencies_config, metadata_dict, original_repository_metadata=None ):
"""
If the combination of name, version and type of each element is defined in the <requirement> tag for at least one tool in the repository,
diff -r 1b8fd73e2a5464fd2caab261dbf10017f119185d -r 1b6819e4598ddcc685cd8ab69667e2d8d7d952f0 test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
--- a/test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
+++ b/test/tool_shed/functional/test_0010_repository_with_tool_dependencies.py
@@ -38,7 +38,7 @@
self.upload_file( repository,
'freebayes/freebayes.xml',
valid_tools_only=False,
- strings_displayed=[ 'Metadata was defined', 'This file requires an entry', 'tool_data_table_conf' ],
+ strings_displayed=[ 'Metadata may have been defined', 'This file requires an entry', 'tool_data_table_conf' ],
commit_message='Uploaded the tool xml.' )
self.display_manage_repository_page( repository, strings_displayed=[ 'Invalid tools' ], strings_not_displayed=[ 'Valid tools' ] )
tip = self.get_repository_tip( repository )
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 displaying repository dependencies when installing a tool shed repository.
by Bitbucket 05 Dec '12
by Bitbucket 05 Dec '12
05 Dec '12
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/changeset/1b8fd73e2a54/
changeset: 1b8fd73e2a54
user: greg
date: 2012-12-05 16:55:29
summary: Fix for displaying repository dependencies when installing a tool shed repository.
affected #: 1 file
diff -r 6304eb6a91103121ed6d6bf960b6bc9984966259 -r 1b8fd73e2a5464fd2caab261dbf10017f119185d 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
@@ -1242,8 +1242,9 @@
encoded_repo_info_dicts=encoded_repo_info_dicts,
includes_tools=includes_tools,
includes_tool_dependencies=includes_tool_dependencies,
+ install_tool_dependencies_check_box=install_tool_dependencies_check_box,
+ includes_repository_dependencies=includes_repository_dependencies,
install_repository_dependencies_check_box=install_repository_dependencies_check_box,
- install_tool_dependencies_check_box=install_tool_dependencies_check_box,
new_tool_panel_section=new_tool_panel_section,
containers_dict=containers_dict,
shed_tool_conf=shed_tool_conf,
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