commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/8bd6b50a9fc1/ Changeset: 8bd6b50a9fc1 User: trevorw Date: 2014-02-21 01:14:09 Summary: whitespace Affected #: 7 files diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -350,7 +350,7 @@ 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 ) diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -1850,7 +1850,7 @@ 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 diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1621,7 +1621,7 @@ 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() diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/tools/parameters/grouping.py --- a/lib/galaxy/tools/parameters/grouping.py +++ b/lib/galaxy/tools/parameters/grouping.py @@ -501,7 +501,7 @@ 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 diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -138,9 +138,9 @@ 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 @@ # ============================ 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 @@ '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 @@ _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 @@ # ==================== # ===== 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', diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee lib/galaxy/webapps/galaxy/controllers/tool_runner.py --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -239,7 +239,7 @@ 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 @@ 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: diff -r 0f65411e40224e7a9b32f3273896113654a742ce -r 8bd6b50a9fc10b334647a5df755d845d341612ee tools/data_source/upload.py --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -126,7 +126,7 @@ 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 @@ 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: https://bitbucket.org/galaxy/galaxy-central/commits/1f2383ac9a8e/ Changeset: 1f2383ac9a8e User: jmchilton Date: 2014-02-21 03:25:04 Summary: Merged in trevorw/galaxy-central (pull request #331) whitespace Affected #: 7 files diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/datatypes/registry.py --- a/lib/galaxy/datatypes/registry.py +++ b/lib/galaxy/datatypes/registry.py @@ -350,7 +350,7 @@ 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 ) diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py +++ b/lib/galaxy/model/__init__.py @@ -1850,7 +1850,7 @@ 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 diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -1621,7 +1621,7 @@ 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() diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/tools/parameters/grouping.py --- a/lib/galaxy/tools/parameters/grouping.py +++ b/lib/galaxy/tools/parameters/grouping.py @@ -501,7 +501,7 @@ 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 diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/webapps/galaxy/buildapp.py --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -138,9 +138,9 @@ 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 @@ # ============================ 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 @@ '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 @@ _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 @@ # ==================== # ===== 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', diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f lib/galaxy/webapps/galaxy/controllers/tool_runner.py --- a/lib/galaxy/webapps/galaxy/controllers/tool_runner.py +++ b/lib/galaxy/webapps/galaxy/controllers/tool_runner.py @@ -239,7 +239,7 @@ 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 @@ 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: diff -r d7c8982b89def2729638c5c4fad3fa14325f608e -r 1f2383ac9a8ec518f4c91a4c5c2de825f4ddf36f tools/data_source/upload.py --- a/tools/data_source/upload.py +++ b/tools/data_source/upload.py @@ -126,7 +126,7 @@ 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 @@ 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: 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