当前位置: 首页>>代码示例>>Python>>正文


Python test_db_util.get_repository_by_name_and_owner函数代码示例

本文整理汇总了Python中tool_shed.base.test_db_util.get_repository_by_name_and_owner函数的典型用法代码示例。如果您正苦于以下问题:Python get_repository_by_name_and_owner函数的具体用法?Python get_repository_by_name_and_owner怎么用?Python get_repository_by_name_and_owner使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_repository_by_name_and_owner函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_0035_generate_repository_dependencies_for_emboss_6

 def test_0035_generate_repository_dependencies_for_emboss_6( self ):
     '''Generate a repository_dependencies.xml file specifying emboss_datatypes and upload it to the emboss_6 repository.'''
     emboss_6_repository = test_db_util.get_repository_by_name_and_owner( emboss_6_repository_name, common.test_user_1_name )
     datatypes_repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name )
     repository_dependencies_path = self.generate_temp_path( 'test_0030', additional_paths=[ 'emboss6' ] )
     datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
     self.create_repository_dependency( repository=emboss_6_repository, repository_tuples=[ datatypes_tuple ], filepath=repository_dependencies_path )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:7,代码来源:test_0030_repository_dependency_revisions.py

示例2: test_0040_update_tool_repository

 def test_0040_update_tool_repository( self ):
     '''Upload a new tool_dependencies.xml to the tool repository, and verify that the base repository displays the new changeset.'''
     global running_standalone
     if running_standalone:
         base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
         tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
         previous_changeset = self.get_repository_tip( tool_repository )
         old_tool_dependency = self.get_filename( os.path.join( 'bwa', 'complex', 'readme', 'tool_dependencies.xml' ) )
         new_tool_dependency_path = self.generate_temp_path( 'test_1100', additional_paths=[ 'tool_dependency' ] )
         xml_filename = os.path.abspath( os.path.join( new_tool_dependency_path, 'tool_dependencies.xml' ) )
         file( xml_filename, 'w' ).write( file( old_tool_dependency, 'r' )
                                  .read().replace( '__PATH__', self.get_filename( 'bwa/complex' ) ) )
         self.upload_file( tool_repository, 
                           filename=xml_filename,
                           filepath=new_tool_dependency_path, 
                           valid_tools_only=True,
                           uncompress_file=False,
                           remove_repo_files_not_in_tar=False, 
                           commit_message='Uploaded new tool_dependencies.xml.',
                           strings_displayed=[], 
                           strings_not_displayed=[] )
         # Verify that the dependency display has been updated as a result of the new tool_dependencies.xml file.
         self.display_manage_repository_page( base_repository, 
                                              strings_displayed=[ self.get_repository_tip( tool_repository ), 'bwa', '0.5.9', 'package' ],
                                              strings_not_displayed=[ previous_changeset ] )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:25,代码来源:test_1100_install_repository_with_complex_dependencies.py

示例3: test_0045_generate_repository_dependency_on_emboss_6

 def test_0045_generate_repository_dependency_on_emboss_6( self ):
     '''Create and upload repository_dependencies.xml for the emboss_6_0030 repository.'''
     emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
     emboss_6_repository = test_db_util.get_repository_by_name_and_owner( emboss_6_repository_name, common.test_user_1_name )
     repository_dependencies_path = self.generate_temp_path( 'test_0030', additional_paths=[ 'emboss', '5' ] )
     emboss_tuple = ( self.url, emboss_6_repository.name, emboss_6_repository.user.username, self.get_repository_tip( emboss_6_repository ) )
     self.create_repository_dependency( repository=emboss_repository, repository_tuples=[ emboss_tuple ], filepath=repository_dependencies_path )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:7,代码来源:test_0030_repository_dependency_revisions.py

示例4: test_0020_create_repository_dependency

 def test_0020_create_repository_dependency( self ):
     '''Create a repository dependency specifying convert_chars.'''
     '''
     Each of the three repositories should depend on the other two, to make this as circular as possible.
     '''
     filter_repository = test_db_util.get_repository_by_name_and_owner( filter_repository_name, common.test_user_1_name )
     column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name )
     convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name )
     dependency_xml_path = self.generate_temp_path( 'test_0160', additional_paths=[ 'column' ] )
     filter_revision = self.get_repository_tip( filter_repository )
     column_revision = self.get_repository_tip( column_repository )
     convert_revision = self.get_repository_tip( convert_repository )
     column_tuple = ( self.url, column_repository.name, column_repository.user.username, column_revision )
     convert_tuple = ( self.url, convert_repository.name, convert_repository.user.username, convert_revision )
     filter_tuple = ( self.url, filter_repository.name, filter_repository.user.username, filter_revision )
     self.create_repository_dependency( repository=column_repository, 
                                        repository_tuples=[ convert_tuple, filter_tuple], 
                                        filepath=dependency_xml_path,
                                        prior_installation_required=False )
     self.create_repository_dependency( repository=convert_repository, 
                                        repository_tuples=[ column_tuple, filter_tuple ], 
                                        filepath=dependency_xml_path,
                                        prior_installation_required=False )
     self.create_repository_dependency( repository=filter_repository, 
                                        repository_tuples=[ convert_tuple, column_tuple ], 
                                        filepath=dependency_xml_path,
                                        prior_installation_required=True )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:27,代码来源:test_0160_circular_prior_installation_required.py

示例5: test_0020_create_repository_dependencies

 def test_0020_create_repository_dependencies( self ):
     '''Set up the filtering and freebayes repository dependencies.'''
     # The dependency structure should look like:
     # Filtering revision 0 -> freebayes revision 0.
     # Freebayes revision 0 -> filtering revision 1.
     # Filtering will have two revisions, one with just the filtering tool, and one with the filtering tool and a dependency on freebayes.
     global running_standalone
     if running_standalone:
         repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name )
         filtering_repository = test_db_util.get_repository_by_name_and_owner( filtering_repository_name, common.test_user_1_name )
         repository_dependencies_path = self.generate_temp_path( 'test_0040', additional_paths=[ 'filtering' ] )
         self.generate_repository_dependency_xml( [ repository ], 
                                                  self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), 
                                                  dependency_description='Filtering 1.1.0 depends on the freebayes repository.' )
         self.upload_file( filtering_repository, 
                           'repository_dependencies.xml', 
                           filepath=repository_dependencies_path, 
                           commit_message='Uploaded dependency on freebayes' )
         repository = test_db_util.get_repository_by_name_and_owner( filtering_repository_name, common.test_user_1_name )
         freebayes_repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name )
         repository_dependencies_path = self.generate_temp_path( 'test_0040', additional_paths=[ 'freebayes' ] )
         self.generate_repository_dependency_xml( [ repository ], 
                                                  self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ), 
                                                  dependency_description='Freebayes depends on the filtering repository.' )
         self.upload_file( freebayes_repository, 
                           'repository_dependencies.xml', 
                           filepath=repository_dependencies_path, 
                           commit_message='Uploaded dependency on filtering' )
开发者ID:cidvbi,项目名称:PathogenPortal,代码行数:28,代码来源:test_1040_install_repository_basic_circular_dependencies.py

示例6: test_0025_generate_and_upload_repository_dependencies_xml

 def test_0025_generate_and_upload_repository_dependencies_xml( self ):
     '''Generate and upload the repository_dependencies.xml file'''
     repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
     datatypes_repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name )
     repository_dependencies_path = self.generate_temp_path( 'test_0020', additional_paths=[ 'emboss', '5' ] )
     repository_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
     self.create_repository_dependency( repository=repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:7,代码来源:test_0020_basic_repository_dependencies.py

示例7: test_0060_search_for_bwa_tools

 def test_0060_search_for_bwa_tools( self ):
     '''Search for and install the repositories with BWA tools, and verify that this reinstalls emboss_datatypes and reactivates filtering.'''
     bwa_color_repository = test_db_util.get_repository_by_name_and_owner( bwa_color_repository_name, common.test_user_1_name )
     bwa_base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
     bwa_base_revision = self.get_repository_tip( bwa_base_repository )
     bwa_color_revision = self.get_repository_tip( bwa_color_repository )
     self.search_for_valid_tools( search_fields={ 'tool_id': 'bwa' }, 
                                  exact_matches=False, from_galaxy=True, 
                                  strings_displayed=[ 'bwa_color_0090', 'bwa_base_0090', bwa_base_revision, bwa_color_revision  ] )
     strings_displayed=[ 'freebayes_0090', 'emboss_0090', 'filtering_0090' ]
     strings_displayed.extend( [ 'bwa_color_0090', 'bwa_base_0090' ] )
     strings_displayed.extend( [ 'bwa', 'Handle', 'tool dependencies' ] )
     repositories_to_install = [ bwa_color_repository, bwa_base_repository ]
     # BWA is a good candidate for testing the installation of tool dependencies, but it is a core requirement of functional 
     # tests that they be able to run independently of any network connection or remote data. 
     #
     # After this test, the repositories should be in the following state:
     # Installed: bwa_color, bwa_base, emboss_datatypes, emboss, filtering, freebayes
     self.install_repositories_from_search_results( repositories_to_install, 
                                                    install_repository_dependencies='True', 
                                                    install_tool_dependencies=False, 
                                                    new_tool_panel_section='bwa_1090',
                                                    strings_displayed=strings_displayed )
     
     installed_repositories = [ ( emboss_repository_name, common.test_user_1_name ),
                                ( filtering_repository_name, common.test_user_1_name ), 
                                ( bwa_color_repository_name, common.test_user_1_name ),
                                ( bwa_base_repository_name, common.test_user_1_name ),
                                ( emboss_datatypes_repository_name, common.test_user_1_name ),
                                ( freebayes_repository_name, common.test_user_1_name ) ]
     strings_displayed = [ 'emboss_datatypes_0090', 'filtering_0090', 'emboss_0090', 'bwa_color_0090', 'bwa_base_0090', 'freebayes_0090' ]
     self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed )
     self.verify_installed_repositories( installed_repositories )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:33,代码来源:test_1090_install_tool_from_tool_search.py

示例8: test_0050_verify_tool_dependencies

 def test_0050_verify_tool_dependencies( self ):
     '''Check that freebayes and emboss display tool dependencies.'''
     freebayes_repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name )
     emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
     self.display_manage_repository_page( freebayes_repository, 
                                          strings_displayed=[ 'freebayes', '0.9.4_9696d0ce8a9', 'samtools', '0.1.18', 'Tool dependencies', 'package' ] )
     self.display_manage_repository_page( emboss_repository, strings_displayed=[ 'Tool dependencies', 'emboss', '5.0.0', 'package' ] )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:7,代码来源:test_0050_circular_dependencies_4_levels.py

示例9: test_0025_verify_repository_dependency

 def test_0025_verify_repository_dependency( self ):
     '''Verify that the previously generated repositiory dependency displays correctly.'''
     filter_repository = test_db_util.get_repository_by_name_and_owner( filter_repository_name, common.test_user_1_name )
     column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name )
     convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name )
     self.check_repository_dependency( repository=column_repository, 
                                       depends_on_repository=convert_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
     self.check_repository_dependency( repository=column_repository, 
                                       depends_on_repository=filter_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
     self.check_repository_dependency( repository=convert_repository, 
                                       depends_on_repository=column_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
     self.check_repository_dependency( repository=convert_repository, 
                                       depends_on_repository=filter_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
     self.check_repository_dependency( repository=filter_repository, 
                                       depends_on_repository=column_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
     self.check_repository_dependency( repository=filter_repository, 
                                       depends_on_repository=convert_repository, 
                                       depends_on_changeset_revision=None, 
                                       changeset_revision=None )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:29,代码来源:test_0160_circular_prior_installation_required.py

示例10: test_0040_generate_tool_dependency

 def test_0040_generate_tool_dependency(self):
     """Generate and upload a new tool_dependencies.xml file that specifies an arbitrary file on the filesystem, and verify that bwa_base depends on the new changeset revision."""
     base_repository = test_db_util.get_repository_by_name_and_owner(
         bwa_base_repository_name, common.test_user_1_name
     )
     tool_repository = test_db_util.get_repository_by_name_and_owner(
         bwa_tool_repository_name, common.test_user_1_name
     )
     previous_changeset = self.get_repository_tip(tool_repository)
     old_tool_dependency = self.get_filename(os.path.join("bwa", "complex", "readme", "tool_dependencies.xml"))
     new_tool_dependency_path = self.generate_temp_path("test_1100", additional_paths=["tool_dependency"])
     xml_filename = os.path.abspath(os.path.join(new_tool_dependency_path, "tool_dependencies.xml"))
     # Generate a tool_dependencies.xml file that points to an arbitrary file in the local filesystem.
     file(xml_filename, "w").write(
         file(old_tool_dependency, "r").read().replace("__PATH__", self.get_filename("bwa/complex"))
     )
     self.upload_file(
         tool_repository,
         xml_filename,
         filepath=new_tool_dependency_path,
         strings_displayed=[],
         commit_message="Uploaded new tool_dependencies.xml.",
     )
     # Verify that the dependency display has been updated as a result of the new tool_dependencies.xml file.
     self.display_manage_repository_page(
         base_repository,
         strings_displayed=[self.get_repository_tip(tool_repository), "bwa", "0.5.9", "package"],
         strings_not_displayed=[previous_changeset],
     )
开发者ID:sa-fa,项目名称:galaxy-dist,代码行数:29,代码来源:test_0100_complex_repository_dependencies.py

示例11: test_0035_generate_complex_repository_dependency

 def test_0035_generate_complex_repository_dependency(self):
     """Generate and upload a valid tool_dependencies.xml file that specifies bwa_tool_repository_0100."""
     base_repository = test_db_util.get_repository_by_name_and_owner(
         bwa_base_repository_name, common.test_user_1_name
     )
     tool_repository = test_db_util.get_repository_by_name_and_owner(
         bwa_tool_repository_name, common.test_user_1_name
     )
     dependency_path = self.generate_temp_path("test_0100", additional_paths=["complex"])
     xml_filename = self.get_filename("tool_dependencies.xml", filepath=dependency_path)
     url = self.url
     name = tool_repository.name
     owner = tool_repository.user.username
     changeset_revision = self.get_repository_tip(tool_repository)
     self.generate_repository_dependency_xml(
         [tool_repository], xml_filename, complex=True, package="bwa", version="0.5.9"
     )
     self.upload_file(
         base_repository,
         "tool_dependencies.xml",
         valid_tools_only=True,
         filepath=dependency_path,
         commit_message="Uploaded valid complex dependency on bwa_tool_0100.",
     )
     self.check_repository_dependency(base_repository, tool_repository)
     self.display_manage_repository_page(base_repository, strings_displayed=["bwa", "0.5.9", "package"])
开发者ID:sa-fa,项目名称:galaxy-dist,代码行数:26,代码来源:test_0100_complex_repository_dependencies.py

示例12: test_0080_url_upload_to_complex_test

 def test_0080_url_upload_to_complex_test( self ):
     '''Populate repository_dependency_test_4_0460.'''
     '''
     This is step 16 - Upload to repository_dependency_test_5_0460 using the url
     hg://<tool shed url>/repos/user1/hg_subfolder_repository_dependency_0460.
     '''
     url = 'hg://%s:%s/repos/user1/hg_subfolder_repository_dependency_0460' % ( self.host, self.port )
     repository = test_db_util.get_repository_by_name_and_owner( 'repository_dependency_test_5_0460', common.test_user_1_name ) 
     package_repository = test_db_util.get_repository_by_name_and_owner( 'emboss_datatypes_0460', common.test_user_1_name )
     self.upload_url( repository, 
                      url=url, 
                      filepath=None,
                      valid_tools_only=True,
                      uncompress_file=False,
                      remove_repo_files_not_in_tar=True,
                      commit_message='Uploaded repository dependency definition.',
                      strings_displayed=[], 
                      strings_not_displayed=[] )
     changeset_revision = self.get_repository_tip( package_repository )
     strings_displayed = [ 'emboss_datatypes_0460', 'user1', changeset_revision ]
     self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
     self.display_repository_file_contents( repository, 
                                            filename='repository_dependencies.xml', 
                                            filepath='subfolder', 
                                            strings_displayed=[ changeset_revision ] )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:25,代码来源:test_0460_upload_to_repository.py

示例13: test_0025_create_dependency_on_filtering

 def test_0025_create_dependency_on_filtering( self ):
     '''Upload a repository_dependencies.xml file that specifies the current revision of filtering to the freebayes_0040 repository.'''
     convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name )
     column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name )
     repository_dependencies_path = self.generate_temp_path( 'test_0080', additional_paths=[ 'convert' ] )
     repository_tuple = ( self.url, column_repository.name, column_repository.user.username, self.get_repository_tip( column_repository ) )
     self.create_repository_dependency( repository=convert_repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:7,代码来源:test_0080_advanced_circular_dependencies.py

示例14: test_0015_create_and_upload_dependency_files

 def test_0015_create_and_upload_dependency_files( self ):
     convert_repository = test_db_util.get_repository_by_name_and_owner( convert_repository_name, common.test_user_1_name )
     column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name )
     repository_dependencies_path = self.generate_temp_path( 'test_1085', additional_paths=[ 'column' ] )
     repository_tuple = ( self.url, convert_repository.name, convert_repository.user.username, self.get_repository_tip( convert_repository ) )
     self.create_repository_dependency( repository=column_repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
     repository_tuple = ( self.url, column_repository.name, column_repository.user.username, self.get_repository_tip( column_repository ) )
     self.create_repository_dependency( repository=convert_repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:8,代码来源:test_1085_repository_dependency_handling.py

示例15: test_0015_create_dependency_on_datatypes_repository

 def test_0015_create_dependency_on_datatypes_repository( self ):
     '''Create a dependency definition file that specifies emboss_datatypes_0430 and upload it to emboss_0430.'''
     emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
     datatypes_repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name )
     dependency_xml_path = self.generate_temp_path( 'test_0430', additional_paths=[ 'dependencies' ] )
     datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
     self.create_repository_dependency( repository=emboss_repository, repository_tuples=[ datatypes_tuple ], filepath=dependency_xml_path )
     self.check_repository_dependency( emboss_repository, datatypes_repository )
开发者ID:knowingchaos,项目名称:galaxy,代码行数:8,代码来源:test_0430_browse_utilities.py


注:本文中的tool_shed.base.test_db_util.get_repository_by_name_and_owner函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。