commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/6c7a8e5d45e0/ Changeset: 6c7a8e5d45e0 User: dannon Date: 2013-04-17 16:19:07 Summary: Transactions won't always have a session (or history), handle returning None appropriately. Affected #: 1 file diff -r 57b64ceac4b5eaef10eb0f6c3cf94a87646901c2 -r 6c7a8e5d45e0bec70ec90d6bfdcc538b072bcf11 lib/galaxy/web/framework/__init__.py --- a/lib/galaxy/web/framework/__init__.py +++ b/lib/galaxy/web/framework/__init__.py @@ -811,16 +811,18 @@ def get_history( self, create=False ): """ Load the current history, creating a new one only if there is not - current history and we're told to create" + current history and we're told to create. + Transactions will not always have an active history (API requests), so + None is a valid response. """ - history = self.galaxy_session.current_history - if not history: - if util.string_as_bool( create ): - history = self.new_history() - else: - # Perhaps a bot is running a tool without having logged in to get a history - log.debug( "This request returned None from get_history(): %s" % self.request.browser_url ) - return None + history = None + if self.galaxy_session: + history = self.galaxy_session.current_history + if not history and util.string_as_bool( create ): + history = self.new_history() + else: + # Perhaps a bot is running a tool without having logged in to get a history + log.debug( "This request returned None from get_history(): %s" % self.request.browser_url ) return history def set_history( self, history ): https://bitbucket.org/galaxy/galaxy-central/commits/28edc7bec404/ Changeset: 28edc7bec404 User: dannon Date: 2013-04-17 16:40:15 Summary: Merge changes Affected #: 4 files diff -r 6c7a8e5d45e0bec70ec90d6bfdcc538b072bcf11 -r 28edc7bec4048b5ef1564396ab3e6f91b03f62d6 lib/galaxy/datatypes/tabular.py --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -543,7 +543,8 @@ MetadataElement( name="columns", default=10, desc="Number of columns", readonly=True, visible=False ) MetadataElement( name="column_types", default=['str','int','str','str','str','int','str','list','str','str'], param=metadata.ColumnTypesParameter, desc="Column types", readonly=True, visible=False ) - MetadataElement( name="viz_filter_cols", desc="Score column for visualization", default=[5], param=metadata.ColumnParameter, multiple=True ) + MetadataElement( name="viz_filter_cols", desc="Score column for visualization", default=[5], param=metadata.ColumnParameter, multiple=True, visible=False ) + MetadataElement( name="sample_names", default=[], desc="Sample names", readonly=True, visible=False, optional=True, no_value=[] ) def sniff( self, filename ): headers = get_headers( filename, '\n', count=1 ) @@ -553,6 +554,21 @@ """Returns formated html of peek""" return Tabular.make_html_table( self, dataset, column_names=self.column_names ) + def set_meta( self, dataset, **kwd ): + Tabular.set_meta( self, dataset, **kwd ) + source = open( dataset.file_name ) + + # Skip comments. + line = None + for line in source: + if not line.startswith( '##' ): + break + + if line and line.startswith( '#' ): + # Found header line, get sample names. + dataset.metadata.sample_names = line.split()[ 9: ] + + class Eland( Tabular ): """Support for the export.txt.gz file used by Illumina's ELANDv2e aligner""" file_ext = '_export.txt.gz' diff -r 6c7a8e5d45e0bec70ec90d6bfdcc538b072bcf11 -r 28edc7bec4048b5ef1564396ab3e6f91b03f62d6 lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -595,9 +595,8 @@ source='data' ) return { "track_type": dataset.datatype.track_type, + "dataset": trans.security.encode_dict_ids( dataset.get_api_value() ), "name": track_dict['name'], - "hda_ldda": track_dict.get("hda_ldda", "hda"), - "dataset_id": trans.security.encode_id( dataset.id ), "prefs": prefs, "mode": track_dict.get( 'mode', 'Auto' ), "filters": track_dict.get( 'filters', { 'filters' : track_data_provider.get_filters() } ), @@ -676,8 +675,7 @@ return { "track_type": dataset.datatype.track_type, "name": dataset.name, - "hda_ldda": hda_ldda, - "dataset_id": trans.security.encode_id( dataset.id ), + "dataset": trans.security.encode_dict_ids( dataset.get_api_value() ), "prefs": {}, "filters": { 'filters' : track_data_provider.get_filters() }, "tool": get_tool_def( trans, dataset ), diff -r 6c7a8e5d45e0bec70ec90d6bfdcc538b072bcf11 -r 28edc7bec4048b5ef1564396ab3e6f91b03f62d6 static/scripts/viz/trackster/tracks.js --- a/static/scripts/viz/trackster/tracks.js +++ b/static/scripts/viz/trackster/tracks.js @@ -2248,10 +2248,7 @@ // // Attribute init. // - this.dataset = new data.Dataset({ - id: obj_dict.dataset_id, - hda_ldda: obj_dict.hda_ldda - }); + this.dataset = new data.Dataset(obj_dict.dataset); this.dataset_id = this.dataset.get('id'); this.hda_ldda = this.dataset.get('hda_ldda'); this.dataset_check_type = 'converted_datasets_state'; diff -r 6c7a8e5d45e0bec70ec90d6bfdcc538b072bcf11 -r 28edc7bec4048b5ef1564396ab3e6f91b03f62d6 templates/webapps/galaxy/tracks/browser.mako --- a/templates/webapps/galaxy/tracks/browser.mako +++ b/templates/webapps/galaxy/tracks/browser.mako @@ -76,9 +76,9 @@ vis_id: "${config.get('vis_id')}", dbkey: "${config.get('dbkey')}" }, - JSON.parse('${ h.to_json_string( config.get( 'viewport', dict() ) ) }'), - JSON.parse('${ h.to_json_string( config['tracks'] ).replace("'", "\\'") }'), - JSON.parse('${ h.to_json_string( config['bookmarks'] ) }'), + ${ h.to_json_string( config.get( 'viewport', dict() ) ) }, + ${ h.to_json_string( config['tracks'] ) }, + ${ h.to_json_string( config['bookmarks'] ) }, true ); init_editor(); 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