commit/galaxy-central: 2 new changesets
2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/881a16a71891/ Changeset: 881a16a71891 User: Dave Bouvier Date: 2013-07-24 16:54:37 Summary: Tool shed functional tests for the repository type feature. Affected #: 9 files diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -453,15 +453,15 @@ original_information = dict( repo_name=repository.name, description=repository.description, long_description=repository.long_description ) strings_displayed = [] strings_not_displayed = [] - for input_elem_name in [ 'repo_name', 'description', 'long_description' ]: + for input_elem_name in [ 'repo_name', 'description', 'long_description', 'repository_type' ]: if input_elem_name in kwd: - tc.fv( "1", input_elem_name, kwd[ input_elem_name ] ) + tc.fv( "edit_repository", input_elem_name, kwd[ input_elem_name ] ) strings_displayed.append( self.escape_html( kwd[ input_elem_name ] ) ) tc.submit( "edit_repository_button" ) self.check_for_strings( strings_displayed ) strings_displayed = [] for input_elem_name in [ 'repo_name', 'description', 'long_description' ]: - tc.fv( "1", input_elem_name, original_information[ input_elem_name ] ) + tc.fv( "edit_repository", input_elem_name, original_information[ input_elem_name ] ) strings_displayed.append( self.escape_html( original_information[ input_elem_name ] ) ) tc.submit( "edit_repository_button" ) self.check_for_strings( strings_displayed ) @@ -577,6 +577,16 @@ return datatypes_count.group( 1 ) return None + def get_env_sh_path( self, tool_dependency_name, tool_dependency_version, repository ): + env_sh_path = os.path.join( self.galaxy_tool_dependency_dir, + tool_dependency_name, + tool_dependency_version, + repository.owner, + repository.name, + repository.installed_changeset_revision, + 'env.sh' ) + return env_sh_path + def get_filename( self, filename, filepath=None ): if filepath is not None: return os.path.abspath( os.path.join( filepath, filename ) ) diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/functional/test_0470_tool_dependency_repository_type.py --- /dev/null +++ b/test/tool_shed/functional/test_0470_tool_dependency_repository_type.py @@ -0,0 +1,253 @@ +from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os +import tool_shed.base.test_db_util as test_db_util + +import logging +log = logging.getLogger( __name__ ) + +category_name = 'Test 0470 Tool dependency repository type' +category_description = 'Test script 0470 for changing repository types.' +package_libx11_repository_name = 'package_x11_client_1_5_proto_7_0_0470' +package_libx11_repository_description = "Contains a tool dependency definition that provides the X11 client libraries and core protocol header files." +package_libx11_repository_long_description = "Xlib is an X Window System protocol client library written in the C programming language." +package_emboss_repository_name = 'package_emboss_5_0_0_0470' +package_emboss_repository_description = "Contains a tool dependency definition that downloads and compiles version 5.0.0 of the EMBOSS tool suite." +package_emboss_repository_long_description = 'EMBOSS is "The European Molecular Biology Open Software Suite".' +datatypes_repository_name = 'emboss_datatypes_0470' +datatypes_repository_description = 'Galaxy applicable data formats used by Emboss tools.' +datatypes_repository_long_description = 'Galaxy applicable data formats used by Emboss tools. This repository contains no tools.' +emboss_repository_name = 'emboss_5_0470' +emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools" +emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools" + +''' +1. Create and populate a repository named package_x11_client_1_5_proto_7_0 that contains only a single file named tool_dependencies.xml. + Keep the repository type as the default "Unrestricted". + +2. Create a repository named package_emboss_5_0_0 of type "Unrestricted" that has a repository dependency definition that defines the + above package_x11_client_1_5_proto_7_0 repository. Upload the tool_dependencies.xml file such that it does not have a changeset_revision + defined so it will get automatically populated. + +3. Create a repository named emboss_5 of type "Unrestricted" that has a tool-dependencies.xml file defining a complex repository dependency + on the package_emboss_5_0_0 repository above. Upload the tool_dependencies.xml file such that it does not have a change set_revision defined + so it will get automatically populated. + +4. Add a comment to the tool_dependencies.xml file to be uploaded to the package_x11_client_1_5_prot_7_0 repository, creating a new installable + changeset revision at the repository tip. + +5. Add a comment to the tool_dependencies.xml file for the package_emboss_5_0_0 repository, eliminating the change set_revision attribute so + that it gets automatically populated when uploaded. After uploading the file, the package_emboss_5_0_0 repository should have 2 + installable changeset revisions. + +6. Add a comment to the tool_dependencies.xml file in the emboss_5 repository, eliminating the changeset_revision attribute so that it gets + automatically populated when uploaded. After uploading the file, the emboss5 repository should have 2 installable metadata revisions. + +7. Change the repository type of the package_x11_client_1_5_proto_7_0 repository to be tool_dependency_definition. + +8. Change the repository type of the package_emboss_5_0_0 repository to be tool_dependency_definition. + +9. Reset metadata on the package_emboss_5_0_0 repository. It should now have only it's tip as the installable revision. + +10. Reset metadata on the emboss_5 repository. It should now have only it's tip as the installable revision. +''' + +class TestEnvironmentInheritance( ShedTwillTestCase ): + '''Test referencing environment variables that were defined in a separate tool dependency.''' + + def test_0000_initiate_users_and_category( self ): + """Create necessary user accounts and login as an admin user.""" + self.logout() + self.login( email=common.admin_email, username=common.admin_username ) + admin_user = test_db_util.get_user( common.admin_email ) + assert admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email + admin_user_private_role = test_db_util.get_private_role( admin_user ) + self.create_category( name=category_name, description=category_description ) + self.logout() + self.login( email=common.test_user_2_email, username=common.test_user_2_name ) + test_user_2 = test_db_util.get_user( common.test_user_2_email ) + assert test_user_2 is not None, 'Problem retrieving user with email %s from the database' % common.test_user_2_email + test_user_2_private_role = test_db_util.get_private_role( test_user_2 ) + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + test_user_1 = test_db_util.get_user( common.test_user_1_email ) + assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % common.test_user_1_email + test_user_1_private_role = test_db_util.get_private_role( test_user_1 ) + + def test_0005_create_libx11_repository( self ): + '''Create and populate package_x11_client_1_5_proto_7_0_0470.''' + ''' + This is step 1 - Create and populate a repository named package_x11_client_1_5_proto_7_0. + + Create and populate a repository named package_x11_client_1_5_proto_7_0 that contains only a single file named tool_dependencies.xml. + Keep the repository type as the default "Unrestricted". + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=package_libx11_repository_name, + description=package_libx11_repository_description, + long_description=package_libx11_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Upload the tool dependency definition to the package_x11_client_1_5_proto_7_0_0470 repository. + self.upload_file( repository, + filename='emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_x11_client_1_5_proto_7_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0010_create_emboss_5_0_0_repository( self ): + '''Create and populate package_emboss_5_0_0_0470.''' + ''' + This is step 2 - Create a repository named package_emboss_5_0_0 of type "Unrestricted". + + Create a repository named package_emboss_5_0_0 of type "Unrestricted" that has a repository dependency definition that defines the + above package_x11_client_1_5_proto_7_0 repository. Upload the tool_dependencues.xml file such that it does not have a changeset_revision + defined so it will get automatically populated. + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=package_emboss_repository_name, + description=package_emboss_repository_description, + long_description=package_emboss_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Upload the edited tool dependency definition to the package_emboss_5_0_0 repository. + self.upload_file( repository, + filename='emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_emboss_5_0_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0015_create_emboss_5_repository( self ): + '''Create and populate emboss_5_0470.''' + ''' + This is step 3 - Create a repository named emboss_5 of type "Unrestricted". + + Create a repository named emboss_5 of type "Unrestricted" that has a tool-dependencies.xml file defining a complex repository dependency + on the package_emboss_5_0_0 repository above. Upload the tool_dependencies.xml file such that it does not have a change set_revision defined + so it will get automatically populated. + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=emboss_repository_name, + description=emboss_repository_description, + long_description=emboss_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Populate emboss_5 with tool and dependency definitions. + self.upload_file( repository, + filename='emboss/0470_files/emboss_complex_dependency.tar', + filepath=None, + valid_tools_only=True, + uncompress_file=True, + remove_repo_files_not_in_tar=False, + commit_message='Populate emboss_5 with tool and dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0020_upload_updated_tool_dependency_to_package_x11( self ): + '''Upload a new tool_dependencies.xml to package_x11_client_1_5_proto_7_0_0470.''' + ''' + This is step 4 - Add a comment to the tool_dependencies.xml file to be uploaded to the package_x11_client_1_5_prot_7_0 repository, creating + a new installable changeset revision at the repository tip. + ''' + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + # Upload the tool dependency definition to the package_x11_client_1_5_proto_7_0_0470 repository. + self.upload_file( package_x11_repository, + filename='emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_x11_client_1_5_proto_7_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( package_x11_repository.metadata_revisions ) == 1, 'package_x11_client_1_5_proto_7_0_0470 has incorrect number of metadata revisions' + + def test_0025_upload_updated_tool_dependency_to_package_emboss( self ): + '''Upload a new tool_dependencies.xml to package_emboss_5_0_0_0470.''' + ''' + This is step 5 - Add a comment to the tool_dependencies.xml file for the package_emboss_5_0_0 repository, eliminating + the change set_revision attribute so that it gets automatically populated when uploaded. After uploading the file, + the package_emboss_5_0_0 repository should have 2 installable changeset revisions. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + # Populate package_emboss_5_0_0_0470 with updated tool dependency definition. + self.upload_file( package_emboss_repository, + filename='emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_emboss_5_0_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( package_emboss_repository.metadata_revisions ) == 2, 'package_emboss_5_0_0_0470 has incorrect number of metadata revisions' + + def test_0030_upload_updated_tool_dependency_to_emboss_5_repository( self ): + '''Upload a new tool_dependencies.xml to emboss_5_0470.''' + ''' + This is step 6 - Add a comment to the tool_dependencies.xml file in the emboss_5 repository, eliminating the + changeset_revision attribute so that it gets automatically populated when uploaded. After uploading the file, + the emboss5 repository should have 2 installable metadata revisions. + ''' + emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) + # Populate package_emboss_5_0_0_0470 with updated tool dependency definition. + self.upload_file( emboss_repository, + filename='emboss/0470_files/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Upload updated complex repository dependency definition to emboss_5_0470.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( emboss_repository.metadata_revisions ) == 2, 'package_emboss_5_0_0_0470 has incorrect number of metadata revisions' + + def test_0035_modify_package_x11_repository_type( self ): + '''Set package_x11_client_1_5_proto_7_0 type tool_dependency_definition.''' + ''' + This is step 7 - Change the repository type of the package_x11_client_1_5_proto_7_0 repository to be tool_dependency_definition. + ''' + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + self.edit_repository_information( package_x11_repository, repository_type='tool_dependency_definition' ) + + def test_0040_modify_package_emboss_repository_type( self ): + '''Set package_emboss_5_0_0 to type tool_dependency_definition.''' + ''' + This is step 8 - Change the repository type of the package_emboss_5_0_0 repository to be tool_dependency_definition. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + self.edit_repository_information( package_emboss_repository, repository_type='tool_dependency_definition' ) + + def test_0045_reset_repository_metadata( self ): + '''Reset metadata on package_emboss_5_0_0_0470 and package_x11_client_1_5_proto_7_0.''' + ''' + This is step 9 - Reset metadata on the package_emboss_5_0_0 and package_x11_client_1_5_proto_7_0 repositories. They should + now have only their tip as the installable revision. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + self.reset_repository_metadata( package_emboss_repository ) + self.reset_repository_metadata( package_x11_repository ) + assert len( package_emboss_repository.metadata_revisions ) == 1, 'Repository package_emboss_5_0_0 has %d installable revisions, expected 1.' % \ + len( package_emboss_repository.metadata_revisions ) + assert len( package_x11_repository.metadata_revisions ) == 1, 'Repository package_x11_client_1_5_proto_7_0 has %d installable revisions, expected 1.' % \ + len( package_x11_repository.metadata_revisions ) + + def test_0050_reset_emboss_5_metadata( self ): + '''Reset metadata on emboss_5.''' + ''' + This is step 10 - Reset metadata on the emboss_5 repository. It should now have only it's tip as the installable revision. + ''' + emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) + self.reset_repository_metadata( emboss_repository ) + assert len( emboss_repository.metadata_revisions ) == 1, 'Repository emboss_5 has %d installable revisions, expected 1.' % \ + len( emboss_repository.metadata_revisions ) diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py --- a/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py +++ b/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py @@ -56,7 +56,7 @@ uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded tool_dependencies.xml.', - strings_displayed=[ 'The settings for <b>name</b>, <b>version</b> and <b>type</b> from a contained tool' ], + strings_displayed=[ 'This repository currently contains a single file named <b>tool_dependencies.xml</b>' ], strings_not_displayed=[] ) self.display_manage_repository_page( repository, strings_displayed=[ 'Tool dependencies', 'may not be', 'in this repository' ] ) @@ -262,13 +262,9 @@ '''Verify that the generated env.sh contains the right data.''' base_repository = test_db_util.get_installed_repository_by_name_owner( bwa_base_repository_name, common.test_user_1_name ) tool_repository = test_db_util.get_installed_repository_by_name_owner( bwa_package_repository_name, common.test_user_1_name ) - env_sh_path = os.path.join( self.galaxy_tool_dependency_dir, - 'bwa', - '0.5.9', - base_repository.owner, - base_repository.name, - base_repository.installed_changeset_revision, - 'env.sh' ) + env_sh_path = self.get_env_sh_path( tool_dependency_name='bwa', + tool_dependency_version='0.5.9', + repository=base_repository ) assert os.path.exists( env_sh_path ), 'env.sh was not generated in %s for this dependency.' % env_sh_path contents = file( env_sh_path, 'r' ).read() if tool_repository.installed_changeset_revision not in contents: diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/0470_files/emboss_complex_dependency.tar Binary file test/tool_shed/test_data/emboss/0470_files/emboss_complex_dependency.tar has changed diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/0470_files/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/0470_files/tool_dependencies.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="emboss" version="5.0.0"> + <!-- These tools require the EMBOSS 5.0.0 binaries. --> + <repository name="package_emboss_5_0_0_0470" owner="user1" /> + </package> +</tool_dependency> diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="libx11" version="1.5.0"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True" /> + </package> + <package name="emboss" version="5.0.0"> + <install version="1.0"> + <actions> + <action type="download_by_url">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/EMBOSS-5.0.0.tar.gz</action> + <action type="set_environment_for_install"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True"> + <package name="libx11" version="1.5.0" /> + </repository> + </action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action extract="true" type="download_file">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/PHYLIP-3.6b.tar.gz</action> + <action type="change_directory">PHYLIP-3.6b</action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR CFLAGS='-I$env.INSTALL_DIR/include' + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> + </action> + </actions> + </install> + <readme> +These links provide information for building the Emboss package in most environments. + +System requirements +http://emboss.sourceforge.net/download/#Requirements + +Platform-dependent notes +http://emboss.sourceforge.net/download/#Platforms + </readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="libx11" version="1.5.0"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True" /> + </package> + <package name="emboss" version="5.0.0"> + <install version="1.0"> + <actions> + <!-- This is also a comment --> + <action type="download_by_url">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/EMBOSS-5.0.0.tar.gz</action> + <action type="set_environment_for_install"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True"> + <package name="libx11" version="1.5.0" /> + </repository> + </action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action extract="true" type="download_file">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/PHYLIP-3.6b.tar.gz</action> + <action type="change_directory">PHYLIP-3.6b</action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR CFLAGS='-I$env.INSTALL_DIR/include' + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> + </action> + </actions> + </install> + <readme> +These links provide information for building the Emboss package in most environments. + +System requirements +http://emboss.sourceforge.net/download/#Requirements + +Platform-dependent notes +http://emboss.sourceforge.net/download/#Platforms + </readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml @@ -0,0 +1,22 @@ +<tool_dependency> + <package name="libx11" version="1.5.0"> + <install version="1.0"> + <actions> + <action type="download_by_url">ftp://ftp.x.org/pub/X11R7.7/src/proto/xproto-7.0.23.tar.bz2</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_INCLUDE_DIR" action="set_to">$INSTALL_DIR/include</environment_variable> + </action> + <action type="download_file" extract="true">ftp://ftp.x.org/pub/X11R7.7/src/lib/libX11-1.5.0.tar.bz2</action> + <action type="change_directory">libX11-1.5.0</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR CFLAGS='-I$INSTALL_DIR/include'</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_LIB_DIR" action="set_to">$INSTALL_DIR/lib</environment_variable> + </action> + </actions> + </install> + <readme>Xlib is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the details of the protocol. Few applications use Xlib directly; rather, they employ other libraries that use Xlib functions to provide widget toolkits.</readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 27b458743a117b5fb119915dc89bddc017625146 -r 881a16a718913fad393369059afe982ecb6b77bc test/tool_shed/test_data/emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml @@ -0,0 +1,23 @@ +<tool_dependency> + <package name="libx11" version="1.5.0"> + <install version="1.0"> + <actions> + <!-- This is a comment --> + <action type="download_by_url">ftp://ftp.x.org/pub/X11R7.7/src/proto/xproto-7.0.23.tar.bz2</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_INCLUDE_DIR" action="set_to">$INSTALL_DIR/include</environment_variable> + </action> + <action type="download_file" extract="true">ftp://ftp.x.org/pub/X11R7.7/src/lib/libX11-1.5.0.tar.bz2</action> + <action type="change_directory">libX11-1.5.0</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR CFLAGS='-I$INSTALL_DIR/include'</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_LIB_DIR" action="set_to">$INSTALL_DIR/lib</environment_variable> + </action> + </actions> + </install> + <readme>Xlib is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the details of the protocol. Few applications use Xlib directly; rather, they employ other libraries that use Xlib functions to provide widget toolkits.</readme> + </package> +</tool_dependency> \ No newline at end of file https://bitbucket.org/galaxy/galaxy-central/commits/6fa490b703b0/ Changeset: 6fa490b703b0 User: Dave Bouvier Date: 2013-07-24 16:58:05 Summary: Merged in changes. Affected #: 9 files diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/base/twilltestcase.py --- a/test/tool_shed/base/twilltestcase.py +++ b/test/tool_shed/base/twilltestcase.py @@ -453,15 +453,15 @@ original_information = dict( repo_name=repository.name, description=repository.description, long_description=repository.long_description ) strings_displayed = [] strings_not_displayed = [] - for input_elem_name in [ 'repo_name', 'description', 'long_description' ]: + for input_elem_name in [ 'repo_name', 'description', 'long_description', 'repository_type' ]: if input_elem_name in kwd: - tc.fv( "1", input_elem_name, kwd[ input_elem_name ] ) + tc.fv( "edit_repository", input_elem_name, kwd[ input_elem_name ] ) strings_displayed.append( self.escape_html( kwd[ input_elem_name ] ) ) tc.submit( "edit_repository_button" ) self.check_for_strings( strings_displayed ) strings_displayed = [] for input_elem_name in [ 'repo_name', 'description', 'long_description' ]: - tc.fv( "1", input_elem_name, original_information[ input_elem_name ] ) + tc.fv( "edit_repository", input_elem_name, original_information[ input_elem_name ] ) strings_displayed.append( self.escape_html( original_information[ input_elem_name ] ) ) tc.submit( "edit_repository_button" ) self.check_for_strings( strings_displayed ) @@ -577,6 +577,16 @@ return datatypes_count.group( 1 ) return None + def get_env_sh_path( self, tool_dependency_name, tool_dependency_version, repository ): + env_sh_path = os.path.join( self.galaxy_tool_dependency_dir, + tool_dependency_name, + tool_dependency_version, + repository.owner, + repository.name, + repository.installed_changeset_revision, + 'env.sh' ) + return env_sh_path + def get_filename( self, filename, filepath=None ): if filepath is not None: return os.path.abspath( os.path.join( filepath, filename ) ) diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/functional/test_0470_tool_dependency_repository_type.py --- /dev/null +++ b/test/tool_shed/functional/test_0470_tool_dependency_repository_type.py @@ -0,0 +1,253 @@ +from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os +import tool_shed.base.test_db_util as test_db_util + +import logging +log = logging.getLogger( __name__ ) + +category_name = 'Test 0470 Tool dependency repository type' +category_description = 'Test script 0470 for changing repository types.' +package_libx11_repository_name = 'package_x11_client_1_5_proto_7_0_0470' +package_libx11_repository_description = "Contains a tool dependency definition that provides the X11 client libraries and core protocol header files." +package_libx11_repository_long_description = "Xlib is an X Window System protocol client library written in the C programming language." +package_emboss_repository_name = 'package_emboss_5_0_0_0470' +package_emboss_repository_description = "Contains a tool dependency definition that downloads and compiles version 5.0.0 of the EMBOSS tool suite." +package_emboss_repository_long_description = 'EMBOSS is "The European Molecular Biology Open Software Suite".' +datatypes_repository_name = 'emboss_datatypes_0470' +datatypes_repository_description = 'Galaxy applicable data formats used by Emboss tools.' +datatypes_repository_long_description = 'Galaxy applicable data formats used by Emboss tools. This repository contains no tools.' +emboss_repository_name = 'emboss_5_0470' +emboss_repository_description = "Galaxy wrappers for Emboss version 5.0.0 tools" +emboss_repository_long_description = "Galaxy wrappers for Emboss version 5.0.0 tools" + +''' +1. Create and populate a repository named package_x11_client_1_5_proto_7_0 that contains only a single file named tool_dependencies.xml. + Keep the repository type as the default "Unrestricted". + +2. Create a repository named package_emboss_5_0_0 of type "Unrestricted" that has a repository dependency definition that defines the + above package_x11_client_1_5_proto_7_0 repository. Upload the tool_dependencies.xml file such that it does not have a changeset_revision + defined so it will get automatically populated. + +3. Create a repository named emboss_5 of type "Unrestricted" that has a tool-dependencies.xml file defining a complex repository dependency + on the package_emboss_5_0_0 repository above. Upload the tool_dependencies.xml file such that it does not have a change set_revision defined + so it will get automatically populated. + +4. Add a comment to the tool_dependencies.xml file to be uploaded to the package_x11_client_1_5_prot_7_0 repository, creating a new installable + changeset revision at the repository tip. + +5. Add a comment to the tool_dependencies.xml file for the package_emboss_5_0_0 repository, eliminating the change set_revision attribute so + that it gets automatically populated when uploaded. After uploading the file, the package_emboss_5_0_0 repository should have 2 + installable changeset revisions. + +6. Add a comment to the tool_dependencies.xml file in the emboss_5 repository, eliminating the changeset_revision attribute so that it gets + automatically populated when uploaded. After uploading the file, the emboss5 repository should have 2 installable metadata revisions. + +7. Change the repository type of the package_x11_client_1_5_proto_7_0 repository to be tool_dependency_definition. + +8. Change the repository type of the package_emboss_5_0_0 repository to be tool_dependency_definition. + +9. Reset metadata on the package_emboss_5_0_0 repository. It should now have only it's tip as the installable revision. + +10. Reset metadata on the emboss_5 repository. It should now have only it's tip as the installable revision. +''' + +class TestEnvironmentInheritance( ShedTwillTestCase ): + '''Test referencing environment variables that were defined in a separate tool dependency.''' + + def test_0000_initiate_users_and_category( self ): + """Create necessary user accounts and login as an admin user.""" + self.logout() + self.login( email=common.admin_email, username=common.admin_username ) + admin_user = test_db_util.get_user( common.admin_email ) + assert admin_user is not None, 'Problem retrieving user with email %s from the database' % common.admin_email + admin_user_private_role = test_db_util.get_private_role( admin_user ) + self.create_category( name=category_name, description=category_description ) + self.logout() + self.login( email=common.test_user_2_email, username=common.test_user_2_name ) + test_user_2 = test_db_util.get_user( common.test_user_2_email ) + assert test_user_2 is not None, 'Problem retrieving user with email %s from the database' % common.test_user_2_email + test_user_2_private_role = test_db_util.get_private_role( test_user_2 ) + self.logout() + self.login( email=common.test_user_1_email, username=common.test_user_1_name ) + test_user_1 = test_db_util.get_user( common.test_user_1_email ) + assert test_user_1 is not None, 'Problem retrieving user with email %s from the database' % common.test_user_1_email + test_user_1_private_role = test_db_util.get_private_role( test_user_1 ) + + def test_0005_create_libx11_repository( self ): + '''Create and populate package_x11_client_1_5_proto_7_0_0470.''' + ''' + This is step 1 - Create and populate a repository named package_x11_client_1_5_proto_7_0. + + Create and populate a repository named package_x11_client_1_5_proto_7_0 that contains only a single file named tool_dependencies.xml. + Keep the repository type as the default "Unrestricted". + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=package_libx11_repository_name, + description=package_libx11_repository_description, + long_description=package_libx11_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Upload the tool dependency definition to the package_x11_client_1_5_proto_7_0_0470 repository. + self.upload_file( repository, + filename='emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_x11_client_1_5_proto_7_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0010_create_emboss_5_0_0_repository( self ): + '''Create and populate package_emboss_5_0_0_0470.''' + ''' + This is step 2 - Create a repository named package_emboss_5_0_0 of type "Unrestricted". + + Create a repository named package_emboss_5_0_0 of type "Unrestricted" that has a repository dependency definition that defines the + above package_x11_client_1_5_proto_7_0 repository. Upload the tool_dependencues.xml file such that it does not have a changeset_revision + defined so it will get automatically populated. + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=package_emboss_repository_name, + description=package_emboss_repository_description, + long_description=package_emboss_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Upload the edited tool dependency definition to the package_emboss_5_0_0 repository. + self.upload_file( repository, + filename='emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_emboss_5_0_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0015_create_emboss_5_repository( self ): + '''Create and populate emboss_5_0470.''' + ''' + This is step 3 - Create a repository named emboss_5 of type "Unrestricted". + + Create a repository named emboss_5 of type "Unrestricted" that has a tool-dependencies.xml file defining a complex repository dependency + on the package_emboss_5_0_0 repository above. Upload the tool_dependencies.xml file such that it does not have a change set_revision defined + so it will get automatically populated. + ''' + category = test_db_util.get_category_by_name( category_name ) + repository = self.get_or_create_repository( name=emboss_repository_name, + description=emboss_repository_description, + long_description=emboss_repository_long_description, + owner=common.test_user_1_name, + category_id=self.security.encode_id( category.id ), + strings_displayed=[] ) + # Populate emboss_5 with tool and dependency definitions. + self.upload_file( repository, + filename='emboss/0470_files/emboss_complex_dependency.tar', + filepath=None, + valid_tools_only=True, + uncompress_file=True, + remove_repo_files_not_in_tar=False, + commit_message='Populate emboss_5 with tool and dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + + def test_0020_upload_updated_tool_dependency_to_package_x11( self ): + '''Upload a new tool_dependencies.xml to package_x11_client_1_5_proto_7_0_0470.''' + ''' + This is step 4 - Add a comment to the tool_dependencies.xml file to be uploaded to the package_x11_client_1_5_prot_7_0 repository, creating + a new installable changeset revision at the repository tip. + ''' + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + # Upload the tool dependency definition to the package_x11_client_1_5_proto_7_0_0470 repository. + self.upload_file( package_x11_repository, + filename='emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_x11_client_1_5_proto_7_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( package_x11_repository.metadata_revisions ) == 1, 'package_x11_client_1_5_proto_7_0_0470 has incorrect number of metadata revisions' + + def test_0025_upload_updated_tool_dependency_to_package_emboss( self ): + '''Upload a new tool_dependencies.xml to package_emboss_5_0_0_0470.''' + ''' + This is step 5 - Add a comment to the tool_dependencies.xml file for the package_emboss_5_0_0 repository, eliminating + the change set_revision attribute so that it gets automatically populated when uploaded. After uploading the file, + the package_emboss_5_0_0 repository should have 2 installable changeset revisions. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + # Populate package_emboss_5_0_0_0470 with updated tool dependency definition. + self.upload_file( package_emboss_repository, + filename='emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Populate package_emboss_5_0_0_0470 with tool dependency definitions.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( package_emboss_repository.metadata_revisions ) == 2, 'package_emboss_5_0_0_0470 has incorrect number of metadata revisions' + + def test_0030_upload_updated_tool_dependency_to_emboss_5_repository( self ): + '''Upload a new tool_dependencies.xml to emboss_5_0470.''' + ''' + This is step 6 - Add a comment to the tool_dependencies.xml file in the emboss_5 repository, eliminating the + changeset_revision attribute so that it gets automatically populated when uploaded. After uploading the file, + the emboss5 repository should have 2 installable metadata revisions. + ''' + emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) + # Populate package_emboss_5_0_0_0470 with updated tool dependency definition. + self.upload_file( emboss_repository, + filename='emboss/0470_files/tool_dependencies.xml', + filepath=None, + valid_tools_only=True, + uncompress_file=False, + remove_repo_files_not_in_tar=False, + commit_message='Upload updated complex repository dependency definition to emboss_5_0470.', + strings_displayed=[], + strings_not_displayed=[] ) + assert len( emboss_repository.metadata_revisions ) == 2, 'package_emboss_5_0_0_0470 has incorrect number of metadata revisions' + + def test_0035_modify_package_x11_repository_type( self ): + '''Set package_x11_client_1_5_proto_7_0 type tool_dependency_definition.''' + ''' + This is step 7 - Change the repository type of the package_x11_client_1_5_proto_7_0 repository to be tool_dependency_definition. + ''' + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + self.edit_repository_information( package_x11_repository, repository_type='tool_dependency_definition' ) + + def test_0040_modify_package_emboss_repository_type( self ): + '''Set package_emboss_5_0_0 to type tool_dependency_definition.''' + ''' + This is step 8 - Change the repository type of the package_emboss_5_0_0 repository to be tool_dependency_definition. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + self.edit_repository_information( package_emboss_repository, repository_type='tool_dependency_definition' ) + + def test_0045_reset_repository_metadata( self ): + '''Reset metadata on package_emboss_5_0_0_0470 and package_x11_client_1_5_proto_7_0.''' + ''' + This is step 9 - Reset metadata on the package_emboss_5_0_0 and package_x11_client_1_5_proto_7_0 repositories. They should + now have only their tip as the installable revision. + ''' + package_emboss_repository = test_db_util.get_repository_by_name_and_owner( package_emboss_repository_name, common.test_user_1_name ) + package_x11_repository = test_db_util.get_repository_by_name_and_owner( package_libx11_repository_name, common.test_user_1_name ) + self.reset_repository_metadata( package_emboss_repository ) + self.reset_repository_metadata( package_x11_repository ) + assert len( package_emboss_repository.metadata_revisions ) == 1, 'Repository package_emboss_5_0_0 has %d installable revisions, expected 1.' % \ + len( package_emboss_repository.metadata_revisions ) + assert len( package_x11_repository.metadata_revisions ) == 1, 'Repository package_x11_client_1_5_proto_7_0 has %d installable revisions, expected 1.' % \ + len( package_x11_repository.metadata_revisions ) + + def test_0050_reset_emboss_5_metadata( self ): + '''Reset metadata on emboss_5.''' + ''' + This is step 10 - Reset metadata on the emboss_5 repository. It should now have only it's tip as the installable revision. + ''' + emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name ) + self.reset_repository_metadata( emboss_repository ) + assert len( emboss_repository.metadata_revisions ) == 1, 'Repository emboss_5 has %d installable revisions, expected 1.' % \ + len( emboss_repository.metadata_revisions ) diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py --- a/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py +++ b/test/tool_shed/functional/test_1100_install_repository_with_complex_dependencies.py @@ -56,7 +56,7 @@ uncompress_file=False, remove_repo_files_not_in_tar=False, commit_message='Uploaded tool_dependencies.xml.', - strings_displayed=[ 'The settings for <b>name</b>, <b>version</b> and <b>type</b> from a contained tool' ], + strings_displayed=[ 'This repository currently contains a single file named <b>tool_dependencies.xml</b>' ], strings_not_displayed=[] ) self.display_manage_repository_page( repository, strings_displayed=[ 'Tool dependencies', 'may not be', 'in this repository' ] ) @@ -262,13 +262,9 @@ '''Verify that the generated env.sh contains the right data.''' base_repository = test_db_util.get_installed_repository_by_name_owner( bwa_base_repository_name, common.test_user_1_name ) tool_repository = test_db_util.get_installed_repository_by_name_owner( bwa_package_repository_name, common.test_user_1_name ) - env_sh_path = os.path.join( self.galaxy_tool_dependency_dir, - 'bwa', - '0.5.9', - base_repository.owner, - base_repository.name, - base_repository.installed_changeset_revision, - 'env.sh' ) + env_sh_path = self.get_env_sh_path( tool_dependency_name='bwa', + tool_dependency_version='0.5.9', + repository=base_repository ) assert os.path.exists( env_sh_path ), 'env.sh was not generated in %s for this dependency.' % env_sh_path contents = file( env_sh_path, 'r' ).read() if tool_repository.installed_changeset_revision not in contents: diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/0470_files/emboss_complex_dependency.tar Binary file test/tool_shed/test_data/emboss/0470_files/emboss_complex_dependency.tar has changed diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/0470_files/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/0470_files/tool_dependencies.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="emboss" version="5.0.0"> + <!-- These tools require the EMBOSS 5.0.0 binaries. --> + <repository name="package_emboss_5_0_0_0470" owner="user1" /> + </package> +</tool_dependency> diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/emboss_5_0_0/first_tool_dependency/tool_dependencies.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="libx11" version="1.5.0"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True" /> + </package> + <package name="emboss" version="5.0.0"> + <install version="1.0"> + <actions> + <action type="download_by_url">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/EMBOSS-5.0.0.tar.gz</action> + <action type="set_environment_for_install"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True"> + <package name="libx11" version="1.5.0" /> + </repository> + </action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action extract="true" type="download_file">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/PHYLIP-3.6b.tar.gz</action> + <action type="change_directory">PHYLIP-3.6b</action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR CFLAGS='-I$env.INSTALL_DIR/include' + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> + </action> + </actions> + </install> + <readme> +These links provide information for building the Emboss package in most environments. + +System requirements +http://emboss.sourceforge.net/download/#Requirements + +Platform-dependent notes +http://emboss.sourceforge.net/download/#Platforms + </readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/emboss_5_0_0/second_tool_dependency/tool_dependencies.xml @@ -0,0 +1,49 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="libx11" version="1.5.0"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True" /> + </package> + <package name="emboss" version="5.0.0"> + <install version="1.0"> + <actions> + <!-- This is also a comment --> + <action type="download_by_url">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/EMBOSS-5.0.0.tar.gz</action> + <action type="set_environment_for_install"> + <repository name="package_x11_client_1_5_proto_7_0_0470" owner="user1" prior_installation_required="True"> + <package name="libx11" version="1.5.0" /> + </repository> + </action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action extract="true" type="download_file">ftp://emboss.open-bio.org/pub/EMBOSS/old/5.0.0/PHYLIP-3.6b.tar.gz</action> + <action type="change_directory">PHYLIP-3.6b</action> + <action type="template_command"> + #if env.get('X11_LIB_DIR', False) and env.get('X11_INCLUDE_DIR', False): + ./configure --prefix=$env.INSTALL_DIR --x-includes=$env.X11_INCLUDE_DIR --x-libraries=$env.X11_LIB_DIR CFLAGS='-I$env.INSTALL_DIR/include' + #else: + ./configure --prefix=$env.INSTALL_DIR + #end if + </action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable> + </action> + </actions> + </install> + <readme> +These links provide information for building the Emboss package in most environments. + +System requirements +http://emboss.sourceforge.net/download/#Requirements + +Platform-dependent notes +http://emboss.sourceforge.net/download/#Platforms + </readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/libx11_proto/first_tool_dependency/tool_dependencies.xml @@ -0,0 +1,22 @@ +<tool_dependency> + <package name="libx11" version="1.5.0"> + <install version="1.0"> + <actions> + <action type="download_by_url">ftp://ftp.x.org/pub/X11R7.7/src/proto/xproto-7.0.23.tar.bz2</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_INCLUDE_DIR" action="set_to">$INSTALL_DIR/include</environment_variable> + </action> + <action type="download_file" extract="true">ftp://ftp.x.org/pub/X11R7.7/src/lib/libX11-1.5.0.tar.bz2</action> + <action type="change_directory">libX11-1.5.0</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR CFLAGS='-I$INSTALL_DIR/include'</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_LIB_DIR" action="set_to">$INSTALL_DIR/lib</environment_variable> + </action> + </actions> + </install> + <readme>Xlib is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the details of the protocol. Few applications use Xlib directly; rather, they employ other libraries that use Xlib functions to provide widget toolkits.</readme> + </package> +</tool_dependency> \ No newline at end of file diff -r 528bee4dd14addc5db2b59a0a229e3aa441f8fda -r 6fa490b703b062231da599fdd7f169d84eddc930 test/tool_shed/test_data/emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml --- /dev/null +++ b/test/tool_shed/test_data/emboss/libx11_proto/second_tool_dependency/tool_dependencies.xml @@ -0,0 +1,23 @@ +<tool_dependency> + <package name="libx11" version="1.5.0"> + <install version="1.0"> + <actions> + <!-- This is a comment --> + <action type="download_by_url">ftp://ftp.x.org/pub/X11R7.7/src/proto/xproto-7.0.23.tar.bz2</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_INCLUDE_DIR" action="set_to">$INSTALL_DIR/include</environment_variable> + </action> + <action type="download_file" extract="true">ftp://ftp.x.org/pub/X11R7.7/src/lib/libX11-1.5.0.tar.bz2</action> + <action type="change_directory">libX11-1.5.0</action> + <action type="shell_command">./configure --prefix=$INSTALL_DIR CFLAGS='-I$INSTALL_DIR/include'</action> + <action type="shell_command">make && make install</action> + <action type="set_environment"> + <environment_variable name="X11_LIB_DIR" action="set_to">$INSTALL_DIR/lib</environment_variable> + </action> + </actions> + </install> + <readme>Xlib is an X Window System protocol client library written in the C programming language. It contains functions for interacting with an X server. These functions allow programmers to write programs without knowing the details of the protocol. Few applications use Xlib directly; rather, they employ other libraries that use Xlib functions to provide widget toolkits.</readme> + </package> +</tool_dependency> \ No newline at end of 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.
participants (1)
-
commits-noreply@bitbucket.org