commit/galaxy-central: natefoo: Make the new tabular column_names metadata element optional.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/7e8ed93ae248/ changeset: 7e8ed93ae248 user: natefoo date: 2012-04-17 19:07:03 summary: Make the new tabular column_names metadata element optional. affected #: 1 file diff -r 564bbbdd8a223a0709420f7feb47e5fccb40a139 -r 7e8ed93ae2485f7a612d967d60d290fedddbf2b8 lib/galaxy/datatypes/tabular.py --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -25,7 +25,7 @@ MetadataElement( name="comment_lines", default=0, desc="Number of comment lines", readonly=False, optional=True, no_value=0 ) MetadataElement( name="columns", default=0, desc="Number of columns", readonly=True, visible=False, no_value=0 ) MetadataElement( name="column_types", default=[], desc="Column types", param=metadata.ColumnTypesParameter, readonly=True, visible=False, no_value=[] ) - MetadataElement( name="column_names", default=[], desc="Column names", readonly=True, visible=False, no_value=[] ) + MetadataElement( name="column_names", default=[], desc="Column names", readonly=True, visible=False, optional=True, no_value=[] ) def init_meta( self, dataset, copy_from=None ): data.Text.init_meta( self, dataset, copy_from=copy_from ) @@ -180,7 +180,13 @@ out = "Can't create peek %s" % str( exc ) return out - def make_html_peek_header( self, dataset, skipchars=[], column_names=[], column_number_format='%s', column_parameter_alias={}, **kwargs ): + def make_html_peek_header( self, dataset, skipchars=None, column_names=None, column_number_format='%s', column_parameter_alias=None, **kwargs ): + if skipchars is None: + skipchars = [] + if column_names is None: + column_names = [] + if column_parameter_alias is None: + column_parameter_alias = {} out = [] try: if not column_names and dataset.metadata.column_names: @@ -216,7 +222,9 @@ raise Exception, "Can't create peek header %s" % str( exc ) return "".join( out ) - def make_html_peek_rows( self, dataset, skipchars=[], **kwargs ): + def make_html_peek_rows( self, dataset, skipchars=None, **kwargs ): + if skipchars is None: + skipchars = [] out = [] try: if not dataset.peek: @@ -504,8 +512,10 @@ 'POSITION', 'STRAND', 'DESC', 'SRAS', 'PRAS', 'PART_CHROM' 'PART_CONTIG', 'PART_OFFSET', 'PART_STRAND', 'FILT' ] - def make_html_table( self, dataset, skipchars=[] ): + def make_html_table( self, dataset, skipchars=None ): """Create HTML table, used for displaying peek""" + if skipchars is None: + skipchars = [] out = ['<table cellspacing="0" cellpadding="3">'] try: # Generate column header 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)
-
Bitbucket