mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Code style cleanup.
This commit is contained in:
@@ -58,7 +58,7 @@ class MetadataGenerator( object ):
|
||||
repository_files_dir = self.repository.repo_files_directory( self.app )
|
||||
if metadata_dict is None:
|
||||
# Shed related tool panel configs are only relevant to Galaxy.
|
||||
self.metadata_dict = { 'shed_config_filename' : self.shed_config_dict.get( 'config_filename', None ) }
|
||||
self.metadata_dict = { 'shed_config_filename': self.shed_config_dict.get( 'config_filename', None ) }
|
||||
else:
|
||||
self.metadata_dict = metadata_dict
|
||||
else:
|
||||
|
||||
@@ -13,7 +13,7 @@ from tool_shed.util import hg_util
|
||||
|
||||
|
||||
class HTTPRedirectWithDataHandler( urllib2.HTTPRedirectHandler ):
|
||||
|
||||
|
||||
def __init__( self, method ):
|
||||
'''
|
||||
Upon first inspection, it would seem that this shouldn't be necessary, but for some reason
|
||||
|
||||
@@ -259,7 +259,7 @@ class ToolShedUtilityContainerManager( utility_container_manager.UtilityContaine
|
||||
valid_tools=None,
|
||||
workflows=None,
|
||||
valid_data_managers=None
|
||||
)
|
||||
)
|
||||
if repository_metadata:
|
||||
metadata = repository_metadata.metadata
|
||||
lock = threading.Lock()
|
||||
@@ -405,19 +405,19 @@ class ToolShedUtilityContainerManager( utility_container_manager.UtilityContaine
|
||||
continue
|
||||
# We have a dictionary that looks something like this:
|
||||
# {
|
||||
# 'missing_test_components': [],
|
||||
# 'failed_tests': [],
|
||||
# 'passed_tests':
|
||||
# [{'tool_id': 'effectiveT3',
|
||||
# 'test_id': 'test_tool_000000 (functional.test_toolbox.TestForTool_testtoolshed.g2.bx.psu.edu/repos/...)',
|
||||
# 'tool_version': '0.0.12'},
|
||||
# {'tool_id': 'effectiveT3',
|
||||
# 'test_id': 'test_tool_000001 (functional.test_toolbox.TestForTool_testtoolshed.g2.bx.psu.edu/repos/...)',
|
||||
# 'tool_version': '0.0.12'}],
|
||||
# 'test_environment':
|
||||
# {'python_version': '2.7.4', 'tool_shed_mercurial_version': '2.2.3', 'system': 'Linux 3.8.0-30-generic',
|
||||
# 'tool_shed_database_version': 21, 'architecture': 'x86_64', 'galaxy_revision': '11573:a62c54ddbe2a',
|
||||
# 'galaxy_database_version': 117, 'time_tested': '2013-12-03 09:11:48', 'tool_shed_revision': '11556:228156daa575'},
|
||||
# 'missing_test_components': [],
|
||||
# 'failed_tests': [],
|
||||
# 'passed_tests':
|
||||
# [{'tool_id': 'effectiveT3',
|
||||
# 'test_id': 'test_tool_000000 (functional.test_toolbox.TestForTool_testtoolshed.g2.bx.psu.edu/repos/...)',
|
||||
# 'tool_version': '0.0.12'},
|
||||
# {'tool_id': 'effectiveT3',
|
||||
# 'test_id': 'test_tool_000001 (functional.test_toolbox.TestForTool_testtoolshed.g2.bx.psu.edu/repos/...)',
|
||||
# 'tool_version': '0.0.12'}],
|
||||
# 'test_environment':
|
||||
# {'python_version': '2.7.4', 'tool_shed_mercurial_version': '2.2.3', 'system': 'Linux 3.8.0-30-generic',
|
||||
# 'tool_shed_database_version': 21, 'architecture': 'x86_64', 'galaxy_revision': '11573:a62c54ddbe2a',
|
||||
# 'galaxy_database_version': 117, 'time_tested': '2013-12-03 09:11:48', 'tool_shed_revision': '11556:228156daa575'},
|
||||
# 'installation_errors': {'current_repository': [], 'repository_dependencies': [], 'tool_dependencies': []},
|
||||
# 'successful_installations': {'current_repository': [], 'repository_dependencies': [], 'tool_dependencies': []}
|
||||
# }
|
||||
@@ -554,10 +554,10 @@ class ToolShedUtilityContainerManager( utility_container_manager.UtilityContaine
|
||||
for missing_test_components_dict in missing_test_components_dicts:
|
||||
missing_test_component_id += 1
|
||||
try:
|
||||
missing_components = missing_test_components_dict.get( 'missing_components', '' )
|
||||
tool_guid = missing_test_components_dict.get( 'tool_guid', '' )
|
||||
tool_id = missing_test_components_dict.get( 'tool_id', '' )
|
||||
tool_version = missing_test_components_dict.get( 'tool_version', '' )
|
||||
missing_components = missing_test_components_dict.get( 'missing_components', '' )
|
||||
tool_guid = missing_test_components_dict.get( 'tool_guid', '' )
|
||||
tool_id = missing_test_components_dict.get( 'tool_id', '' )
|
||||
tool_version = missing_test_components_dict.get( 'tool_version', '' )
|
||||
except Exception, e:
|
||||
missing_components = str( e )
|
||||
tool_guid = 'unknown'
|
||||
@@ -572,9 +572,9 @@ class ToolShedUtilityContainerManager( utility_container_manager.UtilityContaine
|
||||
installation_error_dict = tool_test_results_dict.get( 'installation_errors', {} )
|
||||
if len( installation_error_dict ) > 0:
|
||||
# 'installation_errors':
|
||||
# {'current_repository': [],
|
||||
# 'repository_dependencies': [],
|
||||
# 'tool_dependencies':
|
||||
# {'current_repository': [],
|
||||
# 'repository_dependencies': [],
|
||||
# 'tool_dependencies':
|
||||
# [{'error_message': 'some traceback string' 'type': 'package', 'name': 'MIRA', 'version': '4.0'}]
|
||||
# }
|
||||
current_repository_installation_error_dicts = installation_error_dict.get( 'current_repository', [] )
|
||||
@@ -679,9 +679,9 @@ class ToolShedUtilityContainerManager( utility_container_manager.UtilityContaine
|
||||
successful_installation_dict = tool_test_results_dict.get( 'successful_installations', {} )
|
||||
if len( successful_installation_dict ) > 0:
|
||||
# 'successful_installation':
|
||||
# {'current_repository': [],
|
||||
# 'repository_dependencies': [],
|
||||
# 'tool_dependencies':
|
||||
# {'current_repository': [],
|
||||
# 'repository_dependencies': [],
|
||||
# 'tool_dependencies':
|
||||
# [{'installation_directory': 'some path' 'type': 'package', 'name': 'MIRA', 'version': '4.0'}]
|
||||
# }
|
||||
# We won't display the current repository in this container. I fit is not displaying installation errors,
|
||||
|
||||
@@ -469,7 +469,7 @@ class UtilityContainerManager( object ):
|
||||
container_object_tool_id += 1
|
||||
requirements = tool_dict.get( 'requirements', None )
|
||||
if requirements is not None:
|
||||
# 'requirements': [{'version': '1.56.0', 'type': 'package', 'name': 'picard'}],
|
||||
# 'requirements': [{'version': '1.56.0', 'type': 'package', 'name': 'picard'}],
|
||||
requirements_str = ''
|
||||
for requirement_dict in requirements:
|
||||
try:
|
||||
@@ -643,7 +643,7 @@ class UtilityContainerManager( object ):
|
||||
repository_id=repository_id )
|
||||
folder.workflows.append( workflow )
|
||||
for workflow_tup in workflows:
|
||||
workflow_dict=workflow_tup[ 1 ]
|
||||
workflow_dict = workflow_tup[ 1 ]
|
||||
steps = workflow_dict.get( 'steps', [] )
|
||||
if steps:
|
||||
steps = str( len( steps ) )
|
||||
@@ -779,12 +779,7 @@ class UtilityContainerManager( object ):
|
||||
installation_status = None
|
||||
can_create_dependency = not self.is_subfolder_of( sub_folder, repository_dependency )
|
||||
if can_create_dependency:
|
||||
toolshed, \
|
||||
repository_name, \
|
||||
repository_owner, \
|
||||
changeset_revision, \
|
||||
prior_installation_required, \
|
||||
only_if_compiling_contained_td = \
|
||||
toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
|
||||
common_util.parse_repository_dependency_tuple( repository_dependency )
|
||||
repository_dependency_id += 1
|
||||
repository_dependency = RepositoryDependency( id=repository_dependency_id,
|
||||
@@ -801,12 +796,7 @@ class UtilityContainerManager( object ):
|
||||
return repository_dependencies_folder, folder_id, repository_dependency_id
|
||||
|
||||
def is_subfolder_of( self, folder, repository_dependency ):
|
||||
toolshed, \
|
||||
repository_name, \
|
||||
repository_owner, \
|
||||
changeset_revision, \
|
||||
prior_installation_required, \
|
||||
only_if_compiling_contained_td = \
|
||||
toolshed, repository_name, repository_owner, changeset_revision, prior_installation_required, only_if_compiling_contained_td = \
|
||||
common_util.parse_repository_dependency_tuple( repository_dependency )
|
||||
key = container_util.generate_repository_dependencies_key_for_repository( toolshed,
|
||||
repository_name,
|
||||
@@ -835,10 +825,10 @@ class UtilityContainerManager( object ):
|
||||
key_prior_installation_required = components_list[ 4 ]
|
||||
key_only_if_compiling_contained_td = components_list[ 5 ]
|
||||
if repository_name == key_name and \
|
||||
repository_owner == key_owner and \
|
||||
changeset_revision == key_changeset_revision and \
|
||||
prior_installation_required == key_prior_installation_required and \
|
||||
only_if_compiling_contained_td == key_only_if_compiling_contained_td:
|
||||
repository_owner == key_owner and \
|
||||
changeset_revision == key_changeset_revision and \
|
||||
prior_installation_required == key_prior_installation_required and \
|
||||
only_if_compiling_contained_td == key_only_if_compiling_contained_td:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user