diff --git a/doc/source/admin/galaxy_options.rst b/doc/source/admin/galaxy_options.rst index f4948b3c19e..619dd9b285f 100644 --- a/doc/source/admin/galaxy_options.rst +++ b/doc/source/admin/galaxy_options.rst @@ -697,19 +697,6 @@ :Type: int -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -``manage_dependency_relationships`` -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -:Description: - Enable use of an in-memory registry with bi-directional - relationships between repositories (i.e., in addition to lists of - dependencies for a repository, keep an in-memory registry of - dependent items for each repository. -:Default: ``false`` -:Type: bool - - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``tool_data_table_config_path`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/lib/galaxy/app.py b/lib/galaxy/app.py index 7cc31f01f08..5b13f02a54b 100644 --- a/lib/galaxy/app.py +++ b/lib/galaxy/app.py @@ -91,9 +91,7 @@ class UniverseApplication(config.ConfiguresGalaxyMixin): check_migrate_tools = self.config.check_migrate_tools self._configure_models(check_migrate_databases=self.config.check_migrate_databases, check_migrate_tools=check_migrate_tools, config_file=config_file) - # Manage installed tool shed repositories. self.installed_repository_manager = InstalledRepositoryManager(self) - self._configure_datatypes_registry(self.installed_repository_manager) galaxy.model.set_datatypes_registry(self.datatypes_registry) diff --git a/lib/galaxy/config/sample/galaxy.yml.sample b/lib/galaxy/config/sample/galaxy.yml.sample index 1263f0d1b1f..acd9c1bd0a0 100644 --- a/lib/galaxy/config/sample/galaxy.yml.sample +++ b/lib/galaxy/config/sample/galaxy.yml.sample @@ -447,12 +447,6 @@ galaxy: # between 1 and 24. #hours_between_check: 12 - # Enable use of an in-memory registry with bi-directional - # relationships between repositories (i.e., in addition to lists of - # dependencies for a repository, keep an in-memory registry of - # dependent items for each repository. - #manage_dependency_relationships: false - # XML config file that contains data table entries for the # ToolDataTableManager. This file is manually # maintained by the # Galaxy administrator (.sample used if default does not exist). diff --git a/lib/galaxy/tool_shed/galaxy_install/install_manager.py b/lib/galaxy/tool_shed/galaxy_install/install_manager.py index 3a2b2bedfc2..687aa9bf964 100644 --- a/lib/galaxy/tool_shed/galaxy_install/install_manager.py +++ b/lib/galaxy/tool_shed/galaxy_install/install_manager.py @@ -215,10 +215,6 @@ class InstallToolDependencyManager(object): if tool_dependency and tool_dependency.status in [self.install_model.ToolDependency.installation_status.INSTALLED, self.install_model.ToolDependency.installation_status.ERROR]: installed_packages.append(tool_dependency) - if self.app.config.manage_dependency_relationships: - # Add the tool_dependency to the in-memory dictionaries in the installed_repository_manager. - self.app.installed_repository_manager.handle_tool_dependency_install(tool_shed_repository, - tool_dependency) return installed_packages def install_via_fabric(self, tool_shed_repository, tool_dependency, install_dir, package_name=None, custom_fabfile_path=None, @@ -946,10 +942,6 @@ class InstallRepositoryManager(object): basic_util.remove_dir(work_dir) self.update_tool_shed_repository_status(tool_shed_repository, self.install_model.ToolShedRepository.installation_status.INSTALLED) - if self.app.config.manage_dependency_relationships: - # Add the installed repository and any tool dependencies to the in-memory dictionaries - # in the installed_repository_manager. - self.app.installed_repository_manager.handle_repository_install(tool_shed_repository) else: # An error occurred while cloning the repository, so reset everything necessary to enable another attempt. repository_util.set_repository_attributes(self.app, diff --git a/lib/galaxy/tool_shed/galaxy_install/installed_repository_manager.py b/lib/galaxy/tool_shed/galaxy_install/installed_repository_manager.py index 58f3ba686d6..3ccd62febb7 100644 --- a/lib/galaxy/tool_shed/galaxy_install/installed_repository_manager.py +++ b/lib/galaxy/tool_shed/galaxy_install/installed_repository_manager.py @@ -79,9 +79,6 @@ class InstalledRepositoryManager(object): # whose values are a list of tuples defining tool_dependency objects (whose status is 'Installed') that require the key # at runtime. The value defines the entire tool dependency tree. self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies = {} - if app.config.manage_dependency_relationships: - # Load defined dependency relationships for installed tool shed repositories and their contents. - self.load_dependency_relationships() def activate_repository(self, repository): """Activate an installed tool shed repository that has been marked as deactivated.""" @@ -651,90 +648,6 @@ class InstalledRepositoryManager(object): deleted_tool_dependency_names.append(original_dependency_val_dict['name']) return updated_tool_dependency_names, deleted_tool_dependency_names - def handle_repository_install(self, repository): - """Load the dependency relationships for a repository that was just installed or reinstalled.""" - # Populate self.repository_dependencies_of_installed_repositories. - self.add_entry_to_repository_dependencies_of_installed_repositories(repository) - # Populate self.installed_repository_dependencies_of_installed_repositories. - self.add_entry_to_installed_repository_dependencies_of_installed_repositories(repository) - # Populate self.tool_dependencies_of_installed_repositories. - self.add_entry_to_tool_dependencies_of_installed_repositories(repository) - # Populate self.installed_tool_dependencies_of_installed_repositories. - self.add_entry_to_installed_tool_dependencies_of_installed_repositories(repository) - for tool_dependency in repository.tool_dependencies: - # Populate self.runtime_tool_dependencies_of_installed_tool_dependencies. - self.add_entry_to_runtime_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - # Populate self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies. - self.add_entry_to_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - - def handle_repository_uninstall(self, repository): - """Remove the dependency relationships for a repository that was just uninstalled.""" - for tool_dependency in repository.tool_dependencies: - tool_dependency_tup = self.get_tool_dependency_tuple_for_installed_repository_manager(tool_dependency) - # Remove this tool_dependency from all values in - # self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies - altered_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies = {} - for (td_tup, installed_runtime_dependent_tool_dependency_tups) in self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies.items(): - if tool_dependency_tup in installed_runtime_dependent_tool_dependency_tups: - # Remove the tool_dependency from the list. - installed_runtime_dependent_tool_dependency_tups.remove(tool_dependency_tup) - # Add the possibly altered list to the altered dictionary. - altered_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies[td_tup] = \ - installed_runtime_dependent_tool_dependency_tups - self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies = \ - altered_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies - # Remove the entry for this tool_dependency from self.runtime_tool_dependencies_of_installed_tool_dependencies. - self.remove_entry_from_runtime_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - # Remove the entry for this tool_dependency from - # self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies. - self.remove_entry_from_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - # Remove this repository's entry from self.installed_tool_dependencies_of_installed_repositories. - self.remove_entry_from_installed_tool_dependencies_of_installed_repositories(repository) - # Remove this repository's entry from self.tool_dependencies_of_installed_repositories - self.remove_entry_from_tool_dependencies_of_installed_repositories(repository) - # Remove this repository's entry from self.installed_repository_dependencies_of_installed_repositories. - self.remove_entry_from_installed_repository_dependencies_of_installed_repositories(repository) - # Remove this repository's entry from self.repository_dependencies_of_installed_repositories. - self.remove_entry_from_repository_dependencies_of_installed_repositories(repository) - - def handle_tool_dependency_install(self, repository, tool_dependency): - """Load the dependency relationships for a tool dependency that was just installed independently of its containing repository.""" - # The received repository must have a status of 'Installed'. The value of tool_dependency.status will either be - # 'Installed' or 'Error', but we only need to change the in-memory dictionaries if it is 'Installed'. - if tool_dependency.is_installed: - # Populate self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies. - self.add_entry_to_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - # Populate self.installed_tool_dependencies_of_installed_repositories. - repository_tup = self.get_repository_tuple_for_installed_repository_manager(repository) - tool_dependency_tup = self.get_tool_dependency_tuple_for_installed_repository_manager(tool_dependency) - if repository_tup in self.installed_tool_dependencies_of_installed_repositories: - self.installed_tool_dependencies_of_installed_repositories[repository_tup].append(tool_dependency_tup) - else: - self.installed_tool_dependencies_of_installed_repositories[repository_tup] = [tool_dependency_tup] - - def load_dependency_relationships(self): - """Load relationships for all installed repositories and tool dependencies into in-memnory dictionaries.""" - # Get the list of installed tool shed repositories. - for repository in self.context.query(self.app.install_model.ToolShedRepository) \ - .filter(self.app.install_model.ToolShedRepository.table.c.status == - self.app.install_model.ToolShedRepository.installation_status.INSTALLED): - # Populate self.repository_dependencies_of_installed_repositories. - self.add_entry_to_repository_dependencies_of_installed_repositories(repository) - # Populate self.installed_repository_dependencies_of_installed_repositories. - self.add_entry_to_installed_repository_dependencies_of_installed_repositories(repository) - # Populate self.tool_dependencies_of_installed_repositories. - self.add_entry_to_tool_dependencies_of_installed_repositories(repository) - # Populate self.installed_tool_dependencies_of_installed_repositories. - self.add_entry_to_installed_tool_dependencies_of_installed_repositories(repository) - # Get the list of installed tool dependencies. - for tool_dependency in self.context.query(self.app.install_model.ToolDependency) \ - .filter(self.app.install_model.ToolDependency.table.c.status == - self.app.install_model.ToolDependency.installation_status.INSTALLED): - # Populate self.runtime_tool_dependencies_of_installed_tool_dependencies. - self.add_entry_to_runtime_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - # Populate self.installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies. - self.add_entry_to_installed_runtime_dependent_tool_dependencies_of_installed_tool_dependencies(tool_dependency) - def load_proprietary_datatypes(self): cdl = custom_datatype_manager.CustomDatatypeLoader(self.app) for tool_shed_repository in self.context.query(self.install_model.ToolShedRepository) \ @@ -814,10 +727,6 @@ class InstalledRepositoryManager(object): if remove_from_disk: repository.status = self.app.install_model.ToolShedRepository.installation_status.UNINSTALLED repository.error_message = None - if self.app.config.manage_dependency_relationships: - # Remove the uninstalled repository and any tool dependencies from the in-memory dictionaries in the - # installed_repository_manager. - self.handle_repository_uninstall(repository) else: repository.status = self.app.install_model.ToolShedRepository.installation_status.DEACTIVATED self.app.install_model.context.current.add(repository) diff --git a/lib/galaxy/webapps/galaxy/config_schema.yml b/lib/galaxy/webapps/galaxy/config_schema.yml index a723a9aec95..d8101b9a342 100644 --- a/lib/galaxy/webapps/galaxy/config_schema.yml +++ b/lib/galaxy/webapps/galaxy/config_schema.yml @@ -528,15 +528,6 @@ mapping: server process should be able to check for repository updates. The setting for hours_between_check should be an integer between 1 and 24. - manage_dependency_relationships: - type: bool - default: false - required: false - desc: | - Enable use of an in-memory registry with bi-directional relationships between - repositories (i.e., in addition to lists of dependencies for a repository, - keep an in-memory registry of dependent items for each repository. - tool_data_table_config_path: type: str default: config/tool_data_table_conf.xml