azdev 0.1.70__tar.gz → 0.1.72__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.
Files changed (101) hide show
  1. {azdev-0.1.70 → azdev-0.1.72}/HISTORY.rst +9 -0
  2. {azdev-0.1.70/azdev.egg-info → azdev-0.1.72}/PKG-INFO +11 -2
  3. {azdev-0.1.70 → azdev-0.1.72}/azdev/__init__.py +1 -1
  4. {azdev-0.1.70 → azdev-0.1.72}/azdev/commands.py +1 -0
  5. {azdev-0.1.70 → azdev-0.1.72}/azdev/help.py +3 -0
  6. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/extensions/__init__.py +30 -0
  7. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/extensions/util.py +13 -0
  8. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/extensions/version_upgrade.py +12 -2
  9. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/pylint_checkers/show_command.py +0 -2
  10. {azdev-0.1.70 → azdev-0.1.72}/azdev/params.py +3 -0
  11. {azdev-0.1.70 → azdev-0.1.72/azdev.egg-info}/PKG-INFO +11 -2
  12. {azdev-0.1.70 → azdev-0.1.72}/azdev.egg-info/requires.txt +1 -1
  13. {azdev-0.1.70 → azdev-0.1.72}/setup.py +1 -1
  14. {azdev-0.1.70 → azdev-0.1.72}/LICENSE +0 -0
  15. {azdev-0.1.70 → azdev-0.1.72}/MANIFEST.in +0 -0
  16. {azdev-0.1.70 → azdev-0.1.72}/README.md +0 -0
  17. {azdev-0.1.70 → azdev-0.1.72}/README.rst +0 -0
  18. {azdev-0.1.70 → azdev-0.1.72}/azdev/__main__.py +0 -0
  19. {azdev-0.1.70 → azdev-0.1.72}/azdev/completer.py +0 -0
  20. {azdev-0.1.70 → azdev-0.1.72}/azdev/config/__init__.py +0 -0
  21. {azdev-0.1.70 → azdev-0.1.72}/azdev/config/cli.flake8 +0 -0
  22. {azdev-0.1.70 → azdev-0.1.72}/azdev/config/cli_pylintrc +0 -0
  23. {azdev-0.1.70 → azdev-0.1.72}/azdev/config/ext.flake8 +0 -0
  24. {azdev-0.1.70 → azdev-0.1.72}/azdev/config/ext_pylintrc +0 -0
  25. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/HISTORY.rst +0 -0
  26. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/README.rst +0 -0
  27. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/_client_factory.py +0 -0
  28. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/_help.py +0 -0
  29. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/_params.py +0 -0
  30. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/_validators.py +0 -0
  31. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/azext_metadata.json +0 -0
  32. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/blank__init__.py +0 -0
  33. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/commands.py +0 -0
  34. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/custom.py +0 -0
  35. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/module__init__.py +0 -0
  36. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/pkg_declare__init__.py +0 -0
  37. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/setup.cfg +0 -0
  38. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/setup.py +0 -0
  39. {azdev-0.1.70 → azdev-0.1.72}/azdev/mod_templates/test_service_scenario.py +0 -0
  40. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/__init__.py +0 -0
  41. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/__init__.py +0 -0
  42. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/_macros.j2 +0 -0
  43. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/cmdcov.py +0 -0
  44. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/component.css +0 -0
  45. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/component.js +0 -0
  46. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/favicon.ico +0 -0
  47. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/index.j2 +0 -0
  48. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/index2.j2 +0 -0
  49. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/cmdcov/module.j2 +0 -0
  50. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/code_gen.py +0 -0
  51. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/command_change/__init__.py +0 -0
  52. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/command_change/custom.py +0 -0
  53. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/command_change/util.py +0 -0
  54. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/constant.py +0 -0
  55. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/help/__init__.py +0 -0
  56. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/help/refdoc/__init__.py +0 -0
  57. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/help/refdoc/conf.py +0 -0
  58. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/legal.py +0 -0
  59. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/__init__.py +0 -0
  60. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/linter.py +0 -0
  61. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/pylint_checkers/__init__.py +0 -0
  62. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rule_decorators.py +0 -0
  63. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/__init__.py +0 -0
  64. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/ci_exclusions.yml +0 -0
  65. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/command_coverage_rules.py +0 -0
  66. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/command_group_rules.py +0 -0
  67. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/command_rules.py +0 -0
  68. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/help_rules.py +0 -0
  69. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/linter_exclusions.yml +0 -0
  70. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/rules/parameter_rules.py +0 -0
  71. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/linter/util.py +0 -0
  72. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/performance.py +0 -0
  73. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/pypi.py +0 -0
  74. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/python_sdk.py +0 -0
  75. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/regex.py +0 -0
  76. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/resource.py +0 -0
  77. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/setup.py +0 -0
  78. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/statistics/__init__.py +0 -0
  79. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/statistics/util.py +0 -0
  80. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/style.py +0 -0
  81. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/testtool/__init__.py +0 -0
  82. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/testtool/incremental_strategy.py +0 -0
  83. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/testtool/profile_context.py +0 -0
  84. {azdev-0.1.70 → azdev-0.1.72}/azdev/operations/testtool/pytest_runner.py +0 -0
  85. {azdev-0.1.70 → azdev-0.1.72}/azdev/transformers.py +0 -0
  86. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/__init__.py +0 -0
  87. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/command.py +0 -0
  88. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/config.py +0 -0
  89. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/const.py +0 -0
  90. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/display.py +0 -0
  91. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/git_util.py +0 -0
  92. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/path.py +0 -0
  93. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/pypi.py +0 -0
  94. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/testing.py +0 -0
  95. {azdev-0.1.70 → azdev-0.1.72}/azdev/utilities/tools.py +0 -0
  96. {azdev-0.1.70 → azdev-0.1.72}/azdev.egg-info/SOURCES.txt +0 -0
  97. {azdev-0.1.70 → azdev-0.1.72}/azdev.egg-info/dependency_links.txt +0 -0
  98. {azdev-0.1.70 → azdev-0.1.72}/azdev.egg-info/entry_points.txt +0 -0
  99. {azdev-0.1.70 → azdev-0.1.72}/azdev.egg-info/top_level.txt +0 -0
  100. {azdev-0.1.70 → azdev-0.1.72}/pyproject.toml +0 -0
  101. {azdev-0.1.70 → azdev-0.1.72}/setup.cfg +0 -0
@@ -2,6 +2,15 @@
2
2
 
3
3
  Release History
4
4
  ===============
5
+ 0.1.72
6
+ ++++++
7
+ * Bump `pylint` to 3
8
+
9
+ 0.1.71
10
+ ++++++
11
+ * `azdev extension show`: Show detailed extension info that installed in your development environment.
12
+ * `azdev extension cal-next-version`: Fix last stable version parser from index.json.
13
+
5
14
  0.1.70
6
15
  ++++++
7
16
  * Fix cmdcov issue(#455): remove tested_command.txt reference.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: azdev
3
- Version: 0.1.70
3
+ Version: 0.1.72
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
@@ -26,7 +26,7 @@ Requires-Dist: flake8
26
26
  Requires-Dist: gitpython
27
27
  Requires-Dist: jinja2
28
28
  Requires-Dist: knack
29
- Requires-Dist: pylint<3,>=2.12
29
+ Requires-Dist: pylint<4
30
30
  Requires-Dist: pytest-xdist
31
31
  Requires-Dist: pytest-forked
32
32
  Requires-Dist: pytest>=5.0.0
@@ -145,6 +145,15 @@ License
145
145
 
146
146
  Release History
147
147
  ===============
148
+ 0.1.72
149
+ ++++++
150
+ * Bump `pylint` to 3
151
+
152
+ 0.1.71
153
+ ++++++
154
+ * `azdev extension show`: Show detailed extension info that installed in your development environment.
155
+ * `azdev extension cal-next-version`: Fix last stable version parser from index.json.
156
+
148
157
  0.1.70
149
158
  ++++++
150
159
  * Fix cmdcov issue(#455): remove tested_command.txt reference.
@@ -4,4 +4,4 @@
4
4
  # license information.
5
5
  # -----------------------------------------------------------------------------
6
6
 
7
- __VERSION__ = '0.1.70'
7
+ __VERSION__ = '0.1.72'
@@ -67,6 +67,7 @@ def load_command_table(self, _):
67
67
  g.command('publish', 'publish_extensions')
68
68
  g.command('update-index', 'update_extension_index')
69
69
  g.command('cal-next-version', 'cal_next_version')
70
+ g.command('show', 'show_extension')
70
71
 
71
72
  with CommandGroup(self, 'extension repo', operation_group('extensions')) as g:
72
73
  g.command('add', 'add_extension_repo')
@@ -258,6 +258,9 @@ helps['extension list'] = """
258
258
  short-summary: List what extensions are currently visible to your development environment.
259
259
  """
260
260
 
261
+ helps['extension show'] = """
262
+ short-summary: Show detailed extension info that installed in your development environment.
263
+ """
261
264
 
262
265
  helps['extension publish'] = """
263
266
  short-summary: Build and publish an extension to a storage account.
@@ -138,6 +138,36 @@ def list_extensions():
138
138
  return results
139
139
 
140
140
 
141
+ def show_extension(mod_name):
142
+ ext_paths = get_ext_repo_paths()
143
+ ext_mod_paths = [os.path.join(ext, "src", mod_name) for ext in ext_paths]
144
+ mod_install_path = find_files(ext_mod_paths, '*.*-info')
145
+
146
+ if not mod_install_path:
147
+ raise CLIError('extension not installed using azdev: {}'.format(mod_name))
148
+
149
+ if len(mod_install_path) > 1:
150
+ raise CLIError('extension {} duplicated, please specify extension name'.format(mod_name))
151
+
152
+ mod_install_dir = os.path.dirname(mod_install_path[0])
153
+ long_name = os.path.basename(mod_install_dir)
154
+ assert long_name == mod_name
155
+ mod_info = {
156
+ "name": mod_name,
157
+ "path": mod_install_dir
158
+ }
159
+ # extract pkg name from egg-info or dist-info folders
160
+ logger.debug("Extracting pkg info from %s...", mod_install_path[0])
161
+ meta_files = ["PKG-INFO", "METADATA"]
162
+ pkg_info_path = [os.path.join(mod_install_path[0], meta) for meta in meta_files
163
+ if os.path.isfile(os.path.join(mod_install_path[0], meta))]
164
+ from .util import get_pkg_info_from_pkg_metafile
165
+ for pkg_info_file in pkg_info_path:
166
+ pkg_info = get_pkg_info_from_pkg_metafile(pkg_info_file)
167
+ mod_info.update(pkg_info)
168
+ return mod_info
169
+
170
+
141
171
  def _get_sha256sum(a_file):
142
172
  import hashlib
143
173
  sha256 = hashlib.sha256()
@@ -81,3 +81,16 @@ def get_whl_from_url(url, filename, tmp_dir, whl_cache=None):
81
81
  f.write(chunk)
82
82
  whl_cache[url] = ext_file
83
83
  return ext_file
84
+
85
+
86
+ def get_pkg_info_from_pkg_metafile(pkg_info_file):
87
+ mod_info = {}
88
+ with open(pkg_info_file, "r", encoding="utf-8") as f:
89
+ for line in f:
90
+ if line.startswith("Name:"):
91
+ pkg_name = line.split(":")[-1].strip()
92
+ mod_info["pkg_name"] = pkg_name
93
+ if line.startswith("Version:"):
94
+ pkg_version = line.split(":")[-1].strip()
95
+ mod_info["pkg_version"] = pkg_version
96
+ return mod_info
@@ -9,6 +9,7 @@
9
9
  # https://github.com/Azure/azure-cli/blob/release/doc/extensions/versioning_guidelines.md
10
10
 
11
11
  from packaging.version import parse
12
+ from knack.util import CLIError
12
13
  from azure_cli_diff_tool.utils import DiffLevel
13
14
  from azdev.operations.constant import (PREVIEW_INIT_SUFFIX, VERSION_MAJOR_TAG, VERSION_MINOR_TAG,
14
15
  VERSION_PATCH_TAG, VERSION_STABLE_TAG, VERSION_PREVIEW_TAG, VERSION_PRE_TAG,
@@ -70,6 +71,8 @@ class VersionUpgradeMod:
70
71
  self.init_version_pre_tag()
71
72
  self.next_version = ModuleVersion(self.version)
72
73
  self.last_stable_major = float('inf')
74
+ self.pkg_name = self.module_name
75
+ self.parse_pkg_name()
73
76
  self.parse_last_stable_major()
74
77
 
75
78
  def norm_versions(self):
@@ -179,15 +182,22 @@ class VersionUpgradeMod:
179
182
  has_stable = True
180
183
  return has_stable, max_stable_major
181
184
 
185
+ def parse_pkg_name(self):
186
+ from azdev.operations.extensions import show_extension
187
+ try:
188
+ self.pkg_name = show_extension(self.module_name)["pkg_name"]
189
+ except CLIError:
190
+ pass
191
+
182
192
  def parse_last_stable_major(self):
183
193
  import requests
184
194
  try:
185
195
  response = requests.get(CLI_EXTENSION_INDEX_URL)
186
196
  extension_data = response.json()
187
- if self.module_name not in extension_data["extensions"]:
197
+ if self.pkg_name not in extension_data["extensions"]:
188
198
  return
189
199
  has_stable, max_stable_major = self.find_max_version(
190
- extension_data["extensions"][self.module_name])
200
+ extension_data["extensions"][self.pkg_name])
191
201
  if has_stable:
192
202
  self.last_stable_major = max_stable_major
193
203
  else:
@@ -6,11 +6,9 @@
6
6
  import astroid
7
7
 
8
8
  from pylint.checkers import BaseChecker
9
- from pylint.interfaces import IAstroidChecker
10
9
 
11
10
 
12
11
  class ShowCommandChecker(BaseChecker):
13
- __implements__ = IAstroidChecker
14
12
 
15
13
  name = 'show-command'
16
14
  priority = -1
@@ -178,6 +178,9 @@ def load_arguments(self, _):
178
178
  c.argument('next_version_pre_tag', help='next version is stable or preview, if not provided, use current stable/preview tag')
179
179
  c.argument('next_version_segment_tag', help='used to modify actual major/minor/patch/pre, if provided, increment version as provided')
180
180
 
181
+ with ArgumentsContext(self, 'extension show') as c:
182
+ c.argument('mod_name', required=True, help='installed extension module name')
183
+
181
184
  with ArgumentsContext(self, 'cli create') as c:
182
185
  c.positional('mod_name', help='Name of the module to create.')
183
186
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: azdev
3
- Version: 0.1.70
3
+ Version: 0.1.72
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
@@ -26,7 +26,7 @@ Requires-Dist: flake8
26
26
  Requires-Dist: gitpython
27
27
  Requires-Dist: jinja2
28
28
  Requires-Dist: knack
29
- Requires-Dist: pylint<3,>=2.12
29
+ Requires-Dist: pylint<4
30
30
  Requires-Dist: pytest-xdist
31
31
  Requires-Dist: pytest-forked
32
32
  Requires-Dist: pytest>=5.0.0
@@ -145,6 +145,15 @@ License
145
145
 
146
146
  Release History
147
147
  ===============
148
+ 0.1.72
149
+ ++++++
150
+ * Bump `pylint` to 3
151
+
152
+ 0.1.71
153
+ ++++++
154
+ * `azdev extension show`: Show detailed extension info that installed in your development environment.
155
+ * `azdev extension cal-next-version`: Fix last stable version parser from index.json.
156
+
148
157
  0.1.70
149
158
  ++++++
150
159
  * Fix cmdcov issue(#455): remove tested_command.txt reference.
@@ -4,7 +4,7 @@ flake8
4
4
  gitpython
5
5
  jinja2
6
6
  knack
7
- pylint<3,>=2.12
7
+ pylint<4
8
8
  pytest-xdist
9
9
  pytest-forked
10
10
  pytest>=5.0.0
@@ -72,7 +72,7 @@ setup(
72
72
  'gitpython',
73
73
  'jinja2',
74
74
  'knack',
75
- 'pylint>=2.12,<3',
75
+ 'pylint<4',
76
76
  'pytest-xdist', # depends on pytest-forked
77
77
  'pytest-forked',
78
78
  'pytest>=5.0.0',
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