3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/bc16b9140ee9/ Changeset: bc16b9140ee9 User: davebgx Date: 2014-03-07 16:38:16 Summary: More informative logging when the env.sh file doesn't meet expectations. Affected #: 1 file diff -r 880281e5f42210852a87724b01b4b2411e15a405 -r bc16b9140ee9762ebcb6c2fcd1be1bfee268c388 test/tool_shed/functional/test_1420_tool_dependency_environment_inheritance.py --- a/test/tool_shed/functional/test_1420_tool_dependency_environment_inheritance.py +++ b/test/tool_shed/functional/test_1420_tool_dependency_environment_inheritance.py @@ -316,5 +316,7 @@ tool_dependency_version='1.53.0', repository=package_boost_repository ) rdkit_env_file_contents = file( rdkit_env_sh, 'r' ).read() - assert numpy_tool_dependency_path in rdkit_env_file_contents, 'Environment file for package_rdkit_2012_12_1420 does not contain numpy path.' - assert boost_tool_dependency_path in rdkit_env_file_contents, 'Environment file for package_rdkit_2012_12_1420 does not contain boost path.' + if numpy_tool_dependency_path not in rdkit_env_file_contents or boost_tool_dependency_path not in rdkit_env_file_contents: + message = 'Environment file for package_rdkit_2012_12_1420 does not contain expected path.' + message += '\nExpected:\n%s\n%s\nContents:\n%s' % ( numpy_tool_dependency_path, boost_tool_dependency_path, rdkit_env_file_contents ) + raise AssertionError( message ) https://bitbucket.org/galaxy/galaxy-central/commits/1bbc2b265fba/ Changeset: 1bbc2b265fba Branch: stable User: greg Date: 2014-03-07 16:36:03 Summary: A few enhancements to the very basic tool shed statistics manager. Affected #: 3 files diff -r af15bddfe6854f72d828b46490f8b6c3a4f79bfb -r 1bbc2b265fba40a40ebab9cd03d91a3a7e7d2e18 lib/galaxy/webapps/tool_shed/util/shed_statistics.py --- a/lib/galaxy/webapps/tool_shed/util/shed_statistics.py +++ b/lib/galaxy/webapps/tool_shed/util/shed_statistics.py @@ -1,51 +1,60 @@ -from time import strftime, gmtime +from time import gmtime +from time import strftime + class ShedCounter( object ): def __init__( self, model ): # TODO: Enhance the ShedCounter to retrieve information from the db instead of displaying what's currently in memory. self.model = model + self.custom_datatypes = 0 self.generation_time = strftime( "%b %d, %Y", gmtime() ) + self.deleted_repositories = 0 + self.deprecated_repositories = 0 + self.invalid_versions_of_tools = 0 self.repositories = 0 - #self.new_repositories = 0 - self.deleted_repositories = 0 - self.invalid_tools = 0 - self.valid_tools = 0 + self.total_clones = 0 + self.valid_versions_of_tools = 0 + self.unique_owners = 0 + self.unique_valid_tools = 0 self.workflows = 0 - self.proprietary_datatypes = 0 - self.total_clones = 0 self.generate_statistics() + @property def sa_session( self ): """Returns a SQLAlchemy session""" return self.model.context + def generate_statistics( self ): + self.custom_datatypes = 0 + self.deleted_repositories = 0 + self.deprecated_repositories = 0 + self.invalid_versions_of_tools = 0 self.repositories = 0 - #self.new_repositories = 0 - self.deleted_repositories = 0 - self.invalid_tools = 0 - self.valid_tools = 0 + self.total_clones = 0 + self.unique_owners = 0 + self.valid_versions_of_tools = 0 + self.unique_valid_tools = 0 self.workflows = 0 - self.proprietary_datatypes = 0 - self.total_clones = 0 + unique_user_ids = [] for repository in self.sa_session.query( self.model.Repository ): self.repositories += 1 self.total_clones += repository.times_downloaded is_deleted = repository.deleted - #is_new = repository.is_new - #if is_deleted and is_new: if is_deleted: self.deleted_repositories += 1 - # self.new_repositories += 1 - #elif is_deleted: - # self.deleted_repositories += 1 - #elif is_new: - # self.new_repositories += 1 else: + if repository.deprecated: + self.deprecated_repositories += 1 + if repository.user_id not in unique_user_ids: + self.unique_owners += 1 + unique_user_ids.append( repository.user_id ) + processed_datatypes = [] processed_guids = [] processed_invalid_tool_configs = [] processed_relative_workflow_paths = [] - processed_datatypes = [] - # A repository's metadata_revisions are those that ignore the value of the repository_metadata.downloadable column. + processed_tool_ids = [] + # A repository's metadata_revisions are those that ignore the value of the + # repository_metadata.downloadable column. for metadata_revision in repository.metadata_revisions: metadata = metadata_revision.metadata if 'tools' in metadata: @@ -54,13 +63,18 @@ if 'guid' in tool_dict: guid = tool_dict[ 'guid' ] if guid not in processed_guids: - self.valid_tools += 1 + self.valid_versions_of_tools += 1 processed_guids.append( guid ) + if 'id' in tool_dict: + tool_id = tool_dict[ 'id' ] + if tool_id not in processed_tool_ids: + self.unique_valid_tools += 1 + processed_tool_ids.append( tool_id ) if 'invalid_tools' in metadata: invalid_tool_configs = metadata[ 'invalid_tools' ] for invalid_tool_config in invalid_tool_configs: if invalid_tool_config not in processed_invalid_tool_configs: - self.invalid_tools += 1 + self.invalid_versions_of_tools += 1 processed_invalid_tool_configs.append( invalid_tool_config ) if 'datatypes' in metadata: datatypes = metadata[ 'datatypes' ] @@ -68,7 +82,7 @@ if 'extension' in datatypes_dict: extension = datatypes_dict[ 'extension' ] if extension not in processed_datatypes: - self.proprietary_datatypes += 1 + self.custom_datatypes += 1 processed_datatypes.append( extension ) if 'workflows' in metadata: workflows = metadata[ 'workflows' ] diff -r af15bddfe6854f72d828b46490f8b6c3a4f79bfb -r 1bbc2b265fba40a40ebab9cd03d91a3a7e7d2e18 templates/webapps/tool_shed/admin/statistics.mako --- a/templates/webapps/tool_shed/admin/statistics.mako +++ b/templates/webapps/tool_shed/admin/statistics.mako @@ -18,29 +18,37 @@ <td>Total repositories</td><td>${trans.app.shed_counter.repositories | h}</td></tr> - ##<tr> - ## <td>Empty repositories</td> - ## <td>${trans.app.shed_counter.new_repositories | h}</td> - ##</tr> + <tr> + <td>Unique owners</td> + <td>${trans.app.shed_counter.unique_owners | h}</td> + </tr> + <tr> + <td>Deprecated repositories</td> + <td>${trans.app.shed_counter.deprecated_repositories | h}</td> + </tr><tr><td>Deleted repositories</td><td>${trans.app.shed_counter.deleted_repositories | h}</td></tr><tr><td>Valid tools</td> - <td>${trans.app.shed_counter.valid_tools | h}</td> + <td>${trans.app.shed_counter.unique_valid_tools | h}</td></tr><tr> - <td>Invalid tools</td> - <td>${trans.app.shed_counter.invalid_tools | h}</td> + <td>Valid versions of tools</td> + <td>${trans.app.shed_counter.valid_versions_of_tools | h}</td></tr><tr> - <td>Workflows</td> + <td>Invalid versions of tools</td> + <td>${trans.app.shed_counter.invalid_versions_of_tools | h}</td> + </tr> + <tr> + <td>Exported Galaxy workflows</td><td>${trans.app.shed_counter.workflows | h}</td></tr><tr> - <td>Proprietary datatypes</td> - <td>${trans.app.shed_counter.proprietary_datatypes | h}</td> + <td>Custom datatypes</td> + <td>${trans.app.shed_counter.custom_datatypes | h}</td></tr><tr><td>Total clones</td> diff -r af15bddfe6854f72d828b46490f8b6c3a4f79bfb -r 1bbc2b265fba40a40ebab9cd03d91a3a7e7d2e18 templates/webapps/tool_shed/index.mako --- a/templates/webapps/tool_shed/index.mako +++ b/templates/webapps/tool_shed/index.mako @@ -44,7 +44,7 @@ <%def name="left_panel()"><% can_review_repositories = trans.app.security_agent.user_can_review_repositories( trans.user ) %><div class="unified-panel-header" unselectable="on"> - <div class='unified-panel-header-inner'>${trans.app.shed_counter.valid_tools | h} valid tools on ${trans.app.shed_counter.generation_time | h}</div> + <div class='unified-panel-header-inner'>${trans.app.shed_counter.unique_valid_tools | h} valid tools on ${trans.app.shed_counter.generation_time | h}</div></div><div class="unified-panel-body"><div class="toolMenu"> https://bitbucket.org/galaxy/galaxy-central/commits/feec63e4fc98/ Changeset: feec63e4fc98 User: davebgx Date: 2014-03-07 16:39:08 Summary: Merge with stable. 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.