backend.ai-cli 25.1.1__tar.gz → 25.2.0__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.

Potentially problematic release.


This version of backend.ai-cli might be problematic. Click here for more details.

Files changed (24) hide show
  1. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/PKG-INFO +2 -2
  2. backend_ai_cli-25.2.0/ai/backend/cli/VERSION +1 -0
  3. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/params.py +20 -21
  4. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/PKG-INFO +2 -2
  5. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/requires.txt +1 -1
  6. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/setup.py +2 -2
  7. backend_ai_cli-25.1.1/ai/backend/cli/VERSION +0 -1
  8. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/MANIFEST.in +0 -0
  9. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/__init__.py +0 -0
  10. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/__main__.py +0 -0
  11. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/extensions.py +0 -0
  12. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/interaction.py +0 -0
  13. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/loader.py +0 -0
  14. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/main.py +0 -0
  15. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/py.typed +0 -0
  16. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/ai/backend/cli/types.py +0 -0
  17. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/SOURCES.txt +0 -0
  18. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/dependency_links.txt +0 -0
  19. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/entry_points.txt +0 -0
  20. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/namespace_packages.txt +0 -0
  21. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/not-zip-safe +0 -0
  22. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend.ai_cli.egg-info/top_level.txt +0 -0
  23. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/backend_shim.py +0 -0
  24. {backend_ai_cli-25.1.1 → backend_ai_cli-25.2.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: backend.ai-cli
3
- Version: 25.1.1
3
+ Version: 25.2.0
4
4
  Summary: Backend.AI Command Line Interface Helper
5
5
  Home-page: https://github.com/lablup/backend.ai
6
6
  Author: Lablup Inc. and contributors
@@ -21,7 +21,7 @@ Classifier: License :: OSI Approved :: MIT License
21
21
  Requires-Python: >=3.12,<3.13
22
22
  Description-Content-Type: text/markdown
23
23
  Requires-Dist: attrs>=24.2
24
- Requires-Dist: backend.ai-plugin==25.1.1
24
+ Requires-Dist: backend.ai-plugin==25.2.0
25
25
  Requires-Dist: click~=8.1.7
26
26
  Requires-Dist: trafaret~=2.1
27
27
 
@@ -0,0 +1 @@
1
+ 25.2.0
@@ -1,6 +1,6 @@
1
1
  import json
2
2
  import re
3
- from collections.abc import Mapping, Sequence
3
+ from collections.abc import Mapping
4
4
  from decimal import Decimal
5
5
  from typing import (
6
6
  Any,
@@ -208,25 +208,6 @@ class RangeExprOptionType(click.ParamType):
208
208
  self.fail(str(e), param, ctx)
209
209
 
210
210
 
211
- class CommaSeparatedListType(click.ParamType):
212
- name = "List Expression"
213
-
214
- @override
215
- def convert(
216
- self,
217
- value: str,
218
- param: Optional[click.Parameter],
219
- ctx: Optional[click.Context],
220
- ) -> Sequence[str]:
221
- try:
222
- if isinstance(value, int):
223
- return value
224
- elif isinstance(value, str):
225
- return value.split(",")
226
- except ValueError as e:
227
- self.fail(repr(e), param, ctx)
228
-
229
-
230
211
  T = TypeVar("T")
231
212
 
232
213
 
@@ -237,10 +218,28 @@ class SingleValueConstructorType(Protocol):
237
218
  TScalar = TypeVar("TScalar", bound=SingleValueConstructorType | click.ParamType)
238
219
 
239
220
 
221
+ class CommaSeparatedListType(click.ParamType, Generic[TScalar]):
222
+ name = "List Expression"
223
+
224
+ def __init__(self, type_: Optional[type[TScalar]] = None) -> None:
225
+ super().__init__()
226
+ self.type_ = type_ if type_ is not None else str
227
+
228
+ def convert(self, arg, param, ctx):
229
+ try:
230
+ match arg:
231
+ case int():
232
+ return arg
233
+ case str():
234
+ return [self.type_(elem) for elem in arg.split(",")]
235
+ except ValueError as e:
236
+ self.fail(repr(e), param, ctx)
237
+
238
+
240
239
  class OptionalType(click.ParamType, Generic[TScalar]):
241
240
  name = "Optional Type Wrapper"
242
241
 
243
- def __init__(self, type_: type[TScalar] | click.ParamType) -> None:
242
+ def __init__(self, type_: type[TScalar] | type[click.ParamType] | click.ParamType) -> None:
244
243
  super().__init__()
245
244
  self.type_ = type_
246
245
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: backend.ai-cli
3
- Version: 25.1.1
3
+ Version: 25.2.0
4
4
  Summary: Backend.AI Command Line Interface Helper
5
5
  Home-page: https://github.com/lablup/backend.ai
6
6
  Author: Lablup Inc. and contributors
@@ -21,7 +21,7 @@ Classifier: License :: OSI Approved :: MIT License
21
21
  Requires-Python: >=3.12,<3.13
22
22
  Description-Content-Type: text/markdown
23
23
  Requires-Dist: attrs>=24.2
24
- Requires-Dist: backend.ai-plugin==25.1.1
24
+ Requires-Dist: backend.ai-plugin==25.2.0
25
25
  Requires-Dist: click~=8.1.7
26
26
  Requires-Dist: trafaret~=2.1
27
27
 
@@ -1,4 +1,4 @@
1
1
  attrs>=24.2
2
- backend.ai-plugin==25.1.1
2
+ backend.ai-plugin==25.2.0
3
3
  click~=8.1.7
4
4
  trafaret~=2.1
@@ -27,7 +27,7 @@ setup(**{
27
27
  },
28
28
  'install_requires': (
29
29
  'attrs>=24.2',
30
- 'backend.ai-plugin==25.1.1',
30
+ 'backend.ai-plugin==25.2.0',
31
31
  'click~=8.1.7',
32
32
  'trafaret~=2.1',
33
33
  ),
@@ -75,6 +75,6 @@ You can do the same in `setup.py` as well.
75
75
  },
76
76
  'python_requires': '>=3.12,<3.13',
77
77
  'url': 'https://github.com/lablup/backend.ai',
78
- 'version': '25.1.1',
78
+ 'version': '25.2.0',
79
79
  'zip_safe': False,
80
80
  })
@@ -1 +0,0 @@
1
- 25.1.1