commit/galaxy-central: greg: Fix for generating metadata in tool shed repositories for a tool that does not use a tool_data_table entry for a dynamic SelectField input parameter.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/fa29a49205a2/ changeset: fa29a49205a2 user: greg date: 2011-11-08 21:18:24 summary: Fix for generating metadata in tool shed repositories for a tool that does not use a tool_data_table entry for a dynamic SelectField input parameter. affected #: 2 files diff -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 -r fa29a49205a226fa872601b4aac577973468e486 lib/galaxy/web/controllers/admin.py --- a/lib/galaxy/web/controllers/admin.py +++ b/lib/galaxy/web/controllers/admin.py @@ -1147,21 +1147,20 @@ def __get_repository_tools_and_sample_files( self, trans, tool_path, repo_files_dir ): # The sample_files list contains all files whose name ends in .sample sample_files = [] + # Find all special .sample files first. + for root, dirs, files in os.walk( repo_files_dir ): + if root.find( '.hg' ) < 0: + for name in files: + if name.endswith( '.sample' ): + sample_files.append( os.path.abspath( os.path.join( root, name ) ) ) # The repository_tools_tups list contains tuples of ( relative_path_to_tool_config, tool ) pairs repository_tools_tups = [] for root, dirs, files in os.walk( repo_files_dir ): - if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0: + if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0: if '.hg' in dirs: - # Don't visit .hg directories - should be impossible since we don't - # allow uploaded archives that contain .hg dirs, but just in case... dirs.remove( '.hg' ) if 'hgrc' in files: - # Don't include hgrc files in commit. files.remove( 'hgrc' ) - # Find all special .sample files first. - for name in files: - if name.endswith( '.sample' ): - sample_files.append( os.path.abspath( os.path.join( root, name ) ) ) for name in files: # Find all tool configs. if name.endswith( '.xml' ): diff -r 9ee23aa36ec3807092ce1b8f3031ba751f1368e6 -r fa29a49205a226fa872601b4aac577973468e486 lib/galaxy/webapps/community/controllers/common.py --- a/lib/galaxy/webapps/community/controllers/common.py +++ b/lib/galaxy/webapps/community/controllers/common.py @@ -214,7 +214,8 @@ copy_sample_loc_file( trans, sample_file ) options.index_file = index_tail options.missing_index_file = None - options.tool_data_table.missing_index_file = None + if options.tool_data_table: + options.tool_data_table.missing_index_file = None sample_found = True break if not sample_found: @@ -325,8 +326,14 @@ if ctx is not None: metadata_dict = {} if changeset_revision == repository.tip: + # Find all special .sample files first. for root, dirs, files in os.walk( repo_dir ): - if not root.find( '.hg' ) >= 0 and not root.find( 'hgrc' ) >= 0: + if root.find( '.hg' ) < 0: + for name in files: + if name.endswith( '.sample' ): + sample_files.append( os.path.abspath( os.path.join( root, name ) ) ) + for root, dirs, files in os.walk( repo_dir ): + if root.find( '.hg' ) < 0 and root.find( 'hgrc' ) < 0: if '.hg' in dirs: # Don't visit .hg directories - should be impossible since we don't # allow uploaded archives that contain .hg dirs, but just in case... @@ -334,10 +341,6 @@ if 'hgrc' in files: # Don't include hgrc files in commit. files.remove( 'hgrc' ) - # Find all special .sample files first. - for name in files: - if name.endswith( '.sample' ): - sample_files.append( os.path.abspath( os.path.join( root, name ) ) ) for name in files: # Find all tool configs. if name.endswith( '.xml' ): 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.
participants (1)
-
Bitbucket