whitespace

This commit is contained in:
Trevor Wennblom
2014-02-20 18:14:09 -06:00
parent 85add8fc6d
commit 1848cf2e3d
7 changed files with 37 additions and 37 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ class Registry( object ):
except Exception, e:
self.log.exception( 'Error calling method %s from class %s: %s', str( datatype_class_name ), str( module ), str( e ) )
ok = False
if ok:
if ok:
if deactivate:
# We are deactivating or uninstalling an installed Tool Shed repository, so eliminate the appropriate sniffers.
sniffer_class = elem.get( 'type', None )
+1 -1
View File
@@ -1850,7 +1850,7 @@ class HistoryDatasetAssociation( DatasetInstance, Dictifiable, UsesAnnotations,
if hda.copied_from_library_dataset_dataset_association is not None:
rval['copied_from_ldda_id'] = hda.copied_from_library_dataset_dataset_association.id
if hda.history is not None:
rval['history_id'] = hda.history.id
+1 -1
View File
@@ -1621,7 +1621,7 @@ class DataToolParameter( ToolParameter ):
if type( value ) != list:
value = [ value ]
field = form_builder.SelectField( self.name, self.multiple, None, self.refresh_on_change, refresh_on_change_values=self.refresh_on_change_values )
# CRUCIAL: the dataset_collector function needs to be local to DataToolParameter.get_html_field()
def dataset_collector( hdas, parent_hid ):
current_user_roles = trans.get_current_user_roles()
+1 -1
View File
@@ -501,7 +501,7 @@ class Conditional( Group ):
else:
input.visit_inputs( prefix, value[input.name], callback )
def get_initial_value( self, trans, context, history=None ):
# State for a conditional is a plain dictionary.
# State for a conditional is a plain dictionary.
rval = {}
# Get the default value for the 'test element' and use it
# to determine the current case
+28 -28
View File
@@ -138,9 +138,9 @@ def app_factory( global_conf, **kwargs ):
webapp.mapper.resource( 'workflow', 'workflows', path_prefix='/api' )
webapp.mapper.resource_with_deleted( 'history', 'histories', path_prefix='/api' )
webapp.mapper.resource( 'configuration', 'configuration', path_prefix='/api' )
webapp.mapper.resource( 'datatype',
'datatypes',
path_prefix='/api',
webapp.mapper.resource( 'datatype',
'datatypes',
path_prefix='/api',
collection={ 'sniffers': 'GET' },
parent_resources=dict( member_name='datatype', collection_name='datatypes' ) )
#webapp.mapper.connect( 'run_workflow', '/api/workflow/{workflow_id}/library/{library_id}', controller='workflows', action='run', workflow_id=None, library_id=None, conditions=dict(method=["GET"]) )
@@ -180,41 +180,41 @@ def app_factory( global_conf, **kwargs ):
# ============================
webapp.mapper.connect( 'api_key_retrieval',
'/api/authenticate/baseauth/',
controller='authenticate',
action='get_api_key',
'/api/authenticate/baseauth/',
controller='authenticate',
action='get_api_key',
conditions=dict( method=[ "GET" ] ) )
# =======================
# ===== LIBRARY API =====
# =======================
webapp.mapper.connect( 'show_lda_item',
'/api/libraries/datasets/:id',
controller='lda_datasets',
action='show',
'/api/libraries/datasets/:id',
controller='lda_datasets',
action='show',
conditions=dict( method=[ "GET" ] ) )
webapp.mapper.connect( 'download_lda_items',
'/api/libraries/datasets/download/:format',
controller='lda_datasets',
action='download',
webapp.mapper.connect( 'download_lda_items',
'/api/libraries/datasets/download/:format',
controller='lda_datasets',
action='download',
conditions=dict( method=[ "POST", "GET" ] ) )
webapp.mapper.connect( 'create_folder',
'/api/folders/:encoded_parent_folder_id',
controller='folders',
action='create',
webapp.mapper.connect( 'create_folder',
'/api/folders/:encoded_parent_folder_id',
controller='folders',
action='create',
conditions=dict( method=[ "POST" ] ) )
webapp.mapper.resource_with_deleted( 'library',
'libraries',
'libraries',
path_prefix='/api' )
webapp.mapper.resource( 'folder',
'folders',
webapp.mapper.resource( 'folder',
'folders',
path_prefix='/api' )
webapp.mapper.resource( 'content',
webapp.mapper.resource( 'content',
'contents',
controller='folder_contents',
name_prefix='folder_',
@@ -233,9 +233,9 @@ def app_factory( global_conf, **kwargs ):
'permissions',
path_prefix='/api/libraries/:library_id',
parent_resources=dict( member_name='library', collection_name='libraries' ) )
webapp.mapper.resource( 'job',
'jobs',
webapp.mapper.resource( 'job',
'jobs',
path_prefix='/api' )
webapp.mapper.connect( 'job_search', '/api/jobs/search', controller='jobs', action='search', conditions=dict( method=['POST'] ) )
@@ -243,7 +243,7 @@ def app_factory( global_conf, **kwargs ):
_add_item_extended_metadata_controller( webapp,
name_prefix="library_dataset_",
path_prefix='/api/libraries/:library_id/contents/:library_content_id' )
_add_item_extended_metadata_controller( webapp,
name_prefix="history_dataset_",
path_prefix='/api/histories/:history_id/contents/:history_content_id' )
@@ -251,14 +251,14 @@ def app_factory( global_conf, **kwargs ):
# ====================
# ===== TOOLSHED =====
# ====================
# Handle displaying tool help images and README file images contained in repositories installed from the tool shed.
webapp.add_route( '/admin_toolshed/static/images/:repository_id/:image_file',
controller='admin_toolshed',
action='display_image_in_repository',
repository_id=None,
image_file=None )
# Galaxy API for tool shed features.
webapp.mapper.resource( 'tool_shed_repository',
'tool_shed_repositories',
@@ -239,7 +239,7 @@ class ToolRunner( BaseUIController ):
Redirects a user accessing a Data Source tool to its target action link.
This method will subvert mix-mode content blocking in several browsers when
accessing non-https data_source tools from an https galaxy server.
Tested as working on Safari 7.0 and FireFox 26
Subverting did not work on Chrome 31
"""
@@ -255,13 +255,13 @@ class ToolRunner( BaseUIController ):
trans.log_event( "Tool id '%s' does not exist" % tool_id )
trans.response.status = 404
return "Tool '%s' does not exist, kwd=%s " % ( tool_id, kwd )
if isinstance( tool, DataSourceTool ):
link = url_for( tool.action, **tool.get_static_param_values( trans ) )
else:
link = url_for( controller='tool_runner', tool_id=tool.id )
return trans.response.send_redirect( link )
@web.expose
def redirect( self, trans, redirect_url=None, **kwd ):
if not redirect_url:
+2 -2
View File
@@ -126,7 +126,7 @@ def add_file( dataset, registry, json_file, output_path ):
elif is_gzipped and is_valid:
if link_data_only == 'copy_files':
# We need to uncompress the temp_name file, but BAM files must remain compressed in the BGZF format
CHUNK_SIZE = 2**20 # 1Mb
CHUNK_SIZE = 2**20 # 1Mb
fd, uncompressed = tempfile.mkstemp( prefix='data_id_%s_upload_gunzip_' % dataset.dataset_id, dir=os.path.dirname( output_path ), text=False )
gzipped_file = gzip.GzipFile( dataset.path, 'rb' )
while 1:
@@ -159,7 +159,7 @@ def add_file( dataset, registry, json_file, output_path ):
elif is_bzipped and is_valid:
if link_data_only == 'copy_files':
# We need to uncompress the temp_name file
CHUNK_SIZE = 2**20 # 1Mb
CHUNK_SIZE = 2**20 # 1Mb
fd, uncompressed = tempfile.mkstemp( prefix='data_id_%s_upload_bunzip2_' % dataset.dataset_id, dir=os.path.dirname( output_path ), text=False )
bzipped_file = bz2.BZ2File( dataset.path, 'rb' )
while 1: