galaxy-commits
Threads by month
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
April 2013
- 1 participants
- 197 discussions
commit/galaxy-central: greg: Don't use paging on tool shed repository grids since generated urls filter out needed request params when using paging.
by commits-noreply@bitbucket.org 22 Apr '13
by commits-noreply@bitbucket.org 22 Apr '13
22 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/42632cc2a166/
Changeset: 42632cc2a166
User: greg
Date: 2013-04-22 19:37:28
Summary: Don't use paging on tool shed repository grids since generated urls filter out needed request params when using paging.
Affected #: 1 file
diff -r 1037ab5b4f761c104b01cf0aee9222d28a67034b -r 42632cc2a166e8933fe29496a6087309769b8987 lib/tool_shed/grids/repository_grids.py
--- a/lib/tool_shed/grids/repository_grids.py
+++ b/lib/tool_shed/grids/repository_grids.py
@@ -63,7 +63,7 @@
standard_filters = []
num_rows_per_page = 50
preserve_state = False
- use_paging = True
+ use_paging = False
class ValidCategoryGrid( CategoryGrid ):
@@ -105,7 +105,7 @@
standard_filters = []
num_rows_per_page = 50
preserve_state = False
- use_paging = True
+ use_paging = False
class RepositoryGrid( grids.Grid ):
@@ -310,6 +310,7 @@
allow_multiple=False,
condition=( lambda item: not item.deleted ),
async_compatible=False ) ]
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
category_id = kwd.get( 'id', None )
@@ -353,7 +354,7 @@
default_filter = dict( deleted="False" )
num_rows_per_page = 50
preserve_state = False
- use_paging = True
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
decoded_user_id = trans.security.decode_id( kwd[ 'user_id' ] )
@@ -395,6 +396,7 @@
allow_multiple=False,
condition=( lambda item: not item.deleted and item.deprecated ),
async_compatible=False ) ]
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
return trans.sa_session.query( model.Repository ) \
@@ -424,6 +426,7 @@
key="free-text-search",
visible=False,
filterable="standard" ) )
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
return trans.sa_session.query( model.Repository ) \
@@ -462,7 +465,7 @@
async_compatible=False ) ]
global_actions = [
grids.GridAction( "User preferences", dict( controller='user', action='index', cntrller='repository' ) )
- ]
+ ]
class MyWritableRepositoriesGrid( RepositoryGrid ):
@@ -499,6 +502,7 @@
allow_multiple=False,
condition=( lambda item: not item.deleted ),
async_compatible=False ) ]
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
# TODO: improve performance by adding a db table associating users with repositories for which they have write access.
@@ -589,6 +593,7 @@
visible=False,
filterable="standard" ) )
operations = []
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
if 'id' in kwd:
@@ -665,7 +670,7 @@
default_filter = {}
num_rows_per_page = 50
preserve_state = False
- use_paging = True
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
match_tuples = kwd.get( 'match_tuples', [] )
@@ -823,7 +828,7 @@
default_filter = dict( malicious="False" )
num_rows_per_page = 50
preserve_state = False
- use_paging = True
+ use_paging = False
def build_initial_query( self, trans, **kwd ):
return trans.sa_session.query( model.RepositoryMetadata ) \
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.
1
0
commit/galaxy-central: inithello: Tool shed functional tests for installation order with complex repository dependencies. Modified tests 0100 and 1100 to be less ambiguous regarding which repository contains what.
by commits-noreply@bitbucket.org 22 Apr '13
by commits-noreply@bitbucket.org 22 Apr '13
22 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/1037ab5b4f76/
Changeset: 1037ab5b4f76
User: inithello
Date: 2013-04-22 18:53:43
Summary: Tool shed functional tests for installation order with complex repository dependencies. Modified tests 0100 and 1100 to be less ambiguous regarding which repository contains what.
Affected #: 8 files
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/base/twilltestcase.py
--- a/test/tool_shed/base/twilltestcase.py
+++ b/test/tool_shed/base/twilltestcase.py
@@ -800,8 +800,12 @@
self.check_for_strings( strings_displayed, strings_not_displayed )
# This section is tricky, due to the way twill handles form submission. The tool dependency checkbox needs to
# be hacked in through tc.browser, putting the form field in kwd doesn't work.
+ form = tc.browser.get_form( 'select_tool_panel_section' )
+ submit_button = 'select_tool_panel_section_button'
+ if form is None:
+ form = tc.browser.get_form( 'select_shed_tool_panel_config' )
+ submit_button = 'select_shed_tool_panel_config_button'
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:
@@ -816,14 +820,10 @@
kwd[ 'shed_tool_conf' ] = self.shed_tool_conf
if new_tool_panel_section:
kwd[ 'new_tool_panel_section' ] = new_tool_panel_section
- if includes_tools_for_display_in_tool_panel:
- self.submit_form( 1, 'select_tool_panel_section_button', **kwd )
- self.check_for_strings( post_submit_strings_displayed, strings_not_displayed )
- else:
- self.check_for_strings( strings_displayed=[ 'Choose the configuration file whose tool_path setting will be used for installing repositories' ] )
- args = dict( shed_tool_conf=self.shed_tool_conf )
- self.submit_form( 1, 'select_shed_tool_panel_config_button', **args )
- self.check_for_strings( post_submit_strings_displayed, strings_not_displayed )
+ if not includes_tools_for_display_in_tool_panel:
+ self.check_for_strings( strings_displayed=[ 'Choose the configuration file' ] )
+ self.submit_form( 1, submit_button, **kwd )
+ self.check_for_strings( post_submit_strings_displayed, strings_not_displayed )
repository_ids = self.initiate_installation_process( new_tool_panel_section=new_tool_panel_section )
self.wait_for_repository_installation( repository_ids )
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/functional/test_0100_complex_repository_dependencies.py
--- a/test/tool_shed/functional/test_0100_complex_repository_dependencies.py
+++ b/test/tool_shed/functional/test_0100_complex_repository_dependencies.py
@@ -6,11 +6,11 @@
bwa_base_repository_name = 'bwa_base_repository_0100'
bwa_base_repository_description = "BWA Base"
-bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at bwa_tool_repository_0100"
+bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at package_bwa_0_5_9_0100"
-bwa_tool_repository_name = 'bwa_tool_repository_0100'
-bwa_tool_repository_description = "BWA Tool"
-bwa_tool_repository_long_description = "BWA repository with a package tool dependency defined for BWA 0.5.9."
+bwa_package_repository_name = 'package_bwa_0_5_9_0100'
+bwa_package_repository_description = "BWA Tool"
+bwa_package_repository_long_description = "BWA repository with a package tool dependency defined for BWA 0.5.9."
category_name = 'Test 0100 Complex Repository Dependencies'
category_description = 'Test 0100 Complex Repository Dependencies'
@@ -32,15 +32,15 @@
assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
- def test_0005_create_bwa_tool_repository( self ):
- '''Create and populate bwa_tool_repository_0100.'''
+ def test_0005_create_bwa_package_repository( self ):
+ '''Create and populate package_bwa_0_5_9_0100.'''
category = self.create_category( name=category_name, description=category_description )
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
- # Create a repository named bwa_tool_repository_0100 owned by user1.
- repository = self.get_or_create_repository( name=bwa_tool_repository_name,
- description=bwa_tool_repository_description,
- long_description=bwa_tool_repository_long_description,
+ # Create a repository named package_bwa_0_5_9_0100 owned by user1.
+ repository = self.get_or_create_repository( name=bwa_package_repository_name,
+ description=bwa_package_repository_description,
+ long_description=bwa_package_repository_long_description,
owner=common.test_user_1_name,
category_id=self.security.encode_id( category.id ),
strings_displayed=[] )
@@ -53,7 +53,7 @@
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_not_displayed=[] )
- # Visit the manage repository page for bwa_tool_repository_0100.
+ # Visit the manage repository page for package_bwa_0_5_9_0100.
self.display_manage_repository_page( repository, strings_displayed=[ 'Tool dependencies', 'may not be', 'in this repository' ] )
def test_0010_create_bwa_base_repository( self ):
@@ -85,10 +85,10 @@
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
# The repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = 'http://http://this is not an url!'
- name = 'bwa_tool_repository_0100'
+ name = 'package_bwa_0_5_9_0100'
owner = 'user1'
changeset_revision = self.get_repository_tip( tool_repository )
strings_displayed = [ 'Repository dependencies are currently supported only within the same tool shed' ]
@@ -108,14 +108,14 @@
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
# The base_repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
name = 'invalid_repository!?'
owner = 'user1'
changeset_revision = self.get_repository_tip( tool_repository )
strings_displayed = [ 'because the name is invalid' ]
- # Populate the dependent base_repository named bwa_tool_repository_0100 with an invalid tool_dependencies.xml file.
+ # Populate the dependent base_repository named package_bwa_0_5_9_0100 with an invalid tool_dependencies.xml file.
repository_tuple = ( url, name, owner, changeset_revision )
self.create_repository_dependency( repository=base_repository,
filepath=dependency_path,
@@ -131,10 +131,10 @@
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
# The base_repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
- name = 'bwa_tool_repository_0100'
+ name = 'package_bwa_0_5_9_0100'
owner = 'invalid_owner!?'
changeset_revision = self.get_repository_tip( tool_repository )
strings_displayed = [ 'because the owner is invalid.' ]
@@ -153,10 +153,10 @@
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
# The base_repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
- name = 'bwa_tool_repository_0100'
+ name = 'package_bwa_0_5_9_0100'
owner = 'user1'
changeset_revision = '1234abcd'
strings_displayed = [ 'because the changeset revision is invalid.' ]
@@ -170,14 +170,14 @@
version='0.5.9' )
def test_0035_generate_complex_repository_dependency( self ):
- '''Generate and upload a valid tool_dependencies.xml file that specifies bwa_tool_repository_0100.'''
+ '''Generate and upload a valid tool_dependencies.xml file that specifies package_bwa_0_5_9_0100.'''
# The base_repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex' ] )
url = self.url
- name = 'bwa_tool_repository_0100'
+ name = 'package_bwa_0_5_9_0100'
owner = 'user1'
changeset_revision = self.get_repository_tip( tool_repository )
repository_tuple = ( url, name, owner, changeset_revision )
@@ -194,8 +194,8 @@
'''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.'''
# The base_repository named bwa_base_repository_0100 is the dependent repository.
base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
- # The tool_repository named bwa_tool_repository_0100 is the required repository.
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
+ # The repository named package_bwa_0_5_9_0100 is the required repository.
+ 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' ] )
@@ -220,12 +220,12 @@
self.display_manage_repository_page( tool_repository,
strings_displayed=strings_displayed,
strings_not_displayed=strings_not_displayed )
- # Visit the manage page of the bwa_tool_repository_0100 to confirm the valid tool dependency definition.
+ # Visit the manage page of the package_bwa_0_5_9_0100 to confirm the valid tool dependency definition.
self.display_manage_repository_page( tool_repository,
strings_displayed=strings_displayed,
strings_not_displayed=strings_not_displayed )
# Visit the manage page of the bwa_base_repository_0100 to confirm the valid tool dependency definition
- # and the updated changeset revision (updated tip) of the bwa_tool_repository_0100 repository is displayed
+ # and the updated changeset revision (updated tip) of the package_bwa_0_5_9_0100 repository is displayed
# as the required repository revision. The original revision defined in the previously uploaded
# tool_dependencies.xml file will be updated.
self.display_manage_repository_page( base_repository,
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/functional/test_0170_complex_prior_installation_required.py
--- /dev/null
+++ b/test/tool_shed/functional/test_0170_complex_prior_installation_required.py
@@ -0,0 +1,137 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+matplotlib_repository_name = 'package_matplotlib_1_2_0170'
+matplotlib_repository_description = "Contains a tool dependency definition that downloads and compiles version 1.2.x of the the python matplotlib package."
+matplotlib_repository_long_description = "This repository is intended to be defined as a complex repository dependency within a separate repository."
+
+numpy_repository_name = 'package_numpy_1_7_0170'
+numpy_repository_description = "Contains a tool dependency definition that downloads and compiles version 1.7 of the the python numpy package."
+numpy_repository_long_description = "This repository is intended to be defined as a complex repository dependency within a separate repository."
+
+category_name = 'Test 0170 Prior Installation Complex Dependencies'
+category_description = 'Test 0170 Prior Installation Complex Dependencies'
+
+'''
+1. Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+2. Create a complex repository dependency on package_numpy_1_7_0170, and upload this to package_matplotlib_1_2_0170.
+3. Verify that package_matplotlib_1_2_0170 now depends on package_numpy_1_7_0170, and that the inherited tool dependency displays correctly.
+'''
+
+
+class TestComplexPriorInstallation( ShedTwillTestCase ):
+ '''Test features related to datatype converters.'''
+
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts."""
+ 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' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ 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' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+
+ def test_0005_create_matplotlib_repository( self ):
+ '''Create and populate the package_matplotlib_1_2_0170 repository.'''
+ '''
+ This is step 1 - Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+ '''
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name=matplotlib_repository_name,
+ description=matplotlib_repository_description,
+ long_description=matplotlib_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='package_matplotlib/package_matplotlib_1_2.tar',
+ filepath=None,
+ valid_tools_only=False,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded matplotlib tool dependency tarball.',
+ strings_displayed=['orphan'],
+ strings_not_displayed=[] )
+
+ def test_0010_create_numpy_repository( self ):
+ '''Create and populate the package_numpy_1_7_0170 repository.'''
+ '''
+ This is step 1 - Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+ '''
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name=numpy_repository_name,
+ description=numpy_repository_description,
+ long_description=numpy_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='package_numpy/package_numpy_1_7.tar',
+ filepath=None,
+ valid_tools_only=False,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded numpy tool dependency tarball.',
+ strings_displayed=['orphan'],
+ strings_not_displayed=[] )
+
+ def test_0015_create_complex_repository_dependency( self ):
+ '''Create a dependency on package_numpy_1_7_0170.'''
+ '''
+ This is step 2 - Create a complex repository dependency on package_numpy_1_7_0170, and upload this to package_matplotlib_1_2_0170.
+ package_matplotlib_1_2_0170 should depend on package_numpy_1_7_0170, with prior_installation_required
+ set to True. When matplotlib is selected for installation, the result should be that numpy is compiled
+ and installed first.
+ '''
+ numpy_repository = test_db_util.get_repository_by_name_and_owner( numpy_repository_name, common.test_user_1_name )
+ matplotlib_repository = test_db_util.get_repository_by_name_and_owner( matplotlib_repository_name, common.test_user_1_name )
+ # Generate the new dependency XML. Normally, the create_repository_dependency method would be used for this, but
+ # it replaces any existing tool or repository dependency XML file with the generated contents. This is undesirable
+ # in this case, because matplotlib already has an additional tool dependency definition that we don't want to
+ # overwrite.
+ new_xml = ' <package name="numpy" version="1.7">\n'
+ new_xml += ' <repository toolshed="%s" name="%s" owner="%s" changeset_revision="%s" prior_installation_required="True" />\n'
+ new_xml += ' </package>\n'
+ url = self.url
+ name = numpy_repository.name
+ owner = numpy_repository.user.username
+ changeset_revision = self.get_repository_tip( numpy_repository )
+ processed_xml = new_xml % ( url, name, owner, changeset_revision )
+ original_xml = file( self.get_filename( 'package_matplotlib/tool_dependencies.xml' ), 'r' ).read()
+ dependency_xml_path = self.generate_temp_path( 'test_0170', additional_paths=[ 'matplotlib' ] )
+ new_xml_file = os.path.join( dependency_xml_path, 'tool_dependencies.xml' )
+ file( new_xml_file, 'w' ).write( original_xml.replace( '<!--NUMPY-->', processed_xml ) )
+ # Upload the generated complex repository dependency XML to the matplotlib repository.
+ self.upload_file( matplotlib_repository,
+ filename='tool_dependencies.xml',
+ filepath=dependency_xml_path,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded complex repository dependency on numpy 1.7.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0020_verify_generated_dependency( self ):
+ '''Verify that matplotlib now has a package tool dependency and a complex repository dependency.'''
+ '''
+ This is step 3 - Verify that package_matplotlib_1_2_0170 now depends on package_numpy_1_7_0170, and that the inherited tool
+ dependency displays correctly.
+ 'Inhherited' in this case means that matplotlib should show a package tool dependency on numpy version 1.7, and a repository
+ dependency on the latest revision of package_numpy_1_7_0170.
+ '''
+ numpy_repository = test_db_util.get_repository_by_name_and_owner( numpy_repository_name, common.test_user_1_name )
+ matplotlib_repository = test_db_util.get_repository_by_name_and_owner( matplotlib_repository_name, common.test_user_1_name )
+ changeset_revision = self.get_repository_tip( numpy_repository )
+ self.check_repository_dependency( matplotlib_repository, depends_on_repository=numpy_repository )
+ self.display_manage_repository_page( matplotlib_repository, strings_displayed=[ 'numpy', '1.7', 'package', changeset_revision ] )
+
+
\ No newline at end of file
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b 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
@@ -3,11 +3,11 @@
bwa_base_repository_name = 'bwa_base_repository_0100'
bwa_base_repository_description = "BWA Base"
-bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at bwa_tool_repository_0100"
+bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at package_bwa_0_5_9_0100"
-bwa_tool_repository_name = 'bwa_tool_repository_0100'
-bwa_tool_repository_description = "BWA Tool"
-bwa_tool_repository_long_description = "BWA repository with a package tool dependency defined for BWA 0.5.9."
+bwa_package_repository_name = 'package_bwa_0_5_9_0100'
+bwa_package_repository_description = "BWA Tool"
+bwa_package_repository_long_description = "BWA repository with a package tool dependency defined to compile and install BWA 0.5.9."
category_name = 'Test 0100 Complex Repository Dependencies'
category_description = 'Test 0100 Complex Repository Dependencies'
@@ -30,15 +30,15 @@
assert admin_user is not None, 'Problem retrieving user with email %s from the database' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
- def test_0005_create_bwa_tool_repository( self ):
+ def test_0005_create_bwa_package_repository( self ):
'''Create and populate bwa_tool_0100.'''
global running_standalone
category = self.create_category( name=category_name, description=category_description )
self.logout()
self.login( email=common.test_user_1_email, username=common.test_user_1_name )
- repository = self.get_or_create_repository( name=bwa_tool_repository_name,
- description=bwa_tool_repository_description,
- long_description=bwa_tool_repository_long_description,
+ repository = self.get_or_create_repository( name=bwa_package_repository_name,
+ description=bwa_package_repository_description,
+ long_description=bwa_package_repository_long_description,
owner=common.test_user_1_name,
category_id=self.security.encode_id( category.id ),
strings_displayed=[] )
@@ -73,7 +73,7 @@
owner=common.test_user_1_name,
category_id=self.security.encode_id( category.id ),
strings_displayed=[] )
- tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_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 )
self.upload_file( repository,
filename='bwa/complex/bwa_base.tar',
filepath=None,
@@ -91,7 +91,7 @@
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'shed' ] )
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
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 )
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = 'http://http://this is not an url!'
name = tool_repository.name
owner = tool_repository.user.username
@@ -113,7 +113,7 @@
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'shed' ] )
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
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 )
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
name = 'invalid_repository!?'
owner = tool_repository.user.username
@@ -135,7 +135,7 @@
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'shed' ] )
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
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 )
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
name = tool_repository.name
owner = 'invalid_owner!?'
@@ -157,7 +157,7 @@
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'shed' ] )
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
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 )
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
url = self.url
name = tool_repository.name
owner = tool_repository.user.username
@@ -173,11 +173,11 @@
version='0.5.9' )
def test_0035_generate_valid_complex_repository_dependency( self ):
- '''Generate and upload a valid tool_dependencies.xml file that specifies bwa_tool_repository_0100.'''
+ '''Generate and upload a valid tool_dependencies.xml file that specifies package_bwa_0_5_9_0100.'''
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_tool_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 )
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
@@ -199,7 +199,7 @@
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_tool_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' ] )
@@ -225,7 +225,7 @@
self.galaxy_logout()
self.galaxy_login( email=common.admin_email, username=common.admin_username )
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 )
+ tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_package_repository_name, common.test_user_1_name )
preview_strings_displayed = [ tool_repository.name, self.get_repository_tip( tool_repository ) ]
self.install_repository( bwa_base_repository_name,
common.test_user_1_name,
@@ -238,19 +238,19 @@
def test_0050_verify_installed_repositories( self ):
'''Verify that the installed repositories are displayed properly.'''
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_tool_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 )
strings_displayed = [ 'bwa_base_repository_0100', 'user1', base_repository.installed_changeset_revision ]
- strings_displayed.extend( [ 'bwa_tool_repository_0100', 'user1', tool_repository.installed_changeset_revision ] )
+ strings_displayed.extend( [ 'package_bwa_0_5_9_0100', 'user1', tool_repository.installed_changeset_revision ] )
strings_displayed.append( self.url.replace( 'http://', '' ) )
self.display_galaxy_browse_repositories_page( strings_displayed=strings_displayed, strings_not_displayed=[] )
- strings_displayed = [ 'bwa_tool_repository_0100', 'user1', tool_repository.installed_changeset_revision ]
+ strings_displayed = [ 'package_bwa_0_5_9_0100', 'user1', tool_repository.installed_changeset_revision ]
strings_not_displayed = [ 'Missing tool dependencies' ]
self.display_installed_repository_manage_page( tool_repository,
strings_displayed=strings_displayed,
strings_not_displayed=strings_not_displayed )
strings_displayed = [ 'bwa_base_repository_0100',
'user1',
- 'bwa_tool_repository_0100',
+ 'package_bwa_0_5_9_0100',
base_repository.installed_changeset_revision,
tool_repository.installed_changeset_revision ]
strings_not_displayed = [ 'Missing tool dependencies' ]
@@ -261,7 +261,7 @@
def test_0055_verify_complex_tool_dependency( self ):
'''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_tool_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',
@@ -274,17 +274,17 @@
if tool_repository.installed_changeset_revision not in contents:
raise AssertionError( 'Installed changeset revision %s not found in env.sh.\nContents of env.sh: %s' % \
( tool_repository.installed_changeset_revision, contents ) )
- if 'bwa_tool_repository_0100' not in contents:
- raise AssertionError( 'Repository name bwa_tool_repository_0100 not found in env.sh.\nContents of env.sh: %s' % contents )
+ if 'package_bwa_0_5_9_0100' not in contents:
+ raise AssertionError( 'Repository name package_bwa_0_5_9_0100 not found in env.sh.\nContents of env.sh: %s' % contents )
def test_0060_verify_tool_dependency_uninstallation( self ):
- '''Uninstall the bwa_tool_repository_0100 repository.'''
+ '''Uninstall the package_bwa_0_5_9_0100 repository.'''
'''
Uninstall the repository that defines an orphan tool dependency on BWA 0.5.9, and verify
that this results in the compiled binary package also being removed.
'''
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_tool_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 )
self.uninstall_repository( tool_repository, remove_from_disk=True )
env_sh_path = os.path.join( self.galaxy_tool_dependency_dir,
'bwa',
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/functional/test_1170_complex_prior_installation_required.py
--- /dev/null
+++ b/test/tool_shed/functional/test_1170_complex_prior_installation_required.py
@@ -0,0 +1,181 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+matplotlib_repository_name = 'package_matplotlib_1_2_0170'
+matplotlib_repository_description = "Contains a tool dependency definition that downloads and compiles version 1.2.x of the the python matplotlib package."
+matplotlib_repository_long_description = "This repository is intended to be defined as a complex repository dependency within a separate repository."
+
+numpy_repository_name = 'package_numpy_1_7_0170'
+numpy_repository_description = "Contains a tool dependency definition that downloads and compiles version 1.7 of the the python numpy package."
+numpy_repository_long_description = "This repository is intended to be defined as a complex repository dependency within a separate repository."
+
+category_name = 'Test 0170 Prior Installation Complex Dependencies'
+category_description = 'Test 0170 Prior Installation Complex Dependencies'
+
+'''
+1. Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+2. Create a complex repository dependency on package_numpy_1_7_0170, and upload this to package_matplotlib_1_2_0170.
+3. Verify that package_matplotlib_1_2_0170 now depends on package_numpy_1_7_0170, and that the inherited tool dependency displays correctly.
+4. Install package_matplotlib_1_2_0170 with repository dependencies.
+5. Verify that the prior_installation_required attribute resulted in package_numpy_1_7_0170 being installed first.
+'''
+
+running_standalone = False
+
+
+class TestComplexPriorInstallation( ShedTwillTestCase ):
+ '''Test features related to datatype converters.'''
+
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts."""
+ 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' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ 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' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+
+ def test_0005_create_matplotlib_repository( self ):
+ '''Create and populate the package_matplotlib_1_2_0170 repository.'''
+ '''
+ This is step 1 - Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+ '''
+ global running_standalone
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name=matplotlib_repository_name,
+ description=matplotlib_repository_description,
+ long_description=matplotlib_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ if self.repository_is_new( repository ):
+ running_standalone = True
+ self.upload_file( repository,
+ filename='package_matplotlib/package_matplotlib_1_2.tar',
+ filepath=None,
+ valid_tools_only=False,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded matplotlib tool dependency tarball.',
+ strings_displayed=['orphan'],
+ strings_not_displayed=[] )
+
+ def test_0010_create_numpy_repository( self ):
+ '''Create and populate the package_numpy_1_7_0170 repository.'''
+ '''
+ This is step 1 - Create and populate repositories package_matplotlib_1_2_0170 and package_numpy_1_7_0170.
+ '''
+ global running_standalone
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ if running_standalone:
+ repository = self.get_or_create_repository( name=numpy_repository_name,
+ description=numpy_repository_description,
+ long_description=numpy_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='package_numpy/package_numpy_1_7.tar',
+ filepath=None,
+ valid_tools_only=False,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded numpy tool dependency tarball.',
+ strings_displayed=['orphan'],
+ strings_not_displayed=[] )
+
+ def test_0015_create_complex_repository_dependency( self ):
+ '''Create a dependency on package_numpy_1_7_0170.'''
+ '''
+ This is step 2 - Create a complex repository dependency on package_numpy_1_7_0170, and upload this to package_matplotlib_1_2_0170.
+ package_matplotlib_1_2_0170 should depend on package_numpy_1_7_0170, with prior_installation_required
+ set to True. When matplotlib is selected for installation, the result should be that numpy is compiled
+ and installed first.
+ '''
+ global running_standalone
+ numpy_repository = test_db_util.get_repository_by_name_and_owner( numpy_repository_name, common.test_user_1_name )
+ matplotlib_repository = test_db_util.get_repository_by_name_and_owner( matplotlib_repository_name, common.test_user_1_name )
+ # Generate the new dependency XML. Normally, the create_repository_dependency method would be used for this, but
+ # it replaces any existing tool or repository dependency XML file with the generated contents. This is undesirable
+ # in this case, because matplotlib already has an additional tool dependency definition that we don't want to
+ # overwrite.
+ new_xml = ' <package name="numpy" version="1.7">\n'
+ new_xml += ' <repository toolshed="%s" name="%s" owner="%s" changeset_revision="%s" prior_installation_required="True" />\n'
+ new_xml += ' </package>\n'
+ url = self.url
+ name = numpy_repository.name
+ owner = numpy_repository.user.username
+ if running_standalone:
+ changeset_revision = self.get_repository_tip( numpy_repository )
+ processed_xml = new_xml % ( url, name, owner, changeset_revision )
+ original_xml = file( self.get_filename( 'package_matplotlib/tool_dependencies.xml' ), 'r' ).read()
+ dependency_xml_path = self.generate_temp_path( 'test_0170', additional_paths=[ 'matplotlib' ] )
+ new_xml_file = os.path.join( dependency_xml_path, 'tool_dependencies.xml' )
+ file( new_xml_file, 'w' ).write( original_xml.replace( '<!--NUMPY-->', processed_xml ) )
+ # Upload the generated complex repository dependency XML to the matplotlib repository.
+ self.upload_file( matplotlib_repository,
+ filename='tool_dependencies.xml',
+ filepath=dependency_xml_path,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded complex repository dependency on numpy 1.7.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0020_verify_generated_dependency( self ):
+ '''Verify that matplotlib now has a package tool dependency and a complex repository dependency.'''
+ '''
+ This is step 3 - Verify that package_matplotlib_1_2_0170 now depends on package_numpy_1_7_0170, and that the inherited tool
+ dependency displays correctly.
+ 'Inhherited' in this case means that matplotlib should show a package tool dependency on numpy version 1.7, and a repository
+ dependency on the latest revision of package_numpy_1_7_0170.
+ '''
+ numpy_repository = test_db_util.get_repository_by_name_and_owner( numpy_repository_name, common.test_user_1_name )
+ matplotlib_repository = test_db_util.get_repository_by_name_and_owner( matplotlib_repository_name, common.test_user_1_name )
+ changeset_revision = self.get_repository_tip( numpy_repository )
+ self.check_repository_dependency( matplotlib_repository, depends_on_repository=numpy_repository )
+ self.display_manage_repository_page( matplotlib_repository, strings_displayed=[ 'numpy', '1.7', 'package', changeset_revision ] )
+
+ def test_0025_install_matplotlib_repository( self ):
+ '''Install the package_matplotlib_1_2_0170 repository.'''
+ '''
+ This is step 4 - Install package_matplotlib_1_2_0170 with repository dependencies.
+ '''
+ self.galaxy_logout()
+ self.galaxy_login( email=common.admin_email, username=common.admin_username )
+ matplotlib_repository = test_db_util.get_repository_by_name_and_owner( matplotlib_repository_name, common.test_user_1_name )
+ preview_strings_displayed = [ 'package_matplotlib_1_2_0170', self.get_repository_tip( matplotlib_repository ) ]
+ strings_displayed = [ 'Choose the tool panel section' ]
+ self.install_repository( matplotlib_repository_name,
+ common.test_user_1_name,
+ category_name,
+ install_tool_dependencies=False,
+ install_repository_dependencies=True,
+ preview_strings_displayed=preview_strings_displayed,
+ strings_displayed=[],
+ strings_not_displayed=[],
+ post_submit_strings_displayed=[ 'package_matplotlib_1_2_0170', 'new' ],
+ includes_tools_for_display_in_tool_panel=False )
+
+ def test_0030_verify_installation_order( self ):
+ '''Verify that the numpy repository was installed before the matplotlib repository.'''
+ '''
+ This is step 5 - Verify that the prior_installation_required attribute resulted in package_numpy_1_7_0170 being installed first.
+ In the previous step, package_matplotlib_1_2_0170 was selected for installation, but package_numpy_1_7_0170 had the
+ prior_installation_required attribute set. Confirm that this resulted in package_numpy_1_7_0170 being installed before
+ package_matplotlib_1_2_0170.
+ '''
+ matplotlib_repository = test_db_util.get_installed_repository_by_name_owner( matplotlib_repository_name, common.test_user_1_name )
+ numpy_repository = test_db_util.get_installed_repository_by_name_owner( numpy_repository_name, common.test_user_1_name )
+ assert matplotlib_repository.update_time > numpy_repository.update_time, \
+ 'Error: package_numpy_1_7_0170 shows a later update time than package_matplotlib_1_2_0170'
+
\ No newline at end of file
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/test_data/package_matplotlib/package_matplotlib_1_2.tar
Binary file test/tool_shed/test_data/package_matplotlib/package_matplotlib_1_2.tar has changed
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/test_data/package_matplotlib/tool_dependencies.xml
--- /dev/null
+++ b/test/tool_shed/test_data/package_matplotlib/tool_dependencies.xml
@@ -0,0 +1,25 @@
+<tool_dependency>
+<!--NUMPY-->
+ <package name="matplotlib" version="1.2.1">
+ <install version="1.0">
+ <actions>
+ <action type="download_by_url">https://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-…</action>
+ <action type="shell_command">wget http://downloads.sourceforge.net/project/freetype/freetype2/2.4.11/freetype…</action>
+ <action type="shell_command">tar xfvj freetype-2.4.11.tar.bz2 &&
+ cd freetype-2.4.11 &&
+ ./configure --prefix=$INSTALL_DIR/freetype/build &&
+ make &&
+ make install</action>
+ <action type="make_directory">$INSTALL_DIR/lib/python</action>
+ <action type="shell_command">export PYTHONPATH=$PYTHONPATH:$INSTALL_DIR/lib/python &&
+ export CPLUS_INCLUDE_PATH=$INSTALL_DIR/freetype/build/include:$INSTALL_DIR/freetype/build/include/freetype2/ &&
+ export LIBRARY_PATH=$INSTALL_DIR/freetype/build/lib/ &&
+ python setup.py install --home $INSTALL_DIR --install-scripts $INSTALL_DIR/bin</action>
+ <action type="set_environment">
+ <environment_variable name="PYTHONPATH" action="append_to">$INSTALL_DIR/lib/python</environment_variable>
+ </action>
+ </actions>
+ </install>
+ <readme>Compiling matplotlib requires a C compiler (typically gcc), freetype2, numpy and libpng.</readme>
+ </package>
+</tool_dependency>
diff -r a8139a367ed3de938f5d71336a06f1f768132469 -r 1037ab5b4f761c104b01cf0aee9222d28a67034b test/tool_shed/test_data/package_numpy/package_numpy_1_7.tar
Binary file test/tool_shed/test_data/package_numpy/package_numpy_1_7.tar has changed
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.
1
0
commit/galaxy-central: greg: Abbreviate not applicable in tool shed grids.
by commits-noreply@bitbucket.org 22 Apr '13
by commits-noreply@bitbucket.org 22 Apr '13
22 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a8139a367ed3/
Changeset: a8139a367ed3
User: greg
Date: 2013-04-22 16:52:29
Summary: Abbreviate not applicable in tool shed grids.
Affected #: 1 file
diff -r 77f32521f235ace1773e54389d7b536a9f5235a5 -r a8139a367ed3de938f5d71336a06f1f768132469 lib/tool_shed/grids/repository_grids.py
--- a/lib/tool_shed/grids/repository_grids.py
+++ b/lib/tool_shed/grids/repository_grids.py
@@ -154,9 +154,9 @@
return 'yes'
else:
return 'no'
- return 'not applicable'
+ return 'n/a'
except:
- return 'not applicable'
+ return 'n/a'
class DescriptionColumn( grids.TextColumn ):
@@ -748,9 +748,9 @@
return 'yes'
else:
return 'no'
- return 'not applicable'
+ return 'n/a'
except:
- return 'not applicable'
+ return 'n/a'
class DoNotTestColumn( grids.BooleanColumn ):
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.
1
0
commit/galaxy-central: greg: Handle repositories whith no metadata revisions when displaying the verified tool column in the tool shed.
by commits-noreply@bitbucket.org 22 Apr '13
by commits-noreply@bitbucket.org 22 Apr '13
22 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/77f32521f235/
Changeset: 77f32521f235
User: greg
Date: 2013-04-22 16:50:10
Summary: Handle repositories whith no metadata revisions when displaying the verified tool column in the tool shed.
Affected #: 1 file
diff -r 5138b63cc96435ea72415796aa3daabfbfe2f23f -r 77f32521f235ace1773e54389d7b536a9f5235a5 lib/tool_shed/grids/repository_grids.py
--- a/lib/tool_shed/grids/repository_grids.py
+++ b/lib/tool_shed/grids/repository_grids.py
@@ -147,13 +147,16 @@
def get_value( self, trans, grid, repository ):
# This column will display the value associated with the currently displayed metadata revision.
- displayed_metadata_revision = repository.metadata_revisions[ -1 ]
- if displayed_metadata_revision.includes_tools:
- if displayed_metadata_revision.tools_functionally_correct:
- return 'yes'
- else:
- return 'no'
- return 'not applicable'
+ try:
+ displayed_metadata_revision = repository.metadata_revisions[ -1 ]
+ if displayed_metadata_revision.includes_tools:
+ if displayed_metadata_revision.tools_functionally_correct:
+ return 'yes'
+ else:
+ return 'no'
+ return 'not applicable'
+ except:
+ return 'not applicable'
class DescriptionColumn( grids.TextColumn ):
@@ -735,13 +738,19 @@
class ToolsFunctionallyCorrectColumn( grids.BooleanColumn ):
- def get_value( self, trans, grid, repository_metadata ):
- if repository_metadata.includes_tools:
- if repository_metadata.tools_functionally_correct:
- return 'yes'
- else:
- return 'no'
- return 'not applicable'
+
+ def get_value( self, trans, grid, repository ):
+ # This column will display the value associated with the currently displayed metadata revision.
+ try:
+ displayed_metadata_revision = repository.metadata_revisions[ -1 ]
+ if displayed_metadata_revision.includes_tools:
+ if displayed_metadata_revision.tools_functionally_correct:
+ return 'yes'
+ else:
+ return 'no'
+ return 'not applicable'
+ except:
+ return 'not applicable'
class DoNotTestColumn( grids.BooleanColumn ):
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.
1
0
commit/galaxy-central: greg: Clean up the main repositories by category grid and add a tools verified column.
by commits-noreply@bitbucket.org 22 Apr '13
by commits-noreply@bitbucket.org 22 Apr '13
22 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/5138b63cc964/
Changeset: 5138b63cc964
User: greg
Date: 2013-04-22 16:44:20
Summary: Clean up the main repositories by category grid and add a tools verified column.
Affected #: 2 files
diff -r cac1c2a9247bf1f2c7f78275a6d11bf209867fb2 -r 5138b63cc96435ea72415796aa3daabfbfe2f23f lib/galaxy/webapps/tool_shed/controllers/repository.py
--- a/lib/galaxy/webapps/tool_shed/controllers/repository.py
+++ b/lib/galaxy/webapps/tool_shed/controllers/repository.py
@@ -61,6 +61,7 @@
my_writable_repositories_grid = repository_grids.MyWritableRepositoriesGrid()
repositories_by_user_grid = repository_grids.RepositoriesByUserGrid()
repositories_i_own_grid = repository_grids.RepositoriesIOwnGrid()
+ repositories_in_category_grid = repository_grids.RepositoriesInCategoryGrid()
repository_dependencies_grid = repository_grids.RepositoryDependenciesGrid()
repository_grid = repository_grids.RepositoryGrid()
# The repository_metadata_grid is not currently displayed, but is sub-classed by several grids.
@@ -202,13 +203,14 @@
elif operation == "my_writable_repositories":
return self.my_writable_repositories_grid( trans, **kwd )
elif operation == "repositories_by_category":
- # Eliminate the current filters if any exist.
- for k, v in kwd.items():
- if k.startswith( 'f-' ):
- del kwd[ k ]
category_id = kwd.get( 'id', None )
- category = suc.get_category( trans, category_id )
- kwd[ 'f-Category.name' ] = category.name
+ message = kwd.get( 'message', '' )
+ status = kwd.get( 'status', 'done' )
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='browse_repositories_in_category',
+ id=category_id,
+ message=message,
+ status=status ) )
elif operation == "receive email alerts":
if trans.user:
if kwd[ 'id' ]:
@@ -244,7 +246,7 @@
**kwd ) )
user_id = kwd.get( 'user_id', None )
if user_id is None:
- # The received id is the repository id, so we need to get the id of the user that uploaded the repository.
+ # The received id is the repository id, so we need to get the id of the user that owns the repository.
repository_id = kwd.get( 'id', None )
if repository_id:
repository = suc.get_repository_in_tool_shed( trans, repository_id )
@@ -263,6 +265,40 @@
return self.repositories_by_user_grid( trans, **kwd )
@web.expose
+ def browse_repositories_in_category( self, trans, **kwd ):
+ if 'operation' in kwd:
+ operation = kwd[ 'operation' ].lower()
+ if operation == "view_or_manage_repository":
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='view_or_manage_repository',
+ **kwd ) )
+ if operation == 'repositories_by_user':
+ user_id = kwd.get( 'user_id', None )
+ if user_id is None:
+ # The received id is the repository id, so we need to get the id of the user that owns the repository.
+ repository_id = kwd.get( 'id', None )
+ if repository_id:
+ repository = suc.get_repository_in_tool_shed( trans, repository_id )
+ user_id = trans.security.encode_id( repository.user.id )
+ user = suc.get_user( trans, user_id )
+ self.repositories_by_user_grid.title = "Repositories owned by %s" % user.username
+ kwd[ 'user_id' ] = user_id
+ return self.repositories_by_user_grid( trans, **kwd )
+ selected_changeset_revision, repository = self.__get_repository_from_refresh_on_change( trans, **kwd )
+ if repository:
+ # The user selected a repository revision which results in a refresh_on_change.
+ return trans.response.send_redirect( web.url_for( controller='repository',
+ action='view_or_manage_repository',
+ id=trans.security.encode_id( repository.id ),
+ changeset_revision=selected_changeset_revision ) )
+ category_id = kwd.get( 'id', None )
+ if category_id:
+ category = suc.get_category( trans, category_id )
+ if category:
+ self.repositories_in_category_grid.title = 'Category %s' % str( category.name )
+ return self.repositories_in_category_grid( trans, **kwd )
+
+ @web.expose
def browse_repository( self, trans, id, **kwd ):
params = util.Params( kwd )
message = util.restore_text( params.get( 'message', '' ) )
diff -r cac1c2a9247bf1f2c7f78275a6d11bf209867fb2 -r 5138b63cc96435ea72415796aa3daabfbfe2f23f lib/tool_shed/grids/repository_grids.py
--- a/lib/tool_shed/grids/repository_grids.py
+++ b/lib/tool_shed/grids/repository_grids.py
@@ -143,6 +143,19 @@
return escape_html( repository.revision( trans.app ) )
+ class ToolsFunctionallyCorrectColumn( grids.BooleanColumn ):
+
+ def get_value( self, trans, grid, repository ):
+ # This column will display the value associated with the currently displayed metadata revision.
+ displayed_metadata_revision = repository.metadata_revisions[ -1 ]
+ if displayed_metadata_revision.includes_tools:
+ if displayed_metadata_revision.tools_functionally_correct:
+ return 'yes'
+ else:
+ return 'no'
+ return 'not applicable'
+
+
class DescriptionColumn( grids.TextColumn ):
def get_value( self, trans, grid, repository ):
@@ -261,6 +274,60 @@
.outerjoin( model.Category.table )
+class RepositoriesInCategoryGrid( RepositoryGrid ):
+ title = "Category"
+
+ columns = [
+ RepositoryGrid.NameColumn( "Name",
+ key="name",
+ link=( lambda item: dict( controller="repository", operation="view_or_manage_repository", id=item.id ) ),
+ attach_popup=False ),
+ RepositoryGrid.DescriptionColumn( "Synopsis",
+ key="description",
+ attach_popup=False ),
+ RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
+ RepositoryGrid.UserColumn( "Owner",
+ model_class=model.User,
+ link=( lambda item: dict( controller="repository", operation="repositories_by_user", id=item.id ) ),
+ attach_popup=False,
+ key="User.username" ),
+ # Columns that are valid for filtering but are not visible.
+ RepositoryGrid.EmailColumn( "Email",
+ model_class=model.User,
+ key="email",
+ visible=False )
+ ]
+ columns.append( grids.MulticolFilterColumn( "Search repository name, description",
+ cols_to_filter=[ columns[0], columns[1] ],
+ key="free-text-search",
+ visible=False,
+ filterable="standard" ) )
+ operations = [ grids.GridOperation( "Receive email alerts",
+ allow_multiple=False,
+ condition=( lambda item: not item.deleted ),
+ async_compatible=False ) ]
+
+ def build_initial_query( self, trans, **kwd ):
+ category_id = kwd.get( 'id', None )
+ if category_id:
+ category = suc.get_category( trans, category_id )
+ if category:
+ return trans.sa_session.query( model.Repository ) \
+ .filter( and_( model.Repository.table.c.deleted == False,
+ model.Repository.table.c.deprecated == False ) ) \
+ .join( model.User.table ) \
+ .outerjoin( model.RepositoryCategoryAssociation.table ) \
+ .outerjoin( model.Category.table ) \
+ .filter( model.Category.table.c.name == category.name )
+ return trans.sa_session.query( model.Repository ) \
+ .filter( and_( model.Repository.table.c.deleted == False,
+ model.Repository.table.c.deprecated == False ) ) \
+ .join( model.User.table ) \
+ .outerjoin( model.RepositoryCategoryAssociation.table ) \
+ .outerjoin( model.Category.table )
+
+
class RepositoriesByUserGrid( RepositoryGrid ):
title = "Repositories by user"
columns = [
@@ -268,11 +335,11 @@
key="name",
link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
attach_popup=False ),
- RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ),
- RepositoryGrid.TipRevisionColumn( "Tip Revision" ),
RepositoryGrid.DescriptionColumn( "Synopsis",
key="description",
attach_popup=False ),
+ RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
RepositoryGrid.CategoryColumn( "Category",
model_class=model.Category,
key="Category.name",
@@ -304,7 +371,7 @@
link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
attach_popup=True ),
RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ),
- RepositoryGrid.TipRevisionColumn( "Tip Revision" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
RepositoryGrid.CategoryColumn( "Category",
model_class=model.Category,
key="Category.name",
@@ -343,7 +410,7 @@
link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
attach_popup=True ),
RepositoriesIOwnGrid.MetadataRevisionColumn( "Metadata Revisions" ),
- RepositoriesIOwnGrid.TipRevisionColumn( "Tip Revision" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
RepositoriesIOwnGrid.CategoryColumn( "Category",
model_class=model.Category,
key="Category.name",
@@ -403,7 +470,7 @@
link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
attach_popup=True ),
RepositoryGrid.MetadataRevisionColumn( "Metadata Revisions" ),
- RepositoryGrid.TipRevisionColumn( "Tip Revision" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
RepositoryGrid.UserColumn( "Owner",
model_class=model.User,
link=( lambda item: dict( operation="repositories_by_user", id=item.id ) ),
@@ -480,7 +547,7 @@
return query.filter( model.Category.name == column_filter )
- class RevisionColumn( grids.GridColumn ):
+ class InstallableRevisionColumn( grids.GridColumn ):
def __init__( self, col_name ):
grids.GridColumn.__init__( self, col_name )
@@ -502,7 +569,8 @@
RepositoryGrid.DescriptionColumn( "Synopsis",
key="description",
attach_popup=False ),
- RevisionColumn( "Installable Revisions" ),
+ InstallableRevisionColumn( "Installable Revisions" ),
+ RepositoryGrid.ToolsFunctionallyCorrectColumn( "Tools Verified" ),
RepositoryGrid.UserColumn( "Owner",
model_class=model.User,
attach_popup=False ),
@@ -668,9 +736,12 @@
class ToolsFunctionallyCorrectColumn( grids.BooleanColumn ):
def get_value( self, trans, grid, repository_metadata ):
- if repository_metadata.tools_functionally_correct:
- return 'yes'
- return ''
+ if repository_metadata.includes_tools:
+ if repository_metadata.tools_functionally_correct:
+ return 'yes'
+ else:
+ return 'no'
+ return 'not applicable'
class DoNotTestColumn( grids.BooleanColumn ):
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.
1
0
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/cac1c2a9247b/
Changeset: cac1c2a9247b
User: jgoecks
Date: 2013-04-20 21:04:07
Summary: (a) Fetch sample names before drawing variant track and (b) update dataset metadata when changed.
Affected #: 2 files
diff -r 9b46c246c9cffbf9cbaaf1398e3d1cf51a3c42f6 -r cac1c2a9247bf1f2c7f78275a6d11bf209867fb2 static/scripts/mvc/data.js
--- a/static/scripts/mvc/data.js
+++ b/static/scripts/mvc/data.js
@@ -20,8 +20,15 @@
},
initialize: function() {
- // -- Create and initialize metadata. --
+ // Set metadata.
+ // FIXME: pass back a metadata dict and then Backbone-relational
+ // can be used unpack metadata automatically.
+ this._set_metadata();
+ // Update metadata on change.
+ this.on('change', this._set_metadata, this);
+ },
+ _set_metadata: function() {
var metadata = new DatasetMetadata();
// Move metadata from dataset attributes to metadata object.
@@ -34,7 +41,8 @@
}
}, this);
- this.set('metadata', metadata);
+ // Because this is an internal change, silence it.
+ this.set('metadata', metadata, { 'silent': true });
},
/**
diff -r 9b46c246c9cffbf9cbaaf1398e3d1cf51a3c42f6 -r cac1c2a9247bf1f2c7f78275a6d11bf209867fb2 static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -4263,6 +4263,15 @@
},
/**
+ * Additional initialization required before drawing track for the first time.
+ */
+ predraw_init: function() {
+ if (!this.dataset.get_metadata('sample_names')) {
+ return this.dataset.fetch();
+ }
+ },
+
+ /**
* Actions to be taken after draw has been completed. Draw is completed when all tiles have been
* drawn/fetched and shown.
*/
https://bitbucket.org/galaxy/galaxy-central/commits/9b46c246c9cf/
Changeset: 9b46c246c9cf
User: jgoecks
Date: 2013-04-20 20:28:11
Summary: Trackster: refactor variant sample labels and fix line-height issues.
Affected #: 1 file
diff -r 71fdd146b95ce53735003afa282f51fa188398ad -r 9b46c246c9cffbf9cbaaf1398e3d1cf51a3c42f6 static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -4271,45 +4271,44 @@
// Add summary/sample labels if needed and not already included.
if ( !(tiles[0] instanceof SummaryTreeTile) && this.prefs.show_labels) {
+ var font_size;
+
// Add and/or style labels.
if (this.container_div.find('.yaxislabel.variant').length === 0) {
// Add summary and sample labels.
- // FIXME: label attributes could be cleaner by using CSS classes.
-
- // Add summary label.
- var summary_div_font_size = 10,
- summary_div = $("<div/>").text('Summary').addClass('yaxislabel variant top').css({
- 'font-size': summary_div_font_size + 'px'
- });
- this.container_div.prepend(summary_div);
-
- // Adjust summary label to middle of summary.
- var base_offset = summary_div.position().top;
- summary_div.css('top', base_offset + (this.prefs.summary_height - summary_div_font_size) / 2 + 'px');
-
+ // Add summary label to middle of summary area.
+ font_size = this.prefs.summary_height / 2;
+ this.tiles_div.prepend(
+ $("<div/>").text('Summary').addClass('yaxislabel variant top').css({
+ 'font-size': font_size + 'px',
+ 'top': (this.prefs.summary_height - font_size) / 2 + 'px'
+ })
+ );
+
// Show sample labels.
if (this.prefs.show_sample_data) {
- var samples_div_html = '';
- _.each(this.dataset.get('metadata').get('sample_names'), function(name) {
- samples_div_html += (name + '<br>');
- });
+ var samples_div_html = this.dataset.get('metadata').get('sample_names').join('<br/>');
- var samples_div = $("<div/>").html(samples_div_html).addClass('yaxislabel variant top sample').css({
- // +2 for padding
- 'top': base_offset + this.prefs.summary_height + 2,
- });
- this.container_div.prepend(samples_div);
+ this.tiles_div.prepend(
+ $("<div/>").html(samples_div_html).addClass('yaxislabel variant top sample').css({
+ // +2 for padding
+ 'top': this.prefs.summary_height + 2,
+ })
+ );
}
}
// Style labels.
// Match sample font size to mode.
- $(this.container_div).find('.sample').css('font-size', (this.mode === 'Squish' ? 5 : 10) + 'px');
+ font_size = (this.mode === 'Squish' ? 5 : 10) + 'px';
+ $(this.tiles_div).find('.sample').css({
+ 'font-size': font_size,
+ 'line-height': font_size
+ });
// Color labels to preference color.
- $(this.container_div).find('.yaxislabel').css('color', this.prefs.label_color);
-
+ $(this.tiles_div).find('.yaxislabel').css('color', this.prefs.label_color);
}
else {
// Remove all labels.
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.
1
0
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/71fdd146b95c/
Changeset: 71fdd146b95c
User: jgoecks
Date: 2013-04-20 17:05:42
Summary: Visual analysis enhancements: (a) do not manually convert to json because it is not necessary and (b) gracefully handle missing sample names.
Affected #: 2 files
diff -r 034b2d6118caa1dc6808f1570e92d927973a87ed -r 71fdd146b95ce53735003afa282f51fa188398ad lib/galaxy/webapps/galaxy/api/tools.py
--- a/lib/galaxy/webapps/galaxy/api/tools.py
+++ b/lib/galaxy/webapps/galaxy/api/tools.py
@@ -193,7 +193,7 @@
original_dataset = self.get_dataset( trans, payload[ 'target_dataset_id' ], check_ownership=False, check_accessible=True )
msg = self.check_dataset_state( trans, original_dataset )
if msg:
- return to_json_string( msg )
+ return msg
#
# Set tool parameters--except non-hidden dataset parameters--using combination of
@@ -223,7 +223,8 @@
for jida in original_job.input_datasets:
input_dataset = jida.dataset
data_provider = data_provider_registry.get_data_provider( trans, original_dataset=input_dataset, source='data' )
- if data_provider and not data_provider.converted_dataset:
+ if data_provider and ( not data_provider.converted_dataset
+ or data_provider.converted_dataset.state != trans.app.model.Dataset.states.OK ):
# Can convert but no converted dataset yet, so return message about why.
data_sources = input_dataset.datatype.data_sources
msg = input_dataset.convert_dataset( trans, data_sources[ 'data' ] )
@@ -233,7 +234,7 @@
# Return any messages generated during conversions.
return_message = self._get_highest_priority_msg( messages_list )
if return_message:
- return to_json_string( return_message )
+ return return_message
#
# Set target history (the history that tool will use for inputs/outputs).
@@ -371,7 +372,7 @@
# Add dataset to tool's parameters.
if not set_param_value( tool_params, jida.name, subset_dataset ):
- return to_json_string( { "error" : True, "message" : "error setting parameter %s" % jida.name } )
+ return { "error" : True, "message" : "error setting parameter %s" % jida.name }
#
# Execute tool and handle outputs.
@@ -382,7 +383,7 @@
job_params={ "source" : "trackster" } )
except Exception, e:
# Lots of things can go wrong when trying to execute tool.
- return to_json_string( { "error" : True, "message" : e.__class__.__name__ + ": " + str(e) } )
+ return { "error" : True, "message" : e.__class__.__name__ + ": " + str(e) }
if run_on_regions:
for output in subset_job_outputs.values():
output.visible = False
diff -r 034b2d6118caa1dc6808f1570e92d927973a87ed -r 71fdd146b95ce53735003afa282f51fa188398ad static/scripts/viz/trackster/tracks.js
--- a/static/scripts/viz/trackster/tracks.js
+++ b/static/scripts/viz/trackster/tracks.js
@@ -1821,7 +1821,7 @@
// Start with this status message.
//new_track.container_div.addClass("pending");
- //new_track.content_div.text("Converting input data so that it can be used quickly with tool.");
+ //new_track.content_div.html(DATA_PENDING);
$.when(ss_deferred.go()).then(function(response) {
if (response === "no converter") {
@@ -4234,7 +4234,23 @@
}
else {
var dummy_painter = new (this.painter)(null, null, null, this.prefs, mode);
- return dummy_painter.get_required_height(this.dataset.get_metadata('sample_names').length);
+ // HACK: sample_names is not be defined when dataset definition is fetched before
+ // dataset is complete (as is done when running tools). In that case, fall back on
+ // # of samples in data. This can be fixed by re-requesting dataset definition
+ // in init.
+ var num_samples = ( this.dataset.get_metadata('sample_names') ? this.dataset.get_metadata('sample_names').length : 0);
+ if (num_samples === 0 && result.data.length !== 0) {
+ // Sample data is separated by commas, so this computes # of samples:
+ num_samples = result.data[0][7].match(/,/g);
+ if ( num_samples === null ) {
+ num_samples = 1;
+ }
+ else {
+ num_samples = num_samples.length + 1;
+ }
+ }
+
+ return dummy_painter.get_required_height(num_samples);
}
},
https://bitbucket.org/galaxy/galaxy-central/commits/034b2d6118ca/
Changeset: 034b2d6118ca
User: jgoecks
Date: 2013-04-20 16:08:29
Summary: Remove debugging statement
Affected #: 1 file
diff -r 1fa1583641474f160ca1569ec91faf8f3d7093c8 -r 034b2d6118caa1dc6808f1570e92d927973a87ed lib/galaxy/visualization/data_providers/genome.py
--- a/lib/galaxy/visualization/data_providers/genome.py
+++ b/lib/galaxy/visualization/data_providers/genome.py
@@ -796,7 +796,6 @@
# Search for and yield other data lines.
for data_line in source:
if line_in_region( data_line, chrom, start, end ):
- print chrom, start, end, ">>>", data_line,
yield data_line
return line_filter_iter()
https://bitbucket.org/galaxy/galaxy-central/commits/1fa158364147/
Changeset: 1fa158364147
User: jgoecks
Date: 2013-04-20 16:06:26
Summary: Use tabix rather than interval index for pileup data indexing.
Affected #: 2 files
diff -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 -r 1fa1583641474f160ca1569ec91faf8f3d7093c8 datatypes_conf.xml.sample
--- a/datatypes_conf.xml.sample
+++ b/datatypes_conf.xml.sample
@@ -160,7 +160,8 @@
</datatype><datatype extension="pdf" type="galaxy.datatypes.images:Pdf" mimetype="application/pdf"/><datatype extension="pileup" type="galaxy.datatypes.tabular:Pileup" display_in_upload="true">
- <converter file="pileup_to_interval_index_converter.xml" target_datatype="interval_index"/>
+ <converter file="interval_to_bgzip_converter.xml" target_datatype="bgzip"/>
+ <converter file="interval_to_tabix_converter.xml" target_datatype="tabix" depends_on="bgzip"/></datatype><datatype extension="png" type="galaxy.datatypes.images:Png" mimetype="image/png"/><datatype extension="qual" type="galaxy.datatypes.qualityscore:QualityScore" />
diff -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 -r 1fa1583641474f160ca1569ec91faf8f3d7093c8 lib/galaxy/datatypes/tabular.py
--- a/lib/galaxy/datatypes/tabular.py
+++ b/lib/galaxy/datatypes/tabular.py
@@ -474,11 +474,12 @@
"""Tab delimited data in pileup (6- or 10-column) format"""
file_ext = "pileup"
line_class = "genomic coordinate"
- data_sources = { "data": "interval_index" }
+ data_sources = { "data": "tabix" }
"""Add metadata elements"""
MetadataElement( name="chromCol", default=1, desc="Chrom column", param=metadata.ColumnParameter )
MetadataElement( name="startCol", default=2, desc="Start column", param=metadata.ColumnParameter )
+ MetadataElement( name="endCol", default=2, desc="End column", param=metadata.ColumnParameter )
MetadataElement( name="baseCol", default=3, desc="Reference base column", param=metadata.ColumnParameter )
def init_meta( self, dataset, copy_from=None ):
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.
1
0
commit/galaxy-central: inithello: Refactor repository dependency generation. Add functional tests for the recently introduced feature to determine installation order of dependencies.
by commits-noreply@bitbucket.org 19 Apr '13
by commits-noreply@bitbucket.org 19 Apr '13
19 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/8d72c9adccf9/
Changeset: 8d72c9adccf9
User: inithello
Date: 2013-04-19 21:59:09
Summary: Refactor repository dependency generation. Add functional tests for the recently introduced feature to determine installation order of dependencies.
Affected #: 31 files
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/base/common.py
--- a/test/tool_shed/base/common.py
+++ b/test/tool_shed/base/common.py
@@ -32,7 +32,7 @@
</repositories>
'''
-new_repository_dependencies_line = ''' <repository toolshed="${toolshed_url}" name="${repository_name}" owner="${owner}" changeset_revision="${changeset_revision}" />'''
+new_repository_dependencies_line = ''' <repository toolshed="${toolshed_url}" name="${repository_name}" owner="${owner}" changeset_revision="${changeset_revision}"${prior_installation_required} />'''
# Set a 3 minute timeout for repository installation. This should be sufficient, since we're not installing tool dependencies.
repository_installation_timeout = 180
\ No newline at end of file
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/base/twilltestcase.py
--- a/test/tool_shed/base/twilltestcase.py
+++ b/test/tool_shed/base/twilltestcase.py
@@ -254,29 +254,37 @@
else:
return '%s=%s' % ( field_name, field_value )
- def create_repository_complex_dependency( self, repository, xml_filename, depends_on={} ):
- self.generate_repository_dependency_xml( depends_on[ 'repositories' ],
- xml_filename,
- complex=True,
- package=depends_on[ 'package' ],
- version=depends_on[ 'version' ] )
+ def create_repository_dependency( self,
+ repository=None,
+ repository_tuples=[],
+ filepath=None,
+ prior_installation_required=False,
+ complex=False,
+ package=None,
+ version=None,
+ strings_displayed=[],
+ strings_not_displayed=[] ):
+ repository_names = []
+ if complex:
+ filename = 'tool_dependencies.xml'
+ self.generate_complex_dependency_xml( filename=filename, filepath=filepath, repository_tuples=repository_tuples, package=package, version=version )
+ else:
+ for toolshed_url, name, owner, changeset_revision in repository_tuples:
+ repository_names.append( name )
+ dependency_description = '%s depends on %s.' % ( repository.name, ', '.join( repository_names ) )
+ filename = 'repository_dependencies.xml'
+ self.generate_simple_dependency_xml( repository_tuples=repository_tuples,
+ filename=filename,
+ filepath=filepath,
+ dependency_description=dependency_description,
+ prior_installation_required=prior_installation_required )
self.upload_file( repository,
- 'tool_dependencies.xml',
- filepath=os.path.split( xml_filename )[0],
- commit_message='Uploaded dependency on %s.' % ', '.join( repo.name for repo in depends_on[ 'repositories' ] ) )
-
- def create_repository_dependency( self, repository=None, depends_on=[], filepath=None ):
- dependency_description = '%s depends on %s.' % ( repository.name, ', '.join( repo.name for repo in depends_on ) )
- self.generate_repository_dependency_xml( depends_on,
- self.get_filename( 'repository_dependencies.xml', filepath=filepath ),
- dependency_description=dependency_description )
- self.upload_file( repository,
- 'repository_dependencies.xml',
+ filename=filename,
filepath=filepath,
- valid_tools_only=True,
+ valid_tools_only=False,
uncompress_file=False,
remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on %s.' % ', '.join( repo.name for repo in depends_on ),
+ commit_message='Uploaded dependency on %s.' % ', '.join( repository_names ),
strings_displayed=[],
strings_not_displayed=[] )
@@ -512,53 +520,55 @@
self.check_page_for_string( "You have been logged out" )
self.home()
- def generate_invalid_dependency_xml( self, xml_filename, url, name, owner, changeset_revision, complex=True, package=None, version=None, description=None ):
- file_path = os.path.split( xml_filename )[0]
+ def generate_complex_dependency_xml( self, filename, filepath, repository_tuples, package, version ):
+ file_path = os.path.join( filepath, filename )
dependency_entries = []
template = string.Template( common.new_repository_dependencies_line )
- dependency_entries.append( template.safe_substitute( toolshed_url=url,
- owner=owner,
- repository_name=name,
- changeset_revision=changeset_revision ) )
- if not os.path.exists( file_path ):
- os.makedirs( file_path )
- if complex:
- dependency_template = string.Template( common.complex_repository_dependency_template )
- repository_dependency_xml = dependency_template.safe_substitute( package=package, version=version, dependency_lines='\n'.join( dependency_entries ) )
+ for toolshed_url, name, owner, changeset_revision in repository_tuples:
+ dependency_entries.append( template.safe_substitute( toolshed_url=toolshed_url,
+ owner=owner,
+ repository_name=name,
+ changeset_revision=changeset_revision,
+ prior_installation_required='' ) )
+ if not os.path.exists( filepath ):
+ os.makedirs( filepath )
+ dependency_template = string.Template( common.complex_repository_dependency_template )
+ repository_dependency_xml = dependency_template.safe_substitute( package=package, version=version, dependency_lines='\n'.join( dependency_entries ) )
+ # Save the generated xml to the specified location.
+ file( file_path, 'w' ).write( repository_dependency_xml )
+
+ def generate_simple_dependency_xml( self,
+ repository_tuples,
+ filename,
+ filepath,
+ dependency_description='',
+ complex=False,
+ package=None,
+ version=None,
+ prior_installation_required=False ):
+ if not os.path.exists( filepath ):
+ os.makedirs( filepath )
+ dependency_entries = []
+ if prior_installation_required:
+ prior_installation_value = ' prior_installation_required="True"'
else:
- if not description:
- description = ' description=""'
- else:
- description = ' description="%s"' % description
- template_parser = string.Template( common.new_repository_dependencies_xml )
- repository_dependency_xml = template_parser.safe_substitute( description=description, dependency_lines='\n'.join( dependency_entries ) )
- # Save the generated xml to the specified location.
- file( xml_filename, 'w' ).write( repository_dependency_xml )
-
- def generate_repository_dependency_xml( self, repositories, xml_filename, dependency_description='', complex=False, package=None, version=None ):
- file_path = os.path.split( xml_filename )[0]
- if not os.path.exists( file_path ):
- os.makedirs( file_path )
- dependency_entries = []
- for repository in repositories:
- changeset_revision = self.get_repository_tip( repository )
+ prior_installation_value = ''
+ for toolshed_url, name, owner, changeset_revision in repository_tuples:
template = string.Template( common.new_repository_dependencies_line )
- dependency_entries.append( template.safe_substitute( toolshed_url=self.url,
- owner=repository.user.username,
- repository_name=repository.name,
- changeset_revision=changeset_revision ) )
+ dependency_entries.append( template.safe_substitute( toolshed_url=toolshed_url,
+ owner=owner,
+ repository_name=name,
+ changeset_revision=changeset_revision,
+ prior_installation_required=prior_installation_value ) )
if dependency_description:
description = ' description="%s"' % dependency_description
else:
description = dependency_description
- if complex:
- dependency_template = string.Template( common.complex_repository_dependency_template )
- repository_dependency_xml = dependency_template.safe_substitute( package=package, version=version, dependency_lines='\n'.join( dependency_entries ) )
- else:
- template_parser = string.Template( common.new_repository_dependencies_xml )
- repository_dependency_xml = template_parser.safe_substitute( description=description, dependency_lines='\n'.join( dependency_entries ) )
+ template_parser = string.Template( common.new_repository_dependencies_xml )
+ repository_dependency_xml = template_parser.safe_substitute( description=description, dependency_lines='\n'.join( dependency_entries ) )
# Save the generated xml to the specified location.
- file( xml_filename, 'w' ).write( repository_dependency_xml )
+ full_path = os.path.join( filepath, filename )
+ file( full_path, 'w' ).write( repository_dependency_xml )
def generate_temp_path( self, test_script_path, additional_paths=[] ):
temp_path = os.path.join( self.tool_shed_test_tmp_dir, test_script_path, os.sep.join( additional_paths ) )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0020_basic_repository_dependencies.py
--- a/test/tool_shed/functional/test_0020_basic_repository_dependencies.py
+++ b/test/tool_shed/functional/test_0020_basic_repository_dependencies.py
@@ -9,8 +9,10 @@
emboss_repository_description = 'Galaxy wrappers for Emboss version 5.0.0 tools for test 0020'
emboss_repository_long_description = 'Galaxy wrappers for Emboss version 5.0.0 tools for test 0020'
+
class TestBasicRepositoryDependencies( ShedTwillTestCase ):
'''Testing emboss 5 with repository dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts and login as an admin user."""
self.logout()
@@ -23,9 +25,11 @@
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 )
+
def test_0005_create_category( self ):
"""Create a category for this test suite"""
self.create_category( name='Test 0020 Basic Repository Dependencies', description='Testing basic repository dependency features.' )
+
def test_0010_create_emboss_datatypes_repository_and_upload_tarball( self ):
'''Create and populate the emboss_datatypes repository.'''
self.logout()
@@ -46,10 +50,12 @@
commit_message='Uploaded datatypes_conf.xml.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_verify_datatypes_in_datatypes_repository( self ):
'''Verify that the emboss_datatypes repository contains datatype entries.'''
repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name )
self.display_manage_repository_page( repository, strings_displayed=[ 'Datatypes', 'equicktandem', 'hennig86', 'vectorstrip' ] )
+
def test_0020_create_emboss_5_repository_and_upload_files( self ):
'''Create and populate the emboss_5_0020 repository.'''
category = test_db_util.get_category_by_name( 'Test 0020 Basic Repository Dependencies' )
@@ -68,22 +74,15 @@
commit_message='Uploaded emboss.tar',
strings_displayed=[],
strings_not_displayed=[] )
+
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' ] )
- self.generate_repository_dependency_xml( [ datatypes_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ) )
- self.upload_file( repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded repository_dependencies.xml.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ 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 )
+
def test_0030_verify_emboss_5_dependencies( self ):
'''Verify that the emboss_5 repository now depends on the emboss_datatypes repository with correct name, owner, and changeset revision.'''
repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
@@ -98,6 +97,7 @@
changeset_revision,
'Repository dependencies' ]
self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
+
def test_0040_verify_repository_metadata( self ):
'''Verify that resetting the metadata does not change it.'''
emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0030_repository_dependency_revisions.py
--- a/test/tool_shed/functional/test_0030_repository_dependency_revisions.py
+++ b/test/tool_shed/functional/test_0030_repository_dependency_revisions.py
@@ -1,7 +1,6 @@
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__)
+
datatypes_repository_name = 'emboss_datatypes_0030'
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."
@@ -12,8 +11,10 @@
emboss_repository_description = 'Galaxy wrappers for Emboss version 5.0.0 tools for test 0030'
emboss_repository_long_description = 'Galaxy wrappers for Emboss version 5.0.0 tools for test 0030'
+
class TestRepositoryDependencyRevisions( ShedTwillTestCase ):
'''Test dependencies on different revisions of a repository.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -26,9 +27,11 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_category( self ):
"""Create a category for this test suite"""
self.create_category( name='Test 0030 Repository Dependency Revisions', description='Testing repository dependencies by revision.' )
+
def test_0010_create_emboss_5_repository( self ):
'''Create and populate the emboss_5_0030 repository.'''
self.logout()
@@ -48,6 +51,7 @@
commit_message='Uploaded tool tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_create_emboss_6_repository( self ):
'''Create and populate the emboss_6_0030 repository.'''
self.logout()
@@ -67,6 +71,7 @@
commit_message='Uploaded tool tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_create_emboss_datatypes_repository( self ):
'''Create and populate the emboss_datatypes_0030 repository.'''
self.logout()
@@ -86,6 +91,7 @@
commit_message='Uploaded datatypes_conf.xml.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0025_create_emboss_repository( self ):
'''Create and populate the emboss_0030 repository.'''
self.logout()
@@ -105,69 +111,39 @@
commit_message='Uploaded the tool tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0030_generate_repository_dependencies_for_emboss_5( self ):
'''Generate a repository_dependencies.xml file specifying emboss_datatypes and upload it to the emboss_5 repository.'''
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=[ 'emboss' ] )
- self.generate_repository_dependency_xml( [ datatypes_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ) )
emboss_5_repository = test_db_util.get_repository_by_name_and_owner( emboss_5_repository_name, common.test_user_1_name )
- self.upload_file( emboss_5_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded repository_dependencies.xml.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ repository_dependencies_path = self.generate_temp_path( 'test_0030', additional_paths=[ 'emboss5' ] )
+ datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
+ self.create_repository_dependency( repository=emboss_5_repository, repository_tuples=[ datatypes_tuple ], filepath=repository_dependencies_path )
+
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 )
- repository_dependencies_path = self.generate_temp_path( 'test_0030', additional_paths=[ 'emboss' ] )
- self.upload_file( emboss_6_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded repository_dependencies.xml.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ 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 )
+
def test_0040_generate_repository_dependency_on_emboss_5( self ):
'''Create and upload repository_dependencies.xml for the emboss_5_0030 repository.'''
emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
emboss_5_repository = test_db_util.get_repository_by_name_and_owner( emboss_5_repository_name, common.test_user_1_name )
repository_dependencies_path = self.generate_temp_path( 'test_0030', additional_paths=[ 'emboss', '5' ] )
- self.generate_repository_dependency_xml( [ emboss_5_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Emboss requires the Emboss 5 repository.' )
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded repository_dependencies.xml.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ emboss_tuple = ( self.url, emboss_5_repository.name, emboss_5_repository.user.username, self.get_repository_tip( emboss_5_repository ) )
+ self.create_repository_dependency( repository=emboss_repository, repository_tuples=[ emboss_tuple ], filepath=repository_dependencies_path )
+
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', '6' ] )
- self.generate_repository_dependency_xml( [ emboss_6_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Emboss requires the Emboss 6 repository.' )
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded repository_dependencies.xml.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ 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 )
+
def test_0050_verify_repository_dependency_revisions( self ):
'''Verify that different metadata revisions of the emboss repository have different repository dependencies.'''
repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
@@ -178,7 +154,7 @@
# Iterate through all metadata revisions and check for repository dependencies.
for metadata, changeset_revision in repository_metadata:
# Add the dependency description and datatypes repository details to the strings to check.
- strings_displayed = [ 'Emboss requires the Emboss', 'emboss_datatypes_0030', 'user1', datatypes_tip ]
+ strings_displayed = [ 'emboss_datatypes_0030', 'user1', datatypes_tip ]
strings_displayed.extend( [ 'Tool dependencies', 'emboss', '5.0.0', 'package' ] )
self.display_manage_repository_page( repository,
changeset_revision=changeset_revision,
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0040_repository_circular_dependencies.py
--- a/test/tool_shed/functional/test_0040_repository_circular_dependencies.py
+++ b/test/tool_shed/functional/test_0040_repository_circular_dependencies.py
@@ -9,8 +9,10 @@
filtering_repository_description = "Galaxy's filtering tool for test 0040"
filtering_repository_long_description = "Long description of Galaxy's filtering tool for test 0040"
+
class TestRepositoryCircularDependencies( ShedTwillTestCase ):
'''Verify that the code correctly displays repositories with circular repository dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -23,9 +25,11 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_category( self ):
"""Create a category for this test suite"""
self.create_category( name='test_0040_repository_circular_dependencies', description='Testing handling of circular repository dependencies.' )
+
def test_0010_create_freebayes_repository( self ):
'''Create and populate freebayes_0040.'''
self.logout()
@@ -45,6 +49,7 @@
commit_message='Uploaded the tool tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_create_filtering_repository( self ):
'''Create and populate filtering_0040.'''
self.logout()
@@ -64,6 +69,7 @@
commit_message='Uploaded the tool tarball for filtering 1.1.0.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_create_dependency_on_freebayes( self ):
'''Upload a repository_dependencies.xml file that specifies the current revision of freebayes to the filtering_0040 repository.'''
# The dependency structure should look like:
@@ -73,18 +79,9 @@
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,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on freebayes.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ repository_tuple = ( self.url, repository.name, repository.user.username, self.get_repository_tip( repository ) )
+ self.create_repository_dependency( repository=filtering_repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
+
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.'''
# The dependency structure should look like:
@@ -94,18 +91,9 @@
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,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on filtering.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ repository_tuple = ( self.url, repository.name, repository.user.username, self.get_repository_tip( repository ) )
+ self.create_repository_dependency( repository=freebayes_repository, repository_tuples=[ repository_tuple ], filepath=repository_dependencies_path )
+
def test_0030_verify_repository_dependencies( self ):
'''Verify that each repository can depend on the other without causing an infinite loop.'''
filtering_repository = test_db_util.get_repository_by_name_and_owner( filtering_repository_name, common.test_user_1_name )
@@ -117,12 +105,14 @@
# In this case, the displayed dependency will specify the tip revision, but this will not always be the case.
self.check_repository_dependency( filtering_repository, freebayes_repository, self.get_repository_tip( freebayes_repository ) )
self.check_repository_dependency( freebayes_repository, filtering_repository, self.get_repository_tip( filtering_repository ) )
+
def test_0035_verify_repository_metadata( self ):
'''Verify that resetting the metadata does not change it.'''
freebayes_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 )
for repository in [ freebayes_repository, filtering_repository ]:
self.verify_unchanged_repository_metadata( repository )
+
def test_0040_verify_tool_dependencies( self ):
'''Verify that freebayes displays tool dependencies.'''
repository = test_db_util.get_repository_by_name_and_owner( freebayes_repository_name, common.test_user_1_name )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py
--- a/test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py
+++ b/test/tool_shed/functional/test_0050_circular_dependencies_4_levels.py
@@ -32,8 +32,10 @@
category_name = 'Test 0050 Circular Dependencies 5 Levels'
category_description = 'Test circular dependency features'
+
class TestRepositoryCircularDependenciesToNLevels( ShedTwillTestCase ):
'''Verify that the code correctly handles circular dependencies down to n levels.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -46,6 +48,7 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_convert_repository( self ):
'''Create and populate convert_chars_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -66,6 +69,7 @@
commit_message='Uploaded convert_chars tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0010_create_column_repository( self ):
'''Create and populate convert_chars_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -84,6 +88,7 @@
commit_message='Uploaded column_maker tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_create_emboss_datatypes_repository( self ):
'''Create and populate emboss_datatypes_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -104,6 +109,7 @@
commit_message='Uploaded datatypes_conf.xml.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_create_emboss_repository( self ):
'''Create and populate emboss_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -122,20 +128,7 @@
commit_message='Uploaded emboss tarball.',
strings_displayed=[],
strings_not_displayed=[] )
- datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name )
- repository_dependencies_path = self.generate_temp_path( 'test_0050', additional_paths=[ 'emboss' ] )
- self.generate_repository_dependency_xml( [ datatypes_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Emboss depends on the emboss_datatypes repository.' )
- self.upload_file( repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes.',
- strings_displayed=[],
- strings_not_displayed=[] )
+
def test_0025_create_filtering_repository( self ):
'''Create and populate filtering_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -154,20 +147,7 @@
commit_message='Uploaded filtering 1.1.0 tarball.',
strings_displayed=[],
strings_not_displayed=[] )
- emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
- repository_dependencies_path = self.generate_temp_path( 'test_0050', additional_paths=[ 'filtering' ] )
- self.generate_repository_dependency_xml( [ emboss_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Filtering depends on the emboss repository.' )
- self.upload_file( filtering_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss.',
- strings_displayed=[],
- strings_not_displayed=[] )
+
def test_0030_create_freebayes_repository( self ):
'''Create and populate freebayes_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -186,6 +166,7 @@
commit_message='Uploaded freebayes tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0035_create_bismark_repository( self ):
'''Create and populate bismark_0050.'''
category = self.create_category( name=category_name, description=category_description )
@@ -204,10 +185,11 @@
commit_message='Uploaded bismark tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0040_create_and_upload_dependency_definitions( self ):
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 )
- emboss_datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name )
+ datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_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 )
filtering_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 )
@@ -219,14 +201,21 @@
# emboss_datatypes depends on bismark
# freebayes depends on freebayes, emboss, emboss_datatypes, and column_maker
# filtering depends on emboss
- self.create_repository_dependency( convert_repository, depends_on=[ column_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( column_repository, depends_on=[ convert_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( emboss_datatypes_repository, depends_on=[ bismark_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( emboss_repository, depends_on=[ emboss_datatypes_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( freebayes_repository,
- depends_on=[ freebayes_repository, emboss_datatypes_repository, emboss_repository, column_repository ],
+ column_tuple = ( self.url, column_repository.name, column_repository.user.username, self.get_repository_tip( column_repository ) )
+ convert_tuple = ( self.url, convert_repository.name, convert_repository.user.username, self.get_repository_tip( convert_repository ) )
+ freebayes_tuple = ( self.url, freebayes_repository.name, freebayes_repository.user.username, self.get_repository_tip( freebayes_repository ) )
+ emboss_tuple = ( self.url, emboss_repository.name, emboss_repository.user.username, self.get_repository_tip( emboss_repository ) )
+ datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
+ bismark_tuple = ( self.url, bismark_repository.name, bismark_repository.user.username, self.get_repository_tip( bismark_repository ) )
+ self.create_repository_dependency( repository=convert_repository, repository_tuples=[ column_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=column_repository, repository_tuples=[ convert_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=datatypes_repository, repository_tuples=[ bismark_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=emboss_repository, repository_tuples=[ datatypes_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=freebayes_repository,
+ repository_tuples=[ freebayes_tuple, datatypes_tuple, emboss_tuple, column_tuple ],
filepath=dependency_xml_path )
- self.create_repository_dependency( filtering_repository, depends_on=[ emboss_repository ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=filtering_repository, repository_tuples=[ emboss_tuple ], filepath=dependency_xml_path )
+
def test_0045_verify_repository_dependencies( self ):
'''Verify that the generated dependency circle does not cause an infinite loop.
Expected structure:
@@ -264,6 +253,7 @@
strings_displayed = [ 'freebayes_0050 depends on freebayes_0050, emboss_datatypes_0050, emboss_0050, column_maker_0050.' ]
self.display_manage_repository_page( freebayes_repository,
strings_displayed=strings_displayed )
+
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 )
@@ -271,6 +261,7 @@
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' ] )
+
def test_0055_verify_repository_metadata( self ):
'''Verify that resetting the metadata does not change it.'''
emboss_datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0080_advanced_circular_dependencies.py
--- a/test/tool_shed/functional/test_0080_advanced_circular_dependencies.py
+++ b/test/tool_shed/functional/test_0080_advanced_circular_dependencies.py
@@ -12,8 +12,10 @@
category_name = 'Test 0080 Advanced Circular Dependencies'
category_description = 'Test circular dependency features'
+
class TestRepositoryCircularDependencies( ShedTwillTestCase ):
'''Verify that the code correctly handles circular dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -26,6 +28,7 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_column_repository( self ):
"""Create and populate the column_maker repository."""
category = self.create_category( name=category_name, description=category_description )
@@ -46,6 +49,7 @@
commit_message='Uploaded column_maker tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0005_create_convert_repository( self ):
"""Create and populate the convert_chars repository."""
self.logout()
@@ -68,46 +72,30 @@
commit_message='Uploaded convert_chars tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_create_repository_dependencies( self ):
- '''Upload a repository_dependencies.xml file that specifies the current revision of freebayes to the filtering_0040 repository.'''
+ '''Upload a repository_dependencies.xml file that specifies the current revision of convert_chars_0080 to the column_maker_0080 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' ] )
- self.generate_repository_dependency_xml( [ convert_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Column maker depends on the convert repository.' )
- self.upload_file( column_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=True,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on convert_chars.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ 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 )
+
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' ] )
- self.generate_repository_dependency_xml( [ column_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Convert chars depends on the column_maker repository.' )
- self.upload_file( convert_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=True,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on column_maker.',
- strings_displayed=[],
- strings_not_displayed=[] )
+ 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 )
+
def test_0030_verify_repository_dependencies( self ):
'''Verify that each repository can depend on the other without causing an infinite loop.'''
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 )
self.check_repository_dependency( convert_repository, column_repository, self.get_repository_tip( column_repository ) )
self.check_repository_dependency( column_repository, convert_repository, self.get_repository_tip( convert_repository ) )
+
def test_0035_verify_repository_metadata( self ):
'''Verify that resetting the metadata does not change it.'''
column_repository = test_db_util.get_repository_by_name_and_owner( column_repository_name, common.test_user_1_name )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0090_tool_search.py
--- a/test/tool_shed/functional/test_0090_tool_search.py
+++ b/test/tool_shed/functional/test_0090_tool_search.py
@@ -28,8 +28,10 @@
category_name = 'Test 0090 Tool Search And Installation'
category_description = 'Test 0090 Tool Search And Installation'
+
class TestRepositoryCircularDependenciesAgain( ShedTwillTestCase ):
'''Test more features related to repository dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -42,6 +44,7 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_bwa_base_repository( self ):
'''Create and populate bwa_base_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -62,6 +65,7 @@
commit_message='Uploaded BWA tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0010_create_bwa_color_repository( self ):
'''Create and populate bwa_color_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -82,6 +86,7 @@
commit_message='Uploaded BWA color tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_create_emboss_datatypes_repository( self ):
'''Create and populate emboss_datatypes_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -102,6 +107,7 @@
commit_message='Uploaded datatypes_conf.xml.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_create_emboss_repository( self ):
'''Create and populate emboss_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -120,20 +126,7 @@
commit_message='Uploaded emboss tarball.',
strings_displayed=[],
strings_not_displayed=[] )
- datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name )
- repository_dependencies_path = self.generate_temp_path( 'test_0090', additional_paths=[ 'emboss' ] )
- self.generate_repository_dependency_xml( [ datatypes_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Emboss depends on the emboss_datatypes repository.' )
- self.upload_file( repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=True,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes.',
- strings_displayed=[],
- strings_not_displayed=[] )
+
def test_0025_create_filtering_repository( self ):
'''Create and populate filtering_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -152,20 +145,7 @@
commit_message='Uploaded filtering 1.1.0 tarball.',
strings_displayed=[],
strings_not_displayed=[] )
- emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
- repository_dependencies_path = self.generate_temp_path( 'test_0090', additional_paths=[ 'filtering' ] )
- self.generate_repository_dependency_xml( [ emboss_repository ],
- self.get_filename( 'repository_dependencies.xml', filepath=repository_dependencies_path ),
- dependency_description='Filtering depends on the emboss repository.' )
- self.upload_file( filtering_repository,
- filename='repository_dependencies.xml',
- filepath=repository_dependencies_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss.',
- strings_displayed=[],
- strings_not_displayed=[] )
+
def test_0030_create_freebayes_repository( self ):
'''Create and populate freebayes_0090.'''
category = self.create_category( name=category_name, description=category_description )
@@ -184,19 +164,25 @@
commit_message='Uploaded freebayes tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0035_create_and_upload_dependency_definitions( self ):
'''Create and upload repository dependency definitions.'''
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 )
- emboss_datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_repository_name, common.test_user_1_name )
+ datatypes_repository = test_db_util.get_repository_by_name_and_owner( emboss_datatypes_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 )
filtering_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 )
dependency_xml_path = self.generate_temp_path( 'test_0090', additional_paths=[ 'freebayes' ] )
- self.create_repository_dependency( emboss_repository, depends_on=[ emboss_datatypes_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( filtering_repository, depends_on=[ freebayes_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( bwa_base_repository, depends_on=[ emboss_repository ], filepath=dependency_xml_path )
- self.create_repository_dependency( bwa_color_repository, depends_on=[ filtering_repository ], filepath=dependency_xml_path )
+ freebayes_tuple = ( self.url, freebayes_repository.name, freebayes_repository.user.username, self.get_repository_tip( freebayes_repository ) )
+ emboss_tuple = ( self.url, emboss_repository.name, emboss_repository.user.username, self.get_repository_tip( emboss_repository ) )
+ datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
+ filtering_tuple = ( self.url, filtering_repository.name, filtering_repository.user.username, self.get_repository_tip( filtering_repository ) )
+ self.create_repository_dependency( repository=emboss_repository, repository_tuples=[ datatypes_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=filtering_repository, repository_tuples=[ freebayes_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=bwa_base_repository, repository_tuples=[ emboss_tuple ], filepath=dependency_xml_path )
+ self.create_repository_dependency( repository=bwa_color_repository, repository_tuples=[ filtering_tuple ], filepath=dependency_xml_path )
+
def test_0040_verify_repository_dependencies( self ):
'''Verify the generated dependency structure.'''
bwa_color_repository = test_db_util.get_repository_by_name_and_owner( bwa_color_repository_name, common.test_user_1_name )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0100_complex_repository_dependencies.py
--- a/test/tool_shed/functional/test_0100_complex_repository_dependencies.py
+++ b/test/tool_shed/functional/test_0100_complex_repository_dependencies.py
@@ -1,6 +1,9 @@
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__ )
+
bwa_base_repository_name = 'bwa_base_repository_0100'
bwa_base_repository_description = "BWA Base"
bwa_base_repository_long_description = "BWA tool that depends on bwa 0.5.9, with a complex repository dependency pointing at bwa_tool_repository_0100"
@@ -12,8 +15,10 @@
category_name = 'Test 0100 Complex Repository Dependencies'
category_description = 'Test 0100 Complex Repository Dependencies'
+
class TestComplexRepositoryDependencies( ShedTwillTestCase ):
'''Test features related to complex repository dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts."""
self.logout()
@@ -26,6 +31,7 @@
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' % admin_email
admin_user_private_role = test_db_util.get_private_role( admin_user )
+
def test_0005_create_bwa_tool_repository( self ):
'''Create and populate bwa_tool_repository_0100.'''
category = self.create_category( name=category_name, description=category_description )
@@ -49,6 +55,7 @@
strings_not_displayed=[] )
# Visit the manage repository page for bwa_tool_repository_0100.
self.display_manage_repository_page( repository, strings_displayed=[ 'Tool dependencies', 'may not be', 'in this repository' ] )
+
def test_0010_create_bwa_base_repository( self ):
'''Create and populate bwa_base_0100.'''
category = self.create_category( name=category_name, description=category_description )
@@ -71,30 +78,30 @@
commit_message='Uploaded bwa_base.tar with tool wrapper XML, but without tool dependency XML.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_generate_complex_repository_dependency_invalid_shed_url( self ):
'''Generate and upload a complex repository definition that specifies an invalid tool shed URL.'''
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'invalid' ] )
xml_filename = self.get_filename( 'tool_dependencies.xml', filepath=dependency_path )
# The repository named bwa_base_repository_0100 is the dependent repository.
- repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
+ base_repository = test_db_util.get_repository_by_name_and_owner( bwa_base_repository_name, common.test_user_1_name )
# The tool_repository named bwa_tool_repository_0100 is the required repository.
tool_repository = test_db_util.get_repository_by_name_and_owner( bwa_tool_repository_name, common.test_user_1_name )
url = 'http://http://this is not an url!'
name = 'bwa_tool_repository_0100'
owner = 'user1'
changeset_revision = self.get_repository_tip( tool_repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=True, package='bwa', version='0.5.9' )
strings_displayed = [ 'Repository dependencies are currently supported only within the same tool shed' ]
# Populate the dependent repository named bwa_base_repository_0100 with an invalid tool_dependencies.xml file.
- self.upload_file( repository,
- filename='tool_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on bwa_tool_0100 with invalid url.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=base_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=True,
+ package='bwa',
+ version='0.5.9' )
+
def test_0020_generate_complex_repository_dependency_invalid_repository_name( self ):
'''Generate and upload a complex repository definition that specifies an invalid repository name.'''
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'invalid' ] )
@@ -107,18 +114,17 @@
name = 'invalid_repository!?'
owner = 'user1'
changeset_revision = self.get_repository_tip( tool_repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=True, package='bwa', version='0.5.9' )
strings_displayed = [ 'because the name is invalid' ]
- # # Populate the dependent base_repository named bwa_tool_repository_0100 with an invalid tool_dependencies.xml file.
- self.upload_file( base_repository,
- filename='tool_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on bwa_tool_0100 with invalid repository name.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ # Populate the dependent base_repository named bwa_tool_repository_0100 with an invalid tool_dependencies.xml file.
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=base_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=True,
+ package='bwa',
+ version='0.5.9' )
+
def test_0025_generate_complex_repository_dependency_invalid_owner_name( self ):
'''Generate and upload a complex repository definition that specifies an invalid owner.'''
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'invalid' ] )
@@ -131,17 +137,16 @@
name = 'bwa_tool_repository_0100'
owner = 'invalid_owner!?'
changeset_revision = self.get_repository_tip( tool_repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=True, package='bwa', version='0.5.9' )
- strings_displayed = [ 'because the owner is invalid.' ]
- self.upload_file( base_repository,
- filename='tool_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on bwa_tool_0100 with invalid owner.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ strings_displayed = [ 'because the owner is invalid.' ]
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=base_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=True,
+ package='bwa',
+ version='0.5.9' )
+
def test_0030_generate_complex_repository_dependency_invalid_changeset_revision( self ):
'''Generate and upload a complex repository definition that specifies an invalid changeset revision.'''
dependency_path = self.generate_temp_path( 'test_0100', additional_paths=[ 'complex', 'invalid' ] )
@@ -154,17 +159,16 @@
name = 'bwa_tool_repository_0100'
owner = 'user1'
changeset_revision = '1234abcd'
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=True, package='bwa', version='0.5.9' )
strings_displayed = [ 'because the changeset revision is invalid.' ]
- self.upload_file( base_repository,
- filename='tool_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on bwa_tool_0100 with invalid changeset revision.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=base_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=True,
+ package='bwa',
+ version='0.5.9' )
+
def test_0035_generate_complex_repository_dependency( self ):
'''Generate and upload a valid tool_dependencies.xml file that specifies bwa_tool_repository_0100.'''
# The base_repository named bwa_base_repository_0100 is the dependent repository.
@@ -172,25 +176,20 @@
# The tool_repository named bwa_tool_repository_0100 is the required repository.
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 = 'bwa_tool_repository_0100'
owner = 'user1'
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' )
- # Upload the valid tool_dependencies.xml file to bwa_base_repository_0100 that specifies bwa_tool_repository_0100
- # as a repository dependency via a complex repository dependency definition.
- self.upload_file( base_repository,
- filename='tool_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=True,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded valid complex dependency on bwa_tool_0100.',
- strings_displayed=[],
- strings_not_displayed=[] )
- self.check_repository_dependency( base_repository, tool_repository )
- self.display_manage_repository_page( base_repository, strings_displayed=[ 'bwa', '0.5.9', 'package' ] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=base_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ complex=True,
+ package='bwa',
+ version='0.5.9' )
+ self.check_repository_dependency( base_repository, depends_on_repository=tool_repository )
+ self.display_manage_repository_page( base_repository, strings_displayed=[ 'bwa', '0.5.9', 'package', changeset_revision ] )
+
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.'''
# The base_repository named bwa_base_repository_0100 is the dependent repository.
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0110_invalid_simple_repository_dependencies.py
--- a/test/tool_shed/functional/test_0110_invalid_simple_repository_dependencies.py
+++ b/test/tool_shed/functional/test_0110_invalid_simple_repository_dependencies.py
@@ -12,8 +12,10 @@
category_name = 'Test 0110 Invalid Repository Dependencies'
category_desc = 'Test 0110 Invalid Repository Dependencies'
+
class TestBasicRepositoryDependencies( ShedTwillTestCase ):
'''Testing emboss 5 with repository dependencies.'''
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts and login as an admin user."""
self.logout()
@@ -26,9 +28,11 @@
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 )
+
def test_0005_create_category( self ):
"""Create a category for this test suite"""
self.create_category( name=category_name, description=category_desc )
+
def test_0010_create_emboss_datatypes_repository_and_upload_tarball( self ):
'''Create and populate the emboss_datatypes repository.'''
self.logout()
@@ -49,10 +53,12 @@
commit_message='Uploaded datatypes_conf.xml.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0015_verify_datatypes_in_datatypes_repository( self ):
'''Verify that the emboss_datatypes repository contains datatype entries.'''
repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_1_name )
self.display_manage_repository_page( repository, strings_displayed=[ 'Datatypes', 'equicktandem', 'hennig86', 'vectorstrip' ] )
+
def test_0020_create_emboss_5_repository_and_upload_files( self ):
'''Create and populate the emboss_5_0110 repository.'''
category = test_db_util.get_category_by_name( category_name )
@@ -71,27 +77,25 @@
commit_message='Uploaded emboss tool tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0025_generate_repository_dependency_with_invalid_url( self ):
'''Generate a repository dependency for emboss 5 with an invalid URL.'''
dependency_path = self.generate_temp_path( 'test_0110', additional_paths=[ 'simple' ] )
xml_filename = self.get_filename( 'repository_dependencies.xml', filepath=dependency_path )
- repository = test_db_util.get_repository_by_name_and_owner( datatypes_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 )
emboss_repository = test_db_util.get_repository_by_name_and_owner( emboss_repository_name, common.test_user_1_name )
url = 'http://http://this is not an url!'
- name = repository.name
- owner = repository.user.username
- changeset_revision = self.get_repository_tip( repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=False, description='This is invalid.' )
+ name = datatypes_repository.name
+ owner = datatypes_repository.user.username
+ changeset_revision = self.get_repository_tip( datatypes_repository )
strings_displayed = [ 'Repository dependencies are currently supported only within the same tool shed' ]
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes_0110 with invalid url.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=emboss_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=False )
+
def test_0030_generate_repository_dependency_with_invalid_name( self ):
'''Generate a repository dependency for emboss 5 with an invalid name.'''
dependency_path = self.generate_temp_path( 'test_0110', additional_paths=[ 'simple' ] )
@@ -102,17 +106,14 @@
name = '!?invalid?!'
owner = repository.user.username
changeset_revision = self.get_repository_tip( repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=False, description='This is invalid.' )
strings_displayed = [ 'because the name is invalid.' ]
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes_0110 with invalid name.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=emboss_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=False )
+
def test_0035_generate_repository_dependency_with_invalid_owner( self ):
'''Generate a repository dependency for emboss 5 with an invalid owner.'''
dependency_path = self.generate_temp_path( 'test_0110', additional_paths=[ 'simple' ] )
@@ -123,17 +124,14 @@
name = repository.name
owner = '!?invalid?!'
changeset_revision = self.get_repository_tip( repository )
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=False, description='This is invalid.' )
strings_displayed = [ 'because the owner is invalid.' ]
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes_0110 with invalid owner.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=emboss_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=False )
+
def test_0040_generate_repository_dependency_with_invalid_changeset_revision( self ):
'''Generate a repository dependency for emboss 5 with an invalid changeset revision.'''
dependency_path = self.generate_temp_path( 'test_0110', additional_paths=[ 'simple', 'invalid' ] )
@@ -144,14 +142,10 @@
name = repository.name
owner = repository.user.username
changeset_revision = '!?invalid?!'
- self.generate_invalid_dependency_xml( xml_filename, url, name, owner, changeset_revision, complex=False, description='This is invalid.' )
strings_displayed = [ 'because the changeset revision is invalid.' ]
- self.upload_file( emboss_repository,
- filename='repository_dependencies.xml',
- filepath=dependency_path,
- valid_tools_only=False,
- uncompress_file=False,
- remove_repo_files_not_in_tar=False,
- commit_message='Uploaded dependency on emboss_datatypes_0110 with invalid changeset revision.',
- strings_displayed=strings_displayed,
- strings_not_displayed=[] )
+ repository_tuple = ( url, name, owner, changeset_revision )
+ self.create_repository_dependency( repository=emboss_repository,
+ filepath=dependency_path,
+ repository_tuples=[ repository_tuple ],
+ strings_displayed=strings_displayed,
+ complex=False )
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0120_simple_repository_dependency_multiple_owners.py
--- a/test/tool_shed/functional/test_0120_simple_repository_dependency_multiple_owners.py
+++ b/test/tool_shed/functional/test_0120_simple_repository_dependency_multiple_owners.py
@@ -23,7 +23,9 @@
base_datatypes_count = 0
repository_datatypes_count = 0
+
class TestRepositoryMultipleOwners( ShedTwillTestCase ):
+
def test_0000_initiate_users( self ):
"""Create necessary user accounts and login as an admin user."""
"""
@@ -45,6 +47,7 @@
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 )
+
def test_0005_create_datatypes_repository( self ):
"""Create and populate the blast_datatypes_0120 repository"""
"""
@@ -71,6 +74,7 @@
commit_message='Uploaded blast_datatypes tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0010_verify_datatypes_repository( self ):
'''Verify the blast_datatypes_0120 repository.'''
'''
@@ -83,6 +87,7 @@
strings_displayed = [ 'BlastXml', 'BlastNucDb', 'BlastProtDb', 'application/xml', 'text/html', 'blastxml', 'blastdbn', 'blastdbp']
self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
repository_datatypes_count = int( self.get_repository_datatypes_count( repository ) )
+
def test_0015_create_tool_repository( self ):
"""Create and populate the blastxml_to_top_descr_0120 repository"""
"""
@@ -109,6 +114,7 @@
commit_message='Uploaded blastxml_to_top_descr tarball.',
strings_displayed=[],
strings_not_displayed=[] )
+
def test_0020_verify_tool_repository( self ):
'''Verify the blastxml_to_top_descr_0120 repository.'''
'''
@@ -119,6 +125,7 @@
strings_displayed = [ 'blastxml_to_top_descr_0120', 'BLAST top hit descriptions', 'Make a table from BLAST XML' ]
strings_displayed.extend( [ '0.0.1', 'Valid tools'] )
self.display_manage_repository_page( repository, strings_displayed=strings_displayed )
+
def test_0025_create_repository_dependency( self ):
'''Create a repository dependency on blast_datatypes_0120.'''
'''
@@ -128,7 +135,9 @@
datatypes_repository = test_db_util.get_repository_by_name_and_owner( datatypes_repository_name, common.test_user_2_name )
tool_repository = test_db_util.get_repository_by_name_and_owner( tool_repository_name, common.test_user_1_name )
dependency_xml_path = self.generate_temp_path( 'test_0120', additional_paths=[ 'dependencies' ] )
- self.create_repository_dependency( repository=tool_repository, depends_on=[ datatypes_repository ], filepath=dependency_xml_path )
+ datatypes_tuple = ( self.url, datatypes_repository.name, datatypes_repository.user.username, self.get_repository_tip( datatypes_repository ) )
+ self.create_repository_dependency( repository=tool_repository, repository_tuples=[ datatypes_tuple ], filepath=dependency_xml_path )
+
def test_0040_verify_repository_dependency( self ):
'''Verify the created repository dependency.'''
'''
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0150_prior_installation_required.py
--- /dev/null
+++ b/test/tool_shed/functional/test_0150_prior_installation_required.py
@@ -0,0 +1,109 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+column_repository_name = 'column_maker_0150'
+column_repository_description = "Add column"
+column_repository_long_description = "Compute an expression on every row"
+
+convert_repository_name = 'convert_chars_0150'
+convert_repository_description = "Convert delimiters"
+convert_repository_long_description = "Convert delimiters to tab"
+
+category_name = 'Test 0150 Simple Prior Installation'
+category_description = 'Test 0150 Simple Prior Installation'
+
+'''
+Create column_maker and convert_chars.
+
+Column maker repository dependency:
+<repository toolshed="self.url" name="convert_chars" owner="test" changeset_revision="c3041382815c" prior_installation_required="True" />
+
+Verify display.
+
+Galaxy side:
+
+Install column_maker.
+Verify that convert_chars was installed first, contrary to the ordering that would be present without prior_installation_required.
+'''
+
+
+class TestSimplePriorInstallation( ShedTwillTestCase ):
+ '''Test features related to datatype converters.'''
+
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts."""
+ 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' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ 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' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+
+ def test_0005_create_convert_repository( self ):
+ '''Create and populate convert_chars_0150.'''
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name=convert_repository_name,
+ description=convert_repository_description,
+ long_description=convert_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='convert_chars/convert_chars.tar',
+ filepath=None,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded convert_chars tarball.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0010_create_column_repository( self ):
+ '''Create and populate convert_chars_0150.'''
+ category = self.create_category( name=category_name, description=category_description )
+ repository = self.get_or_create_repository( name=column_repository_name,
+ description=column_repository_description,
+ long_description=column_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='column_maker/column_maker.tar',
+ filepath=None,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded column_maker tarball.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0015_create_repository_dependency( self ):
+ '''Create a repository dependency specifying convert_chars.'''
+ '''
+ Column maker repository dependency:
+ <repository toolshed="self.url" name="convert_chars" owner="test" changeset_revision="<tip>" prior_installation_required="True" />
+ '''
+ 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_0150', additional_paths=[ 'column' ] )
+ convert_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=[ convert_tuple ],
+ filepath=dependency_xml_path,
+ prior_installation_required=True )
+
+ def test_0020_verify_repository_dependency( self ):
+ '''Verify that the previously generated repositiory dependency displays correctly.'''
+ 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 )
+
diff -r 2c50935e70c8a483bcd09b358765408543a153fb -r 8d72c9adccf92f8a1971ec7d9b622de43cbd6f48 test/tool_shed/functional/test_0160_circular_prior_installation_required.py
--- /dev/null
+++ b/test/tool_shed/functional/test_0160_circular_prior_installation_required.py
@@ -0,0 +1,161 @@
+from tool_shed.base.twilltestcase import ShedTwillTestCase, common, os
+import tool_shed.base.test_db_util as test_db_util
+
+filter_repository_name = 'filtering_0160'
+filter_repository_description = "Galaxy's filtering tool for test 0160"
+filter_repository_long_description = "Long description of Galaxy's filtering tool for test 0160"
+
+column_repository_name = 'column_maker_0160'
+column_repository_description = "Add column"
+column_repository_long_description = "Compute an expression on every row"
+
+convert_repository_name = 'convert_chars_0160'
+convert_repository_description = "Convert delimiters"
+convert_repository_long_description = "Convert delimiters to tab"
+
+category_name = 'Test 0160 Simple Prior Installation'
+category_description = 'Test 0160 Simple Prior Installation'
+
+'''
+Create column_maker and convert_chars.
+
+Column maker repository dependency:
+<repository toolshed="self.url" name="convert_chars" owner="test" changeset_revision="c3041382815c" prior_installation_required="True" />
+
+Verify display.
+'''
+
+
+class TestSimplePriorInstallation( ShedTwillTestCase ):
+ '''Test features related to datatype converters.'''
+
+ def test_0000_initiate_users( self ):
+ """Create necessary user accounts."""
+ 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' % test_user_1_email
+ test_user_1_private_role = test_db_util.get_private_role( test_user_1 )
+ 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' % admin_email
+ admin_user_private_role = test_db_util.get_private_role( admin_user )
+
+ def test_0005_create_convert_repository( self ):
+ '''Create and populate convert_chars_0160.'''
+ category = self.create_category( name=category_name, description=category_description )
+ self.logout()
+ self.login( email=common.test_user_1_email, username=common.test_user_1_name )
+ repository = self.get_or_create_repository( name=convert_repository_name,
+ description=convert_repository_description,
+ long_description=convert_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='convert_chars/convert_chars.tar',
+ filepath=None,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded convert_chars tarball.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0010_create_column_repository( self ):
+ '''Create and populate convert_chars_0160.'''
+ category = self.create_category( name=category_name, description=category_description )
+ repository = self.get_or_create_repository( name=column_repository_name,
+ description=column_repository_description,
+ long_description=column_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='column_maker/column_maker.tar',
+ filepath=None,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded column_maker tarball.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ def test_0015_create_filtering_repository( self ):
+ '''Create and populate filtering_0160.'''
+ category = self.create_category( name=category_name, description=category_description )
+ repository = self.get_or_create_repository( name=filter_repository_name,
+ description=filter_repository_description,
+ long_description=filter_repository_long_description,
+ owner=common.test_user_1_name,
+ category_id=self.security.encode_id( category.id ),
+ strings_displayed=[] )
+ self.upload_file( repository,
+ filename='filtering/filtering_1.1.0.tar',
+ filepath=None,
+ valid_tools_only=True,
+ uncompress_file=True,
+ remove_repo_files_not_in_tar=False,
+ commit_message='Uploaded filtering 1.1.0 tarball.',
+ strings_displayed=[],
+ strings_not_displayed=[] )
+
+ 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 )
+
+ 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 )
+
This diff is so big that we needed to truncate the remainder.
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.
1
0
commit/galaxy-central: greg: Do not allow sorting by owner on the RepositoriesReviewedByMeGrid.
by commits-noreply@bitbucket.org 19 Apr '13
by commits-noreply@bitbucket.org 19 Apr '13
19 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/2c50935e70c8/
Changeset: 2c50935e70c8
User: greg
Date: 2013-04-19 21:11:00
Summary: Do not allow sorting by owner on the RepositoriesReviewedByMeGrid.
Affected #: 1 file
diff -r 6ed903aff045656cdfb519c571627af750675aef -r 2c50935e70c8a483bcd09b358765408543a153fb lib/tool_shed/grids/repository_review_grids.py
--- a/lib/tool_shed/grids/repository_review_grids.py
+++ b/lib/tool_shed/grids/repository_review_grids.py
@@ -248,6 +248,23 @@
class RepositoriesReviewedByMeGrid( RepositoriesWithReviewsGrid ):
# This grid filters out repositories that have been marked as either deprecated or deleted.
+ columns = [
+ RepositoriesWithReviewsGrid.NameColumn( "Repository name",
+ key="name",
+ link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
+ attach_popup=True ),
+ RepositoriesWithReviewsGrid.UserColumn( "Owner", attach_popup=False ),
+ RepositoriesWithReviewsGrid.WithReviewsRevisionColumn( "Reviewed revisions" ),
+ RepositoriesWithReviewsGrid.ReviewersColumn( "Reviewers", attach_popup=False ),
+ RepositoriesWithReviewsGrid.RatingColumn( "Rating", attach_popup=False ),
+ RepositoriesWithReviewsGrid.ApprovedColumn( "Approved", attach_popup=False )
+ ]
+ columns.append( grids.MulticolFilterColumn( "Search repository name",
+ cols_to_filter=[ columns[ 0 ] ],
+ key="free-text-search",
+ visible=False,
+ filterable="standard" ) )
+
def build_initial_query( self, trans, **kwd ):
return trans.sa_session.query( model.Repository ) \
.filter( and_( model.Repository.table.c.deleted == False,
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.
1
0
commit/galaxy-central: greg: Enhance several of the repository review grids to enable sorting by repository owner.
by commits-noreply@bitbucket.org 19 Apr '13
by commits-noreply@bitbucket.org 19 Apr '13
19 Apr '13
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/6ed903aff045/
Changeset: 6ed903aff045
User: greg
Date: 2013-04-19 20:59:37
Summary: Enhance several of the repository review grids to enable sorting by repository owner.
Affected #: 1 file
diff -r ac8f6516735f7c68859e3f0cd124e19b39c77ac7 -r 6ed903aff045656cdfb519c571627af750675aef lib/tool_shed/grids/repository_review_grids.py
--- a/lib/tool_shed/grids/repository_review_grids.py
+++ b/lib/tool_shed/grids/repository_review_grids.py
@@ -136,7 +136,10 @@
key="name",
link=( lambda item: dict( operation="view_or_manage_repository", id=item.id ) ),
attach_popup=True ),
- RepositoryGrid.UserColumn( "Owner", attach_popup=False ),
+ RepositoryGrid.UserColumn( "Owner",
+ model_class=model.User,
+ attach_popup=False,
+ key="User.username" ),
WithReviewsRevisionColumn( "Reviewed revisions" ),
ReviewersColumn( "Reviewers", attach_popup=False ),
RatingColumn( "Rating", attach_popup=False ),
@@ -177,7 +180,9 @@
attach_popup=False ),
RepositoriesWithReviewsGrid.WithoutReviewsRevisionColumn( "Revisions for review" ),
RepositoriesWithReviewsGrid.UserColumn( "Owner",
- attach_popup=False )
+ model_class=model.User,
+ attach_popup=False,
+ key="User.username" )
]
columns.append( grids.MulticolFilterColumn( "Search repository name, description",
cols_to_filter=[ columns[ 0 ], columns[ 1 ] ],
@@ -213,7 +218,9 @@
attach_popup=False ),
RepositoriesWithoutReviewsGrid.WithoutReviewsRevisionColumn( "Revisions for review" ),
RepositoriesWithoutReviewsGrid.UserColumn( "Owner",
- attach_popup=False )
+ model_class=model.User,
+ attach_popup=False,
+ key="User.username" )
]
columns.append( grids.MulticolFilterColumn( "Search repository name, description",
cols_to_filter=[ columns[ 0 ], columns[ 1 ] ],
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.
1
0