1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/9ff8e6f3b081/ changeset: 9ff8e6f3b081 user: inithello date: 2012-12-18 20:48:14 summary: Fix for installing tool shed repository when tool_dependency_dir is not set. Toll shed functional test enhancements. affected #: 5 files diff -r eb39627264622db4805927d0d0f35972067a58b7 -r 9ff8e6f3b0813fa3acbc76f94ad6a9d426d4752b lib/galaxy/util/shed_util_common.py --- a/lib/galaxy/util/shed_util_common.py +++ b/lib/galaxy/util/shed_util_common.py @@ -44,7 +44,11 @@ dependency_name = requirements_dict[ 'name' ] version = requirements_dict[ 'version' ] type = requirements_dict[ 'type' ] - install_dir = os.path.join( trans.app.config.tool_dependency_dir, + if trans.app.config.tool_dependency_dir: + root_dir = trans.app.config.tool_dependency_dir + else: + root_dir = '<set your tool_dependency_dir in your Galaxy configuration file>' + install_dir = os.path.join( root_dir, dependency_name, version, repository_owner, diff -r eb39627264622db4805927d0d0f35972067a58b7 -r 9ff8e6f3b0813fa3acbc76f94ad6a9d426d4752b templates/admin/tool_shed_repository/select_tool_panel_section.mako --- a/templates/admin/tool_shed_repository/select_tool_panel_section.mako +++ b/templates/admin/tool_shed_repository/select_tool_panel_section.mako @@ -47,7 +47,7 @@ ${render_readme_section( containers_dict )} <div style="clear: both"></div> %endif - %if includes_repository_dependencies or ( includes_tool_dependencies and trans.app.config.use_tool_dependencies ): + %if includes_repository_dependencies or includes_tool_dependencies: <div class="form-row"><table class="colored" width="100%"><th bgcolor="#EBD9B2">Confirm dependency installation</th> diff -r eb39627264622db4805927d0d0f35972067a58b7 -r 9ff8e6f3b0813fa3acbc76f94ad6a9d426d4752b test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -28,6 +28,8 @@ self.file_dir = os.environ.get( 'TOOL_SHED_TEST_FILE_DIR', None ) self.tool_shed_test_file = None self.tool_data_path = os.environ.get( 'GALAXY_TEST_TOOL_DATA_PATH' ) + # TODO: Figure out a way to alter these attributes during tests. + self.galaxy_tool_dependency_dir = None # os.environ.get( 'GALAXY_TEST_TOOL_DEPENDENCY_DIR' ) self.shed_tools_dict = {} self.home() def browse_category( self, category, strings_displayed=[], strings_not_displayed=[] ): @@ -387,12 +389,12 @@ tc.fv( "3", "allow_push", '+%s' % username ) tc.submit( 'user_access_button' ) self.check_for_strings( strings_displayed, strings_not_displayed ) - def install_repository( self, name, owner, category_name, install_tool_dependencies=False, changeset_revision=None, strings_displayed=[], strings_not_displayed=[] ): + def install_repository( self, name, owner, category_name, install_tool_dependencies=False, changeset_revision=None, strings_displayed=[], strings_not_displayed=[], preview_strings_displayed=[] ): if test_db_util.get_installed_repository_by_name_owner( name, owner ) is not None: return self.browse_tool_shed( url=self.url ) self.browse_category( test_db_util.get_category_by_name( category_name ) ) - self.preview_repository_in_tool_shed( name, common.test_user_1_name, strings_displayed=[] ) + self.preview_repository_in_tool_shed( name, common.test_user_1_name, strings_displayed=preview_strings_displayed ) repository = test_db_util.get_repository_by_name_and_owner( name, owner ) repository_id = self.security.encode_id( repository.id ) if changeset_revision is None: @@ -402,10 +404,13 @@ self.visit_url( url ) self.check_for_strings( strings_displayed, strings_not_displayed ) if 'install_tool_dependencies' in self.last_page(): + form = tc.browser.get_form( 'select_tool_panel_section' ) + checkbox = form.find_control( id="install_tool_dependencies" ) + checkbox.disabled = False if install_tool_dependencies: - tc.fv( '1', 'install_tool_dependencies', True ) + checkbox.selected = True else: - tc.fv( '1', 'install_tool_dependencies', False ) + checkbox.selected = False tc.submit( 'select_tool_panel_section_button' ) html = self.last_page() # Since the installation process is by necessity asynchronous, we have to get the parameters to 'manually' initiate the diff -r eb39627264622db4805927d0d0f35972067a58b7 -r 9ff8e6f3b0813fa3acbc76f94ad6a9d426d4752b test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py --- a/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py +++ b/test/tool_shed/functional/test_1010_install_repository_with_tool_dependencies.py @@ -62,10 +62,15 @@ self.browse_tool_shed( url=self.url, strings_displayed=[ 'Test 0010 Repository With Tool Dependencies' ] ) category = test_db_util.get_category_by_name( 'Test 0010 Repository With Tool Dependencies' ) self.browse_category( category, strings_displayed=[ 'freebayes_0010' ] ) - self.preview_repository_in_tool_shed( 'freebayes_0010', common.test_user_1_name, strings_displayed=[ 'freebayes_0010', 'Valid tools' ] ) + self.preview_repository_in_tool_shed( 'freebayes_0010', common.test_user_1_name, strings_displayed=[ 'freebayes_0010', 'Valid tools', 'Tool dependencies' ] ) def test_0015_install_freebayes_repository( self ): '''Install the freebayes repository without installing tool dependencies.''' - self.install_repository( 'freebayes_0010', common.test_user_1_name, 'Test 0010 Repository With Tool Dependencies', install_tool_dependencies=False ) + strings_displayed=[ 'set your tool_dependency_dir', 'can be automatically installed', 'Set the tool_dependency_dir' ] + self.install_repository( 'freebayes_0010', + common.test_user_1_name, + 'Test 0010 Repository With Tool Dependencies', + strings_displayed=strings_displayed, + install_tool_dependencies=False ) installed_repository = test_db_util.get_installed_repository_by_name_owner( 'freebayes_0010', common.test_user_1_name ) self.verify_installed_repository_on_browse_page( installed_repository ) self.display_installed_repository_manage_page( installed_repository, diff -r eb39627264622db4805927d0d0f35972067a58b7 -r 9ff8e6f3b0813fa3acbc76f94ad6a9d426d4752b test/tool_shed/functional_tests.py --- a/test/tool_shed/functional_tests.py +++ b/test/tool_shed/functional_tests.py @@ -140,6 +140,7 @@ new_repos_path = tempfile.mkdtemp( dir=tool_shed_test_tmp_dir ) galaxy_shed_tool_path = tempfile.mkdtemp( dir=tool_shed_test_tmp_dir ) galaxy_tool_dependency_dir = tempfile.mkdtemp( dir=tool_shed_test_tmp_dir ) + os.environ[ 'GALAXY_TEST_TOOL_DEPENDENCY_DIR' ] = galaxy_tool_dependency_dir if 'TOOL_SHED_TEST_DBURI' in os.environ: toolshed_database_connection = os.environ[ 'TOOL_SHED_TEST_DBURI' ] else: @@ -268,7 +269,6 @@ file_path = galaxy_file_path, tool_path = tool_path, tool_data_path = tool_data_path, - tool_dependency_dir=galaxy_tool_dependency_dir, shed_tool_path=galaxy_shed_tool_path, update_integrated_tool_panel = False, tool_config_file = [ galaxy_tool_conf_file, galaxy_shed_tool_conf_file ], 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.