1 new commit in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/31714646a7b4/
Changeset: 31714646a7b4
User: greg
Date: 2013-05-24 21:14:08
Summary: Add some important documentation to some tool shed methods.
Affected #: 2 files
diff -r 308719efff061598955f5b54fae2621c4f902ee9 -r 31714646a7b441f34a43748065278a1b08940c3c lib/galaxy/webapps/tool_shed/util/container_util.py
--- a/lib/galaxy/webapps/tool_shed/util/container_util.py
+++ b/lib/galaxy/webapps/tool_shed/util/container_util.py
@@ -798,12 +798,13 @@
label='Valid tools' )
containers_dict[ 'valid_tools' ] = valid_tools_root_folder
# Tool test results container.
- if tool_test_results:
- # Only create and populate this folder if there are actual tool test results to display, since the
- # display of the 'Test environment' folder by itself can be misleading.
- if len( tool_test_results ) > 1:
- folder_id, tool_test_results_root_folder = build_tool_test_results_folder( trans, folder_id, tool_test_results, time_last_tested=time_last_tested )
- containers_dict[ 'tool_test_results' ] = tool_test_results_root_folder
+ if tool_test_results and len( tool_test_results ) > 1:
+ # Only create and populate this folder if there are actual tool test results to display, since the display of the 'Test environment'
+ # folder by itself can be misleading. We check for more than a single entry in the tool_test_results dictionary because it may have
+ # only the "test_environment" entry, but we want at least 1 of "passed_tests", "failed_tests", "installation_errors", "missing_test_components"
+ # "skipped_tests", "not_tested" or any other entry that may be added in the future.
+ folder_id, tool_test_results_root_folder = build_tool_test_results_folder( trans, folder_id, tool_test_results, time_last_tested=time_last_tested )
+ containers_dict[ 'tool_test_results' ] = tool_test_results_root_folder
# Workflows container.
if metadata:
if 'workflows' in metadata:
diff -r 308719efff061598955f5b54fae2621c4f902ee9 -r 31714646a7b441f34a43748065278a1b08940c3c lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
--- a/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
+++ b/lib/tool_shed/galaxy_install/tool_dependencies/fabric_util.py
@@ -51,6 +51,70 @@
return output.return_code
def handle_environment_variables( app, tool_dependency, install_dir, env_var_dict, set_prior_environment_commands ):
+ """
+ This method works with with a combination of three tool dependency definition tag sets, which are defined in the tool_dependencies.xml file in the
+ order discussed here. The example for this discussion is the tool_dependencies.xml file contained in the osra repository, which is available at:
+
+ http://testtoolshed.g2.bx.psu.edu/view/bgruening/osra
+
+ The first tag set defines a complex repository dependency like this. This tag set ensures that changeset revision XXX of the repository named
+ package_graphicsmagick_1_3 owned by YYY in the tool shed ZZZ has been previously installed.
+
+ <tool_dependency>
+ <package name="graphicsmagick" version="1.3.18">
+ <repository changeset_revision="XXX" name="package_graphicsmagick_1_3" owner="YYY" prior_installation_required="True" toolshed="ZZZ" />
+ </package>
+ ...
+
+ * By the way, there is an env.sh file associated with version 1.3.18 of the graphicsmagick package which looks something like this (we'll reference
+ this file later in this discussion.
+ ----
+ GRAPHICSMAGICK_ROOT_DIR=/<my configured tool dependency path>/graphicsmagick/1.3.18/YYY/package_graphicsmagick_1_3/XXX/gmagick;
+ export GRAPHICSMAGICK_ROOT_DIR
+ ----
+
+ The second tag set defines a specific package dependency that has been previously installed (guaranteed by the tag set discussed above) and compiled,
+ where the compiled dependency is needed by the tool dependency currently being installed (osra version 2.0.0 in this case) and complied in order for
+ it's installation and compilation to succeed. This tag set is contained within the <package name="osra" version="2.0.0"> tag set, which implies that
+ version 2.0.0 of the osra package requires version 1.3.18 of the graphicsmagick package in order to successfully compile. When this tag set is handled,
+ one of the effects is that the env.sh file associated with graphicsmagick version 1.3.18 is "sourced", which undoubtedly sets or alters certain environment
+ variables (e.g. PATH, PYTHONPATH, etc).
+
+ <!-- populate the environment variables from the dependent repositories -->
+ <action type="set_environment_for_install">
+ <repository changeset_revision="XXX" name="package_graphicsmagick_1_3" owner="YYY" toolshed="ZZZ">
+ <package name="graphicsmagick" version="1.3.18" />
+ </repository>
+ </action>
+
+ The third tag set enables discovery of the same required package dependency discussed above for correctly compiling the osra version 2.0.0 package, but
+ in this case the package can be discovered at tool execution time. Using the $ENV[] option as shown in this example, the value of the environment
+ variable named GRAPHICSMAGICK_ROOT_DIR (which was set in the environment using the second tag set described above) will be used to automatically alter
+ the env.sh file associated with the osra version 2.0.0 tool dependency when it is installed into Galaxy. * Refer to where we discussed the env.sh file
+ for version 1.3.18 of the graphicsmagick package above.
+
+ <action type="set_environment">
+ <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$ENV[$GRAPHICSMAGICK_ROOT_DIR]/lib/</environment_variable>
+ <environment_variable action="prepend_to" name="LD_LIBRARY_PATH">$INSTALL_DIR/potrace/build/lib/</environment_variable>
+ <environment_variable action="prepend_to" name="PATH">$INSTALL_DIR/bin</environment_variable>
+ <!-- OSRA_DATA_FILES is only used by the galaxy wrapper and is not part of OSRA -->
+ <environment_variable action="set_to" name="OSRA_DATA_FILES">$INSTALL_DIR/share</environment_variable>
+ </action>
+
+ The above tag will produce an env.sh file for version 2.0.0 of the osra package when it it installed into Galaxy that looks something like this. Notice
+ that the path to the gmagick binary is included here since it expands the defined $ENV[$GRAPHICSMAGICK_ROOT_DIR] value in the above tag set.
+
+ ----
+ LD_LIBRARY_PATH=/<my configured tool dependency path>/graphicsmagick/1.3.18/YYY/package_graphicsmagick_1_3/XXX/gmagick/lib/:$LD_LIBRARY_PATH;
+ export LD_LIBRARY_PATH
+ LD_LIBRARY_PATH=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/potrace/build/lib/:$LD_LIBRARY_PATH;
+ export LD_LIBRARY_PATH
+ PATH=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/bin:$PATH;
+ export PATH
+ OSRA_DATA_FILES=/<my configured tool dependency path>/osra/1.4.0/YYY/depends_on/XXX/share;
+ export OSRA_DATA_FILES
+ ----
+ """
env_var_value = env_var_dict[ 'value' ]
if '$ENV[' in env_var_value and ']' in env_var_value:
# Pull out the name of the environment variable to populate.
@@ -107,6 +171,8 @@
filtered_actions = actions[ 1: ]
url = action_dict[ 'url' ]
if 'target_filename' in action_dict:
+ # Sometimes compressed archives extracts their content to a folder other than the default defined file name. Using this
+ # attribute will ensure that the file name is set appropriately and can be located after download, decompression and extraction.
downloaded_filename = action_dict[ 'target_filename' ]
else:
downloaded_filename = os.path.split( url )[ -1 ]
@@ -137,6 +203,8 @@
filtered_actions = actions[ 1: ]
url = action_dict[ 'url' ]
if action_dict[ 'target_filename' ]:
+ # Sometimes compressed archives extracts their content to a folder other than the default defined file name. Using this
+ # attribute will ensure that the file name is set appropriately and can be located after download, decompression and extraction.
filename = action_dict[ 'target_filename' ]
else:
filename = url.split( '/' )[ -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.
2 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/b51fa0eb1524/
Changeset: b51fa0eb1524
Branch: next-stable
User: Dave Bouvier
Date: 2013-05-24 20:02:14
Summary: Fix for missing_test_components always being present, causing misleading test result display on repository pages.
Affected #: 1 file
diff -r 12978bbb5ffa91743afdf6aed29355843735f96f -r b51fa0eb15244712e2d410dc2930b8c4fb657d59 lib/tool_shed/scripts/check_repositories_for_functional_tests.py
--- a/lib/tool_shed/scripts/check_repositories_for_functional_tests.py
+++ b/lib/tool_shed/scripts/check_repositories_for_functional_tests.py
@@ -117,6 +117,8 @@
and test repositories script to process. If the tested changeset revision does not have a test-data directory, this script will also mark the revision
not to be tested.
+ TODO: Update this dict structure with the recently added components.
+
If any error is encountered, the script will update the repository_metadata.tool_test_results attribute following this structure:
{
"test_environment":
@@ -137,24 +139,62 @@
"tool_id": "The tool ID that was tested",
"tool_version": "The tool version that was tested",
},
- ],
+ ]
"failed_tests":
[
{
"test_id": "The test ID, generated by twill",
"tool_id": "The tool ID that was tested",
"tool_version": "The tool version that was tested",
- "stderr": "The output of the test, or a more detailed description of what was tested and what the error was.",
- "traceback": "The traceback, if any."
+ "stderr": "The output of the test, or a more detailed description of what was tested and what the outcome was."
+ "traceback": "The captured traceback."
},
- ],
+ ]
+ "installation_errors":
+ {
+ 'tool_dependencies':
+ [
+ {
+ 'type': 'Type of tool dependency, e.g. package, set_environment, etc.',
+ 'name': 'Name of the tool dependency.',
+ 'version': 'Version if this is a package, otherwise blank.',
+ 'error_message': 'The error message returned when installation was attempted.',
+ },
+ ],
+ 'repository_dependencies':
+ [
+ {
+ 'tool_shed': 'The tool shed that this repository was installed from.',
+ 'name': 'The name of the repository that failed to install.',
+ 'owner': 'Owner of the failed repository.',
+ 'changeset_revision': 'Changeset revision of the failed repository.',
+ 'error_message': 'The error message that was returned when the repository failed to install.',
+ },
+ ],
+ 'current_repository':
+ [
+ {
+ 'tool_shed': 'The tool shed that this repository was installed from.',
+ 'name': 'The name of the repository that failed to install.',
+ 'owner': 'Owner of the failed repository.',
+ 'changeset_revision': 'Changeset revision of the failed repository.',
+ 'error_message': 'The error message that was returned when the repository failed to install.',
+ },
+ ],
+ {
+ "name": "The name of the repository.",
+ "owner": "The owner of the repository.",
+ "changeset_revision": "The changeset revision of the repository.",
+ "error_message": "The message stored in tool_dependency.error_message."
+ },
+ }
"missing_test_components":
[
{
- "tool_id": "The tool ID that is missing functional test definitions and/or test data.",
- "tool_version": "The version of the tool.",
- "tool_guid": "The guid of the tool.",
- "missing_components": "The components that are missing for this tool to be considered testable."
+ "tool_id": "The tool ID that missing components.",
+ "tool_version": "The version of the tool."
+ "tool_guid": "The guid of the tool."
+ "missing_components": "Which components are missing, e.g. the test data filename, or the test-data directory."
},
]
}
@@ -167,22 +207,22 @@
no_tools = 0
valid_revisions = 0
invalid_revisions = 0
+ records_checked = 0
# Get the list of metadata records to check for functional tests and test data. Limit this to records that have not been flagged do_not_test,
# since there's no need to check them again if they won't be tested anyway. Also filter out changeset revisions that are not downloadable,
# because it's redundant to test a revision that a user can't install.
- metadata_records_to_check = app.sa_session.query( app.model.RepositoryMetadata ) \
- .filter( and_( app.model.RepositoryMetadata.table.c.downloadable == True,
- app.model.RepositoryMetadata.table.c.includes_tools == True,
- app.model.RepositoryMetadata.table.c.do_not_test == False ) ) \
- .all()
- for metadata_record in metadata_records_to_check:
+ for metadata_record in app.sa_session.query( app.model.RepositoryMetadata ) \
+ .filter( and_( app.model.RepositoryMetadata.table.c.downloadable == True,
+ app.model.RepositoryMetadata.table.c.includes_tools == True,
+ app.model.RepositoryMetadata.table.c.do_not_test == False ) ):
+ records_checked += 1
# Initialize the repository_status dict with the test environment, but leave the test_errors empty.
repository_status = {}
if metadata_record.tool_test_results:
repository_status = metadata_record.tool_test_results
# Clear any old invalid tests for this metadata revision, since this could lead to duplication of invalid test rows,
# or tests incorrectly labeled as invalid.
- repository_status[ 'missing_test_components' ] = []
+ missing_test_components = []
if 'test_environment' in repository_status:
repository_status[ 'test_environment' ] = get_test_environment( repository_status[ 'test_environment' ] )
else:
@@ -295,7 +335,7 @@
# "tool_id": "The tool ID that was tested",
# "tool_version": "The tool version that was tested",
# },
- # ],
+ # ]
# "failed_tests":
# [
# {
@@ -305,14 +345,52 @@
# "stderr": "The output of the test, or a more detailed description of what was tested and what the outcome was."
# "traceback": "The captured traceback."
# },
- # ],
+ # ]
+ # "installation_errors":
+ # {
+ # 'tool_dependencies':
+ # [
+ # {
+ # 'type': 'Type of tool dependency, e.g. package, set_environment, etc.',
+ # 'name': 'Name of the tool dependency.',
+ # 'version': 'Version if this is a package, otherwise blank.',
+ # 'error_message': 'The error message returned when installation was attempted.',
+ # },
+ # ],
+ # 'repository_dependencies':
+ # [
+ # {
+ # 'tool_shed': 'The tool shed that this repository was installed from.',
+ # 'name': 'The name of the repository that failed to install.',
+ # 'owner': 'Owner of the failed repository.',
+ # 'changeset_revision': 'Changeset revision of the failed repository.',
+ # 'error_message': 'The error message that was returned when the repository failed to install.',
+ # },
+ # ],
+ # 'current_repository':
+ # [
+ # {
+ # 'tool_shed': 'The tool shed that this repository was installed from.',
+ # 'name': 'The name of the repository that failed to install.',
+ # 'owner': 'Owner of the failed repository.',
+ # 'changeset_revision': 'Changeset revision of the failed repository.',
+ # 'error_message': 'The error message that was returned when the repository failed to install.',
+ # },
+ # ],
+ # {
+ # "name": "The name of the repository.",
+ # "owner": "The owner of the repository.",
+ # "changeset_revision": "The changeset revision of the repository.",
+ # "error_message": "The message stored in tool_dependency.error_message."
+ # },
+ # }
# "missing_test_components":
# [
# {
- # "tool_id": "The ID of the tool that does not have valid tests.",
+ # "tool_id": "The tool ID that missing components.",
# "tool_version": "The version of the tool."
# "tool_guid": "The guid of the tool."
- # "missing_components": "The components that are missing for this tool to be considered testable."
+ # "missing_components": "Which components are missing, e.g. the test data filename, or the test-data directory."
# },
# ]
# }
@@ -321,14 +399,14 @@
# than the list relevant to what it is testing.
# Only append this error dict if it hasn't already been added.
if problem_found:
- if test_errors not in repository_status[ 'missing_test_components' ]:
- repository_status[ 'missing_test_components' ].append( test_errors )
+ if test_errors not in missing_test_components:
+ missing_test_components.append( test_errors )
if tool_has_tests and has_test_files:
testable_revision_found = True
# Remove the cloned repository path. This has to be done after the check for required test files, for obvious reasons.
if os.path.exists( work_dir ):
shutil.rmtree( work_dir )
- if not repository_status[ 'missing_test_components' ]:
+ if not missing_test_components:
valid_revisions += 1
if verbosity >= 1:
print '# All tools have functional tests in changeset revision %s of repository %s owned by %s.' % ( changeset_revision, name, owner )
@@ -337,13 +415,13 @@
if verbosity >= 1:
print '# Some tools have problematic functional tests in changeset revision %s of repository %s owned by %s.' % ( changeset_revision, name, owner )
if verbosity >= 2:
- for invalid_test in repository_status[ 'missing_test_components' ]:
+ for invalid_test in missing_test_components:
if 'missing_components' in invalid_test:
print '# %s' % invalid_test[ 'missing_components' ]
if not info_only:
# If repository_status[ 'test_errors' ] is empty, no issues were found, and we can just update time_last_tested with the platform
# on which this script was run.
- if repository_status[ 'missing_test_components' ]:
+ if missing_test_components:
# If functional test definitions or test data are missing, set do_not_test = True if no tool with valid tests has been
# found in this revision, and:
# a) There are multiple downloadable revisions, and the revision being tested is not the most recent downloadable revision.
@@ -358,13 +436,14 @@
metadata_record.do_not_test = True
metadata_record.tools_functionally_correct = False
metadata_record.missing_test_components = True
+ repository_status[ 'missing_test_components' ] = missing_test_components
metadata_record.tool_test_results = repository_status
metadata_record.time_last_tested = datetime.utcnow()
app.sa_session.add( metadata_record )
app.sa_session.flush()
stop = time.time()
print '# -------------------------------------------------------------------------------------------'
- print '# Checked %d repositories with %d tools in %d changeset revisions.' % ( len( checked_repository_ids ), tool_count, len( metadata_records_to_check ) )
+ print '# Checked %d repositories with %d tools in %d changeset revisions.' % ( len( checked_repository_ids ), tool_count, records_checked )
print '# %d revisions found with functional tests and test data for all tools.' % valid_revisions
print '# %d revisions found with one or more tools missing functional tests and/or test data.' % invalid_revisions
print '# Found %d tools without functional tests.' % no_tests
https://bitbucket.org/galaxy/galaxy-central/commits/308719efff06/
Changeset: 308719efff06
User: Dave Bouvier
Date: 2013-05-24 20:02:41
Summary: Merge in next-stable.
Affected #: 1 file
diff -r ffa2061034a8266d27c34dc47defb485addf469e -r 308719efff061598955f5b54fae2621c4f902ee9 lib/tool_shed/scripts/check_repositories_for_functional_tests.py
--- a/lib/tool_shed/scripts/check_repositories_for_functional_tests.py
+++ b/lib/tool_shed/scripts/check_repositories_for_functional_tests.py
@@ -117,6 +117,8 @@
and test repositories script to process. If the tested changeset revision does not have a test-data directory, this script will also mark the revision
not to be tested.
+ TODO: Update this dict structure with the recently added components.
+
If any error is encountered, the script will update the repository_metadata.tool_test_results attribute following this structure:
{
"test_environment":
@@ -137,24 +139,62 @@
"tool_id": "The tool ID that was tested",
"tool_version": "The tool version that was tested",
},
- ],
+ ]
"failed_tests":
[
{
"test_id": "The test ID, generated by twill",
"tool_id": "The tool ID that was tested",
"tool_version": "The tool version that was tested",
- "stderr": "The output of the test, or a more detailed description of what was tested and what the error was.",
- "traceback": "The traceback, if any."
+ "stderr": "The output of the test, or a more detailed description of what was tested and what the outcome was."
+ "traceback": "The captured traceback."
},
- ],
+ ]
+ "installation_errors":
+ {
+ 'tool_dependencies':
+ [
+ {
+ 'type': 'Type of tool dependency, e.g. package, set_environment, etc.',
+ 'name': 'Name of the tool dependency.',
+ 'version': 'Version if this is a package, otherwise blank.',
+ 'error_message': 'The error message returned when installation was attempted.',
+ },
+ ],
+ 'repository_dependencies':
+ [
+ {
+ 'tool_shed': 'The tool shed that this repository was installed from.',
+ 'name': 'The name of the repository that failed to install.',
+ 'owner': 'Owner of the failed repository.',
+ 'changeset_revision': 'Changeset revision of the failed repository.',
+ 'error_message': 'The error message that was returned when the repository failed to install.',
+ },
+ ],
+ 'current_repository':
+ [
+ {
+ 'tool_shed': 'The tool shed that this repository was installed from.',
+ 'name': 'The name of the repository that failed to install.',
+ 'owner': 'Owner of the failed repository.',
+ 'changeset_revision': 'Changeset revision of the failed repository.',
+ 'error_message': 'The error message that was returned when the repository failed to install.',
+ },
+ ],
+ {
+ "name": "The name of the repository.",
+ "owner": "The owner of the repository.",
+ "changeset_revision": "The changeset revision of the repository.",
+ "error_message": "The message stored in tool_dependency.error_message."
+ },
+ }
"missing_test_components":
[
{
- "tool_id": "The tool ID that is missing functional test definitions and/or test data.",
- "tool_version": "The version of the tool.",
- "tool_guid": "The guid of the tool.",
- "missing_components": "The components that are missing for this tool to be considered testable."
+ "tool_id": "The tool ID that missing components.",
+ "tool_version": "The version of the tool."
+ "tool_guid": "The guid of the tool."
+ "missing_components": "Which components are missing, e.g. the test data filename, or the test-data directory."
},
]
}
@@ -167,22 +207,22 @@
no_tools = 0
valid_revisions = 0
invalid_revisions = 0
+ records_checked = 0
# Get the list of metadata records to check for functional tests and test data. Limit this to records that have not been flagged do_not_test,
# since there's no need to check them again if they won't be tested anyway. Also filter out changeset revisions that are not downloadable,
# because it's redundant to test a revision that a user can't install.
- metadata_records_to_check = app.sa_session.query( app.model.RepositoryMetadata ) \
- .filter( and_( app.model.RepositoryMetadata.table.c.downloadable == True,
- app.model.RepositoryMetadata.table.c.includes_tools == True,
- app.model.RepositoryMetadata.table.c.do_not_test == False ) ) \
- .all()
- for metadata_record in metadata_records_to_check:
+ for metadata_record in app.sa_session.query( app.model.RepositoryMetadata ) \
+ .filter( and_( app.model.RepositoryMetadata.table.c.downloadable == True,
+ app.model.RepositoryMetadata.table.c.includes_tools == True,
+ app.model.RepositoryMetadata.table.c.do_not_test == False ) ):
+ records_checked += 1
# Initialize the repository_status dict with the test environment, but leave the test_errors empty.
repository_status = {}
if metadata_record.tool_test_results:
repository_status = metadata_record.tool_test_results
# Clear any old invalid tests for this metadata revision, since this could lead to duplication of invalid test rows,
# or tests incorrectly labeled as invalid.
- repository_status[ 'missing_test_components' ] = []
+ missing_test_components = []
if 'test_environment' in repository_status:
repository_status[ 'test_environment' ] = get_test_environment( repository_status[ 'test_environment' ] )
else:
@@ -295,7 +335,7 @@
# "tool_id": "The tool ID that was tested",
# "tool_version": "The tool version that was tested",
# },
- # ],
+ # ]
# "failed_tests":
# [
# {
@@ -305,14 +345,52 @@
# "stderr": "The output of the test, or a more detailed description of what was tested and what the outcome was."
# "traceback": "The captured traceback."
# },
- # ],
+ # ]
+ # "installation_errors":
+ # {
+ # 'tool_dependencies':
+ # [
+ # {
+ # 'type': 'Type of tool dependency, e.g. package, set_environment, etc.',
+ # 'name': 'Name of the tool dependency.',
+ # 'version': 'Version if this is a package, otherwise blank.',
+ # 'error_message': 'The error message returned when installation was attempted.',
+ # },
+ # ],
+ # 'repository_dependencies':
+ # [
+ # {
+ # 'tool_shed': 'The tool shed that this repository was installed from.',
+ # 'name': 'The name of the repository that failed to install.',
+ # 'owner': 'Owner of the failed repository.',
+ # 'changeset_revision': 'Changeset revision of the failed repository.',
+ # 'error_message': 'The error message that was returned when the repository failed to install.',
+ # },
+ # ],
+ # 'current_repository':
+ # [
+ # {
+ # 'tool_shed': 'The tool shed that this repository was installed from.',
+ # 'name': 'The name of the repository that failed to install.',
+ # 'owner': 'Owner of the failed repository.',
+ # 'changeset_revision': 'Changeset revision of the failed repository.',
+ # 'error_message': 'The error message that was returned when the repository failed to install.',
+ # },
+ # ],
+ # {
+ # "name": "The name of the repository.",
+ # "owner": "The owner of the repository.",
+ # "changeset_revision": "The changeset revision of the repository.",
+ # "error_message": "The message stored in tool_dependency.error_message."
+ # },
+ # }
# "missing_test_components":
# [
# {
- # "tool_id": "The ID of the tool that does not have valid tests.",
+ # "tool_id": "The tool ID that missing components.",
# "tool_version": "The version of the tool."
# "tool_guid": "The guid of the tool."
- # "missing_components": "The components that are missing for this tool to be considered testable."
+ # "missing_components": "Which components are missing, e.g. the test data filename, or the test-data directory."
# },
# ]
# }
@@ -321,14 +399,14 @@
# than the list relevant to what it is testing.
# Only append this error dict if it hasn't already been added.
if problem_found:
- if test_errors not in repository_status[ 'missing_test_components' ]:
- repository_status[ 'missing_test_components' ].append( test_errors )
+ if test_errors not in missing_test_components:
+ missing_test_components.append( test_errors )
if tool_has_tests and has_test_files:
testable_revision_found = True
# Remove the cloned repository path. This has to be done after the check for required test files, for obvious reasons.
if os.path.exists( work_dir ):
shutil.rmtree( work_dir )
- if not repository_status[ 'missing_test_components' ]:
+ if not missing_test_components:
valid_revisions += 1
if verbosity >= 1:
print '# All tools have functional tests in changeset revision %s of repository %s owned by %s.' % ( changeset_revision, name, owner )
@@ -337,13 +415,13 @@
if verbosity >= 1:
print '# Some tools have problematic functional tests in changeset revision %s of repository %s owned by %s.' % ( changeset_revision, name, owner )
if verbosity >= 2:
- for invalid_test in repository_status[ 'missing_test_components' ]:
+ for invalid_test in missing_test_components:
if 'missing_components' in invalid_test:
print '# %s' % invalid_test[ 'missing_components' ]
if not info_only:
# If repository_status[ 'test_errors' ] is empty, no issues were found, and we can just update time_last_tested with the platform
# on which this script was run.
- if repository_status[ 'missing_test_components' ]:
+ if missing_test_components:
# If functional test definitions or test data are missing, set do_not_test = True if no tool with valid tests has been
# found in this revision, and:
# a) There are multiple downloadable revisions, and the revision being tested is not the most recent downloadable revision.
@@ -358,13 +436,14 @@
metadata_record.do_not_test = True
metadata_record.tools_functionally_correct = False
metadata_record.missing_test_components = True
+ repository_status[ 'missing_test_components' ] = missing_test_components
metadata_record.tool_test_results = repository_status
metadata_record.time_last_tested = datetime.utcnow()
app.sa_session.add( metadata_record )
app.sa_session.flush()
stop = time.time()
print '# -------------------------------------------------------------------------------------------'
- print '# Checked %d repositories with %d tools in %d changeset revisions.' % ( len( checked_repository_ids ), tool_count, len( metadata_records_to_check ) )
+ print '# Checked %d repositories with %d tools in %d changeset revisions.' % ( len( checked_repository_ids ), tool_count, records_checked )
print '# %d revisions found with functional tests and test data for all tools.' % valid_revisions
print '# %d revisions found with one or more tools missing functional tests and/or test data.' % invalid_revisions
print '# Found %d tools without functional tests.' % no_tests
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.
3 new commits in galaxy-central:
https://bitbucket.org/galaxy/galaxy-central/commits/dfeca47bd70e/
Changeset: dfeca47bd70e
User: dan
Date: 2013-05-24 19:59:26
Summary: Unicode fixes for tool parameters
Affected #: 1 file
diff -r 9a97a7fd23bce7bdc6e7b5faa421b2fba932fd39 -r dfeca47bd70ec4252b2cde76411d1d771dab9dba lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -7,7 +7,7 @@
from galaxy import config, datatypes, util
from galaxy.web import form_builder
from galaxy.util.bunch import Bunch
-from galaxy.util import string_as_bool, sanitize_param
+from galaxy.util import string_as_bool, sanitize_param, unicodify
from sanitize import ToolParameterSanitizer
import validation, dynamic_options
# For BaseURLToolParameter
@@ -112,7 +112,9 @@
def to_string( self, value, app ):
"""Convert a value to a string representation suitable for persisting"""
- return str( value )
+ if not isinstance( value, basestring ):
+ value = str( value )
+ return unicodify( value )
def to_python( self, value, app ):
"""Convert a value created with to_string back to an object representation"""
@@ -144,13 +146,13 @@
Convert a value to a text representation suitable for displaying to
the user
"""
- return value
+ return unicodify( value )
def to_param_dict_string( self, value, other_values={} ):
"""Called via __str__ when used in the Cheetah template"""
if value is None:
value = ""
- else:
+ elif not isinstance( value, basestring ):
value = str( value )
if self.tool is None or self.tool.options.sanitize:
if self.sanitizer:
https://bitbucket.org/galaxy/galaxy-central/commits/12978bbb5ffa/
Changeset: 12978bbb5ffa
Branch: next-stable
User: dan
Date: 2013-05-24 19:59:26
Summary: Unicode fixes for tool parameters
Affected #: 1 file
diff -r d57826b9c6052bd6278631228f8ce09ebfbabb98 -r 12978bbb5ffa91743afdf6aed29355843735f96f lib/galaxy/tools/parameters/basic.py
--- a/lib/galaxy/tools/parameters/basic.py
+++ b/lib/galaxy/tools/parameters/basic.py
@@ -7,7 +7,7 @@
from galaxy import config, datatypes, util
from galaxy.web import form_builder
from galaxy.util.bunch import Bunch
-from galaxy.util import string_as_bool, sanitize_param
+from galaxy.util import string_as_bool, sanitize_param, unicodify
from sanitize import ToolParameterSanitizer
import validation, dynamic_options
# For BaseURLToolParameter
@@ -112,7 +112,9 @@
def to_string( self, value, app ):
"""Convert a value to a string representation suitable for persisting"""
- return str( value )
+ if not isinstance( value, basestring ):
+ value = str( value )
+ return unicodify( value )
def to_python( self, value, app ):
"""Convert a value created with to_string back to an object representation"""
@@ -144,13 +146,13 @@
Convert a value to a text representation suitable for displaying to
the user
"""
- return value
+ return unicodify( value )
def to_param_dict_string( self, value, other_values={} ):
"""Called via __str__ when used in the Cheetah template"""
if value is None:
value = ""
- else:
+ elif not isinstance( value, basestring ):
value = str( value )
if self.tool is None or self.tool.options.sanitize:
if self.sanitizer:
https://bitbucket.org/galaxy/galaxy-central/commits/ffa2061034a8/
Changeset: ffa2061034a8
User: dan
Date: 2013-05-24 19:59:49
Summary: merge
Affected #: 0 files
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.