2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/bb744d8d3d6a/
Changeset: bb744d8d3d6a
Branch: stable
User: dan
Date: 2014-02-10 19:31:39
Summary: Fix for Dataset.set_total_size() when e.g. encountering a dead symlink.
Affected #: 1 file
diff -r dc067a95261dec2b8862162dbac3f61bffa69ec9 -r bb744d8d3d6a74872a7b42b511d087c16b1ee8b3 lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1183,7 +1183,7 @@
self.total_size = self.file_size or 0
if self.object_store.exists(self, extra_dir=self._extra_files_path or "dataset_%d_files" % self.id, dir_only=True):
for root, dirs, files in os.walk( self.extra_files_path ):
- self.total_size += sum( [ os.path.getsize( os.path.join( root, file ) ) for file in files ] )
+ self.total_size += sum( [ os.path.getsize( os.path.join( root, file ) ) for file in files if os.path.exists( os.path.join( root, file ) ) ] )
def has_data( self ):
"""Detects whether there is any data"""
return self.get_size() > 0
https://bitbucket.org/galaxy/galaxy-central/commits/bb0f56f7c636/
Changeset: bb0f56f7c636
User: dan
Date: 2014-02-10 19:32:35
Summary: merge
Affected #: 1 file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/ec9d31a8bc04/
Changeset: ec9d31a8bc04
User: dan
Date: 2014-02-10 19:31:39
Summary: Fix for Dataset.set_total_size() when e.g. encountering a dead symlink.
Affected #: 1 file
diff -r 29ce93a13ac7c4a5d2b54e5e2c10960f30a350b3 -r ec9d31a8bc046fa2c682c0b220b7ecdbd014e38b lib/galaxy/model/__init__.py
--- a/lib/galaxy/model/__init__.py
+++ b/lib/galaxy/model/__init__.py
@@ -1221,7 +1221,7 @@
self.total_size = self.file_size or 0
if self.object_store.exists(self, extra_dir=self._extra_files_path or "dataset_%d_files" % self.id, dir_only=True):
for root, dirs, files in os.walk( self.extra_files_path ):
- self.total_size += sum( [ os.path.getsize( os.path.join( root, file ) ) for file in files ] )
+ self.total_size += sum( [ os.path.getsize( os.path.join( root, file ) ) for file in files if os.path.exists( os.path.join( root, file ) ) ] )
def has_data( self ):
"""Detects whether there is any data"""
return self.get_size() > 0
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/a5c0d860d190/
Changeset: a5c0d860d190
User: dan
Date: 2014-02-10 17:59:58
Summary: Add a very simple example script that uses API to run data managers.
Affected #: 1 file
diff -r 1c14b0cdba15d8ffc2474a82aa3ca535e728f941 -r a5c0d860d19010309e8a8fd02f39c015c5315fe9 scripts/api/data_manager_example_execute.py
--- /dev/null
+++ b/scripts/api/data_manager_example_execute.py
@@ -0,0 +1,106 @@
+#!/usr/bin/env python
+##Dan Blankenberg
+##Very simple example of using the API to run Data Managers
+##Script makes the naive assumption that dbkey==sequence id, which in many cases is not true nor desired
+##*** This script is not recommended for use as-is on a production server ***
+
+import os
+import sys
+import optparse
+import urlparse
+import time
+
+sys.path.insert( 0, os.path.dirname( __file__ ) )
+
+from common import post, get
+
+DEFAULT_SLEEP_TIME = 3
+FETCH_GENOME_TOOL_ID = 'testtoolshed.g2.bx.psu.edu/repos/blankenberg/data_manager_fetch_genome_all_…'
+BUILD_INDEX_TOOLS_ID = [ 'testtoolshed.g2.bx.psu.edu/repos/blankenberg/data_manager_bwa_index_builder…',
+ 'testtoolshed.g2.bx.psu.edu/repos/blankenberg/data_manager_bwa_index_builder…' ]
+
+def run_tool( tool_id, history_id, params, api_key, galaxy_url, wait=True, sleep_time=None, **kwargs ):
+ sleep_time = sleep_time or DEFAULT_SLEEP_TIME
+ tools_url = urlparse.urljoin( galaxy_url, 'api/tools' )
+ payload = {
+ 'tool_id' : tool_id,
+ }
+ if history_id:
+ payload['history_id'] = history_id
+ payload[ 'inputs' ] = params
+ rval = post( api_key, tools_url, payload )
+ if wait:
+ outputs = list( rval['outputs'] )
+ while outputs:
+ finished_datasets = []
+ for i, dataset_dict in enumerate( outputs ):
+ if dataset_is_terminal( dataset_dict['id'], api_key=api_key, galaxy_url=galaxy_url ):
+ finished_datasets.append( i )
+ for i in reversed( finished_datasets ):
+ outputs.pop( 0 )
+ if wait and outputs:
+ time.sleep( sleep_time )
+
+ return rval
+
+def get_dataset_state( hda_id, api_key, galaxy_url ):
+ datasets_url = urlparse.urljoin( galaxy_url, 'api/datasets/%s' % hda_id )
+ dataset_info = get( api_key, datasets_url )
+ return dataset_info['state']
+
+def dataset_is_terminal( hda_id, api_key, galaxy_url ):
+ dataset_state = get_dataset_state( hda_id, api_key, galaxy_url )
+ return dataset_state in [ 'ok', 'error' ]
+
+if __name__ == '__main__':
+ #Parse Command Line
+ parser = optparse.OptionParser()
+ parser.add_option( '-k', '--key', dest='api_key', action='store', type="string", default=None, help='API Key.' )
+ parser.add_option( '-u', '--url', dest='base_url', action='store', type="string", default='http://localhost:8080', help='Base URL of Galaxy Server' )
+ parser.add_option( '-d', '--dbkey', dest='dbkeys', action='append', type="string", default=[], help='List of dbkeys to download and Index' )
+ parser.add_option( '-s', '--sleep_time', dest='sleep_time', action='store', type="int", default=DEFAULT_SLEEP_TIME, help='How long to sleep between check loops' )
+ (options, args) = parser.parse_args()
+
+ #check options
+ assert options.api_key is not None, ValueError( 'You must specify an API key.' )
+ assert options.dbkeys, ValueError( 'You must specify at least one dbkey to use.' )
+
+ #check user is admin
+ configuration_options = get( options.api_key, urlparse.urljoin( options.base_url, 'api/configuration' ) )
+ if 'library_import_dir' not in configuration_options: #hack to check if is admin user
+ print "Warning: Data Managers are only available to admin users. The API Key provided does not appear to belong to an admin user. Will attempt to run anyway."
+
+ #Fetch Genomes
+ dbkeys = {}
+ for dbkey in options.dbkeys:
+ if dbkey not in dbkeys:
+ dbkeys[ dbkey ] = run_tool( FETCH_GENOME_TOOL_ID, None, { 'dbkey':dbkey, 'reference_source|reference_source_selector': 'ucsc', 'reference_source|requested_dbkey': dbkey }, options.api_key, options.base_url, wait=False )
+ else:
+ "dbkey (%s) was specified more than once, skipping additional specification." % ( dbkey )
+
+ print 'Genomes Queued for downloading.'
+
+ #Start indexers
+ indexing_tools = []
+ while dbkeys:
+ for dbkey, value in dbkeys.items():
+ if dataset_is_terminal( value['outputs'][0]['id'], options.api_key, options.base_url ):
+ del dbkeys[ dbkey ]
+ for tool_id in BUILD_INDEX_TOOLS_ID:
+ indexing_tools.append( run_tool( tool_id, None, { 'all_fasta_source':dbkey }, options.api_key, options.base_url, wait=False ) )
+ if dbkeys:
+ time.sleep( options.sleep_time )
+
+ print 'All genomes downloaded and indexers now queued.'
+
+ #Wait for indexers to finish
+ while indexing_tools:
+ for i, indexing_tool_value in enumerate( indexing_tools ):
+ if dataset_is_terminal( indexing_tool_value['outputs'][0]['id'], options.api_key, options.base_url ):
+ print 'Finished:', indexing_tool_value
+ del indexing_tools[i]
+ break
+ if indexing_tools:
+ time.sleep( options.sleep_time )
+
+ print 'All indexers have been run, please check results.'
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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/f957eec387a0/
Changeset: f957eec387a0
Branch: next-stable
User: greg
Date: 2014-02-10 17:33:51
Summary: Fixes for the tool shed's install and test framework.
Affected #: 3 files
diff -r aea2ff5acd6805ad10db0442cc159f7e4e67a541 -r f957eec387a07f5dc7acceff2124a8ef2edac6f8 test/install_and_test_tool_shed_repositories/base/util.py
--- a/test/install_and_test_tool_shed_repositories/base/util.py
+++ b/test/install_and_test_tool_shed_repositories/base/util.py
@@ -285,15 +285,17 @@
break
return version
-def get_missing_repository_dependencies( repository ):
+def get_missing_repository_dependencies( repository, all_missing_repository_dependencies=None ):
"""
Return the entire list of missing repository dependencies for the received repository. The entire
dependency tree will be inspected.
"""
+ if all_missing_repository_dependencies is None:
+ all_missing_repository_dependencies = []
print 'Checking revision %s of repository %s owned by %s for missing repository dependencies.' % \
( repository.changeset_revision, repository.name, repository.owner )
- missing_repository_dependencies = repository.missing_repository_dependencies
- for missing_required_repository in missing_repository_dependencies:
+ all_missing_repository_dependencies.extend( repository.missing_repository_dependencies )
+ for missing_required_repository in repository.missing_repository_dependencies:
print 'Revision %s of required repository %s owned by %s has status %s.' % \
( missing_required_repository.changeset_revision,
missing_required_repository.name,
@@ -301,24 +303,28 @@
missing_required_repository.status )
for repository_dependency in repository.repository_dependencies:
if repository_dependency.missing_repository_dependencies:
- missing_repository_dependencies.extend( get_missing_repository_dependencies( repository_dependency ) )
- return missing_repository_dependencies
+ all_missing_repository_dependencies.extend( get_missing_repository_dependencies( repository_dependency,
+ all_missing_repository_dependencies ) )
+ return all_missing_repository_dependencies
-def get_missing_tool_dependencies( repository ):
+def get_missing_tool_dependencies( repository, all_missing_tool_dependencies=None ):
"""
Return the entire list of missing tool dependencies for the received repository. The entire
dependency tree will be inspected.
"""
+ if all_missing_tool_dependencies is None:
+ all_missing_tool_dependencies = []
print 'Checking revision %s of repository %s owned by %s for missing tool dependencies.' % \
( repository.changeset_revision, repository.name, repository.owner )
- missing_tool_dependencies = repository.missing_tool_dependencies
- for missing_tool_dependency in missing_tool_dependencies:
+ all_missing_tool_dependencies.extend( repository.missing_tool_dependencies )
+ for missing_tool_dependency in repository.missing_tool_dependencies:
print 'Tool dependency %s version %s has status %s.' % \
( missing_tool_dependency.name, missing_tool_dependency.version, missing_tool_dependency.status )
for repository_dependency in repository.repository_dependencies:
- if repository_dependency.includes_tool_dependencies:
- missing_tool_dependencies.extend( get_missing_tool_dependencies( repository_dependency ) )
- return missing_tool_dependencies
+ if repository_dependency.missing_tool_dependencies:
+ all_missing_tool_dependencies.extend( get_missing_tool_dependencies( repository_dependency,
+ all_missing_tool_dependencies ) )
+ return all_missing_tool_dependencies
def get_repositories_to_install( tool_shed_url, test_framework ):
"""
@@ -950,29 +956,23 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
- response_dict = save_test_results_for_changeset_revision( galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dependencies_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ save_test_results_for_changeset_revision( galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dependencies_dict,
+ params,
+ can_update_tool_shed )
else:
# The required repository's installation failed.
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = str( required_repository.error_message )
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = save_test_results_for_changeset_revision( galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dependencies_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ save_test_results_for_changeset_revision( galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dependencies_dict,
+ params,
+ can_update_tool_shed )
else:
print 'Cannot retrieve revision %s of required repository %s owned by %s from the database ' % \
( changeset_revision, name, owner )
@@ -1059,26 +1059,26 @@
changeset_revision = repository_dict.get( 'changeset_revision', None )
if name is None or owner is None or changeset_revision is None:
print 'Entries for name, owner or changeset_revision missing from repository_dict %s' % repository_dict
- return {}
- name = str( name )
- owner = str( owner )
- changeset_revision = str( changeset_revision )
- print '\n============================================================='
- print 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( tool_test_results_dict ) )
- print 'Updating tool_test_results for repository_metadata id %s.' % metadata_revision_id
- tool_test_results_dicts.insert( 0, tool_test_results_dict )
- params[ 'tool_test_results' ] = tool_test_results_dicts
- # Set the time_last_tested entry so that the repository_metadata.time_last_tested will be set in the tool shed.
- params[ 'time_last_tested' ] = 'This entry will result in this value being set via the Tool Shed API.'
- url = '%s' % ( suc.url_join( galaxy_tool_shed_url,'api', 'repository_revisions', str( metadata_revision_id ) ) )
- print 'url: ', url
- print 'params: ', params
- try:
- return update( tool_shed_api_key, url, params, return_formatted=False )
- except Exception, e:
- log.exception( 'Error updating tool_test_results for repository_metadata id %s:\n%s' % \
- ( str( metadata_revision_id ), str( e ) ) )
- return {}
- else:
- return {}
+ else:
+ name = str( name )
+ owner = str( owner )
+ changeset_revision = str( changeset_revision )
+ print '\n=============================================================\n'
+ print 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( tool_test_results_dict ) )
+ print 'Updating tool_test_results for repository_metadata id %s.' % metadata_revision_id
+ tool_test_results_dicts.insert( 0, tool_test_results_dict )
+ params[ 'tool_test_results' ] = tool_test_results_dicts
+ # Set the time_last_tested entry so that the repository_metadata.time_last_tested will be set in the tool shed.
+ params[ 'time_last_tested' ] = 'This entry will result in this value being set via the Tool Shed API.'
+ url = '%s' % ( suc.url_join( galaxy_tool_shed_url,'api', 'repository_revisions', str( metadata_revision_id ) ) )
+ print 'url: ', url
+ print 'params: ', params
+ try:
+ response_from_update = update( tool_shed_api_key, url, params, return_formatted=False )
+ print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( response_from_update ) )
+ print '\n=============================================================\n'
+ except Exception, e:
+ log.exception( 'Error updating tool_test_results for repository_metadata id %s:\n%s' % \
+ ( str( metadata_revision_id ), str( e ) ) )
diff -r aea2ff5acd6805ad10db0442cc159f7e4e67a541 -r f957eec387a07f5dc7acceff2124a8ef2edac6f8 test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
@@ -195,16 +195,12 @@
# If this repository is being skipped, register the reason.
tool_test_results_dict[ 'not_tested' ] = dict( reason=reason )
params = dict( do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# See if the repository was installed in a previous test.
repository = install_and_test_base_util.get_repository( name, owner, changeset_revision )
@@ -223,16 +219,12 @@
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The repository was successfully installed.
print 'Installation succeeded for revision %s of repository %s owned by %s.' % \
@@ -243,6 +235,9 @@
# missing test components.
if 'missing_test_components' not in tool_test_results_dict:
tool_test_results_dict[ 'missing_test_components' ] = []
+ # Hopefully we'll be able to run functional tests defined for tools contained in the repository - we'll
+ # assume so as the default.
+ can_run_functional_tests = True
# Populate the installation containers (success and error) for the repository's immediate dependencies
# (the entire dependency tree is not handled here).
params, install_and_test_statistics_dict, tool_test_results_dict = \
@@ -254,16 +249,18 @@
if params.get( 'test_install_error', False ):
# The repository was successfully installed, but one or more dependencies had installation errors,
# so we'll populate the test result containers since we cannot execute any tests.
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
+ # We cannot run functional tests for contained tools due to dependency installation errors.
+ print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
+ ( changeset_revision, name, owner )
+ print 'because one or more dependencies has installation errors.'
+ can_run_functional_tests = False
+ remove_tests( app )
# Populate the installation containers (success or error) for the repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
@@ -271,63 +268,67 @@
encoded_repository_metadata_id,
install_and_test_statistics_dict,
can_update_tool_shed )
- # Execute the contained tool's functional tests only if the repository's entire dependency
- # tree is successfully installed.
- missing_repository_dependencies = install_and_test_base_util.get_missing_repository_dependencies( repository )
- missing_tool_dependencies = install_and_test_base_util.get_missing_tool_dependencies( repository )
- if missing_repository_dependencies or missing_tool_dependencies:
- print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
- ( changeset_revision, name, owner )
- print 'because one or more dependencies has installation errors.'
- # The repository was installed successfully, but one or more dependencies had installation errors. Since
- # we cannot test the tools due to these errors, we'll remove tests and tools were created during the repository
- # installation process so nose will not discover them and attempt to execute them.
- remove_tests( app )
- else:
- print 'Revision %s of repository %s owned by %s installed successfully, so running tool tests.' % \
- ( changeset_revision, name, owner )
- # Generate the shed_tools_dict that specifies the location of test data contained within this repository.
- # and configure and run functional tests for this repository. This is equivalent to
- # sh run_functional_tests.sh -installed
- file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( {} ) )
- # Find the path to the test-data directory within the installed repository.
- has_test_data, shed_tools_dict = \
- parse_tool_panel_config( galaxy_shed_tool_conf_file,
- from_json_string( file( galaxy_shed_tools_dict, 'r' ).read() ) )
- # If the repository has a test-data directory we write the generated shed_tools_dict to a temporary
- # file so the functional test framework can find it.
- # TODO: Eliminate the need for this shed_tools_dict since it grows large over the course of each test run.
- # If it cannot be eliminated altogether, reinitialize it with each new repository install so at this point
- # it contains only entries for the current repository dependency hierarchy being tested.
- file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) )
- print 'Saved generated shed_tools_dict to %s\nContents: %s' % ( galaxy_shed_tools_dict, shed_tools_dict )
- try:
- install_and_test_statistics_dict = test_repository_tools( app,
- repository,
- repository_dict,
- tool_test_results_dicts,
- tool_test_results_dict,
- install_and_test_statistics_dict )
- except Exception, e:
- exception_message = 'Error executing tests for repository %s: %s' % ( name, str( e ) )
- log.exception( exception_message )
- tool_test_results_dict[ 'failed_tests' ].append( exception_message )
- processed_at_least_one_test_failed = \
- install_and_test_statistics_dict.get( 'at_least_one_test_failed', [] )
- if repository_identifier_tup not in processed_at_least_one_test_failed:
- install_and_test_statistics_dict[ 'at_least_one_test_failed' ].append( repository_identifier_tup )
- # Record the status of this repository in the tool shed.
- params[ 'tools_functionally_correct' ] = False
- response_dict = \
+ if can_run_functional_tests:
+ # Execute the contained tool's functional tests only if the repository's entire dependency
+ # tree is successfully installed. The following checks should discover missing dependencies
+ # at any level of the dependency hierarchy.
+ missing_repository_dependencies = \
+ install_and_test_base_util.get_missing_repository_dependencies( repository,
+ all_missing_repository_dependencies=None )
+ print 'Missing repository dependencies:\n%s' % str( missing_repository_dependencies )
+ missing_tool_dependencies = \
+ install_and_test_base_util.get_missing_tool_dependencies( repository,
+ all_missing_tool_dependencies=None )
+ print 'Missing tool dependencies:\n%s' % str( missing_tool_dependencies )
+ if missing_repository_dependencies or missing_tool_dependencies:
+ print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
+ ( changeset_revision, name, owner )
+ print 'because one or more dependencies has installation errors.'
+ # The repository was installed successfully, but one or more dependencies had installation errors. Since
+ # we cannot test the tools due to these errors, we'll remove tests and tools were created during the repository
+ # installation process so nose will not discover them and attempt to execute them.
+ remove_tests( app )
+ else:
+ print 'Revision %s of repository %s owned by %s installed successfully, so running tool tests.' % \
+ ( changeset_revision, name, owner )
+ # Generate the shed_tools_dict that specifies the location of test data contained within this repository.
+ # and configure and run functional tests for this repository. This is equivalent to
+ # sh run_functional_tests.sh -installed
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( {} ) )
+ # Find the path to the test-data directory within the installed repository.
+ has_test_data, shed_tools_dict = \
+ parse_tool_panel_config( galaxy_shed_tool_conf_file,
+ from_json_string( file( galaxy_shed_tools_dict, 'r' ).read() ) )
+ # If the repository has a test-data directory we write the generated shed_tools_dict to a temporary
+ # file so the functional test framework can find it.
+ # TODO: Eliminate the need for this shed_tools_dict since it grows large over the course of each test run.
+ # If it cannot be eliminated altogether, reinitialize it with each new repository install so at this point
+ # it contains only entries for the current repository dependency hierarchy being tested.
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) )
+ print 'Saved generated shed_tools_dict to %s\nContents: %s' % ( galaxy_shed_tools_dict, shed_tools_dict )
+ try:
+ install_and_test_statistics_dict = test_repository_tools( app,
+ repository,
+ repository_dict,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ install_and_test_statistics_dict )
+ except Exception, e:
+ exception_message = 'Error executing tests for repository %s: %s' % ( name, str( e ) )
+ log.exception( exception_message )
+ tool_test_results_dict[ 'failed_tests' ].append( exception_message )
+ processed_at_least_one_test_failed = \
+ install_and_test_statistics_dict.get( 'at_least_one_test_failed', [] )
+ if repository_identifier_tup not in processed_at_least_one_test_failed:
+ install_and_test_statistics_dict[ 'at_least_one_test_failed' ].append( repository_identifier_tup )
+ # Record the status of this repository in the tool shed.
+ params[ 'tools_functionally_correct' ] = False
install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
tool_test_results_dicts,
tool_test_results_dict,
repository_dict,
params,
can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
else:
print 'Skipped attempt to install revision %s of repository %s owned by %s because ' % \
( changeset_revision, name, owner )
@@ -663,16 +664,12 @@
# Call the save_test_results_for_changeset_revision() method to execute a PUT request to the
# repository_revisions API controller with the status of the test. This also sets the do_not_test
# and tools_functionally correct flags and updates the time_last_tested field to today's date.
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The get_failed_test_dicts() method returns a list.
print 'Revision %s of repository %s owned by %s installed successfully but did not pass functional tests.' % \
@@ -695,16 +692,12 @@
params = dict( tools_functionally_correct=False,
test_install_error=False,
do_not_test=set_do_not_test )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
# Remove the just-executed tests so twill will not find and re-test them along with the tools
# contained in the next repository.
remove_tests( app )
diff -r aea2ff5acd6805ad10db0442cc159f7e4e67a541 -r f957eec387a07f5dc7acceff2124a8ef2edac6f8 test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
@@ -129,16 +129,12 @@
( changeset_revision, name, owner )
tool_test_results_dict[ 'not_tested' ] = dict( reason=reason )
params = dict( do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# See if the repository was installed in a previous test.
repository = install_and_test_base_util.get_repository( name, owner, changeset_revision )
@@ -157,16 +153,12 @@
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The repository was successfully installed.
print 'Installation succeeded for revision %s of repository %s owned by %s.' % \
@@ -179,16 +171,12 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
# Populate the installation containers (success or error) for the repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
https://bitbucket.org/galaxy/galaxy-central/commits/1c14b0cdba15/
Changeset: 1c14b0cdba15
User: greg
Date: 2014-02-10 17:34:23
Summary: merged from next-stable
Affected #: 3 files
diff -r 7ca065784d58e7aa77e5092952eacd963853df65 -r 1c14b0cdba15d8ffc2474a82aa3ca535e728f941 test/install_and_test_tool_shed_repositories/base/util.py
--- a/test/install_and_test_tool_shed_repositories/base/util.py
+++ b/test/install_and_test_tool_shed_repositories/base/util.py
@@ -285,15 +285,17 @@
break
return version
-def get_missing_repository_dependencies( repository ):
+def get_missing_repository_dependencies( repository, all_missing_repository_dependencies=None ):
"""
Return the entire list of missing repository dependencies for the received repository. The entire
dependency tree will be inspected.
"""
+ if all_missing_repository_dependencies is None:
+ all_missing_repository_dependencies = []
print 'Checking revision %s of repository %s owned by %s for missing repository dependencies.' % \
( repository.changeset_revision, repository.name, repository.owner )
- missing_repository_dependencies = repository.missing_repository_dependencies
- for missing_required_repository in missing_repository_dependencies:
+ all_missing_repository_dependencies.extend( repository.missing_repository_dependencies )
+ for missing_required_repository in repository.missing_repository_dependencies:
print 'Revision %s of required repository %s owned by %s has status %s.' % \
( missing_required_repository.changeset_revision,
missing_required_repository.name,
@@ -301,24 +303,28 @@
missing_required_repository.status )
for repository_dependency in repository.repository_dependencies:
if repository_dependency.missing_repository_dependencies:
- missing_repository_dependencies.extend( get_missing_repository_dependencies( repository_dependency ) )
- return missing_repository_dependencies
+ all_missing_repository_dependencies.extend( get_missing_repository_dependencies( repository_dependency,
+ all_missing_repository_dependencies ) )
+ return all_missing_repository_dependencies
-def get_missing_tool_dependencies( repository ):
+def get_missing_tool_dependencies( repository, all_missing_tool_dependencies=None ):
"""
Return the entire list of missing tool dependencies for the received repository. The entire
dependency tree will be inspected.
"""
+ if all_missing_tool_dependencies is None:
+ all_missing_tool_dependencies = []
print 'Checking revision %s of repository %s owned by %s for missing tool dependencies.' % \
( repository.changeset_revision, repository.name, repository.owner )
- missing_tool_dependencies = repository.missing_tool_dependencies
- for missing_tool_dependency in missing_tool_dependencies:
+ all_missing_tool_dependencies.extend( repository.missing_tool_dependencies )
+ for missing_tool_dependency in repository.missing_tool_dependencies:
print 'Tool dependency %s version %s has status %s.' % \
( missing_tool_dependency.name, missing_tool_dependency.version, missing_tool_dependency.status )
for repository_dependency in repository.repository_dependencies:
- if repository_dependency.includes_tool_dependencies:
- missing_tool_dependencies.extend( get_missing_tool_dependencies( repository_dependency ) )
- return missing_tool_dependencies
+ if repository_dependency.missing_tool_dependencies:
+ all_missing_tool_dependencies.extend( get_missing_tool_dependencies( repository_dependency,
+ all_missing_tool_dependencies ) )
+ return all_missing_tool_dependencies
def get_repositories_to_install( tool_shed_url, test_framework ):
"""
@@ -950,29 +956,23 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
- response_dict = save_test_results_for_changeset_revision( galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dependencies_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ save_test_results_for_changeset_revision( galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dependencies_dict,
+ params,
+ can_update_tool_shed )
else:
# The required repository's installation failed.
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = str( required_repository.error_message )
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = save_test_results_for_changeset_revision( galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dependencies_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ save_test_results_for_changeset_revision( galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dependencies_dict,
+ params,
+ can_update_tool_shed )
else:
print 'Cannot retrieve revision %s of required repository %s owned by %s from the database ' % \
( changeset_revision, name, owner )
@@ -1059,26 +1059,26 @@
changeset_revision = repository_dict.get( 'changeset_revision', None )
if name is None or owner is None or changeset_revision is None:
print 'Entries for name, owner or changeset_revision missing from repository_dict %s' % repository_dict
- return {}
- name = str( name )
- owner = str( owner )
- changeset_revision = str( changeset_revision )
- print '\n============================================================='
- print 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( tool_test_results_dict ) )
- print 'Updating tool_test_results for repository_metadata id %s.' % metadata_revision_id
- tool_test_results_dicts.insert( 0, tool_test_results_dict )
- params[ 'tool_test_results' ] = tool_test_results_dicts
- # Set the time_last_tested entry so that the repository_metadata.time_last_tested will be set in the tool shed.
- params[ 'time_last_tested' ] = 'This entry will result in this value being set via the Tool Shed API.'
- url = '%s' % ( suc.url_join( galaxy_tool_shed_url,'api', 'repository_revisions', str( metadata_revision_id ) ) )
- print 'url: ', url
- print 'params: ', params
- try:
- return update( tool_shed_api_key, url, params, return_formatted=False )
- except Exception, e:
- log.exception( 'Error updating tool_test_results for repository_metadata id %s:\n%s' % \
- ( str( metadata_revision_id ), str( e ) ) )
- return {}
- else:
- return {}
+ else:
+ name = str( name )
+ owner = str( owner )
+ changeset_revision = str( changeset_revision )
+ print '\n=============================================================\n'
+ print 'Inserting the following into tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( tool_test_results_dict ) )
+ print 'Updating tool_test_results for repository_metadata id %s.' % metadata_revision_id
+ tool_test_results_dicts.insert( 0, tool_test_results_dict )
+ params[ 'tool_test_results' ] = tool_test_results_dicts
+ # Set the time_last_tested entry so that the repository_metadata.time_last_tested will be set in the tool shed.
+ params[ 'time_last_tested' ] = 'This entry will result in this value being set via the Tool Shed API.'
+ url = '%s' % ( suc.url_join( galaxy_tool_shed_url,'api', 'repository_revisions', str( metadata_revision_id ) ) )
+ print 'url: ', url
+ print 'params: ', params
+ try:
+ response_from_update = update( tool_shed_api_key, url, params, return_formatted=False )
+ print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
+ ( changeset_revision, name, owner, str( response_from_update ) )
+ print '\n=============================================================\n'
+ except Exception, e:
+ log.exception( 'Error updating tool_test_results for repository_metadata id %s:\n%s' % \
+ ( str( metadata_revision_id ), str( e ) ) )
diff -r 7ca065784d58e7aa77e5092952eacd963853df65 -r 1c14b0cdba15d8ffc2474a82aa3ca535e728f941 test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/repositories_with_tools/functional_tests.py
@@ -195,16 +195,12 @@
# If this repository is being skipped, register the reason.
tool_test_results_dict[ 'not_tested' ] = dict( reason=reason )
params = dict( do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# See if the repository was installed in a previous test.
repository = install_and_test_base_util.get_repository( name, owner, changeset_revision )
@@ -223,16 +219,12 @@
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The repository was successfully installed.
print 'Installation succeeded for revision %s of repository %s owned by %s.' % \
@@ -243,6 +235,9 @@
# missing test components.
if 'missing_test_components' not in tool_test_results_dict:
tool_test_results_dict[ 'missing_test_components' ] = []
+ # Hopefully we'll be able to run functional tests defined for tools contained in the repository - we'll
+ # assume so as the default.
+ can_run_functional_tests = True
# Populate the installation containers (success and error) for the repository's immediate dependencies
# (the entire dependency tree is not handled here).
params, install_and_test_statistics_dict, tool_test_results_dict = \
@@ -254,16 +249,18 @@
if params.get( 'test_install_error', False ):
# The repository was successfully installed, but one or more dependencies had installation errors,
# so we'll populate the test result containers since we cannot execute any tests.
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print'\n============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
+ # We cannot run functional tests for contained tools due to dependency installation errors.
+ print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
+ ( changeset_revision, name, owner )
+ print 'because one or more dependencies has installation errors.'
+ can_run_functional_tests = False
+ remove_tests( app )
# Populate the installation containers (success or error) for the repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
@@ -271,63 +268,67 @@
encoded_repository_metadata_id,
install_and_test_statistics_dict,
can_update_tool_shed )
- # Execute the contained tool's functional tests only if the repository's entire dependency
- # tree is successfully installed.
- missing_repository_dependencies = install_and_test_base_util.get_missing_repository_dependencies( repository )
- missing_tool_dependencies = install_and_test_base_util.get_missing_tool_dependencies( repository )
- if missing_repository_dependencies or missing_tool_dependencies:
- print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
- ( changeset_revision, name, owner )
- print 'because one or more dependencies has installation errors.'
- # The repository was installed successfully, but one or more dependencies had installation errors. Since
- # we cannot test the tools due to these errors, we'll remove tests and tools were created during the repository
- # installation process so nose will not discover them and attempt to execute them.
- remove_tests( app )
- else:
- print 'Revision %s of repository %s owned by %s installed successfully, so running tool tests.' % \
- ( changeset_revision, name, owner )
- # Generate the shed_tools_dict that specifies the location of test data contained within this repository.
- # and configure and run functional tests for this repository. This is equivalent to
- # sh run_functional_tests.sh -installed
- file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( {} ) )
- # Find the path to the test-data directory within the installed repository.
- has_test_data, shed_tools_dict = \
- parse_tool_panel_config( galaxy_shed_tool_conf_file,
- from_json_string( file( galaxy_shed_tools_dict, 'r' ).read() ) )
- # If the repository has a test-data directory we write the generated shed_tools_dict to a temporary
- # file so the functional test framework can find it.
- # TODO: Eliminate the need for this shed_tools_dict since it grows large over the course of each test run.
- # If it cannot be eliminated altogether, reinitialize it with each new repository install so at this point
- # it contains only entries for the current repository dependency hierarchy being tested.
- file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) )
- print 'Saved generated shed_tools_dict to %s\nContents: %s' % ( galaxy_shed_tools_dict, shed_tools_dict )
- try:
- install_and_test_statistics_dict = test_repository_tools( app,
- repository,
- repository_dict,
- tool_test_results_dicts,
- tool_test_results_dict,
- install_and_test_statistics_dict )
- except Exception, e:
- exception_message = 'Error executing tests for repository %s: %s' % ( name, str( e ) )
- log.exception( exception_message )
- tool_test_results_dict[ 'failed_tests' ].append( exception_message )
- processed_at_least_one_test_failed = \
- install_and_test_statistics_dict.get( 'at_least_one_test_failed', [] )
- if repository_identifier_tup not in processed_at_least_one_test_failed:
- install_and_test_statistics_dict[ 'at_least_one_test_failed' ].append( repository_identifier_tup )
- # Record the status of this repository in the tool shed.
- params[ 'tools_functionally_correct' ] = False
- response_dict = \
+ if can_run_functional_tests:
+ # Execute the contained tool's functional tests only if the repository's entire dependency
+ # tree is successfully installed. The following checks should discover missing dependencies
+ # at any level of the dependency hierarchy.
+ missing_repository_dependencies = \
+ install_and_test_base_util.get_missing_repository_dependencies( repository,
+ all_missing_repository_dependencies=None )
+ print 'Missing repository dependencies:\n%s' % str( missing_repository_dependencies )
+ missing_tool_dependencies = \
+ install_and_test_base_util.get_missing_tool_dependencies( repository,
+ all_missing_tool_dependencies=None )
+ print 'Missing tool dependencies:\n%s' % str( missing_tool_dependencies )
+ if missing_repository_dependencies or missing_tool_dependencies:
+ print 'Cannot execute tests for tools in revision %s of repository %s owned by %s ' % \
+ ( changeset_revision, name, owner )
+ print 'because one or more dependencies has installation errors.'
+ # The repository was installed successfully, but one or more dependencies had installation errors. Since
+ # we cannot test the tools due to these errors, we'll remove tests and tools were created during the repository
+ # installation process so nose will not discover them and attempt to execute them.
+ remove_tests( app )
+ else:
+ print 'Revision %s of repository %s owned by %s installed successfully, so running tool tests.' % \
+ ( changeset_revision, name, owner )
+ # Generate the shed_tools_dict that specifies the location of test data contained within this repository.
+ # and configure and run functional tests for this repository. This is equivalent to
+ # sh run_functional_tests.sh -installed
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( {} ) )
+ # Find the path to the test-data directory within the installed repository.
+ has_test_data, shed_tools_dict = \
+ parse_tool_panel_config( galaxy_shed_tool_conf_file,
+ from_json_string( file( galaxy_shed_tools_dict, 'r' ).read() ) )
+ # If the repository has a test-data directory we write the generated shed_tools_dict to a temporary
+ # file so the functional test framework can find it.
+ # TODO: Eliminate the need for this shed_tools_dict since it grows large over the course of each test run.
+ # If it cannot be eliminated altogether, reinitialize it with each new repository install so at this point
+ # it contains only entries for the current repository dependency hierarchy being tested.
+ file( galaxy_shed_tools_dict, 'w' ).write( to_json_string( shed_tools_dict ) )
+ print 'Saved generated shed_tools_dict to %s\nContents: %s' % ( galaxy_shed_tools_dict, shed_tools_dict )
+ try:
+ install_and_test_statistics_dict = test_repository_tools( app,
+ repository,
+ repository_dict,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ install_and_test_statistics_dict )
+ except Exception, e:
+ exception_message = 'Error executing tests for repository %s: %s' % ( name, str( e ) )
+ log.exception( exception_message )
+ tool_test_results_dict[ 'failed_tests' ].append( exception_message )
+ processed_at_least_one_test_failed = \
+ install_and_test_statistics_dict.get( 'at_least_one_test_failed', [] )
+ if repository_identifier_tup not in processed_at_least_one_test_failed:
+ install_and_test_statistics_dict[ 'at_least_one_test_failed' ].append( repository_identifier_tup )
+ # Record the status of this repository in the tool shed.
+ params[ 'tools_functionally_correct' ] = False
install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
tool_test_results_dicts,
tool_test_results_dict,
repository_dict,
params,
can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
else:
print 'Skipped attempt to install revision %s of repository %s owned by %s because ' % \
( changeset_revision, name, owner )
@@ -663,16 +664,12 @@
# Call the save_test_results_for_changeset_revision() method to execute a PUT request to the
# repository_revisions API controller with the status of the test. This also sets the do_not_test
# and tools_functionally correct flags and updates the time_last_tested field to today's date.
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The get_failed_test_dicts() method returns a list.
print 'Revision %s of repository %s owned by %s installed successfully but did not pass functional tests.' % \
@@ -695,16 +692,12 @@
params = dict( tools_functionally_correct=False,
test_install_error=False,
do_not_test=set_do_not_test )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
# Remove the just-executed tests so twill will not find and re-test them along with the tools
# contained in the next repository.
remove_tests( app )
diff -r 7ca065784d58e7aa77e5092952eacd963853df65 -r 1c14b0cdba15d8ffc2474a82aa3ca535e728f941 test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
--- a/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
+++ b/test/install_and_test_tool_shed_repositories/tool_dependency_definitions/functional_tests.py
@@ -129,16 +129,12 @@
( changeset_revision, name, owner )
tool_test_results_dict[ 'not_tested' ] = dict( reason=reason )
params = dict( do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# See if the repository was installed in a previous test.
repository = install_and_test_base_util.get_repository( name, owner, changeset_revision )
@@ -157,16 +153,12 @@
tool_test_results_dict[ 'installation_errors' ][ 'current_repository' ] = error_message
params = dict( test_install_error=True,
do_not_test=False )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
else:
# The repository was successfully installed.
print 'Installation succeeded for revision %s of repository %s owned by %s.' % \
@@ -179,16 +171,12 @@
repository_identifier_tup,
install_and_test_statistics_dict,
tool_test_results_dict )
- response_dict = \
- install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
- tool_test_results_dicts,
- tool_test_results_dict,
- repository_dict,
- params,
- can_update_tool_shed )
- print 'Result of inserting tool_test_results for revision %s of repository %s owned by %s:\n%s' % \
- ( changeset_revision, name, owner, str( response_dict ) )
- print '============================================================='
+ install_and_test_base_util.save_test_results_for_changeset_revision( install_and_test_base_util.galaxy_tool_shed_url,
+ tool_test_results_dicts,
+ tool_test_results_dict,
+ repository_dict,
+ params,
+ can_update_tool_shed )
# Populate the installation containers (success or error) for the repository's immediate repository
# dependencies whose containers are not yet populated.
install_and_test_base_util.populate_install_containers_for_repository_dependencies( app,
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 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/0c2b806274c5/
Changeset: 0c2b806274c5
User: guerler
Date: 2014-02-08 06:31:29
Summary: Upload: Fix progress bar in FF
Affected #: 4 files
diff -r 303f709d14276511f121c216f030400fddec2bd5 -r 0c2b806274c53d16d9c9ba15501431a2103c8a54 static/scripts/mvc/upload/upload-model.js
--- a/static/scripts/mvc/upload/upload-model.js
+++ b/static/scripts/mvc/upload/upload-model.js
@@ -13,6 +13,7 @@
file_size : 0,
file_type : null,
file_path : '',
+ percentage : 0,
// settings
space_to_tabs : false,
diff -r 303f709d14276511f121c216f030400fddec2bd5 -r 0c2b806274c53d16d9c9ba15501431a2103c8a54 static/scripts/mvc/upload/upload-view.js
--- a/static/scripts/mvc/upload/upload-view.js
+++ b/static/scripts/mvc/upload/upload-view.js
@@ -342,6 +342,7 @@
// update status
var it = this.collection.get(index);
it.set('status', 'success');
+ it.set('percentage', 100);
// file size
var file_size = it.get('file_size');
@@ -371,6 +372,7 @@
// update status
it.set('status', 'error');
it.set('info', message);
+ it.set('percentage', 100);
// update ui button
this.ui_button.set('percentage', this._upload_percentage(100, file.size));
diff -r 303f709d14276511f121c216f030400fddec2bd5 -r 0c2b806274c53d16d9c9ba15501431a2103c8a54 static/scripts/packed/mvc/upload/upload-model.js
--- a/static/scripts/packed/mvc/upload/upload-model.js
+++ b/static/scripts/packed/mvc/upload/upload-model.js
@@ -1,1 +1,1 @@
-define([],function(){var b=Backbone.Model.extend({defaults:{extension:"auto",genome:"?",url_paste:"",status:"init",info:null,file_mode:"local",file_size:0,file_type:null,file_path:"",space_to_tabs:false,to_posix_lines:true}});var a=Backbone.Collection.extend({model:b});return{Model:b,Collection:a}});
\ No newline at end of file
+define([],function(){var b=Backbone.Model.extend({defaults:{extension:"auto",genome:"?",url_paste:"",status:"init",info:null,file_mode:"local",file_size:0,file_type:null,file_path:"",percentage:0,space_to_tabs:false,to_posix_lines:true}});var a=Backbone.Collection.extend({model:b});return{Model:b,Collection:a}});
\ No newline at end of file
diff -r 303f709d14276511f121c216f030400fddec2bd5 -r 0c2b806274c53d16d9c9ba15501431a2103c8a54 static/scripts/packed/mvc/upload/upload-view.js
--- a/static/scripts/packed/mvc/upload/upload-view.js
+++ b/static/scripts/packed/mvc/upload/upload-view.js
@@ -1,1 +1,1 @@
-define(["galaxy.modal","utils/utils","mvc/upload/upload-button","mvc/upload/upload-model","mvc/upload/upload-row","mvc/upload/upload-ftp","mvc/ui.popover","mvc/ui","utils/uploadbox"],function(a,f,e,c,b,g,d){return Backbone.View.extend({options:{nginx_upload_path:""},modal:null,ui_button:null,uploadbox:null,current_history:null,upload_size:0,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],collection:new c.Collection(),ftp:null,counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},initialize:function(i){var h=this;if(!Galaxy.currHistoryPanel||!Galaxy.currHistoryPanel.model){window.setTimeout(function(){h.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}this.ui_button=new e.Model({icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",onclick:function(j){if(j){h._eventShow(j)}},onunload:function(){if(h.counter.running>0){return"Several uploads are still processing."}}});$("#left .unified-panel-header-inner").append((new e.View(this.ui_button)).$el);var h=this;f.jsonFromUrl(galaxy_config.root+"api/datatypes?upload_only=True",function(j){for(key in j){h.select_extension.push([j[key],j[key]])}});f.jsonFromUrl(galaxy_config.root+"api/genomes",function(j){var k=h.select_genome[0];h.select_genome=[];for(key in j){if(j[key].length>1){if(j[key][1]!==k[1]){h.select_genome.push(j[key])}}}h.select_genome.sort(function(m,l){return m[0]>l[0]?1:m[0]<l[0]?-1:0});h.select_genome.unshift(k)});if(i){this.options=_.defaults(i,this.options)}this.collection.on("remove",function(j){h._eventRemove(j)});this.collection.on("change:genome",function(k){var j=k.get("genome");h.collection.each(function(l){if(l.get("status")=="init"&&l.get("genome")=="?"){l.set("genome",j)}})})},_eventShow:function(j){j.preventDefault();if(!this.modal){var h=this;this.modal=new a.GalaxyModal({title:"Download data directly from web or upload files from your disk",body:this._template("upload-box","upload-info"),buttons:{"Choose local file":function(){h.uploadbox.select()},"Choose FTP file":function(){h._eventFtp()},"Create new file":function(){h._eventCreate()},Start:function(){h._eventStart()},Pause:function(){h._eventStop()},Reset:function(){h._eventReset()},Close:function(){h.modal.hide()},},height:"400",width:"900",closing_events:true});this.setElement("#upload-box");var h=this;this.uploadbox=this.$el.uploadbox({announce:function(k,l,m){h._eventAnnounce(k,l,m)},initialize:function(k,l,m){return h._eventInitialize(k,l,m)},progress:function(k,l,m){h._eventProgress(k,l,m)},success:function(k,l,m){h._eventSuccess(k,l,m)},error:function(k,l,m){h._eventError(k,l,m)},complete:function(){h._eventComplete()}});this._updateScreen();if(this.options.ftp_upload_dir&&this.options.ftp_upload_site){var i=this.modal.getButton("Choose FTP file");this.ftp=new d.View({title:"FTP files",container:i})}else{this.modal.hideButton("Choose FTP file")}}this.modal.show()},_eventRemove:function(i){var h=i.get("status");if(h=="success"){this.counter.success--}else{if(h=="error"){this.counter.error--}else{this.counter.announce--}}this._updateScreen();this.uploadbox.remove(i.id)},_eventAnnounce:function(h,i,k){this.counter.announce++;this._updateScreen();var j=new b(this,{id:h,file_name:i.name,file_size:i.size,file_mode:i.mode,file_path:i.path});this.collection.add(j.model);$(this.el).find("tbody:first").append(j.$el);j.render()},_eventInitialize:function(m,j,s){var k=this.collection.get(m);k.set("status","running");var o=k.get("file_name");var n=k.get("file_path");var h=k.get("file_mode");var p=k.get("extension");var r=k.get("genome");var q=k.get("url_paste");var l=k.get("space_to_tabs");var i=k.get("to_posix_lines");if(!q&&!(j.size>0)){return null}this.uploadbox.configure({url:this.options.nginx_upload_path});if(h=="ftp"){this.uploadbox.configure({paramname:""})}else{this.uploadbox.configure({paramname:"files_0|file_data"})}tool_input={};tool_input.dbkey=r;tool_input.file_type=p;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=q;tool_input.space_to_tabs=l;tool_input.to_posix_lines=i;if(h=="ftp"){tool_input["files_0|ftp_files"]=n}data={};data.history_id=this.current_history;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},_eventProgress:function(i,j,h){var k=this.collection.get(i);k.set("percentage",h);this.ui_button.set("percentage",this._upload_percentage(h,j.size))},_eventSuccess:function(i,j,l){var k=this.collection.get(i);k.set("status","success");var h=k.get("file_size");this.ui_button.set("percentage",this._upload_percentage(100,h));this.upload_completed+=h*100;this.counter.announce--;this.counter.success++;this._updateScreen();Galaxy.currHistoryPanel.refreshHdas()},_eventError:function(h,i,k){var j=this.collection.get(h);j.set("status","error");j.set("info",k);this.ui_button.set("percentage",this._upload_percentage(100,i.size));this.ui_button.set("status","danger");this.upload_completed+=i.size*100;this.counter.announce--;this.counter.error++;this._updateScreen()},_eventComplete:function(){this.collection.each(function(h){if(h.get("status")=="queued"){h.set("status","init")}});this.counter.running=0;this._updateScreen()},_eventFtp:function(){if(!this.ftp.visible){this.ftp.empty();this.ftp.append((new g(this)).$el);this.ftp.show()}else{this.ftp.hide()}},_eventCreate:function(){this.uploadbox.add([{name:"New File",size:0,mode:"new"}])},_eventStart:function(){if(this.counter.announce==0||this.counter.running>0){return}var h=this;this.upload_size=0;this.upload_completed=0;this.collection.each(function(i){if(i.get("status")=="init"){i.set("status","queued");h.upload_size+=i.get("file_size")}});this.ui_button.set("percentage",0);this.ui_button.set("status","success");this.current_history=Galaxy.currHistoryPanel.model.get("id");this.counter.running=this.counter.announce;this._updateScreen();this.uploadbox.start()},_eventStop:function(){if(this.counter.running==0){return}this.ui_button.set("status","info");this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},_eventReset:function(){if(this.counter.running==0){this.collection.reset();this.counter.reset();this._updateScreen();this.uploadbox.reset();this.ui_button.set("percentage",0)}},_updateScreen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="You can Drag & Drop files into this box."}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Some supported browsers are: Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Start' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Start")}else{this.modal.disableButton("Start")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Choose local file");this.modal.enableButton("Choose FTP file");this.modal.enableButton("Create new file")}else{this.modal.disableButton("Choose local file");this.modal.disableButton("Choose FTP file");this.modal.disableButton("Create new file")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("#upload-table").show()}else{$(this.el).find("#upload-table").hide()}},_upload_percentage:function(h,i){return(this.upload_completed+(h*i))/this.upload_size},_template:function(i,h){return'<div id="'+i+'" class="upload-box"><table id="upload-table" class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Settings</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+h+'" class="upload-info"></h6>'}})});
\ No newline at end of file
+define(["galaxy.modal","utils/utils","mvc/upload/upload-button","mvc/upload/upload-model","mvc/upload/upload-row","mvc/upload/upload-ftp","mvc/ui.popover","mvc/ui","utils/uploadbox"],function(a,f,e,c,b,g,d){return Backbone.View.extend({options:{nginx_upload_path:""},modal:null,ui_button:null,uploadbox:null,current_history:null,upload_size:0,select_extension:[["Auto-detect","auto"]],select_genome:[["Unspecified (?)","?"]],collection:new c.Collection(),ftp:null,counter:{announce:0,success:0,error:0,running:0,reset:function(){this.announce=this.success=this.error=this.running=0}},initialize:function(i){var h=this;if(!Galaxy.currHistoryPanel||!Galaxy.currHistoryPanel.model){window.setTimeout(function(){h.initialize()},500);return}if(!Galaxy.currUser.get("id")){return}this.ui_button=new e.Model({icon:"fa-upload",tooltip:"Download from URL or upload files from disk",label:"Load Data",onclick:function(j){if(j){h._eventShow(j)}},onunload:function(){if(h.counter.running>0){return"Several uploads are still processing."}}});$("#left .unified-panel-header-inner").append((new e.View(this.ui_button)).$el);var h=this;f.jsonFromUrl(galaxy_config.root+"api/datatypes?upload_only=True",function(j){for(key in j){h.select_extension.push([j[key],j[key]])}});f.jsonFromUrl(galaxy_config.root+"api/genomes",function(j){var k=h.select_genome[0];h.select_genome=[];for(key in j){if(j[key].length>1){if(j[key][1]!==k[1]){h.select_genome.push(j[key])}}}h.select_genome.sort(function(m,l){return m[0]>l[0]?1:m[0]<l[0]?-1:0});h.select_genome.unshift(k)});if(i){this.options=_.defaults(i,this.options)}this.collection.on("remove",function(j){h._eventRemove(j)});this.collection.on("change:genome",function(k){var j=k.get("genome");h.collection.each(function(l){if(l.get("status")=="init"&&l.get("genome")=="?"){l.set("genome",j)}})})},_eventShow:function(j){j.preventDefault();if(!this.modal){var h=this;this.modal=new a.GalaxyModal({title:"Download data directly from web or upload files from your disk",body:this._template("upload-box","upload-info"),buttons:{"Choose local file":function(){h.uploadbox.select()},"Choose FTP file":function(){h._eventFtp()},"Create new file":function(){h._eventCreate()},Start:function(){h._eventStart()},Pause:function(){h._eventStop()},Reset:function(){h._eventReset()},Close:function(){h.modal.hide()},},height:"400",width:"900",closing_events:true});this.setElement("#upload-box");var h=this;this.uploadbox=this.$el.uploadbox({announce:function(k,l,m){h._eventAnnounce(k,l,m)},initialize:function(k,l,m){return h._eventInitialize(k,l,m)},progress:function(k,l,m){h._eventProgress(k,l,m)},success:function(k,l,m){h._eventSuccess(k,l,m)},error:function(k,l,m){h._eventError(k,l,m)},complete:function(){h._eventComplete()}});this._updateScreen();if(this.options.ftp_upload_dir&&this.options.ftp_upload_site){var i=this.modal.getButton("Choose FTP file");this.ftp=new d.View({title:"FTP files",container:i})}else{this.modal.hideButton("Choose FTP file")}}this.modal.show()},_eventRemove:function(i){var h=i.get("status");if(h=="success"){this.counter.success--}else{if(h=="error"){this.counter.error--}else{this.counter.announce--}}this._updateScreen();this.uploadbox.remove(i.id)},_eventAnnounce:function(h,i,k){this.counter.announce++;this._updateScreen();var j=new b(this,{id:h,file_name:i.name,file_size:i.size,file_mode:i.mode,file_path:i.path});this.collection.add(j.model);$(this.el).find("tbody:first").append(j.$el);j.render()},_eventInitialize:function(m,j,s){var k=this.collection.get(m);k.set("status","running");var o=k.get("file_name");var n=k.get("file_path");var h=k.get("file_mode");var p=k.get("extension");var r=k.get("genome");var q=k.get("url_paste");var l=k.get("space_to_tabs");var i=k.get("to_posix_lines");if(!q&&!(j.size>0)){return null}this.uploadbox.configure({url:this.options.nginx_upload_path});if(h=="ftp"){this.uploadbox.configure({paramname:""})}else{this.uploadbox.configure({paramname:"files_0|file_data"})}tool_input={};tool_input.dbkey=r;tool_input.file_type=p;tool_input["files_0|type"]="upload_dataset";tool_input["files_0|url_paste"]=q;tool_input.space_to_tabs=l;tool_input.to_posix_lines=i;if(h=="ftp"){tool_input["files_0|ftp_files"]=n}data={};data.history_id=this.current_history;data.tool_id="upload1";data.inputs=JSON.stringify(tool_input);return data},_eventProgress:function(i,j,h){var k=this.collection.get(i);k.set("percentage",h);this.ui_button.set("percentage",this._upload_percentage(h,j.size))},_eventSuccess:function(i,j,l){var k=this.collection.get(i);k.set("status","success");k.set("percentage",100);var h=k.get("file_size");this.ui_button.set("percentage",this._upload_percentage(100,h));this.upload_completed+=h*100;this.counter.announce--;this.counter.success++;this._updateScreen();Galaxy.currHistoryPanel.refreshHdas()},_eventError:function(h,i,k){var j=this.collection.get(h);j.set("status","error");j.set("info",k);j.set("percentage",100);this.ui_button.set("percentage",this._upload_percentage(100,i.size));this.ui_button.set("status","danger");this.upload_completed+=i.size*100;this.counter.announce--;this.counter.error++;this._updateScreen()},_eventComplete:function(){this.collection.each(function(h){if(h.get("status")=="queued"){h.set("status","init")}});this.counter.running=0;this._updateScreen()},_eventFtp:function(){if(!this.ftp.visible){this.ftp.empty();this.ftp.append((new g(this)).$el);this.ftp.show()}else{this.ftp.hide()}},_eventCreate:function(){this.uploadbox.add([{name:"New File",size:0,mode:"new"}])},_eventStart:function(){if(this.counter.announce==0||this.counter.running>0){return}var h=this;this.upload_size=0;this.upload_completed=0;this.collection.each(function(i){if(i.get("status")=="init"){i.set("status","queued");h.upload_size+=i.get("file_size")}});this.ui_button.set("percentage",0);this.ui_button.set("status","success");this.current_history=Galaxy.currHistoryPanel.model.get("id");this.counter.running=this.counter.announce;this._updateScreen();this.uploadbox.start()},_eventStop:function(){if(this.counter.running==0){return}this.ui_button.set("status","info");this.uploadbox.stop();$("#upload-info").html("Queue will pause after completing the current file...")},_eventReset:function(){if(this.counter.running==0){this.collection.reset();this.counter.reset();this._updateScreen();this.uploadbox.reset();this.ui_button.set("percentage",0)}},_updateScreen:function(){if(this.counter.announce==0){if(this.uploadbox.compatible()){message="You can Drag & Drop files into this box."}else{message="Unfortunately, your browser does not support multiple file uploads or drag&drop.<br>Some supported browsers are: Firefox 4+, Chrome 7+, IE 10+, Opera 12+ or Safari 6+."}}else{if(this.counter.running==0){message="You added "+this.counter.announce+" file(s) to the queue. Add more files or click 'Start' to proceed."}else{message="Please wait..."+this.counter.announce+" out of "+this.counter.running+" remaining."}}$("#upload-info").html(message);if(this.counter.running==0&&this.counter.announce+this.counter.success+this.counter.error>0){this.modal.enableButton("Reset")}else{this.modal.disableButton("Reset")}if(this.counter.running==0&&this.counter.announce>0){this.modal.enableButton("Start")}else{this.modal.disableButton("Start")}if(this.counter.running>0){this.modal.enableButton("Pause")}else{this.modal.disableButton("Pause")}if(this.counter.running==0){this.modal.enableButton("Choose local file");this.modal.enableButton("Choose FTP file");this.modal.enableButton("Create new file")}else{this.modal.disableButton("Choose local file");this.modal.disableButton("Choose FTP file");this.modal.disableButton("Create new file")}if(this.counter.announce+this.counter.success+this.counter.error>0){$(this.el).find("#upload-table").show()}else{$(this.el).find("#upload-table").hide()}},_upload_percentage:function(h,i){return(this.upload_completed+(h*i))/this.upload_size},_template:function(i,h){return'<div id="'+i+'" class="upload-box"><table id="upload-table" class="table table-striped" style="display: none;"><thead><tr><th>Name</th><th>Size</th><th>Type</th><th>Genome</th><th>Settings</th><th>Status</th><th></th></tr></thead><tbody></tbody></table></div><h6 id="'+h+'" class="upload-info"></h6>'}})});
\ No newline at end of file
Repository URL: https://bitbucket.org/galaxy/galaxy-central/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/303f709d1427/
Changeset: 303f709d1427
User: guerler
Date: 2014-02-08 06:06:46
Summary: Charts: Adjust to viz framework change
Affected #: 1 file
diff -r 375c04b4a7085c91c48201fc5d7376ab613874c8 -r 303f709d14276511f121c216f030400fddec2bd5 config/plugins/visualizations/charts/templates/charts.mako
--- a/config/plugins/visualizations/charts/templates/charts.mako
+++ b/config/plugins/visualizations/charts/templates/charts.mako
@@ -61,7 +61,7 @@
require(['app'], function(App) {
// load options
var options = {
- config : ${h.to_json_string( query_args )},
+ config : ${h.to_json_string( config )},
dataset : ${h.to_json_string( trans.security.encode_dict_ids( hda.to_dict() ) )}
}
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.