azdev 0.1.66__tar.gz → 0.1.68__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azdev-0.1.66 → azdev-0.1.68}/HISTORY.rst +8 -0
- {azdev-0.1.66/azdev.egg-info → azdev-0.1.68}/PKG-INFO +9 -1
- {azdev-0.1.66 → azdev-0.1.68}/azdev/__init__.py +1 -1
- {azdev-0.1.66 → azdev-0.1.68}/azdev/commands.py +1 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/command_change/__init__.py +58 -1
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/command_change/util.py +15 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/extensions/version_upgrade.py +22 -4
- {azdev-0.1.66 → azdev-0.1.68}/azdev/params.py +4 -0
- {azdev-0.1.66 → azdev-0.1.68/azdev.egg-info}/PKG-INFO +9 -1
- {azdev-0.1.66 → azdev-0.1.68}/LICENSE +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/MANIFEST.in +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/README.md +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/README.rst +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/__main__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/completer.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/config/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/config/cli.flake8 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/config/cli_pylintrc +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/config/ext.flake8 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/config/ext_pylintrc +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/help.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/HISTORY.rst +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/README.rst +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/_client_factory.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/_help.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/_params.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/_validators.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/azext_metadata.json +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/blank__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/commands.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/custom.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/module__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/pkg_declare__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/setup.cfg +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/setup.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/mod_templates/test_service_scenario.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/_macros.j2 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/cmdcov.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/component.css +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/component.js +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/favicon.ico +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/index.j2 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/index2.j2 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/cmdcov/module.j2 +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/code_gen.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/command_change/custom.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/constant.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/extensions/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/extensions/util.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/help/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/help/refdoc/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/help/refdoc/conf.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/legal.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/linter.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/pylint_checkers/show_command.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rule_decorators.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/command_group_rules.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/command_rules.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/help_rules.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/rules/parameter_rules.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/linter/util.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/performance.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/pypi.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/python_sdk.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/regex.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/resource.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/setup.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/statistics/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/statistics/util.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/style.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/testtool/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/testtool/incremental_strategy.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/testtool/profile_context.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/operations/testtool/pytest_runner.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/transformers.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/__init__.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/command.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/config.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/const.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/display.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/git_util.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/path.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/pypi.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/testing.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev/utilities/tools.py +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev.egg-info/SOURCES.txt +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev.egg-info/dependency_links.txt +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev.egg-info/entry_points.txt +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev.egg-info/requires.txt +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/azdev.egg-info/top_level.txt +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/pyproject.toml +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/setup.cfg +0 -0
- {azdev-0.1.66 → azdev-0.1.68}/setup.py +0 -0
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Release History
|
|
4
4
|
===============
|
|
5
|
+
0.1.68
|
|
6
|
+
++++++
|
|
7
|
+
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
8
|
+
|
|
9
|
+
0.1.67
|
|
10
|
+
++++++
|
|
11
|
+
* `azdev extension cal-next-version`: Justify preview/exp tag operation based on last version's tag and next version's stable/preview tag.
|
|
12
|
+
|
|
5
13
|
0.1.66
|
|
6
14
|
++++++
|
|
7
15
|
* `azdev style`: Use azdev config files when .flake8 and pylintrc are not found in azure cli/ext repo.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.68
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -145,6 +145,14 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.68
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
151
|
+
|
|
152
|
+
0.1.67
|
|
153
|
+
++++++
|
|
154
|
+
* `azdev extension cal-next-version`: Justify preview/exp tag operation based on last version's tag and next version's stable/preview tag.
|
|
155
|
+
|
|
148
156
|
0.1.66
|
|
149
157
|
++++++
|
|
150
158
|
* `azdev style`: Use azdev config files when .flake8 and pylintrc are not found in azure cli/ext repo.
|
|
@@ -40,6 +40,7 @@ def load_command_table(self, _):
|
|
|
40
40
|
with CommandGroup(self, 'command-change', operation_group('command_change')) as g:
|
|
41
41
|
g.command('meta-export', 'export_command_meta')
|
|
42
42
|
g.command('meta-diff', 'cmp_command_meta')
|
|
43
|
+
g.command('tree-export', 'export_command_tree')
|
|
43
44
|
|
|
44
45
|
with CommandGroup(self, 'cli', operation_group('pypi')) as g:
|
|
45
46
|
g.command('check-versions', 'verify_versions')
|
|
@@ -12,7 +12,7 @@ from knack.log import get_logger
|
|
|
12
12
|
import azure_cli_diff_tool
|
|
13
13
|
from azdev.utilities import display, require_azure_cli, heading, get_path_table, filter_by_git_diff
|
|
14
14
|
from .custom import DiffExportFormat, get_commands_meta, STORED_DEPRECATION_KEY
|
|
15
|
-
from .util import export_commands_meta
|
|
15
|
+
from .util import export_commands_meta, dump_command_tree, add_to_command_tree
|
|
16
16
|
from ..statistics import _create_invoker_and_load_cmds, _get_command_source, \
|
|
17
17
|
_command_codegen_info # pylint: disable=protected-access
|
|
18
18
|
from ..statistics.util import filter_modules
|
|
@@ -129,3 +129,60 @@ def export_command_meta(modules=None, git_source=None, git_target=None, git_repo
|
|
|
129
129
|
|
|
130
130
|
def cmp_command_meta(base_meta_file, diff_meta_file, only_break=False, output_type="text", output_file=None):
|
|
131
131
|
return azure_cli_diff_tool.meta_diff(base_meta_file, diff_meta_file, only_break, output_type, output_file)
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def export_command_tree(modules, output_file=None):
|
|
135
|
+
require_azure_cli()
|
|
136
|
+
|
|
137
|
+
# allow user to run only on CLI or extensions
|
|
138
|
+
cli_only = modules == ['CLI']
|
|
139
|
+
ext_only = modules == ['EXT']
|
|
140
|
+
if cli_only or ext_only:
|
|
141
|
+
modules = None
|
|
142
|
+
|
|
143
|
+
selected_modules = get_path_table(include_only=modules)
|
|
144
|
+
|
|
145
|
+
if cli_only:
|
|
146
|
+
selected_modules['ext'] = {}
|
|
147
|
+
if ext_only:
|
|
148
|
+
selected_modules['core'] = {}
|
|
149
|
+
selected_modules['mod'] = {}
|
|
150
|
+
|
|
151
|
+
if not any(selected_modules.values()):
|
|
152
|
+
logger.warning('No commands selected to check.')
|
|
153
|
+
|
|
154
|
+
selected_mod_names = list(selected_modules['mod'].keys())
|
|
155
|
+
selected_mod_names += list(selected_modules['ext'].keys())
|
|
156
|
+
selected_mod_names += list(selected_modules['core'].keys())
|
|
157
|
+
|
|
158
|
+
if selected_mod_names:
|
|
159
|
+
display('Modules selected: {}\n'.format(', '.join(selected_mod_names)))
|
|
160
|
+
|
|
161
|
+
heading('Export Command Tree')
|
|
162
|
+
start = time.time()
|
|
163
|
+
display('Initializing with loading command table...')
|
|
164
|
+
from azure.cli.core import get_default_cli # pylint: disable=import-error
|
|
165
|
+
az_cli = get_default_cli()
|
|
166
|
+
|
|
167
|
+
# load commands, args, and help
|
|
168
|
+
_create_invoker_and_load_cmds(az_cli)
|
|
169
|
+
|
|
170
|
+
stop = time.time()
|
|
171
|
+
logger.info('Commands loaded in %i sec', stop - start)
|
|
172
|
+
display('Commands loaded in {} sec'.format(stop - start))
|
|
173
|
+
command_loader = az_cli.invocation.commands_loader
|
|
174
|
+
|
|
175
|
+
# trim command table to selected_modules
|
|
176
|
+
command_loader = filter_modules(command_loader, modules=selected_mod_names)
|
|
177
|
+
|
|
178
|
+
if not command_loader.command_table:
|
|
179
|
+
logger.warning('No commands selected to check.')
|
|
180
|
+
|
|
181
|
+
command_tree = {}
|
|
182
|
+
|
|
183
|
+
for command_name, command in command_loader.command_table.items():
|
|
184
|
+
module_source = _get_command_source(command_name, command)['module']
|
|
185
|
+
# The command tree is a tree structure like our azExtCmdTree: https://aka.ms/azExtCmdTree
|
|
186
|
+
add_to_command_tree(command_tree, command_name, module_source)
|
|
187
|
+
|
|
188
|
+
dump_command_tree(command_tree, output_file)
|
|
@@ -73,3 +73,18 @@ def export_commands_meta(commands_meta, meta_output_path=None):
|
|
|
73
73
|
os.makedirs(file_folder)
|
|
74
74
|
with open(file_name, "w") as f_out:
|
|
75
75
|
f_out.write(jsbeautifier.beautify(json.dumps(module_info), options))
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def add_to_command_tree(tree, key, value):
|
|
79
|
+
parts = key.split()
|
|
80
|
+
subtree = tree
|
|
81
|
+
for part in parts[:-1]:
|
|
82
|
+
if not subtree.get(part):
|
|
83
|
+
subtree[part] = {}
|
|
84
|
+
subtree = subtree[part]
|
|
85
|
+
subtree[parts[-1]] = value
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def dump_command_tree(command_tree, output_file):
|
|
89
|
+
with open(output_file, 'w', encoding='utf-8') as f:
|
|
90
|
+
json.dump(command_tree, f, indent=4)
|
|
@@ -195,12 +195,30 @@ class VersionUpgradeMod:
|
|
|
195
195
|
except Exception as e:
|
|
196
196
|
raise ValueError(str(e))
|
|
197
197
|
|
|
198
|
+
def gen_preview_exp_tags(self, res_dict):
|
|
199
|
+
"""
|
|
200
|
+
if next_version is preview: due to doc generation requirement, preview tag is needed
|
|
201
|
+
1. preview tag need to be reserved which had previous preview tag, nothing to do
|
|
202
|
+
2. preview tag need to be added if previous version does not have preview tag
|
|
203
|
+
|
|
204
|
+
if next_version is stable:
|
|
205
|
+
remove previous existed preview tag
|
|
206
|
+
|
|
207
|
+
exp tag should be removed for stable/preview
|
|
208
|
+
"""
|
|
209
|
+
if self.has_exp_tag:
|
|
210
|
+
res_dict["exp_tag"] = "remove"
|
|
211
|
+
if self.next_version.pre:
|
|
212
|
+
if not self.has_preview_tag:
|
|
213
|
+
res_dict["preview_tag"] = "add"
|
|
214
|
+
else:
|
|
215
|
+
if self.has_preview_tag:
|
|
216
|
+
res_dict["preview_tag"] = "remove"
|
|
217
|
+
|
|
198
218
|
def format_outputs(self):
|
|
199
|
-
has_preview_tag = bool(self.next_version.pre and (self.has_preview_tag or self.has_exp_tag))
|
|
200
219
|
result = {
|
|
201
220
|
"version": str(self.next_version),
|
|
202
|
-
"is_stable": self.next_version.pre is None
|
|
203
|
-
"has_preview_tag": has_preview_tag,
|
|
204
|
-
"has_exp_tag": False
|
|
221
|
+
"is_stable": self.next_version.pre is None
|
|
205
222
|
}
|
|
223
|
+
self.gen_preview_exp_tags(result)
|
|
206
224
|
return result
|
|
@@ -129,6 +129,10 @@ def load_arguments(self, _):
|
|
|
129
129
|
help='format to print diff and suggest message')
|
|
130
130
|
c.argument('output_file', help='command meta diff json file path to store')
|
|
131
131
|
|
|
132
|
+
with ArgumentsContext(self, 'command-change tree-export') as c:
|
|
133
|
+
c.positional('modules', modules_type)
|
|
134
|
+
c.argument('output_file', help='command tree json file path to store')
|
|
135
|
+
|
|
132
136
|
# region cmdcov
|
|
133
137
|
with ArgumentsContext(self, 'cmdcov') as c:
|
|
134
138
|
c.positional('modules', modules_type)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: azdev
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.68
|
|
4
4
|
Summary: Microsoft Azure CLI Developer Tools
|
|
5
5
|
Home-page: https://github.com/Azure/azure-cli-dev-tools
|
|
6
6
|
Author: Microsoft Corporation
|
|
@@ -145,6 +145,14 @@ License
|
|
|
145
145
|
|
|
146
146
|
Release History
|
|
147
147
|
===============
|
|
148
|
+
0.1.68
|
|
149
|
+
++++++
|
|
150
|
+
* `azdev command-change tree-export`: Add new command to support export command tree of CLI modules.
|
|
151
|
+
|
|
152
|
+
0.1.67
|
|
153
|
+
++++++
|
|
154
|
+
* `azdev extension cal-next-version`: Justify preview/exp tag operation based on last version's tag and next version's stable/preview tag.
|
|
155
|
+
|
|
148
156
|
0.1.66
|
|
149
157
|
++++++
|
|
150
158
|
* `azdev style`: Use azdev config files when .flake8 and pylintrc are not found in azure cli/ext repo.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|