Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/planemo/commands/cmd_delete_alias.py @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 """Module describing the planemo ``delete_alias`` command.""" | |
2 import click | |
3 | |
4 from planemo import options | |
5 from planemo.cli import command_function | |
6 from planemo.galaxy import profiles | |
7 from planemo.io import error, info | |
8 | |
9 try: | |
10 from tabulate import tabulate | |
11 except ImportError: | |
12 tabulate = None # type: ignore | |
13 | |
14 | |
15 @click.command('delete_alias') | |
16 @options.alias_option(required=True) | |
17 @options.profile_option(required=True) | |
18 @command_function | |
19 def cli(ctx, alias, profile, **kwds): | |
20 """ | |
21 List aliases for a path or a workflow or dataset ID. Aliases are associated with a particular planemo profile. | |
22 """ | |
23 info("Looking for profiles...") | |
24 exit_code = profiles.delete_alias(ctx, alias, profile) | |
25 if exit_code == 0: | |
26 info('Alias {} was successfully deleted from profile {}'.format(alias, profile)) | |
27 else: | |
28 error('Alias {} does not exist, so was not deleted from profile {}'.format(alias, profile)) | |
29 | |
30 ctx.exit(exit_code) | |
31 return |