commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/b724301b1244/ changeset: b724301b1244 user: jgoecks date: 2012-12-04 20:15:08 summary: Remove import *'s from page controller. affected #: 1 file diff -r 3a1f833d3463ff3b5fc82eeff5adc72f1a07c6a9 -r b724301b1244c4c48e1e98336680b5eafce1c2c5 lib/galaxy/webapps/galaxy/controllers/page.py --- a/lib/galaxy/webapps/galaxy/controllers/page.py +++ b/lib/galaxy/webapps/galaxy/controllers/page.py @@ -1,6 +1,8 @@ -from galaxy import model -from galaxy.model.item_attrs import * -from galaxy.web.base.controller import * +from sqlalchemy import desc +from galaxy import model, web +from galaxy.web import error, url_for +from galaxy.model.item_attrs import UsesAnnotations, UsesItemRatings +from galaxy.web.base.controller import BaseUIController, SharableMixin, UsesHistoryMixin, UsesStoredWorkflowMixin, UsesVisualizationMixin from galaxy.web.framework.helpers import time_ago, grids from galaxy.util.sanitize_html import sanitize_html, _BaseHTMLProcessor from galaxy.util.odict import odict https://bitbucket.org/galaxy/galaxy-central/changeset/87c8970719b1/ changeset: 87c8970719b1 user: jgoecks date: 2012-12-04 20:15:52 summary: merge affected #: 1 file diff -r b724301b1244c4c48e1e98336680b5eafce1c2c5 -r 87c8970719b135a7b2c9804484dc0d96df171083 lib/galaxy/datatypes/tabular.py --- a/lib/galaxy/datatypes/tabular.py +++ b/lib/galaxy/datatypes/tabular.py @@ -4,15 +4,16 @@ """ import pkg_resources pkg_resources.require( "bx-python" ) - +import gzip import logging -import data +import os +from cgi import escape from galaxy import util -from cgi import escape +from galaxy.datatypes import data from galaxy.datatypes import metadata +from galaxy.datatypes.checkers import is_gzip from galaxy.datatypes.metadata import MetadataElement -import galaxy_utils.sequence.vcf -from sniff import * +from galaxy.datatypes.sniff import get_headers from galaxy.util.json import to_json_string log = logging.getLogger(__name__) @@ -264,10 +265,21 @@ return to_json_string({'ck_data': ck_data, 'ck_index': ck_index+1}) def display_data(self, trans, dataset, preview=False, filename=None, to_ext=None, chunk=None): - #TODO Prevent failure when displaying extremely long > 50kb lines. if chunk: return self.get_chunk(trans, dataset, chunk) - if to_ext or not preview: + elif dataset.metadata.columns > 50: + #Fancy tabular display is only suitable for datasets without an incredibly large number of columns. + #We should add a new datatype 'matrix', with it's own draw method, suitable for this kind of data. + #For now, default to the old behavior, ugly as it is. Remove this after adding 'matrix'. + max_peek_size = 1000000 # 1 MB + if not preview or os.stat( dataset.file_name ).st_size < max_peek_size: + return open( dataset.file_name ) + else: + trans.response.set_content_type( "text/html" ) + return trans.stream_template_mako( "/dataset/large_file.mako", + truncated_data = open( dataset.file_name ).read(max_peek_size), + data = dataset) + elif to_ext or not preview: return self._serve_raw(trans, dataset, to_ext) else: column_names = 'null' @@ -589,7 +601,6 @@ - LANE, TILEm X, Y, INDEX, READ_NO, SEQ, QUAL, POSITION, *STRAND, FILT must be correct - We will only check that up to the first 5 alignments are correctly formatted. """ - import gzip try: compress = is_gzip(filename) if compress: 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