-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathcommands.py
More file actions
74 lines (53 loc) · 3.03 KB
/
commands.py
File metadata and controls
74 lines (53 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -----------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -----------------------------------------------------------------------------
from knack.commands import CommandGroup
from .transformers import performance_benchmark_data_transformer
def load_command_table(self, _):
def operation_group(name):
return 'azdev.operations.{}#{{}}'.format(name)
with CommandGroup(self, '', operation_group('setup')) as g:
g.command('setup', 'setup')
# TODO: enhance with tox support
with CommandGroup(self, '', operation_group('testtool')) as g:
g.command('test', 'run_tests')
with CommandGroup(self, '', operation_group('format')) as g:
g.command('format', 'auto_format')
with CommandGroup(self, '', operation_group('style')) as g:
g.command('style', 'check_style')
with CommandGroup(self, '', operation_group('linter')) as g:
g.command('linter', 'run_linter')
with CommandGroup(self, 'statistics', operation_group('statistics')) as g:
g.command('list-command-table', 'list_command_table')
g.command('diff-command-tables', 'diff_command_tables')
with CommandGroup(self, 'verify', operation_group('pypi')) as g:
g.command('history', 'check_history')
with CommandGroup(self, 'cli', operation_group('pypi')) as g:
g.command('check-versions', 'verify_versions')
with CommandGroup(self, '', operation_group('code_gen')) as g:
g.command('cli create', 'create_module')
g.command('extension create', 'create_extension')
with CommandGroup(self, 'verify', operation_group('help')) as g:
g.command('document-map', 'check_document_map')
with CommandGroup(self, 'verify', operation_group('legal')) as g:
g.command('license', 'check_license_headers')
with CommandGroup(self, 'perf', operation_group('performance')) as g:
g.command('load-times', 'check_load_time')
g.command('benchmark', 'benchmark', is_preview=True, table_transformer=performance_benchmark_data_transformer)
with CommandGroup(self, 'extension', operation_group('extensions')) as g:
g.command('add', 'add_extension')
g.command('remove', 'remove_extension')
g.command('list', 'list_extensions')
g.command('build', 'build_extensions')
g.command('publish', 'publish_extensions')
g.command('update-index', 'update_extension_index')
with CommandGroup(self, 'extension repo', operation_group('extensions')) as g:
g.command('add', 'add_extension_repo')
g.command('remove', 'remove_extension_repo')
g.command('list', 'list_extension_repos')
with CommandGroup(self, 'cli', operation_group('help')) as g:
g.command('generate-docs', 'generate_cli_ref_docs')
with CommandGroup(self, 'extension', operation_group('help')) as g:
g.command('generate-docs', 'generate_extension_ref_docs')