commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c74d749979cd/ Changeset: c74d749979cd User: jmchilton Date: 2014-06-13 22:45:41 Summary: Rollback UI commit - not quite ready after more testing. Affected #: 6 files diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/collection/dataset-collection-base.js --- a/static/scripts/mvc/collection/dataset-collection-base.js +++ b/static/scripts/mvc/collection/dataset-collection-base.js @@ -144,7 +144,7 @@ contentView.$el.children( '.dataset-body' ).replaceWith( contentView._render_body() ); contentView.$el.children( '.dataset-body' ).slideDown( contentView.fxSpeed, function(){ contentView.expanded = true; - contentView.trigger( 'body-expanded', contentView.model ); + contentView.trigger( 'body-expanded', contentView.model.get( 'id' ) ); }); } // TODO: Fetch more details like HDA view... @@ -158,7 +158,7 @@ var hdaView = this; this.$el.children( '.dataset-body' ).slideUp( hdaView.fxSpeed, function(){ hdaView.expanded = false; - hdaView.trigger( 'body-collapsed', hdaView.model.id ); + hdaView.trigger( 'body-collapsed', hdaView.model.get( 'id' ) ); }); }, diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/dataset/hda-base.js --- a/static/scripts/mvc/dataset/hda-base.js +++ b/static/scripts/mvc/dataset/hda-base.js @@ -319,7 +319,7 @@ title : "Data Viewer: " + self.model.get('name'), type : "other", content : function(parent_elt) { - var new_dataset = new dataset.TabularDataset({id: self.model.get('id')}); + var new_dataset = new dataset.TabularDataset({id: self.model.id}); $.when(new_dataset.fetch()).then(function() { dataset.createTabularDatasetChunkedView({ model: new_dataset, @@ -568,7 +568,7 @@ hdaView.$el.children( '.dataset-body' ).replaceWith( hdaView._render_body() ); hdaView.$el.children( '.dataset-body' ).slideDown( hdaView.fxSpeed, function(){ hdaView.expanded = true; - hdaView.trigger( 'body-expanded', hdaView.model ); + hdaView.trigger( 'body-expanded', hdaView.model.get( 'id' ) ); }); //hdaView.render( false ).$el.children( '.dataset-body' ).slideDown( hdaView.fxSpeed, function(){ @@ -595,7 +595,7 @@ var hdaView = this; this.$el.children( '.dataset-body' ).slideUp( hdaView.fxSpeed, function(){ hdaView.expanded = false; - hdaView.trigger( 'body-collapsed', hdaView.model.id ); + hdaView.trigger( 'body-collapsed', hdaView.model.get( 'id' ) ); }); }, diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/dataset/hda-model.js --- a/static/scripts/mvc/dataset/hda-model.js +++ b/static/scripts/mvc/dataset/hda-model.js @@ -12,22 +12,9 @@ * @constructs */ var HistoryContent = Backbone.Model.extend( baseMVC.LoggableMixin ).extend( { - idAttribute : 'type_id', /** fetch location of this HDA's history in the api */ urlRoot: galaxy_config.root + 'api/histories/', - - constructor : function( attrs, options ){ - attrs.type_id = HistoryContent.typeIdStr( attrs.type, attrs.id ); - Backbone.Model.apply( this, arguments ); - }, - - initialize : function( attrs, options ){ - // assumes type won't change - this.on( 'change:id', this._createTypeId ); - //TODO: not sure this covers all the bases... - }, - /** full url spec. for this HDA */ url : function(){ return this.urlRoot + this.get( 'history_id' ) + '/contents/' + this.get('history_content_type') + 's/' + this.get( 'id' ); @@ -151,19 +138,10 @@ term = term.replace( /"/g, '' ); return model.matches( term ); }); - }, - - _createTypeId : function(){ - return ( this.attributes.type_id = [ this.attributes.type, this.attributes.id ].join( '-' ) ); - }, + } } ); -/** create a type + id string for use in mixed collections */ -HistoryContent.typeIdStr = function _typeId( type, id ){ - return [ type, id ].join( '-' ); -}; - //============================================================================== /** @class (HDA) model for a Galaxy dataset * related to a history. @@ -250,10 +228,6 @@ initialize : function( data ){ this.log( this + '.initialize', this.attributes ); this.log( '\tparent history_id: ' + this.get( 'history_id' ) ); - - this._createTypeId(); - // assumes type won't change - this.on( 'change:id', this._createTypeId ); //!! this state is not in trans.app.model.Dataset.states - set it here - if( !this.get( 'accessible' ) ){ @@ -508,7 +482,7 @@ * @returns array of encoded ids */ ids : function(){ - return this.map( function( hda ){ return hda.get('id'); }); + return this.map( function( hda ){ return hda.id; }); }, /** Get hdas that are not ready @@ -669,7 +643,7 @@ this.chain().each( function( hda ) { // TODO: Handle duplicate names. var name = hda.attributes.name; - var id = hda.get('id'); + var id = hda.id; var content_type = hda.attributes.history_content_type; if( content_type == "dataset" ) { if( full_collection_type != "list" ) { diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/history/history-model.js --- a/static/scripts/mvc/history/history-model.js +++ b/static/scripts/mvc/history/history-model.js @@ -236,7 +236,7 @@ // for symmetry, not actually used by backend of consumed // by frontend. data[ "dataset_collection_details" ] = hdcaDetailIds.join( ',' ); - } + } return jQuery.ajax( galaxy_config.root + 'api/histories/' + historyData.id + '/contents', { data: data }); } diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/history/history-panel.js --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -273,7 +273,7 @@ * @param {HistoryDatasetAssociation} hda */ _createContentView : function( hda ){ - var hdaId = hda.id, + var hdaId = hda.get( 'id' ), historyContentType = hda.get( 'history_content_type' ), hdaView = null; @@ -328,7 +328,7 @@ // only } else { - var id = hdaView.model.id; + var id = hdaView.model.get( 'id' ); historyView.lastSelectedViewId = id; //console.debug( 'lastSelectedViewId:', historyView.lastSelectedViewId ); selectedIds = [ id ]; @@ -340,7 +340,7 @@ }); hdaView.on( 'de-selected', function( hdaView, event ){ //console.debug( 'de-selected', event ); - var id = hdaView.model.id; + var id = hdaView.model.get( 'id' ); historyView.selectedHdaIds = _.without( historyView.selectedHdaIds, id ); //console.debug( 'de-selected', historyView.selectedHdaIds ); }); diff -r e5eae98697a2f5bc4fdab711ebc1ae8d48ccde20 -r c74d749979cd894d4e69f82967d69938f90e4a27 static/scripts/mvc/history/readonly-history-panel.js --- a/static/scripts/mvc/history/readonly-history-panel.js +++ b/static/scripts/mvc/history/readonly-history-panel.js @@ -18,9 +18,9 @@ //TODO: add scroll position? }, /** add an hda id to the hash of expanded hdas */ - addExpandedHda : function( model ){ + addExpandedHda : function( id ){ var key = 'expandedHdas'; - this.save( key, _.extend( this.get( key ), _.object([ model.id ], [ model.get( 'id' ) ]) ) ); + this.save( key, _.extend( this.get( key ), _.object([ id ], [ true ]) ) ); }, /** remove an hda id from the hash of expanded hdas */ removeExpandedHda : function( id ){ @@ -264,7 +264,7 @@ var hdaDetailIds = function( historyData ){ // will be called to get hda ids that need details from the api //TODO: non-visible HDAs are getting details loaded... either stop loading them at all or filter ids thru isVisible - return _.values( HistoryPrefs.get( historyData.id ).get( 'expandedHdas' ) ); + return _.keys( HistoryPrefs.get( historyData.id ).get( 'expandedHdas' ) ); }; return this.loadHistory( historyId, attributes, historyFn, hdaFn, hdaDetailIds ); }, @@ -591,7 +591,7 @@ if( visibleHdas.length ){ visibleHdas.each( function( hda ){ // render it (NOTE: reverse order, newest on top (prepend)) - var hdaId = hda.id, + var hdaId = hda.get( 'id' ), hdaView = panel._createContentView( hda ); newHdaViews[ hdaId ] = hdaView; // persist selection @@ -610,7 +610,7 @@ * @param {HistoryDatasetAssociation} hda */ _createContentView : function( hda ){ - var hdaId = hda.id, + var hdaId = hda.get( 'id' ), historyContentType = hda.get( "history_content_type" ), hdaView = null; if( historyContentType === "dataset" ){ @@ -646,8 +646,8 @@ panel.errorHandler( model, xhr, options, msg ); }); // maintain a list of hdas whose bodies are expanded - hdaView.on( 'body-expanded', function( model ){ - panel.storage.addExpandedHda( model ); + hdaView.on( 'body-expanded', function( id ){ + panel.storage.addExpandedHda( id ); }); hdaView.on( 'body-collapsed', function( id ){ panel.storage.removeExpandedHda( id ); https://bitbucket.org/galaxy/galaxy-central/commits/fb4ac45f7827/ Changeset: fb4ac45f7827 User: jmchilton Date: 2014-06-13 22:50:38 Summary: Merge. Affected #: 6 files diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b lib/galaxy/tools/data/__init__.py --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -34,6 +34,9 @@ def __getitem__( self, key ): return self.data_tables.__getitem__( key ) + def __setitem__( self, key, value ): + return self.data_tables.__setitem__( key, value ) + def __contains__( self, key ): return self.data_tables.__contains__( key ) @@ -43,6 +46,9 @@ except KeyError: return default + def set( self, name, value ): + self[ name ] = value + def get_tables( self ): return self.data_tables @@ -335,7 +341,7 @@ return rval def get_version_fields( self ): - return ( self._loaded_content_version, self.data ) + return ( self._loaded_content_version, self.get_fields() ) def parse_column_spec( self, config_element ): """ @@ -422,7 +428,7 @@ return default rval = default # Look for table entry. - for fields in self.data: + for fields in self.get_fields(): if fields[ query_col ] == query_val: rval = fields[ return_col ] break @@ -444,7 +450,7 @@ is_error = False if self.largest_index < len( fields ): fields = self._replace_field_separators( fields ) - if fields not in self.data or allow_duplicates: + if fields not in self.get_fields() or allow_duplicates: self.data.append( fields ) else: log.debug( "Attempted to add fields (%s) to data table '%s', but this entry already exists and allow_duplicates is False.", fields, self.name ) diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b run.sh --- a/run.sh +++ b/run.sh @@ -5,31 +5,12 @@ python ./scripts/check_python.py [ $? -ne 0 ] && exit 1 -./scripts/copy_sample_files.sh +./scripts/common_startup.sh if [ -n "$GALAXY_UNIVERSE_CONFIG_DIR" ]; then python ./scripts/build_universe_config.py "$GALAXY_UNIVERSE_CONFIG_DIR" fi -# explicitly attempt to fetch eggs before running -FETCH_EGGS=1 -for arg in "$@"; do - [ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0; break -done -if [ $FETCH_EGGS -eq 1 ]; then - python ./scripts/check_eggs.py -q - if [ $? -ne 0 ]; then - echo "Some eggs are out of date, attempting to fetch..." - python ./scripts/fetch_eggs.py - if [ $? -eq 0 ]; then - echo "Fetch successful." - else - echo "Fetch failed." - exit 1 - fi - fi -fi - if [ -n "$GALAXY_RUN_ALL" ]; then servers=`sed -n 's/^\[server:\(.*\)\]/\1/ p' universe_wsgi.ini | xargs echo` daemon=`echo "$@" | grep -q daemon` diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b run_reports.sh --- a/run_reports.sh +++ b/run_reports.sh @@ -11,6 +11,8 @@ cd `dirname $0` +./scripts/common_startup.sh --skip-samples + GALAXY_REPORTS_CONFIG=${GALAXY_REPORTS_CONFIG:-reports_wsgi.ini} GALAXY_REPORTS_PID=${GALAXY_REPORTS_PID:-reports_webapp.pid} GALAXY_REPORTS_LOG=${GALAXY_REPORTS_LOG:-reports_webapp.log} diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b run_tool_shed.sh --- a/run_tool_shed.sh +++ b/run_tool_shed.sh @@ -2,7 +2,7 @@ cd `dirname $0` -./scripts/copy_sample_files.sh +./scripts/common_startup.sh tool_shed=`./lib/tool_shed/scripts/bootstrap_tool_shed/parse_run_sh_args.sh $@` args=$@ diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b scripts/common_startup.sh --- /dev/null +++ b/scripts/common_startup.sh @@ -0,0 +1,63 @@ +#!/bin/bash + +# explicitly attempt to fetch eggs before running +FETCH_EGGS=1 +COPY_SAMPLE_FILES=1 +for arg in "$@"; do + [ "$arg" = "--skip-eggs" ] && FETCH_EGGS=0 + [ "$arg" = "--stop-daemon" ] && FETCH_EGGS=0 + [ "$arg" = "--skip-samples" ] && COPY_SAMPLE_FILES=0 +done +if [ $FETCH_EGGS -eq 1 ]; then + python ./scripts/check_eggs.py -q + if [ $? -ne 0 ]; then + echo "Some eggs are out of date, attempting to fetch..." + python ./scripts/fetch_eggs.py + if [ $? -eq 0 ]; then + echo "Fetch successful." + else + echo "Fetch failed." + exit 1 + fi + fi +fi + +SAMPLES=" + tool_shed_wsgi.ini.sample + datatypes_conf.xml.sample + external_service_types_conf.xml.sample + migrated_tools_conf.xml.sample + reports_wsgi.ini.sample + shed_tool_conf.xml.sample + tool_conf.xml.sample + shed_tool_data_table_conf.xml.sample + tool_data_table_conf.xml.sample + tool_sheds_conf.xml.sample + data_manager_conf.xml.sample + shed_data_manager_conf.xml.sample + openid_conf.xml.sample + job_metrics_conf.xml.sample + universe_wsgi.ini.sample + lib/tool_shed/scripts/bootstrap_tool_shed/user_info.xml.sample + tool-data/shared/ncbi/builds.txt.sample + tool-data/shared/ensembl/builds.txt.sample + tool-data/shared/ucsc/builds.txt.sample + tool-data/shared/ucsc/publicbuilds.txt.sample + tool-data/shared/ucsc/ucsc_build_sites.txt.sample + tool-data/shared/igv/igv_build_sites.txt.sample + tool-data/shared/rviewer/rviewer_build_sites.txt.sample + tool-data/*.sample + static/welcome.html.sample +" + +if [ $COPY_SAMPLE_FILES -eq 1 ]; then + # Create any missing config/location files + for sample in $SAMPLES; do + file=${sample%.sample} + if [ ! -f "$file" -a -f "$sample" ]; then + echo "Initializing $file from `basename $sample`" + cp $sample $file + fi + done +fi + diff -r c74d749979cd894d4e69f82967d69938f90e4a27 -r fb4ac45f7827a92fa637899fb5da43a350bc857b scripts/copy_sample_files.sh --- a/scripts/copy_sample_files.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -SAMPLES=" - tool_shed_wsgi.ini.sample - datatypes_conf.xml.sample - external_service_types_conf.xml.sample - migrated_tools_conf.xml.sample - reports_wsgi.ini.sample - shed_tool_conf.xml.sample - tool_conf.xml.sample - shed_tool_data_table_conf.xml.sample - tool_data_table_conf.xml.sample - tool_sheds_conf.xml.sample - data_manager_conf.xml.sample - shed_data_manager_conf.xml.sample - openid_conf.xml.sample - job_metrics_conf.xml.sample - universe_wsgi.ini.sample - lib/tool_shed/scripts/bootstrap_tool_shed/user_info.xml.sample - tool-data/shared/ncbi/builds.txt.sample - tool-data/shared/ensembl/builds.txt.sample - tool-data/shared/ucsc/builds.txt.sample - tool-data/shared/ucsc/publicbuilds.txt.sample - tool-data/shared/ucsc/ucsc_build_sites.txt.sample - tool-data/shared/igv/igv_build_sites.txt.sample - tool-data/shared/rviewer/rviewer_build_sites.txt.sample - tool-data/*.sample - static/welcome.html.sample -" - -# Create any missing config/location files -for sample in $SAMPLES; do - file=${sample%.sample} - if [ ! -f "$file" -a -f "$sample" ]; then - echo "Initializing $file from `basename $sample`" - cp $sample $file - fi -done - Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org