Path: blob/main/_plugins/gtn/toolshed.rb
1677 views
# frozen_string_literal: true12module Gtn3# Handle toolshed yaml formatting for ephemeris4module Toolshed5##6# Prepare a tool list for installation7#8# Params:9# +data+:: The data from metadata/toolshed-revisions.json10# +tool_list+:: The list of tools to check (either 'upload1' or11# 'toolshed.g2.bx.psu.edu/repos/iuc/circos/circos/0.69.8+galaxy10' style tools)12# +topic+:: The topic to install the tools under13# Returns:14# +supported+:: A string of the admin install, ready for ephemeris15def self.format_admin_install(data, tool_list, topic, tool_cats)16# p "Calculating supported servers for this tool list"17return {} if data.nil? || data.empty?1819tools = tool_list.select { |t| data.key? t }.map do |tool|20tool_info = data[tool]21{22'name' => tool_info[1],23'owner' => tool_info[0],24'revisions' => tool_info[2],25'tool_panel_section_label' => tool_cats["#{tool_info[0]}/#{tool_info[1]}"] || topic,26'tool_shed_url' => 'https://toolshed.g2.bx.psu.edu/',27}28end2930{31'install_tool_dependencies' => true,32'install_repository_dependencies' => true,33'install_resolver_dependencies' => true,34'tools' => tools35}36end37end38end394041