qbraid-cli 0.8.5a0__tar.gz → 0.8.5a1__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 qbraid-cli might be problematic. Click here for more details.

Files changed (128) hide show
  1. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/PKG-INFO +1 -1
  2. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/pyproject.toml +1 -1
  3. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/_version.py +2 -2
  4. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/admin/app.py +3 -5
  5. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/admin/headers.py +3 -3
  6. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/admin/validation.py +1 -2
  7. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/configure/actions.py +2 -2
  8. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/devices/app.py +3 -3
  9. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/envs/app.py +4 -4
  10. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/handlers.py +5 -5
  11. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/jobs/app.py +4 -4
  12. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/jobs/toggle_braket.py +15 -14
  13. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/jobs/validation.py +5 -5
  14. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/pip/hooks.py +1 -1
  15. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/PKG-INFO +1 -1
  16. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_toggle_braket_confirm.py +1 -1
  17. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_toggle_braket_enable.py +2 -1
  18. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tools/create_dev_build.sh +2 -2
  19. qbraid_cli-0.8.5a1/tools/stamp_pre_release.py +36 -0
  20. qbraid_cli-0.8.5a0/tools/stamp_pre_release.py +0 -18
  21. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.env.example +0 -0
  22. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  23. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  24. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  25. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/bump-version.yml +0 -0
  26. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/docs.yml +0 -0
  27. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/format.yml +0 -0
  28. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/main.yml +0 -0
  29. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/pre-release.yml +0 -0
  30. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/publish.yml +0 -0
  31. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.github/workflows/tag-on-merge.yml +0 -0
  32. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.gitignore +0 -0
  33. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/.readthedocs.yml +0 -0
  34. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/CONTRIBUTING.md +0 -0
  35. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/LICENSE +0 -0
  36. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/MANIFEST.IN +0 -0
  37. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/Makefile +0 -0
  38. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/README.md +0 -0
  39. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/Makefile +0 -0
  40. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/api-key.png +0 -0
  41. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/cards/jupyter.png +0 -0
  42. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/cards/python.png +0 -0
  43. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/cards/terminal.png +0 -0
  44. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/favicon.ico +0 -0
  45. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/logo.png +0 -0
  46. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/style/custom.css +0 -0
  47. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/_static/style/s4defs-roles.css +0 -0
  48. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/configure.rst +0 -0
  49. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/credits.rst +0 -0
  50. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/devices-list.rst +0 -0
  51. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/devices.rst +0 -0
  52. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/envs-activate.rst +0 -0
  53. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/envs-list.rst +0 -0
  54. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/envs-uninstall.rst +0 -0
  55. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/envs.rst +0 -0
  56. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/jobs-add.rst +0 -0
  57. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/jobs-disable.rst +0 -0
  58. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/jobs-enable.rst +0 -0
  59. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/jobs-list.rst +0 -0
  60. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/jobs.rst +0 -0
  61. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/kernels.rst +0 -0
  62. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/cli/qbraid.rst +0 -0
  63. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/conf.py +0 -0
  64. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/guide/overview.rst +0 -0
  65. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/index.rst +0 -0
  66. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/make.bat +0 -0
  67. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/docs/requirements.txt +0 -0
  68. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/__init__.py +0 -0
  69. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/admin/__init__.py +0 -0
  70. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/admin/buildlogs.py +0 -0
  71. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/configure/__init__.py +0 -0
  72. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/configure/app.py +0 -0
  73. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/credits/__init__.py +0 -0
  74. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/credits/app.py +0 -0
  75. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/devices/__init__.py +0 -0
  76. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/devices/validation.py +0 -0
  77. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/envs/__init__.py +0 -0
  78. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/envs/activate.py +0 -0
  79. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/envs/create.py +0 -0
  80. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/envs/data_handling.py +0 -0
  81. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/exceptions.py +0 -0
  82. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/jobs/__init__.py +0 -0
  83. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/kernels/__init__.py +0 -0
  84. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/kernels/app.py +0 -0
  85. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/main.py +0 -0
  86. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/pip/__init__.py +0 -0
  87. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/pip/app.py +0 -0
  88. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli/py.typed +0 -0
  89. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/SOURCES.txt +0 -0
  90. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  91. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/entry_points.txt +0 -0
  92. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/requires.txt +0 -0
  93. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/qbraid_cli.egg-info/top_level.txt +0 -0
  94. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/ruff.toml +0 -0
  95. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/setup.cfg +0 -0
  96. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/__init__.py +0 -0
  97. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/configure/__init__.py +0 -0
  98. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/configure/test_configure_prompt_for_config.py +0 -0
  99. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/configure/test_configure_set.py +0 -0
  100. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/configure/test_configure_validate_input.py +0 -0
  101. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/credits/__init__.py +0 -0
  102. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/credits/test_credits_value.py +0 -0
  103. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/devices/__init__.py +0 -0
  104. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/devices/test_devices_list.py +0 -0
  105. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/devices/test_devices_validations.py +0 -0
  106. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/__init__.py +0 -0
  107. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_activate.py +0 -0
  108. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_activate_find_shell_rc.py +0 -0
  109. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_activate_print_command.py +0 -0
  110. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_activate_pyenv.py +0 -0
  111. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_list.py +0 -0
  112. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/envs/test_envs_remove.py +0 -0
  113. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/__init__.py +0 -0
  114. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_disable.py +0 -0
  115. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_enable.py +0 -0
  116. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_list.py +0 -0
  117. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_state.py +0 -0
  118. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_toggle_braket_disable.py +0 -0
  119. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_toggle_braket_get_data.py +0 -0
  120. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_validate_get_state.py +0 -0
  121. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_validate_handle_state.py +0 -0
  122. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/jobs/test_jobs_validate_library.py +0 -0
  123. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/kernels/__init__.py +0 -0
  124. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tests/kernels/test_kernels_list.py +0 -0
  125. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tools/bump_version.py +0 -0
  126. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tools/install_wheel_extras.sh +0 -0
  127. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tools/split_md.py +0 -0
  128. {qbraid_cli-0.8.5a0 → qbraid_cli-0.8.5a1}/tools/split_rst.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qbraid-cli
3
- Version: 0.8.5a0
3
+ Version: 0.8.5a1
4
4
  Summary: Command Line Interface for interacting with all parts of the qBraid platform.
5
5
  Author-email: qBraid Development Team <contact@qbraid.com>
6
6
  License: Proprietary
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qbraid-cli"
7
- version = "0.8.5-alpha"
7
+ version = "0.8.5a1"
8
8
  description = "Command Line Interface for interacting with all parts of the qBraid platform."
9
9
  readme = "README.md"
10
10
  authors = [{ name = "qBraid Development Team", email = "contact@qbraid.com" }]
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '0.1.dev1+gbba28a4'
16
- __version_tuple__ = version_tuple = (0, 1, 'dev1', 'gbba28a4')
15
+ __version__ = version = '0.1.dev1+g1ab987a.d20240820'
16
+ __version_tuple__ = version_tuple = (0, 1, 'dev1', 'g1ab987a.d20240820')
@@ -3,10 +3,8 @@
3
3
 
4
4
  """
5
5
  Module defining commands in the 'qbraid admin' namespace.
6
- """
7
-
8
- from typing import List
9
6
 
7
+ """
10
8
  import typer
11
9
 
12
10
  from qbraid_cli.admin.buildlogs import buildlogs_app
@@ -21,7 +19,7 @@ admin_app.add_typer(buildlogs_app, name="buildlogs")
21
19
 
22
20
  @admin_app.command(name="headers")
23
21
  def admin_headers(
24
- src_paths: List[str] = typer.Argument(
22
+ src_paths: list[str] = typer.Argument(
25
23
  ..., help="Source file or directory paths to verify.", callback=validate_paths_exist
26
24
  ),
27
25
  header_type: str = typer.Option(
@@ -31,7 +29,7 @@ def admin_headers(
31
29
  help="Type of header to use ('default' or 'gpl').",
32
30
  callback=validate_header_type,
33
31
  ),
34
- skip_files: List[str] = typer.Option(
32
+ skip_files: list[str] = typer.Option(
35
33
  [], "--skip", "-s", help="Files to skip during verification.", callback=validate_paths_exist
36
34
  ),
37
35
  fix: bool = typer.Option(
@@ -6,7 +6,7 @@ Script to verify qBraid copyright file headers
6
6
 
7
7
  """
8
8
  import os
9
- from typing import List, Optional
9
+ from typing import Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
@@ -37,9 +37,9 @@ HEADER_TYPES = {
37
37
 
38
38
 
39
39
  def check_and_fix_headers(
40
- src_paths: List[str],
40
+ src_paths: list[str],
41
41
  header_type: str = "default",
42
- skip_files: Optional[List[str]] = None,
42
+ skip_files: Optional[list[str]] = None,
43
43
  fix: bool = False,
44
44
  ) -> None:
45
45
  """Script to add or verify qBraid copyright file headers"""
@@ -7,7 +7,6 @@ Module for validating command arguments for qBraid admin commands.
7
7
  """
8
8
 
9
9
  import os
10
- from typing import List
11
10
 
12
11
  import typer
13
12
 
@@ -21,7 +20,7 @@ def validate_header_type(value: str) -> str:
21
20
  return validate_item(value, header_types, "Header type")
22
21
 
23
22
 
24
- def validate_paths_exist(paths: List[str]) -> List[str]:
23
+ def validate_paths_exist(paths: list[str]) -> list[str]:
25
24
  """Verifies that each path in the provided list exists."""
26
25
  non_existent_paths = [path for path in paths if not os.path.exists(path)]
27
26
  if non_existent_paths:
@@ -9,7 +9,7 @@ Module defining actions invoked by 'qbraid configure' command(s).
9
9
  import configparser
10
10
  import re
11
11
  from copy import deepcopy
12
- from typing import Dict, Optional
12
+ from typing import Optional
13
13
 
14
14
  import typer
15
15
  from qbraid_core.config import (
@@ -53,7 +53,7 @@ def prompt_for_config(
53
53
  config: configparser.ConfigParser,
54
54
  section: str,
55
55
  key: str,
56
- default_values: Optional[Dict[str, str]] = None,
56
+ default_values: Optional[dict[str, str]] = None,
57
57
  ) -> str:
58
58
  """Prompt the user for a configuration setting, showing the current value as default."""
59
59
  default_values = default_values or {}
@@ -6,7 +6,7 @@ Module defining commands in the 'qbraid devices' namespace.
6
6
 
7
7
  """
8
8
 
9
- from typing import Any, Callable, Optional, Tuple
9
+ from typing import Any, Callable, Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
@@ -42,14 +42,14 @@ def devices_list( # pylint: disable=too-many-branches
42
42
  if provider:
43
43
  filters["provider"] = provider
44
44
 
45
- def import_devices() -> Tuple[Any, Callable]:
45
+ def import_devices() -> tuple[Any, Callable]:
46
46
  from qbraid_core.services.quantum import QuantumClient, process_device_data
47
47
 
48
48
  client = QuantumClient()
49
49
 
50
50
  return client, process_device_data
51
51
 
52
- result: Tuple[Callable, Callable] = run_progress_task(import_devices)
52
+ result: tuple[Callable, Callable] = run_progress_task(import_devices)
53
53
  client, process_device_data = result
54
54
  raw_data = client.search_devices(filters)
55
55
  device_data, msg = process_device_data(raw_data)
@@ -10,7 +10,7 @@ import shutil
10
10
  import subprocess
11
11
  import sys
12
12
  from pathlib import Path
13
- from typing import TYPE_CHECKING, Optional, Tuple
13
+ from typing import TYPE_CHECKING, Optional
14
14
 
15
15
  import typer
16
16
  from rich.console import Console
@@ -41,14 +41,14 @@ def envs_create( # pylint: disable=too-many-statements
41
41
  """Create a new qBraid environment."""
42
42
  env_description = description or ""
43
43
 
44
- def create_environment(*args, **kwargs) -> "Tuple[dict, EMC]":
44
+ def create_environment(*args, **kwargs) -> "tuple[dict, EMC]":
45
45
  """Create a qBraid environment."""
46
46
  from qbraid_core.services.environments.client import EnvironmentManagerClient
47
47
 
48
48
  client = EnvironmentManagerClient()
49
49
  return client.create_environment(*args, **kwargs), client
50
50
 
51
- def gather_local_data() -> Tuple[Path, str]:
51
+ def gather_local_data() -> tuple[Path, str]:
52
52
  """Gather environment data and return the slug."""
53
53
  from qbraid_core.services.environments import get_default_envs_paths
54
54
 
@@ -155,7 +155,7 @@ def envs_remove(
155
155
  emc = EnvironmentManagerClient()
156
156
  emc.delete_environment(slug)
157
157
 
158
- def gather_local_data(env_name: str) -> Tuple[Path, str]:
158
+ def gather_local_data(env_name: str) -> tuple[Path, str]:
159
159
  """Get environment path and slug from name (alias)."""
160
160
  installed, aliases = installed_envs_data()
161
161
  for alias, slug in aliases.items():
@@ -10,7 +10,7 @@ and executing operations with progress tracking within the qBraid CLI.
10
10
  import os
11
11
  import traceback
12
12
  from pathlib import Path
13
- from typing import Any, Callable, List, Optional, Union
13
+ from typing import Any, Callable, Optional, Union
14
14
 
15
15
  import typer
16
16
  from rich.console import Console
@@ -136,13 +136,13 @@ def run_progress_task(
136
136
  return handle_error(message=custom_message)
137
137
 
138
138
 
139
- def _format_list_items(items: List[str]) -> str:
139
+ def _format_list_items(items: list[str]) -> str:
140
140
  """
141
141
  Formats a list of items as a string with values comma-separated and
142
142
  each item surrounded by single quotes
143
143
 
144
144
  Args:
145
- items (List[str]): The list of items to format.
145
+ items (list[str]): The list of items to format.
146
146
 
147
147
  Returns:
148
148
  str: The formatted string.
@@ -151,14 +151,14 @@ def _format_list_items(items: List[str]) -> str:
151
151
 
152
152
 
153
153
  def validate_item(
154
- value: Optional[str], allowed_items: List[str], item_type: str
154
+ value: Optional[str], allowed_items: list[str], item_type: str
155
155
  ) -> Union[str, None]:
156
156
  """
157
157
  Generic item validation function.
158
158
 
159
159
  Args:
160
160
  value (optional, str): The value to validate.
161
- allowed_items (List[str]): A list of allowed items.
161
+ allowed_items (list[str]): A list of allowed items.
162
162
  item_type (str): A description of the item type (e.g., 'provider', 'status', 'type') for
163
163
  error messages.
164
164
 
@@ -5,7 +5,7 @@
5
5
  Module defining commands in the 'qbraid jobs' namespace.
6
6
 
7
7
  """
8
- from typing import Any, Callable, Dict, Tuple
8
+ from typing import Any, Callable
9
9
 
10
10
  import typer
11
11
  from rich.console import Console
@@ -66,7 +66,7 @@ def jobs_state(
66
66
  )
67
67
  ) -> None:
68
68
  """Display the state of qBraid Quantum Jobs for the current environment."""
69
- result: Tuple[str, Dict[str, Tuple[bool, bool]]] = run_progress_get_state(library)
69
+ result: tuple[str, dict[str, tuple[bool, bool]]] = run_progress_get_state(library)
70
70
  python_exe, state_values = result
71
71
  state_values = dict(sorted(state_values.items()))
72
72
 
@@ -95,14 +95,14 @@ def jobs_list(
95
95
  ) -> None:
96
96
  """List qBraid Quantum Jobs."""
97
97
 
98
- def import_jobs() -> Tuple[Any, Callable]:
98
+ def import_jobs() -> tuple[Any, Callable]:
99
99
  from qbraid_core.services.quantum import QuantumClient, process_job_data
100
100
 
101
101
  client = QuantumClient()
102
102
 
103
103
  return client, process_job_data
104
104
 
105
- result: Tuple[Any, Callable] = run_progress_task(import_jobs)
105
+ result: tuple[Any, Callable] = run_progress_task(import_jobs)
106
106
  client, process_job_data = result
107
107
  # https://github.com/qBraid/api/issues/644
108
108
  # raw_data = client.search_jobs(query={"numResults": limit})
@@ -10,7 +10,7 @@ import os
10
10
  import re
11
11
  import subprocess
12
12
  from pathlib import Path
13
- from typing import Optional, Tuple
13
+ from typing import Optional
14
14
 
15
15
  import requests
16
16
  import typer
@@ -34,14 +34,14 @@ def fetch_botocore_version() -> Optional[str]:
34
34
  return None
35
35
 
36
36
 
37
- def get_package_data(package: str) -> Tuple[str, str, str, str]:
37
+ def get_package_data(package: str) -> tuple[str, str, str, str]:
38
38
  """Retrieve package version and location data.
39
39
 
40
40
  Args:
41
41
  package (str): The name of the package to retrieve data for.
42
42
 
43
43
  Returns:
44
- Tuple[str, str, str, str]: The installed and latest versions of the package, and the
44
+ tuple[str, str, str, str]: The installed and latest versions of the package, and the
45
45
  local site-packages path where it is / would be installed.
46
46
 
47
47
  Raises:
@@ -60,7 +60,7 @@ def get_package_data(package: str) -> Tuple[str, str, str, str]:
60
60
  installed_version = get_local_package_version(package, python_path=python_pathlib)
61
61
 
62
62
  latest_version = None
63
- if package == "botocore":
63
+ if package in ["botocore", "boto3"]:
64
64
  latest_version = fetch_botocore_version()
65
65
  latest_version = latest_version or get_latest_package_version(package)
66
66
 
@@ -74,7 +74,7 @@ def confirm_updates(
74
74
  mode: str,
75
75
  site_packages_path: str,
76
76
  installed_version: Optional[str] = None,
77
- latest_version: Optional[str] = None,
77
+ target_version: Optional[str] = None,
78
78
  ) -> None:
79
79
  """
80
80
  Prompts the user to proceed with enabling or disabling qBraid Quantum Jobs.
@@ -84,7 +84,7 @@ def confirm_updates(
84
84
  site_packages_path (str): The location of the site-packages directory where
85
85
  target package(s) will be updated.
86
86
  installed_version (optional, str): The installed version of the target package.
87
- latest_version (optional, str): The latest version of the target package available on PyPI.
87
+ target_version (optional, str): The latest version of the target package available on PyPI.
88
88
 
89
89
  Raises:
90
90
  ValueError: If an invalid mode is provided.
@@ -105,12 +105,12 @@ def confirm_updates(
105
105
  typer.echo(f"\n==> WARNING: {provider}/{core_package} package required <==")
106
106
  if (
107
107
  installed_version is not None
108
- and latest_version is not None
109
- and installed_version != latest_version
108
+ and target_version is not None
109
+ and installed_version != target_version
110
110
  ):
111
- typer.echo(f"==> WARNING: A newer version of {versioned_package} exists. <==")
111
+ typer.echo(f"==> WARNING: A different version of {versioned_package} is required. <==")
112
112
  typer.echo(f" current version: {installed_version}")
113
- typer.echo(f" latest version: {latest_version}")
113
+ typer.echo(f" target version: {target_version}")
114
114
 
115
115
  gerund = mode[:-2].capitalize() + "ing"
116
116
 
@@ -146,12 +146,12 @@ def aws_configure_dummy() -> None:
146
146
 
147
147
  def enable_braket(auto_confirm: bool = False):
148
148
  """Enable qBraid quantum jobs for Amazon Braket."""
149
- installed, latest, path, python_exe = run_progress_task(
149
+ installed, target, path, python_exe = run_progress_task(
150
150
  get_package_data, "boto3", description="Solving environment..."
151
151
  )
152
152
 
153
153
  if not auto_confirm:
154
- confirm_updates("enable", path, installed_version=installed, latest_version=latest)
154
+ confirm_updates("enable", path, installed_version=installed, target_version=target)
155
155
  typer.echo("")
156
156
 
157
157
  aws_configure_dummy() # TODO: possibly add another confirmation for writing aws config files
@@ -165,10 +165,11 @@ def enable_braket(auto_confirm: bool = False):
165
165
  "install",
166
166
  "amazon-braket-sdk",
167
167
  "--upgrade",
168
- "--upgrade-strategy eager",
168
+ "--upgrade-strategy",
169
+ "eager",
169
170
  ]
170
171
  )
171
- subprocess.check_call([python_exe, "-m", "pip", "install", f"boto3=={latest}"])
172
+ subprocess.check_call([python_exe, "-m", "pip", "install", f"boto3=={target}"])
172
173
  subprocess.check_call([python_exe, "-m", "pip", "uninstall", "botocore", "-y", "--quiet"])
173
174
  subprocess.check_call(
174
175
  [python_exe, "-m", "pip", "install", "git+https://github.com/qBraid/botocore.git"]
@@ -6,14 +6,14 @@ Module for validating command arguments for qBraid Quantum Jobs.
6
6
 
7
7
  """
8
8
  import sys
9
- from typing import Any, Callable, Dict, Optional, Tuple
9
+ from typing import Any, Callable, Optional
10
10
 
11
11
  import typer
12
12
  from rich.console import Console
13
13
 
14
14
  from qbraid_cli.handlers import handle_error, run_progress_task, validate_item
15
15
 
16
- LEGACY_ARGS: Dict[str, str] = {
16
+ LEGACY_ARGS: dict[str, str] = {
17
17
  "amazon_braket": "braket",
18
18
  "aws_braket": "braket",
19
19
  }
@@ -39,14 +39,14 @@ def validate_library(value: str) -> str:
39
39
  return validate_item(value, qjobs_libs, "Library")
40
40
 
41
41
 
42
- def get_state(library: Optional[str] = None) -> Tuple[str, Dict[str, Tuple[bool, bool]]]:
42
+ def get_state(library: Optional[str] = None) -> tuple[str, dict[str, tuple[bool, bool]]]:
43
43
  """Get the state of qBraid Quantum Jobs for the specified library."""
44
44
  from qbraid_core.services.quantum import QuantumClient
45
45
 
46
46
  jobs_state = QuantumClient.qbraid_jobs_state(device_lib=library)
47
47
 
48
48
  python_exe: str = jobs_state.get("exe", sys.executable)
49
- libs_state: Dict[str, Any] = jobs_state.get("libs", {})
49
+ libs_state: dict[str, Any] = jobs_state.get("libs", {})
50
50
 
51
51
  state_values = {
52
52
  lib: (state["supported"], state["enabled"]) for lib, state in libs_state.items()
@@ -57,7 +57,7 @@ def get_state(library: Optional[str] = None) -> Tuple[str, Dict[str, Tuple[bool,
57
57
 
58
58
  def run_progress_get_state(
59
59
  library: Optional[str] = None,
60
- ) -> Tuple[str, Dict[str, Tuple[bool, bool]]]:
60
+ ) -> tuple[str, dict[str, tuple[bool, bool]]]:
61
61
  """Run get state function with rich progress UI."""
62
62
  return run_progress_task(
63
63
  get_state,
@@ -36,7 +36,7 @@ def find_matching_prefix(python_executable: Path, path_list: list[Path]) -> Opti
36
36
 
37
37
  Args:
38
38
  python_executable (Path): The path to the Python executable.
39
- path_list (List[Path]): A list of paths to check against the Python executable path.
39
+ path_list (list[Path]): A list of paths to check against the Python executable path.
40
40
 
41
41
  Returns:
42
42
  Optional[Path]: The first matching path that is a prefix of the Python executable path,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qbraid-cli
3
- Version: 0.8.5a0
3
+ Version: 0.8.5a1
4
4
  Summary: Command Line Interface for interacting with all parts of the qBraid platform.
5
5
  Author-email: qBraid Development Team <contact@qbraid.com>
6
6
  License: Proprietary
@@ -49,4 +49,4 @@ def test_version_warning():
49
49
  latest_version = "1.2.0"
50
50
  with patch("typer.echo") as mock_echo, patch("typer.confirm", return_value=True):
51
51
  confirm_updates("enable", "/fake/site-packages", installed_version, latest_version)
52
- mock_echo.assert_any_call("==> WARNING: A newer version of boto3 exists. <==")
52
+ mock_echo.assert_any_call("==> WARNING: A different version of boto3 is required. <==")
@@ -60,7 +60,8 @@ def test_subprocess_calls():
60
60
  "install",
61
61
  "amazon-braket-sdk",
62
62
  "--upgrade",
63
- "--upgrade-strategy eager",
63
+ "--upgrade-strategy",
64
+ "eager",
64
65
  ]
65
66
  ),
66
67
  call([mock_python_path, "-m", "pip", "install", f"boto3=={version}"]),
@@ -73,7 +73,7 @@ fi
73
73
 
74
74
  # Update the version in the version file
75
75
  echo "Setting version to ${DEV_VERSION}"
76
- toml set "$PYPROJECT_TOML_PATH" "project.version" "$DEV_VERSION" > tmp.$$.toml && mv tmp.$$.toml "$PYPROJECT_TOML_PATH"
76
+ toml set --toml-path "$PYPROJECT_TOML_PATH" "project.version" "$DEV_VERSION"
77
77
 
78
78
  # Check if `build` module is installed
79
79
  if ! python -c "import build" 2>/dev/null; then
@@ -85,4 +85,4 @@ fi
85
85
  echo "Building the project..."
86
86
  python -m build --outdir "${OUT_DIR}"
87
87
 
88
- echo "Done."
88
+ echo "Done."
@@ -0,0 +1,36 @@
1
+ # Copyright (c) 2024, qBraid Development Team
2
+ # All rights reserved.
3
+
4
+ """
5
+ Script for getting/bumping the next pre-release version.
6
+
7
+ """
8
+ import pathlib
9
+ import re
10
+ import sys
11
+
12
+ from qbraid_core.system.versions import get_prelease_version
13
+
14
+
15
+ def replace_version_format(v: str) -> str:
16
+ """
17
+ Replace the version format from "x.y.z-abc.def" to "x.y.zabcdef".
18
+
19
+ Args:
20
+ v (str): The version string to transform.
21
+
22
+ Returns:
23
+ str: The transformed version string.
24
+ """
25
+ pattern = r"-(\w+)\.(\d+)"
26
+ new_version = re.sub(pattern, r"\1\2", v)
27
+ return new_version
28
+
29
+
30
+ if __name__ == "__main__":
31
+
32
+ package_name = sys.argv[1]
33
+ root = pathlib.Path(__file__).parent.parent.resolve()
34
+ version = get_prelease_version(root, package_name)
35
+ formatted_version = replace_version_format(version)
36
+ print(formatted_version)
@@ -1,18 +0,0 @@
1
- # Copyright (c) 2024, qBraid Development Team
2
- # All rights reserved.
3
-
4
- """
5
- Script for getting/bumping the next pre-release version.
6
-
7
- """
8
- import pathlib
9
- import sys
10
-
11
- from qbraid_core.system.versions import get_prelease_version
12
-
13
- if __name__ == "__main__":
14
-
15
- package_name = sys.argv[1]
16
- root = pathlib.Path(__file__).parent.parent.resolve()
17
- version = get_prelease_version(root, package_name)
18
- print(version)
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