Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/planemo/commands/cmd_brew.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
1 """Module describing the planemo ``brew`` command.""" | |
2 import click | |
3 from galaxy.tool_util.deps import ( | |
4 brew_exts, | |
5 brew_util, | |
6 ) | |
7 from galaxy.tool_util.deps.requirements import parse_requirements_from_xml | |
8 from galaxy.tool_util.loader_directory import load_tool_elements_from_path | |
9 from galaxy.util import bunch | |
10 | |
11 from planemo import options | |
12 from planemo.cli import command_function | |
13 | |
14 | |
15 @click.command('brew') | |
16 @options.optional_tools_arg() | |
17 @options.brew_option() | |
18 @command_function | |
19 def cli(ctx, path, brew=None): | |
20 """Install tool requirements using brew. | |
21 | |
22 An experimental approach to versioning brew recipes will be used. | |
23 See full discussion on the homebrew-science issues page here - | |
24 https://github.com/Homebrew/homebrew-science/issues/1191. Information | |
25 on the implementation can be found at | |
26 https://github.com/jmchilton/platform-brew | |
27 until a more permanent project home is setup. | |
28 """ | |
29 for (tool_path, tool_xml) in load_tool_elements_from_path(path): | |
30 ctx.log('Brewing requirements from tool %s', | |
31 click.format_filename(tool_path)) | |
32 mock_args = bunch.Bunch(brew=brew) | |
33 brew_context = brew_exts.BrewContext(mock_args) | |
34 requirements, containers = parse_requirements_from_xml(tool_xml) | |
35 | |
36 for recipe_context in brew_util.requirements_to_recipe_contexts( | |
37 requirements, | |
38 brew_context | |
39 ): | |
40 brew_exts.versioned_install(recipe_context) |