qbraid-cli 0.9.5__tar.gz → 0.9.7__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 (122) hide show
  1. qbraid_cli-0.9.7/.github/dependabot.yml +15 -0
  2. qbraid_cli-0.9.7/.github/workflows/ci-pr-target.yml +81 -0
  3. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/main.yml +5 -4
  4. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/PKG-INFO +20 -5
  5. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/README.md +19 -4
  6. qbraid_cli-0.9.7/docs/requirements.txt +7 -0
  7. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/pyproject.toml +1 -1
  8. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/_version.py +2 -2
  9. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/admin/app.py +4 -8
  10. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/admin/headers.py +46 -29
  11. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/admin/validation.py +1 -8
  12. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/configure/app.py +60 -2
  13. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/PKG-INFO +20 -5
  14. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/SOURCES.txt +3 -0
  15. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/admin/test_headers.py +67 -50
  16. qbraid_cli-0.9.7/tests/configure/test_configure_commands.py +91 -0
  17. qbraid_cli-0.9.5/docs/requirements.txt +0 -7
  18. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.env.example +0 -0
  19. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  20. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  21. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  22. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/bump-version.yml +0 -0
  23. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/docs-pr.yml +0 -0
  24. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/docs.yml +0 -0
  25. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/format.yml +0 -0
  26. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/pre-release.yml +0 -0
  27. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/publish.yml +0 -0
  28. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.github/workflows/tag-on-merge.yml +0 -0
  29. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.gitignore +0 -0
  30. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/.readthedocs.yml +0 -0
  31. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/CONTRIBUTING.md +0 -0
  32. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/LICENSE +0 -0
  33. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/MANIFEST.IN +0 -0
  34. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/Makefile +0 -0
  35. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/Makefile +0 -0
  36. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/_static/favicon.ico +0 -0
  37. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/_static/logo.png +0 -0
  38. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/_static/style/custom.css +0 -0
  39. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/_static/style/s4defs-roles.css +0 -0
  40. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/conf.py +0 -0
  41. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/index.rst +0 -0
  42. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/docs/make.bat +0 -0
  43. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/__init__.py +0 -0
  44. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/account/__init__.py +0 -0
  45. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/account/app.py +0 -0
  46. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/admin/__init__.py +0 -0
  47. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/chat/__init__.py +0 -0
  48. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/chat/app.py +0 -0
  49. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/configure/__init__.py +0 -0
  50. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/configure/actions.py +0 -0
  51. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/devices/__init__.py +0 -0
  52. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/devices/app.py +0 -0
  53. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/devices/validation.py +0 -0
  54. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/envs/__init__.py +0 -0
  55. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/envs/activate.py +0 -0
  56. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/envs/app.py +0 -0
  57. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/envs/create.py +0 -0
  58. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/envs/data_handling.py +0 -0
  59. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/exceptions.py +0 -0
  60. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/files/__init__.py +0 -0
  61. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/files/app.py +0 -0
  62. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/handlers.py +0 -0
  63. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/jobs/__init__.py +0 -0
  64. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/jobs/app.py +0 -0
  65. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/jobs/toggle_braket.py +0 -0
  66. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/jobs/validation.py +0 -0
  67. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/kernels/__init__.py +0 -0
  68. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/kernels/app.py +0 -0
  69. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/main.py +0 -0
  70. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/pip/__init__.py +0 -0
  71. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/pip/app.py +0 -0
  72. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/pip/hooks.py +0 -0
  73. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli/py.typed +0 -0
  74. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  75. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/entry_points.txt +0 -0
  76. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/requires.txt +0 -0
  77. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/qbraid_cli.egg-info/top_level.txt +0 -0
  78. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/setup.cfg +0 -0
  79. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/__init__.py +0 -0
  80. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/account/__init__.py +0 -0
  81. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/account/test_account_credits.py +0 -0
  82. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/configure/__init__.py +0 -0
  83. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/configure/test_configure_prompt_for_config.py +0 -0
  84. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/configure/test_configure_set.py +0 -0
  85. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/configure/test_configure_validate_input.py +0 -0
  86. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/conftest.py +0 -0
  87. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/devices/__init__.py +0 -0
  88. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/devices/test_devices_list.py +0 -0
  89. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/devices/test_devices_validations.py +0 -0
  90. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/__init__.py +0 -0
  91. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_activate.py +0 -0
  92. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_activate_find_shell_rc.py +0 -0
  93. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_activate_print_command.py +0 -0
  94. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_activate_pyenv.py +0 -0
  95. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_create_from_yaml.py +0 -0
  96. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_list.py +0 -0
  97. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/envs/test_envs_remove.py +0 -0
  98. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/files/__init__.py +0 -0
  99. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/files/test_files_commands.py +0 -0
  100. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/__init__.py +0 -0
  101. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_disable.py +0 -0
  102. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_enable.py +0 -0
  103. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_list.py +0 -0
  104. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_state.py +0 -0
  105. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_toggle_braket_confirm.py +0 -0
  106. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_toggle_braket_disable.py +0 -0
  107. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_toggle_braket_enable.py +0 -0
  108. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_toggle_braket_get_data.py +0 -0
  109. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_validate_get_state.py +0 -0
  110. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_validate_handle_state.py +0 -0
  111. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/jobs/test_jobs_validate_library.py +0 -0
  112. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/kernels/__init__.py +0 -0
  113. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/kernels/test_kernels_list.py +0 -0
  114. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/resources/envs/correct.yaml +0 -0
  115. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/resources/envs/icon.png +0 -0
  116. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tests/resources/envs/incorrect.yaml +0 -0
  117. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/bump_version.py +0 -0
  118. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/create_dev_build.sh +0 -0
  119. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/install_wheel_extras.sh +0 -0
  120. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/split_md.py +0 -0
  121. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/split_rst.py +0 -0
  122. {qbraid_cli-0.9.5 → qbraid_cli-0.9.7}/tools/stamp_pre_release.py +0 -0
@@ -0,0 +1,15 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "pip" # See documentation for possible values
9
+ directory: "/" # Location of package manifests
10
+ schedule:
11
+ interval: "weekly"
12
+ - package-ecosystem: "github-actions"
13
+ directory: "/"
14
+ schedule:
15
+ interval: "weekly"
@@ -0,0 +1,81 @@
1
+ name: CI (PR Target)
2
+
3
+ on:
4
+ pull_request_target:
5
+ branches: ['main']
6
+ types: [opened, reopened, ready_for_review, synchronize]
7
+
8
+ jobs:
9
+ build:
10
+ if: github.event.pull_request.draft == false && github.event.pull_request.user.login == 'dependabot[bot]'
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ['3.11']
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python ${{ matrix.python-version }}
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: ${{ matrix.python-version }}
22
+ cache: pip
23
+ - name: Upgrade pip and install build tools
24
+ run: |
25
+ pip install --upgrade pip
26
+ pip install setuptools wheel build
27
+ - name: Build the package
28
+ run: |
29
+ python -m build
30
+ - name: Upload built package
31
+ uses: actions/upload-artifact@v4
32
+ with:
33
+ name: built-package
34
+ path: dist/*.whl
35
+
36
+ test:
37
+ if: github.event.pull_request.draft == false && github.event.pull_request.user.login == 'dependabot[bot]'
38
+ needs: build
39
+ runs-on: ${{ matrix.os }}
40
+ strategy:
41
+ matrix:
42
+ os: [ubuntu-latest, windows-latest]
43
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
44
+ fail-fast: true
45
+
46
+ steps:
47
+ - uses: actions/checkout@v4
48
+ - name: Set up Python ${{ matrix.python-version }}
49
+ uses: actions/setup-python@v5
50
+ with:
51
+ python-version: ${{ matrix.python-version }}
52
+ cache: pip
53
+ - name: Download built package
54
+ uses: actions/download-artifact@v4
55
+ with:
56
+ name: built-package
57
+ path: dist
58
+ - name: Install package
59
+ run: |
60
+ if ($env:RUNNER_OS -eq "Windows") {
61
+ Get-ChildItem dist/*.whl | ForEach-Object { pip install $_.FullName }
62
+ } else {
63
+ pip install dist/*.whl
64
+ }
65
+ shell: pwsh
66
+ - name: Install testing dependencies
67
+ run: |
68
+ pip install pytest pytest-cov qbraid-core[environments]
69
+ - name: Run tests with pytest
70
+ run: |
71
+ pytest --cov=qbraid_cli tests/ --cov-report=html --cov-report=xml --cov-report=term --cov-config=pyproject.toml
72
+ env:
73
+ QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
74
+ - name: Upload coverage to Codecov
75
+ if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
76
+ uses: codecov/codecov-action@v5.1.2
77
+ with:
78
+ token: ${{ secrets.CODECOV_TOKEN }}
79
+ fail_ci_if_error: false
80
+ files: ./build/coverage/coverage.xml
81
+ verbose: true
@@ -10,7 +10,7 @@ on:
10
10
 
11
11
  jobs:
12
12
  build:
13
- if: github.event.pull_request.draft == false
13
+ if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]'
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  matrix:
@@ -37,13 +37,14 @@ jobs:
37
37
  path: dist/*.whl
38
38
 
39
39
  test:
40
- if: github.event.pull_request.draft == false
40
+ if: github.event.pull_request.draft == false && github.event.pull_request.user.login != 'dependabot[bot]'
41
41
  needs: build
42
42
  runs-on: ${{ matrix.os }}
43
43
  strategy:
44
44
  matrix:
45
45
  os: [ubuntu-latest, windows-latest]
46
- python-version: ['3.9', '3.10', '3.11', '3.12']
46
+ python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
47
+ fail-fast: true
47
48
 
48
49
  steps:
49
50
  - uses: actions/checkout@v4
@@ -75,7 +76,7 @@ jobs:
75
76
  QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
76
77
  - name: Upload coverage to Codecov
77
78
  if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
78
- uses: codecov/codecov-action@v4.4.1
79
+ uses: codecov/codecov-action@v5.1.2
79
80
  with:
80
81
  token: ${{ secrets.CODECOV_TOKEN }}
81
82
  fail_ci_if_error: false
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qbraid-cli
3
- Version: 0.9.5
3
+ Version: 0.9.7
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
@@ -52,7 +52,11 @@ Requires-Dist: pytest-cov; extra == "dev"
52
52
 
53
53
  Command Line Interface for interacting with all parts of the qBraid platform.
54
54
 
55
- The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct acess to QPU devices from leading providers like IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid and AWS, all using qBraid [credits](https://docs.qbraid.com/home/pricing), with no additional access keys required.
55
+ The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct, pre-configured access to QPUs from IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid, AWS, IonQ, QuEra, and NEC. See [pricing](https://docs.qbraid.com/home/pricing) for more.
56
+
57
+ *Resources*:
58
+ - [User Guide](https://docs.qbraid.com/cli/user-guide/overview)
59
+ - [API Reference](https://docs.qbraid.com/cli/api-reference/qbraid)
56
60
 
57
61
  ## Getting Started
58
62
 
@@ -69,6 +73,12 @@ You can also install the qBraid-CLI from PyPI with:
69
73
  pip install qbraid-cli
70
74
  ```
71
75
 
76
+ To manage qBraid [environments](https://docs.qbraid.com/lab/user-guide/environments) using the CLI, you must also install the `envs` extra:
77
+
78
+ ```bash
79
+ pip install 'qbraid-cli[envs]'
80
+ ```
81
+
72
82
  ## Local configuration
73
83
 
74
84
  After installation, you must configure your account credentials to use the CLI locally:
@@ -83,6 +93,8 @@ After installation, you must configure your account credentials to use the CLI l
83
93
  $ qbraid configure
84
94
  ```
85
95
 
96
+ For more on API keys, see [documentation](https://docs.qbraid.com/home/account#api-keys).
97
+
86
98
  ## Basic Commands
87
99
 
88
100
  ```bash
@@ -142,12 +154,17 @@ Options
142
154
  --help Show this message and exit.
143
155
 
144
156
  Commands
157
+ account Manage qBraid account
158
+ admin CI/CD commands for qBraid maintainers.
145
159
  configure Configure qBraid CLI options.
146
160
  account Manage qBraid account.
161
+ chat Interact with qBraid AI chat service.
147
162
  devices Manage qBraid quantum devices.
148
163
  envs Manage qBraid environments.
164
+ files Manage qBraid cloud storage files.
149
165
  jobs Manage qBraid quantum jobs.
150
166
  kernels Manage qBraid kernels.
167
+ pip Run pip command in active qBraid environment.
151
168
  ```
152
169
 
153
170
  To get the version of the qBraid CLI:
@@ -173,7 +190,5 @@ In [1]: %load_ext qbraid_magic
173
190
  Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic ``%`` operator, e.g.
174
191
 
175
192
  ```python
176
- In [2]: %qbraid jobs state
177
-
178
- In [3]: %qbraid jobs enable braket -y
193
+ In [2]: %qbraid chat -f code -p "Write a Qiskit bell circuit"
179
194
  ```
@@ -9,7 +9,11 @@
9
9
 
10
10
  Command Line Interface for interacting with all parts of the qBraid platform.
11
11
 
12
- The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct acess to QPU devices from leading providers like IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid and AWS, all using qBraid [credits](https://docs.qbraid.com/home/pricing), with no additional access keys required.
12
+ The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct, pre-configured access to QPUs from IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid, AWS, IonQ, QuEra, and NEC. See [pricing](https://docs.qbraid.com/home/pricing) for more.
13
+
14
+ *Resources*:
15
+ - [User Guide](https://docs.qbraid.com/cli/user-guide/overview)
16
+ - [API Reference](https://docs.qbraid.com/cli/api-reference/qbraid)
13
17
 
14
18
  ## Getting Started
15
19
 
@@ -26,6 +30,12 @@ You can also install the qBraid-CLI from PyPI with:
26
30
  pip install qbraid-cli
27
31
  ```
28
32
 
33
+ To manage qBraid [environments](https://docs.qbraid.com/lab/user-guide/environments) using the CLI, you must also install the `envs` extra:
34
+
35
+ ```bash
36
+ pip install 'qbraid-cli[envs]'
37
+ ```
38
+
29
39
  ## Local configuration
30
40
 
31
41
  After installation, you must configure your account credentials to use the CLI locally:
@@ -40,6 +50,8 @@ After installation, you must configure your account credentials to use the CLI l
40
50
  $ qbraid configure
41
51
  ```
42
52
 
53
+ For more on API keys, see [documentation](https://docs.qbraid.com/home/account#api-keys).
54
+
43
55
  ## Basic Commands
44
56
 
45
57
  ```bash
@@ -99,12 +111,17 @@ Options
99
111
  --help Show this message and exit.
100
112
 
101
113
  Commands
114
+ account Manage qBraid account
115
+ admin CI/CD commands for qBraid maintainers.
102
116
  configure Configure qBraid CLI options.
103
117
  account Manage qBraid account.
118
+ chat Interact with qBraid AI chat service.
104
119
  devices Manage qBraid quantum devices.
105
120
  envs Manage qBraid environments.
121
+ files Manage qBraid cloud storage files.
106
122
  jobs Manage qBraid quantum jobs.
107
123
  kernels Manage qBraid kernels.
124
+ pip Run pip command in active qBraid environment.
108
125
  ```
109
126
 
110
127
  To get the version of the qBraid CLI:
@@ -130,7 +147,5 @@ In [1]: %load_ext qbraid_magic
130
147
  Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic ``%`` operator, e.g.
131
148
 
132
149
  ```python
133
- In [2]: %qbraid jobs state
134
-
135
- In [3]: %qbraid jobs enable braket -y
150
+ In [2]: %qbraid chat -f code -p "Write a Qiskit bell circuit"
136
151
  ```
@@ -0,0 +1,7 @@
1
+ sphinx>=7.2.6,<8.2.0
2
+ sphinx-rtd-theme>=1.3,<3.1
3
+ docutils<0.22
4
+ toml
5
+ build
6
+ m2r
7
+ typer
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qbraid-cli"
7
- version = "0.9.5"
7
+ version = "0.9.7"
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+g5dbdf17'
16
- __version_tuple__ = version_tuple = (0, 1, 'dev1', 'g5dbdf17')
15
+ __version__ = version = '0.1.dev1+g51fd097'
16
+ __version_tuple__ = version_tuple = (0, 1, 'dev1', 'g51fd097')
@@ -10,8 +10,8 @@ from typing import Optional
10
10
 
11
11
  import typer
12
12
 
13
- from qbraid_cli.admin.headers import check_and_fix_headers
14
- from qbraid_cli.admin.validation import validate_header_type, validate_paths_exist
13
+ from qbraid_cli.admin.headers import HeaderType, check_and_fix_headers
14
+ from qbraid_cli.admin.validation import validate_paths_exist
15
15
 
16
16
  admin_app = typer.Typer(
17
17
  help="CI/CD commands for qBraid maintainers.",
@@ -25,12 +25,8 @@ def admin_headers(
25
25
  src_paths: list[str] = typer.Argument(
26
26
  ..., help="Source file or directory paths to verify.", callback=validate_paths_exist
27
27
  ),
28
- header_type: str = typer.Option(
29
- "default",
30
- "--type",
31
- "-t",
32
- help="Type of header to use ('default' or 'gpl').",
33
- callback=validate_header_type,
28
+ header_type: HeaderType = typer.Option(
29
+ "default", "--type", "-t", help="Type of header to use."
34
30
  ),
35
31
  skip_files: list[str] = typer.Option(
36
32
  [], "--skip", "-s", help="Files to skip during verification.", callback=validate_paths_exist
@@ -1,6 +1,8 @@
1
1
  # Copyright (c) 2024, qBraid Development Team
2
2
  # All rights reserved.
3
3
 
4
+ # pylint: disable=too-many-branches,too-many-statements
5
+
4
6
  """
5
7
  Script to verify qBraid copyright file headers
6
8
 
@@ -8,6 +10,8 @@ Script to verify qBraid copyright file headers
8
10
 
9
11
  import datetime
10
12
  import os
13
+ from enum import Enum
14
+ from pathlib import Path
11
15
  from typing import Optional
12
16
 
13
17
  import typer
@@ -15,36 +19,47 @@ from rich.console import Console
15
19
 
16
20
  from qbraid_cli.handlers import handle_error
17
21
 
18
- # pylint: disable=too-many-branches,too-many-statements
19
22
  CURR_YEAR = datetime.datetime.now().year
20
23
  PREV_YEAR = CURR_YEAR - 1
21
- VALID_EXTS = (".py", ".js", ".ts")
22
24
 
25
+ COMMENT_MARKER = {
26
+ ".py": "#",
27
+ ".js": "//",
28
+ ".ts": "//",
29
+ }
30
+
31
+ VALID_EXTS = tuple(COMMENT_MARKER.keys())
32
+
33
+
34
+ class HeaderType(Enum):
35
+ """Type of header to use."""
36
+
37
+ default = "default" # pylint: disable=invalid-name
38
+ gpl = "gpl" # pylint: disable=invalid-name
23
39
 
24
- DEFAULT_HEADER = f"""# Copyright (c) {str(CURR_YEAR)}, qBraid Development Team
40
+
41
+ DEFAULT_HEADER = f"""# Copyright (c) {CURR_YEAR}, qBraid Development Team
25
42
  # All rights reserved.
26
43
  """
27
44
 
28
- DEFAULT_HEADER_GPL = (
29
- f"""# Copyright (C) {str(CURR_YEAR)} qBraid"""
30
- + """#
31
- # This file is part of {project_name}
45
+ DEFAULT_HEADER_GPL = f"""# Copyright (C) {CURR_YEAR} qBraid
46
+ #
47
+ # This file is part of {{project_name}}
32
48
  #
33
- # {project_name_start} is free software released under the GNU General Public License v3
49
+ # {{project_name_start}} is free software released under the GNU General Public License v3
34
50
  # or later. You can redistribute and/or modify it under the terms of the GPL v3.
35
51
  # See the LICENSE file in the project root or <https://www.gnu.org/licenses/gpl-3.0.html>.
36
52
  #
37
- # THERE IS NO WARRANTY for {project_name}, as per Section 15 of the GPL v3.
53
+ # THERE IS NO WARRANTY for {{project_name}}, as per Section 15 of the GPL v3.
38
54
  """
39
- )
40
55
 
41
56
  HEADER_TYPES = {
42
- "default": DEFAULT_HEADER,
43
- "gpl": DEFAULT_HEADER_GPL,
57
+ HeaderType.default: DEFAULT_HEADER,
58
+ HeaderType.gpl: DEFAULT_HEADER_GPL,
44
59
  }
45
60
 
46
61
 
47
- def get_formatted_header(header_type: str, project_name: str) -> str:
62
+ def get_formatted_header(header_type: HeaderType, project_name: str) -> str:
48
63
  """Get the formatted header based on the header type
49
64
 
50
65
  Args:
@@ -56,16 +71,24 @@ def get_formatted_header(header_type: str, project_name: str) -> str:
56
71
  """
57
72
 
58
73
  header = HEADER_TYPES[header_type]
59
- if header_type == "gpl":
60
- return header.format(
61
- project_name=project_name, project_name_start=project_name[0].upper() + project_name[1:]
62
- )
74
+ if header_type == HeaderType.gpl:
75
+ if project_name.split(" ")[0].lower() == "the":
76
+ project_name = project_name[:1].lower() + project_name[1:]
77
+ project_name_start = project_name[:1].upper() + project_name[1:]
78
+ else:
79
+ project_name_start = project_name
80
+ return header.format(project_name=project_name, project_name_start=project_name_start)
63
81
  return header
64
82
 
65
83
 
84
+ def _get_comment_marker(file_path: str, default: Optional[str] = None) -> str:
85
+ file_ext = Path(file_path).suffix
86
+ return COMMENT_MARKER.get(file_ext, default)
87
+
88
+
66
89
  def check_and_fix_headers(
67
90
  src_paths: list[str],
68
- header_type: str = "default",
91
+ header_type: HeaderType = HeaderType.default,
69
92
  skip_files: Optional[list[str]] = None,
70
93
  fix: bool = False,
71
94
  project_name: Optional[str] = None,
@@ -74,11 +97,10 @@ def check_and_fix_headers(
74
97
  try:
75
98
  header = get_formatted_header(header_type, project_name)
76
99
  except KeyError:
100
+ members = HeaderType._member_names_ # pylint: disable=no-member,protected-access
77
101
  handle_error(
78
102
  error_type="ValueError",
79
- message=(
80
- f"Invalid header type: {HEADER_TYPES}. Expected one of {list(HEADER_TYPES.keys())}"
81
- ),
103
+ message=(f"Invalid header type: {HEADER_TYPES}. Expected one of {members}"),
82
104
  )
83
105
 
84
106
  for path in src_paths:
@@ -101,7 +123,8 @@ def check_and_fix_headers(
101
123
  if os.path.basename(file_path) == "__init__.py":
102
124
  return not content.strip()
103
125
 
104
- skip_header_tag = "# qbraid: skip-header"
126
+ comment_marker = _get_comment_marker(file_path)
127
+ skip_header_tag = f"{comment_marker} qbraid: skip-header"
105
128
  line_number = 0
106
129
 
107
130
  for line in content.splitlines():
@@ -117,13 +140,7 @@ def check_and_fix_headers(
117
140
  with open(file_path, "r", encoding="ISO-8859-1") as f:
118
141
  content = f.read()
119
142
 
120
- # Get the file extension
121
- file_ext = os.path.splitext(file_path)[1]
122
-
123
- if file_ext == ".py":
124
- comment_marker = "#"
125
- elif file_ext in (".js", ".ts"):
126
- comment_marker = "//"
143
+ comment_marker = _get_comment_marker(file_path)
127
144
 
128
145
  # This finds the start of the actual content after skipping initial whitespace and comments.
129
146
  lines = content.splitlines()
@@ -10,14 +10,7 @@ import os
10
10
 
11
11
  import typer
12
12
 
13
- from qbraid_cli.admin.headers import HEADER_TYPES
14
- from qbraid_cli.handlers import _format_list_items, validate_item
15
-
16
-
17
- def validate_header_type(value: str) -> str:
18
- """Validate header type."""
19
- header_types = list(HEADER_TYPES.keys())
20
- return validate_item(value, header_types, "Header type")
13
+ from qbraid_cli.handlers import _format_list_items
21
14
 
22
15
 
23
16
  def validate_paths_exist(paths: list[str]) -> list[str]:
@@ -1,4 +1,4 @@
1
- # Copyright (c) 2024, qBraid Development Team
1
+ # Copyright (c) 2025, qBraid Development Team
2
2
  # All rights reserved.
3
3
 
4
4
  """
@@ -7,7 +7,9 @@ Module defining commands in the 'qbraid configure' namespace.
7
7
  """
8
8
 
9
9
  import typer
10
+ from rich import box
10
11
  from rich.console import Console
12
+ from rich.table import Table
11
13
 
12
14
  from qbraid_cli.configure.actions import default_action
13
15
 
@@ -36,7 +38,7 @@ def configure(ctx: typer.Context):
36
38
  def configure_set(
37
39
  name: str = typer.Argument(..., help="Config name"),
38
40
  value: str = typer.Argument(..., help="Config value"),
39
- profile: str = typer.Option("default", help="Profile name"),
41
+ profile: str = typer.Option("default", "--profile", "-p", help="Profile name"),
40
42
  ):
41
43
  """Set configuration value in qbraidrc file."""
42
44
  # pylint: disable-next=import-outside-toplevel
@@ -53,6 +55,62 @@ def configure_set(
53
55
  typer.echo("Configuration updated successfully.")
54
56
 
55
57
 
58
+ @configure_app.command(name="get")
59
+ def configure_get(
60
+ name: str = typer.Argument(..., help="Config name"),
61
+ profile: str = typer.Option("default", "--profile", "-p", help="Profile name"),
62
+ ):
63
+ """Get configuration value from qbraidrc file."""
64
+ # pylint: disable-next=import-outside-toplevel
65
+ from qbraid_core.config import load_config
66
+
67
+ config = load_config()
68
+
69
+ if profile not in config:
70
+ typer.echo(f"Profile '{profile}' not found in configuration.")
71
+ raise typer.Exit(1)
72
+
73
+ if name not in config[profile]:
74
+ typer.echo(f"Configuration '{name}' not found in profile '{profile}'.")
75
+ raise typer.Exit(1)
76
+
77
+ typer.echo(config[profile][name])
78
+
79
+
80
+ @configure_app.command(name="list")
81
+ def configure_list():
82
+ """List all configuration values in qbraidrc."""
83
+ # pylint: disable-next=import-outside-toplevel
84
+ from qbraid_core.config import load_config
85
+
86
+ config = load_config()
87
+ console = Console()
88
+ profile = "default"
89
+
90
+ if profile not in config:
91
+ typer.echo("Default profile not found in configuration.")
92
+ raise typer.Exit(1)
93
+
94
+ if not config[profile]:
95
+ typer.echo("No configuration values found in default profile.")
96
+ return
97
+
98
+ table = Table(show_edge=False, box=box.MINIMAL)
99
+ table.add_column("Name", style="cyan")
100
+ table.add_column("Value", style="green")
101
+
102
+ sensitive_keys = {"api-key", "refresh-token"}
103
+
104
+ for name, value in config[profile].items():
105
+ if name in sensitive_keys and value:
106
+ masked_value = f"*****{str(value)[-3:]}"
107
+ else:
108
+ masked_value = str(value)
109
+ table.add_row(name, masked_value)
110
+
111
+ console.print(table)
112
+
113
+
56
114
  @configure_app.command(name="magic")
57
115
  def configure_magic():
58
116
  """Enable qBraid IPython magic commands."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qbraid-cli
3
- Version: 0.9.5
3
+ Version: 0.9.7
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
@@ -52,7 +52,11 @@ Requires-Dist: pytest-cov; extra == "dev"
52
52
 
53
53
  Command Line Interface for interacting with all parts of the qBraid platform.
54
54
 
55
- The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct acess to QPU devices from leading providers like IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid and AWS, all using qBraid [credits](https://docs.qbraid.com/home/pricing), with no additional access keys required.
55
+ The **qBraid CLI** is a versatile command-line interface tool designed for seamless interaction with qBraid cloud services and quantum software management tools. Initially exclusive to the [qBraid Lab](https://docs.qbraid.com/lab/user-guide/overview) platform, the CLI now supports local installations as well. This enhancement broadens access to features like [qBraid Quantum Jobs](https://docs.qbraid.com/cli/user-guide/quantum-jobs), enabling direct, pre-configured access to QPUs from IonQ, Oxford Quantum Circuits, QuEra, Rigetti, and IQM, as well as on-demand simulators from qBraid, AWS, IonQ, QuEra, and NEC. See [pricing](https://docs.qbraid.com/home/pricing) for more.
56
+
57
+ *Resources*:
58
+ - [User Guide](https://docs.qbraid.com/cli/user-guide/overview)
59
+ - [API Reference](https://docs.qbraid.com/cli/api-reference/qbraid)
56
60
 
57
61
  ## Getting Started
58
62
 
@@ -69,6 +73,12 @@ You can also install the qBraid-CLI from PyPI with:
69
73
  pip install qbraid-cli
70
74
  ```
71
75
 
76
+ To manage qBraid [environments](https://docs.qbraid.com/lab/user-guide/environments) using the CLI, you must also install the `envs` extra:
77
+
78
+ ```bash
79
+ pip install 'qbraid-cli[envs]'
80
+ ```
81
+
72
82
  ## Local configuration
73
83
 
74
84
  After installation, you must configure your account credentials to use the CLI locally:
@@ -83,6 +93,8 @@ After installation, you must configure your account credentials to use the CLI l
83
93
  $ qbraid configure
84
94
  ```
85
95
 
96
+ For more on API keys, see [documentation](https://docs.qbraid.com/home/account#api-keys).
97
+
86
98
  ## Basic Commands
87
99
 
88
100
  ```bash
@@ -142,12 +154,17 @@ Options
142
154
  --help Show this message and exit.
143
155
 
144
156
  Commands
157
+ account Manage qBraid account
158
+ admin CI/CD commands for qBraid maintainers.
145
159
  configure Configure qBraid CLI options.
146
160
  account Manage qBraid account.
161
+ chat Interact with qBraid AI chat service.
147
162
  devices Manage qBraid quantum devices.
148
163
  envs Manage qBraid environments.
164
+ files Manage qBraid cloud storage files.
149
165
  jobs Manage qBraid quantum jobs.
150
166
  kernels Manage qBraid kernels.
167
+ pip Run pip command in active qBraid environment.
151
168
  ```
152
169
 
153
170
  To get the version of the qBraid CLI:
@@ -173,7 +190,5 @@ In [1]: %load_ext qbraid_magic
173
190
  Now you can continue to use the qBraid-CLI as normal from within your Jupyter notebook using the magic ``%`` operator, e.g.
174
191
 
175
192
  ```python
176
- In [2]: %qbraid jobs state
177
-
178
- In [3]: %qbraid jobs enable braket -y
193
+ In [2]: %qbraid chat -f code -p "Write a Qiskit bell circuit"
179
194
  ```
@@ -8,9 +8,11 @@ Makefile
8
8
  README.md
9
9
  pyproject.toml
10
10
  .github/PULL_REQUEST_TEMPLATE.md
11
+ .github/dependabot.yml
11
12
  .github/ISSUE_TEMPLATE/bug_report.yml
12
13
  .github/ISSUE_TEMPLATE/feature_request.yml
13
14
  .github/workflows/bump-version.yml
15
+ .github/workflows/ci-pr-target.yml
14
16
  .github/workflows/docs-pr.yml
15
17
  .github/workflows/docs.yml
16
18
  .github/workflows/format.yml
@@ -75,6 +77,7 @@ tests/account/__init__.py
75
77
  tests/account/test_account_credits.py
76
78
  tests/admin/test_headers.py
77
79
  tests/configure/__init__.py
80
+ tests/configure/test_configure_commands.py
78
81
  tests/configure/test_configure_prompt_for_config.py
79
82
  tests/configure/test_configure_set.py
80
83
  tests/configure/test_configure_validate_input.py