qbraid-cli 0.8.4__tar.gz → 0.8.4a0__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 (127) hide show
  1. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/workflows/pre-release.yml +1 -1
  2. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/PKG-INFO +3 -2
  3. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/pyproject.toml +3 -2
  4. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/_version.py +2 -2
  5. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/envs/create.py +8 -4
  6. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/kernels/app.py +14 -32
  7. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/PKG-INFO +3 -2
  8. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/SOURCES.txt +0 -3
  9. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/requires.txt +1 -1
  10. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/kernels/test_kernels_list.py +9 -7
  11. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tools/split_md.py +0 -0
  12. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tools/stamp_pre_release.py +3 -3
  13. qbraid_cli-0.8.4/.github/workflows/bump-version.yml +0 -71
  14. qbraid_cli-0.8.4/.github/workflows/tag-on-merge.yml +0 -36
  15. qbraid_cli-0.8.4/tools/bump_version.py +0 -28
  16. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.env.example +0 -0
  17. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  18. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  19. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  20. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/workflows/docs.yml +0 -0
  21. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/workflows/format.yml +0 -0
  22. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/workflows/main.yml +0 -0
  23. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.github/workflows/publish.yml +0 -0
  24. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.gitignore +0 -0
  25. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/.readthedocs.yml +0 -0
  26. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/CONTRIBUTING.md +0 -0
  27. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/LICENSE +0 -0
  28. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/MANIFEST.IN +0 -0
  29. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/Makefile +0 -0
  30. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/README.md +0 -0
  31. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/Makefile +0 -0
  32. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/api-key.png +0 -0
  33. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/cards/jupyter.png +0 -0
  34. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/cards/python.png +0 -0
  35. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/cards/terminal.png +0 -0
  36. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/favicon.ico +0 -0
  37. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/logo.png +0 -0
  38. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/style/custom.css +0 -0
  39. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/_static/style/s4defs-roles.css +0 -0
  40. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/configure.rst +0 -0
  41. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/credits.rst +0 -0
  42. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/devices-list.rst +0 -0
  43. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/devices.rst +0 -0
  44. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/envs-activate.rst +0 -0
  45. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/envs-list.rst +0 -0
  46. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/envs-uninstall.rst +0 -0
  47. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/envs.rst +0 -0
  48. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/jobs-add.rst +0 -0
  49. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/jobs-disable.rst +0 -0
  50. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/jobs-enable.rst +0 -0
  51. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/jobs-list.rst +0 -0
  52. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/jobs.rst +0 -0
  53. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/kernels.rst +0 -0
  54. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/cli/qbraid.rst +0 -0
  55. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/conf.py +0 -0
  56. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/guide/overview.rst +0 -0
  57. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/index.rst +0 -0
  58. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/make.bat +0 -0
  59. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/docs/requirements.txt +0 -0
  60. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/__init__.py +0 -0
  61. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/admin/__init__.py +0 -0
  62. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/admin/app.py +0 -0
  63. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/admin/buildlogs.py +0 -0
  64. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/admin/headers.py +0 -0
  65. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/admin/validation.py +0 -0
  66. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/configure/__init__.py +0 -0
  67. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/configure/actions.py +0 -0
  68. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/configure/app.py +0 -0
  69. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/credits/__init__.py +0 -0
  70. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/credits/app.py +0 -0
  71. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/devices/__init__.py +0 -0
  72. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/devices/app.py +0 -0
  73. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/devices/validation.py +0 -0
  74. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/envs/__init__.py +0 -0
  75. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/envs/activate.py +0 -0
  76. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/envs/app.py +0 -0
  77. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/envs/data_handling.py +0 -0
  78. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/exceptions.py +0 -0
  79. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/handlers.py +0 -0
  80. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/jobs/__init__.py +0 -0
  81. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/jobs/app.py +0 -0
  82. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/jobs/toggle_braket.py +0 -0
  83. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/jobs/validation.py +0 -0
  84. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/kernels/__init__.py +0 -0
  85. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/main.py +0 -0
  86. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/pip/__init__.py +0 -0
  87. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/pip/app.py +0 -0
  88. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/pip/hooks.py +0 -0
  89. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli/py.typed +0 -0
  90. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  91. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/entry_points.txt +0 -0
  92. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/qbraid_cli.egg-info/top_level.txt +0 -0
  93. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/ruff.toml +0 -0
  94. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/setup.cfg +0 -0
  95. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/__init__.py +0 -0
  96. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/configure/__init__.py +0 -0
  97. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/configure/test_configure_prompt_for_config.py +0 -0
  98. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/configure/test_configure_set.py +0 -0
  99. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/configure/test_configure_validate_input.py +0 -0
  100. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/credits/__init__.py +0 -0
  101. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/credits/test_credits_value.py +0 -0
  102. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/devices/__init__.py +0 -0
  103. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/devices/test_devices_list.py +0 -0
  104. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/devices/test_devices_validations.py +0 -0
  105. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/__init__.py +0 -0
  106. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_activate.py +0 -0
  107. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_activate_find_shell_rc.py +0 -0
  108. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_activate_print_command.py +0 -0
  109. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_activate_pyenv.py +0 -0
  110. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_list.py +0 -0
  111. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/envs/test_envs_remove.py +0 -0
  112. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/__init__.py +0 -0
  113. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_disable.py +0 -0
  114. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_enable.py +0 -0
  115. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_list.py +0 -0
  116. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_state.py +0 -0
  117. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_toggle_braket_confirm.py +0 -0
  118. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_toggle_braket_disable.py +0 -0
  119. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_toggle_braket_enable.py +0 -0
  120. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_toggle_braket_get_data.py +0 -0
  121. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_validate_get_state.py +0 -0
  122. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_validate_handle_state.py +0 -0
  123. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/jobs/test_jobs_validate_library.py +0 -0
  124. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tests/kernels/__init__.py +0 -0
  125. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tools/create_dev_build.sh +0 -0
  126. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tools/install_wheel_extras.sh +0 -0
  127. {qbraid_cli-0.8.4 → qbraid_cli-0.8.4a0}/tools/split_rst.py +0 -0
@@ -24,7 +24,7 @@ jobs:
24
24
  - name: Build binary wheel + source tarball
25
25
  id: build-dev
26
26
  run: |
27
- export PRE_RELEASE_VERSION=$(python tools/stamp_pre_release.py qbraid_cli)
27
+ export PRE_RELEASE_VERSION=$(python tools/stamp_pre_release.py)
28
28
  [[ "$PRE_RELEASE_VERSION" =~ .*(-a\.|-b\.|-rc\.).* ]] && echo "Deploying pre-release version '$PRE_RELEASE_VERSION'" || (echo "not pre-release version"; exit 0)
29
29
  out_dir="${PWD}/dist"
30
30
  tools/create_dev_build.sh $PRE_RELEASE_VERSION "${out_dir}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qbraid-cli
3
- Version: 0.8.4
3
+ Version: 0.8.4a0
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
@@ -8,6 +8,7 @@ Project-URL: Homepage, https://docs.qbraid.com/cli/user-guide/overview
8
8
  Project-URL: Documentation, https://docs.qbraid.com/cli/api-reference/qbraid
9
9
  Project-URL: Bug Tracker, https://github.com/qBraid/community/issues
10
10
  Project-URL: Discord, https://discord.gg/KugF6Cnncm
11
+ Project-URL: Launch on Lab, https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/.git
11
12
  Keywords: qbraid,cli,quantum,cloud
12
13
  Classifier: Development Status :: 5 - Production/Stable
13
14
  Classifier: Intended Audience :: Developers
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
30
  Requires-Dist: typer>=0.12.1
30
31
  Requires-Dist: rich>=10.11.0
31
- Requires-Dist: qbraid-core[environments]>=0.1.17
32
+ Requires-Dist: qbraid-core[environments]==0.1.17a0
32
33
  Provides-Extra: jobs
33
34
  Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
34
35
  Provides-Extra: dev
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qbraid-cli"
7
- version = "0.8.4"
7
+ version = "0.8.4-alpha"
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" }]
@@ -29,7 +29,7 @@ classifiers = [
29
29
  dependencies = [
30
30
  "typer>=0.12.1",
31
31
  "rich>=10.11.0",
32
- "qbraid-core[environments]>=0.1.17",
32
+ "qbraid-core[environments]==0.1.17a0",
33
33
  ]
34
34
  requires-python = ">= 3.9"
35
35
 
@@ -38,6 +38,7 @@ Homepage = "https://docs.qbraid.com/cli/user-guide/overview"
38
38
  Documentation = "https://docs.qbraid.com/cli/api-reference/qbraid"
39
39
  "Bug Tracker" = "https://github.com/qBraid/community/issues"
40
40
  Discord = "https://discord.gg/KugF6Cnncm"
41
+ "Launch on Lab" = "https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/.git"
41
42
 
42
43
  [project.optional-dependencies]
43
44
  jobs = ["amazon-braket-sdk>=1.48.1"]
@@ -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+g00f25d1'
16
- __version_tuple__ = version_tuple = (0, 1, 'dev1', 'g00f25d1')
15
+ __version__ = version = '0.1.dev1+g8412556'
16
+ __version_tuple__ = version_tuple = (0, 1, 'dev1', 'g8412556')
@@ -5,6 +5,10 @@
5
5
  Module supporting 'qbraid envs create' command.
6
6
 
7
7
  """
8
+ import json
9
+ import os
10
+ import shutil
11
+ import sys
8
12
 
9
13
 
10
14
  def create_venv(*args, **kwargs) -> None:
@@ -16,14 +20,14 @@ def create_venv(*args, **kwargs) -> None:
16
20
 
17
21
  def update_state_json(*ags, **kwargs) -> None:
18
22
  """Update the state.json file for the qBraid environment."""
19
- from qbraid_core.services.environments.state import update_state_json as update_state
23
+ from qbraid_core.services.environments.state import update_install_status
20
24
 
21
- return update_state(*ags, **kwargs)
25
+ return update_install_status(*ags, **kwargs)
22
26
 
23
27
 
24
28
  def create_qbraid_env_assets(slug: str, alias: str, kernel_name: str, slug_path: str) -> None:
25
29
  """Create a qBraid environment including python venv, PS1 configs,
26
30
  kernel resource files, and qBraid state.json."""
27
- from qbraid_core.services.environments.create import create_qbraid_env_assets as create_assets
31
+ from qbraid_core.services.environments.create import create_qbraid_env_assets
28
32
 
29
- return create_assets(slug, alias, kernel_name, slug_path)
33
+ return create_qbraid_env_assets(slug, alias, kernel_name, slug_path)
@@ -2,10 +2,13 @@
2
2
  # All rights reserved.
3
3
 
4
4
  """
5
- Module defining commands in the 'qbraid kernels' namespace.
5
+ Module defining commands in the 'qbraid jobs' namespace.
6
6
 
7
7
  """
8
+ from pathlib import Path
9
+
8
10
  import typer
11
+ from qbraid_core.services.environments.kernels import add_kernels, list_kernels, remove_kernels
9
12
  from rich.console import Console
10
13
 
11
14
  from qbraid_cli.handlers import handle_error
@@ -16,11 +19,9 @@ kernels_app = typer.Typer(help="Manage qBraid kernels.")
16
19
  @kernels_app.command(name="list")
17
20
  def kernels_list():
18
21
  """List all available kernels."""
19
- from qbraid_core.services.environments.kernels import get_all_kernels
20
-
21
22
  console = Console()
22
23
  # Get the list of kernelspecs
23
- kernelspecs: dict = get_all_kernels()
24
+ kernelspecs = list_kernels()
24
25
 
25
26
  if len(kernelspecs) == 0:
26
27
  console.print("No qBraid kernels are active.")
@@ -30,25 +31,16 @@ def kernels_list():
30
31
  longest_kernel_name = max(len(kernel_name) for kernel_name in kernelspecs)
31
32
  spacing = longest_kernel_name + 10
32
33
 
33
- output_lines = []
34
- output_lines.append("# qbraid kernels:")
35
- output_lines.append("#")
36
- output_lines.append("")
34
+ console.print("# qbraid kernels:\n#\n")
37
35
 
38
36
  # Ensure 'python3' kernel is printed first if it exists
39
37
  default_kernel_name = "python3"
40
38
  python3_kernel_info = kernelspecs.pop(default_kernel_name, None)
41
39
  if python3_kernel_info:
42
- line = f"{default_kernel_name.ljust(spacing)}{python3_kernel_info['resource_dir']}"
43
- output_lines.append(line)
40
+ console.print(f"{default_kernel_name.ljust(spacing)}{python3_kernel_info['resource_dir']}")
44
41
  # print rest of the kernels
45
42
  for kernel_name, kernel_info in sorted(kernelspecs.items()):
46
- line = f"{kernel_name.ljust(spacing)}{kernel_info['resource_dir']}"
47
- output_lines.append(line)
48
-
49
- final_output = "\n".join(output_lines)
50
-
51
- console.print(final_output)
43
+ console.print(f"{kernel_name.ljust(spacing)}{kernel_info['resource_dir']}")
52
44
 
53
45
 
54
46
  @kernels_app.command(name="add")
@@ -58,18 +50,15 @@ def kernels_add(
58
50
  )
59
51
  ):
60
52
  """Add a kernel."""
61
- from qbraid_core.services.environments.kernels import add_kernels
62
53
 
63
54
  try:
64
55
  add_kernels(environment)
65
- except ValueError:
56
+ except ValueError as e:
66
57
  handle_error(
67
- message="Failed to add kernel(s). Please verify that the environment exists.",
68
- include_traceback=True,
58
+ message=e,
59
+ include_traceback=False,
69
60
  )
70
-
71
- console = Console()
72
- console.print(f"\nSuccessfully added '{environment}' kernel(s).", highlight=False)
61
+ return
73
62
 
74
63
 
75
64
  @kernels_app.command(name="remove")
@@ -80,18 +69,11 @@ def kernels_remove(
80
69
  )
81
70
  ):
82
71
  """Remove a kernel."""
83
- from qbraid_core.services.environments.kernels import remove_kernels
84
-
85
72
  try:
86
73
  remove_kernels(environment)
87
74
  except ValueError:
88
- handle_error(
89
- message="Failed to remove kernel(s). Please verify that the environment exists.",
90
- include_traceback=True,
91
- )
92
-
93
- console = Console()
94
- console.print(f"\nSuccessfully removed '{environment}' kernel(s).", highlight=False)
75
+ handle_error(message=f"Environment '{environment}' not found.", include_traceback=False)
76
+ return
95
77
 
96
78
 
97
79
  if __name__ == "__main__":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: qbraid-cli
3
- Version: 0.8.4
3
+ Version: 0.8.4a0
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
@@ -8,6 +8,7 @@ Project-URL: Homepage, https://docs.qbraid.com/cli/user-guide/overview
8
8
  Project-URL: Documentation, https://docs.qbraid.com/cli/api-reference/qbraid
9
9
  Project-URL: Bug Tracker, https://github.com/qBraid/community/issues
10
10
  Project-URL: Discord, https://discord.gg/KugF6Cnncm
11
+ Project-URL: Launch on Lab, https://account.qbraid.com/?gitHubUrl=https://github.com/qBraid/.git
11
12
  Keywords: qbraid,cli,quantum,cloud
12
13
  Classifier: Development Status :: 5 - Production/Stable
13
14
  Classifier: Intended Audience :: Developers
@@ -28,7 +29,7 @@ Description-Content-Type: text/markdown
28
29
  License-File: LICENSE
29
30
  Requires-Dist: typer>=0.12.1
30
31
  Requires-Dist: rich>=10.11.0
31
- Requires-Dist: qbraid-core[environments]>=0.1.17
32
+ Requires-Dist: qbraid-core[environments]==0.1.17a0
32
33
  Provides-Extra: jobs
33
34
  Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
34
35
  Provides-Extra: dev
@@ -11,13 +11,11 @@ ruff.toml
11
11
  .github/PULL_REQUEST_TEMPLATE.md
12
12
  .github/ISSUE_TEMPLATE/bug_report.yml
13
13
  .github/ISSUE_TEMPLATE/feature_request.yml
14
- .github/workflows/bump-version.yml
15
14
  .github/workflows/docs.yml
16
15
  .github/workflows/format.yml
17
16
  .github/workflows/main.yml
18
17
  .github/workflows/pre-release.yml
19
18
  .github/workflows/publish.yml
20
- .github/workflows/tag-on-merge.yml
21
19
  docs/Makefile
22
20
  docs/conf.py
23
21
  docs/index.rst
@@ -117,7 +115,6 @@ tests/jobs/test_jobs_validate_handle_state.py
117
115
  tests/jobs/test_jobs_validate_library.py
118
116
  tests/kernels/__init__.py
119
117
  tests/kernels/test_kernels_list.py
120
- tools/bump_version.py
121
118
  tools/create_dev_build.sh
122
119
  tools/install_wheel_extras.sh
123
120
  tools/split_md.py
@@ -1,6 +1,6 @@
1
1
  typer>=0.12.1
2
2
  rich>=10.11.0
3
- qbraid-core[environments]>=0.1.17
3
+ qbraid-core[environments]==0.1.17a0
4
4
 
5
5
  [dev]
6
6
  ruff
@@ -15,7 +15,8 @@ def mock_is_exe(path):
15
15
  return path == "/path/to/bin/python3", "-m", "ipykernel_launcher", "-f", "test"
16
16
 
17
17
 
18
- @patch("qbraid_core.services.environments.kernels.get_all_kernels", return_value={})
18
+ # @patch("jupyter_client.kernelspec.KernelSpecManager")
19
+ @patch("qbraid_cli.kernels.app.list_kernels", return_value={})
19
20
  @patch("qbraid_cli.kernels.app.Console")
20
21
  def test_kernels_list_no_active_kernels(mock_console, mock_list_kernels):
21
22
  """Test listing kernels when no kernels are active."""
@@ -32,7 +33,7 @@ def test_kernels_list_no_active_kernels(mock_console, mock_list_kernels):
32
33
 
33
34
 
34
35
  @patch(
35
- "qbraid_core.services.environments.kernels.get_all_kernels",
36
+ "qbraid_cli.kernels.app.list_kernels",
36
37
  return_value={"python3": {"resource_dir": "/path/to/python3/kernel"}},
37
38
  )
38
39
  @patch("qbraid_cli.kernels.app.Console")
@@ -42,14 +43,15 @@ def test_kernels_list_default_python3_kernel_present(mock_console, mock_list_ker
42
43
  kernels_list()
43
44
 
44
45
  expected_calls = [
45
- call("# qbraid kernels:\n#\n\npython3 /path/to/python3/kernel"),
46
+ call("# qbraid kernels:\n#\n"),
47
+ call("python3 /path/to/python3/kernel"),
46
48
  ]
47
49
  actual_calls = mock_console.return_value.print.call_args_list
48
50
  assert actual_calls == expected_calls
49
51
 
50
52
 
51
53
  @patch(
52
- "qbraid_core.services.environments.kernels.get_all_kernels",
54
+ "qbraid_cli.kernels.app.list_kernels",
53
55
  return_value={
54
56
  "python3": {"resource_dir": "/path/to/python3/kernel"},
55
57
  "another_kernel": {
@@ -69,9 +71,9 @@ def test_kernels_list_multiple_kernels_available(mock_console, mock_list_kernels
69
71
  kernels_list()
70
72
 
71
73
  expected_calls = [
72
- call(
73
- "# qbraid kernels:\n#\n\npython3 /path/to/python3/kernel\nanother_kernel /path/to/another/kernel"
74
- ),
74
+ call("# qbraid kernels:\n#\n"),
75
+ call("python3 /path/to/python3/kernel"),
76
+ call("another_kernel /path/to/another/kernel"),
75
77
  ]
76
78
  actual_calls = mock_console.return_value.print.call_args_list
77
79
  assert actual_calls == expected_calls
@@ -5,14 +5,14 @@
5
5
  Script for getting/bumping the next pre-release version.
6
6
 
7
7
  """
8
+
8
9
  import pathlib
9
- import sys
10
10
 
11
11
  from qbraid_core.system.versions import get_prelease_version
12
12
 
13
13
  if __name__ == "__main__":
14
14
 
15
- package_name = sys.argv[1]
15
+ PACKAGE = "qbraid_cli"
16
16
  root = pathlib.Path(__file__).parent.parent.resolve()
17
- version = get_prelease_version(root, package_name)
17
+ version = get_prelease_version(root, PACKAGE)
18
18
  print(version)
@@ -1,71 +0,0 @@
1
- name: Bump Version
2
-
3
- on:
4
- workflow_dispatch:
5
- inputs:
6
- bump_type:
7
- description: 'Select the version bump type'
8
- required: true
9
- type: choice
10
- options:
11
- - major
12
- - minor
13
- - patch
14
- default: 'patch'
15
-
16
- jobs:
17
- bump-version:
18
- runs-on: ubuntu-latest
19
- permissions:
20
- contents: write
21
- pull-requests: write
22
- steps:
23
- - name: Checkout code
24
- uses: actions/checkout@v4
25
- with:
26
- ref: 'main'
27
-
28
- - name: Create feature branch
29
- run: git checkout -b qbraid-bot/${{ github.run_id }}
30
-
31
- - name: Setup Python
32
- uses: actions/setup-python@v5
33
- with:
34
- python-version: '3.11'
35
-
36
- - name: Install dependencies
37
- run: |
38
- python -m pip install --upgrade pip
39
- python -m pip install "qbraid-core>=0.1.17"
40
-
41
- - name: Setup Git config
42
- run: |
43
- git config --global user.name 'qbraidTeam'
44
- git config --global user.email 'qbraid.team@qbraid.com'
45
-
46
- - name: Bump version, commit and push
47
- id: bump_version
48
- run: |
49
- BUMP_TYPE=${{ github.event.inputs.bump_type }}
50
- VERSION=$(python3 tools/bump_version.py qbraid_cli $BUMP_TYPE)
51
- echo "version=$VERSION" >> $GITHUB_OUTPUT
52
- git commit -am "Bump $BUMP_TYPE version to $VERSION"
53
- git push origin qbraid-bot/${{ github.run_id }}
54
-
55
- - name: Create Pull Request
56
- id: create_pr
57
- run: |
58
- VERSION=${{ steps.bump_version.outputs.version }}
59
- PR_URL=$(gh pr create -B main -H qbraid-bot/${{ github.run_id }} --title "Bump project version to $VERSION" --body "This PR bumps the project version to $VERSION")
60
- PR_NUMBER=$(echo "$PR_URL" | grep -o '[0-9]*$')
61
- echo "url=$PR_URL" >> $GITHUB_OUTPUT
62
- echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT
63
- env:
64
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65
-
66
- - name: Summary
67
- run: |
68
- VERSION=${{ steps.bump_version.outputs.version }}
69
- PR_URL=${{ steps.create_pr.outputs.url }}
70
- PR_NUMBER=${{ steps.create_pr.outputs.number }}
71
- echo "Opened PR [#$PR_NUMBER]($PR_URL) to update project to version **$VERSION**." >> $GITHUB_STEP_SUMMARY
@@ -1,36 +0,0 @@
1
- name: Tag on PR Merge
2
-
3
- on:
4
- pull_request:
5
- types: [closed]
6
-
7
- jobs:
8
- tag-version:
9
- if: github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && startsWith(github.event.pull_request.title, 'Bump project version to ')
10
- runs-on: ubuntu-latest
11
- permissions:
12
- contents: write
13
- steps:
14
- - name: Extract version
15
- id: extract_version
16
- run: |
17
- VERSION=$(echo '${{ github.event.pull_request.title }}' | sed -E 's/Bump project version to (.*)/\1/')
18
- echo "version=$VERSION" >> $GITHUB_OUTPUT
19
-
20
- - name: Checkout code
21
- uses: actions/checkout@v4
22
- with:
23
- ref: 'main'
24
-
25
- - name: Setup Git config
26
- run: |
27
- git config --global user.name 'qbraidTeam'
28
- git config --global user.email 'qbraid.team@qbraid.com'
29
-
30
- - name: Create Tag
31
- run: |
32
- VERSION=${{ steps.extract_version.outputs.version }}
33
- git tag v$VERSION
34
- git push origin v$VERSION
35
- env:
36
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -1,28 +0,0 @@
1
- # Copyright (c) 2024, qBraid Development Team
2
- # All rights reserved.
3
-
4
- """
5
- Script to bump the major, minor, or patch version in pyproject.toml.
6
-
7
- """
8
- import pathlib
9
- import sys
10
-
11
- from qbraid_core.system.versions import (
12
- bump_version,
13
- get_latest_package_version,
14
- update_version_in_pyproject,
15
- )
16
-
17
- if __name__ == "__main__":
18
-
19
- package_name = sys.argv[1]
20
- bump_type = sys.argv[2]
21
-
22
- root = pathlib.Path(__file__).parent.parent.resolve()
23
- pyproject_toml_path = root / "pyproject.toml"
24
-
25
- current_version = get_latest_package_version(package_name)
26
- bumped_version = bump_version(current_version, bump_type)
27
- update_version_in_pyproject(pyproject_toml_path, bumped_version)
28
- print(bumped_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
File without changes
File without changes