qbraid-cli 0.8.0.dev0__tar.gz → 0.9.5__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 (168) hide show
  1. qbraid_cli-0.9.5/.env.example +4 -0
  2. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/.github/ISSUE_TEMPLATE/bug_report.yml +1 -8
  3. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -9
  4. qbraid_cli-0.9.5/.github/PULL_REQUEST_TEMPLATE.md +3 -0
  5. qbraid_cli-0.9.5/.github/workflows/bump-version.yml +71 -0
  6. qbraid_cli-0.9.5/.github/workflows/docs-pr.yml +128 -0
  7. qbraid_cli-0.9.5/.github/workflows/docs.yml +41 -0
  8. qbraid_cli-0.9.5/.github/workflows/format.yml +30 -0
  9. qbraid_cli-0.9.5/.github/workflows/main.yml +83 -0
  10. qbraid_cli-0.9.5/.github/workflows/pre-release.yml +38 -0
  11. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/.github/workflows/publish.yml +4 -5
  12. qbraid_cli-0.9.5/.github/workflows/tag-on-merge.yml +36 -0
  13. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/.gitignore +5 -1
  14. qbraid_cli-0.9.5/.readthedocs.yml +23 -0
  15. qbraid_cli-0.9.5/CONTRIBUTING.md +122 -0
  16. qbraid_cli-0.9.5/LICENSE +41 -0
  17. qbraid_cli-0.9.5/MANIFEST.IN +6 -0
  18. qbraid_cli-0.9.5/Makefile +58 -0
  19. qbraid_cli-0.9.5/PKG-INFO +179 -0
  20. qbraid_cli-0.9.5/README.md +136 -0
  21. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/conf.py +11 -10
  22. qbraid-cli-0.8.0.dev0/docs/guide/overview.rst → qbraid_cli-0.9.5/docs/index.rst +31 -14
  23. qbraid_cli-0.9.5/docs/requirements.txt +7 -0
  24. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/pyproject.toml +43 -14
  25. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/_version.py +2 -2
  26. qbraid_cli-0.9.5/qbraid_cli/account/__init__.py +11 -0
  27. qbraid_cli-0.9.5/qbraid_cli/account/app.py +65 -0
  28. qbraid_cli-0.9.5/qbraid_cli/admin/__init__.py +11 -0
  29. qbraid_cli-0.9.5/qbraid_cli/admin/app.py +59 -0
  30. qbraid_cli-0.9.5/qbraid_cli/admin/headers.py +235 -0
  31. qbraid_cli-0.9.5/qbraid_cli/admin/validation.py +32 -0
  32. qbraid_cli-0.9.5/qbraid_cli/chat/__init__.py +11 -0
  33. qbraid_cli-0.9.5/qbraid_cli/chat/app.py +76 -0
  34. qbraid_cli-0.9.5/qbraid_cli/configure/__init__.py +11 -0
  35. qbraid_cli-0.9.5/qbraid_cli/configure/actions.py +111 -0
  36. qbraid_cli-0.9.5/qbraid_cli/configure/app.py +77 -0
  37. qbraid_cli-0.9.5/qbraid_cli/devices/__init__.py +11 -0
  38. qbraid_cli-0.9.5/qbraid_cli/devices/app.py +80 -0
  39. qbraid_cli-0.9.5/qbraid_cli/devices/validation.py +26 -0
  40. qbraid_cli-0.9.5/qbraid_cli/envs/__init__.py +11 -0
  41. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/envs/activate.py +8 -5
  42. qbraid_cli-0.9.5/qbraid_cli/envs/app.py +306 -0
  43. qbraid_cli-0.9.5/qbraid_cli/envs/create.py +29 -0
  44. qbraid_cli-0.9.5/qbraid_cli/envs/data_handling.py +46 -0
  45. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/exceptions.py +3 -0
  46. qbraid_cli-0.9.5/qbraid_cli/files/__init__.py +11 -0
  47. qbraid_cli-0.9.5/qbraid_cli/files/app.py +118 -0
  48. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/handlers.py +47 -13
  49. qbraid_cli-0.9.5/qbraid_cli/jobs/__init__.py +11 -0
  50. qbraid_cli-0.9.5/qbraid_cli/jobs/app.py +152 -0
  51. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/jobs/toggle_braket.py +68 -74
  52. qbraid_cli-0.9.5/qbraid_cli/jobs/validation.py +94 -0
  53. qbraid_cli-0.9.5/qbraid_cli/kernels/__init__.py +11 -0
  54. qbraid_cli-0.9.5/qbraid_cli/kernels/app.py +99 -0
  55. qbraid_cli-0.9.5/qbraid_cli/main.py +125 -0
  56. qbraid_cli-0.9.5/qbraid_cli/pip/__init__.py +11 -0
  57. qbraid_cli-0.9.5/qbraid_cli/pip/app.py +50 -0
  58. qbraid_cli-0.9.5/qbraid_cli/pip/hooks.py +74 -0
  59. qbraid_cli-0.9.5/qbraid_cli/py.typed +0 -0
  60. qbraid_cli-0.9.5/qbraid_cli.egg-info/PKG-INFO +179 -0
  61. qbraid_cli-0.9.5/qbraid_cli.egg-info/SOURCES.txt +116 -0
  62. qbraid_cli-0.9.5/qbraid_cli.egg-info/requires.txt +16 -0
  63. qbraid_cli-0.9.5/tests/__init__.py +0 -0
  64. qbraid_cli-0.9.5/tests/account/__init__.py +0 -0
  65. qbraid_cli-0.9.5/tests/account/test_account_credits.py +88 -0
  66. qbraid_cli-0.9.5/tests/admin/test_headers.py +211 -0
  67. qbraid_cli-0.9.5/tests/configure/__init__.py +0 -0
  68. qbraid_cli-0.9.5/tests/configure/test_configure_prompt_for_config.py +39 -0
  69. qbraid_cli-0.9.5/tests/configure/test_configure_set.py +37 -0
  70. qbraid_cli-0.9.5/tests/configure/test_configure_validate_input.py +54 -0
  71. qbraid_cli-0.9.5/tests/conftest.py +35 -0
  72. qbraid_cli-0.9.5/tests/devices/__init__.py +0 -0
  73. qbraid_cli-0.9.5/tests/devices/test_devices_list.py +74 -0
  74. qbraid_cli-0.9.5/tests/devices/test_devices_validations.py +72 -0
  75. qbraid_cli-0.9.5/tests/envs/__init__.py +0 -0
  76. qbraid_cli-0.9.5/tests/envs/test_envs_activate.py +42 -0
  77. qbraid_cli-0.9.5/tests/envs/test_envs_activate_find_shell_rc.py +54 -0
  78. qbraid_cli-0.9.5/tests/envs/test_envs_activate_print_command.py +38 -0
  79. qbraid_cli-0.9.5/tests/envs/test_envs_activate_pyenv.py +70 -0
  80. qbraid_cli-0.9.5/tests/envs/test_envs_create_from_yaml.py +108 -0
  81. qbraid_cli-0.9.5/tests/envs/test_envs_list.py +37 -0
  82. qbraid_cli-0.9.5/tests/envs/test_envs_remove.py +34 -0
  83. qbraid_cli-0.9.5/tests/files/__init__.py +0 -0
  84. qbraid_cli-0.9.5/tests/files/test_files_commands.py +109 -0
  85. qbraid_cli-0.9.5/tests/jobs/__init__.py +0 -0
  86. qbraid_cli-0.9.5/tests/jobs/test_jobs_disable.py +51 -0
  87. qbraid_cli-0.9.5/tests/jobs/test_jobs_enable.py +69 -0
  88. qbraid_cli-0.9.5/tests/jobs/test_jobs_list.py +50 -0
  89. qbraid_cli-0.9.5/tests/jobs/test_jobs_state.py +32 -0
  90. qbraid_cli-0.9.5/tests/jobs/test_jobs_toggle_braket_confirm.py +52 -0
  91. qbraid_cli-0.9.5/tests/jobs/test_jobs_toggle_braket_disable.py +100 -0
  92. qbraid_cli-0.9.5/tests/jobs/test_jobs_toggle_braket_enable.py +107 -0
  93. qbraid_cli-0.9.5/tests/jobs/test_jobs_toggle_braket_get_data.py +185 -0
  94. qbraid_cli-0.9.5/tests/jobs/test_jobs_validate_get_state.py +94 -0
  95. qbraid_cli-0.9.5/tests/jobs/test_jobs_validate_handle_state.py +60 -0
  96. qbraid_cli-0.9.5/tests/jobs/test_jobs_validate_library.py +35 -0
  97. qbraid_cli-0.9.5/tests/kernels/__init__.py +0 -0
  98. qbraid_cli-0.9.5/tests/kernels/test_kernels_list.py +82 -0
  99. qbraid_cli-0.9.5/tests/resources/envs/correct.yaml +16 -0
  100. qbraid_cli-0.9.5/tests/resources/envs/icon.png +0 -0
  101. qbraid_cli-0.9.5/tests/resources/envs/incorrect.yaml +4 -0
  102. qbraid_cli-0.9.5/tools/bump_version.py +28 -0
  103. qbraid_cli-0.9.5/tools/create_dev_build.sh +88 -0
  104. qbraid_cli-0.9.5/tools/install_wheel_extras.sh +67 -0
  105. qbraid_cli-0.9.5/tools/split_md.py +185 -0
  106. qbraid_cli-0.9.5/tools/split_rst.py +119 -0
  107. qbraid_cli-0.9.5/tools/stamp_pre_release.py +36 -0
  108. qbraid-cli-0.8.0.dev0/.env-example +0 -3
  109. qbraid-cli-0.8.0.dev0/.github/PULL_REQUEST_TEMPLATE.md +0 -3
  110. qbraid-cli-0.8.0.dev0/.github/workflows/docs.yml +0 -27
  111. qbraid-cli-0.8.0.dev0/.github/workflows/format.yml +0 -25
  112. qbraid-cli-0.8.0.dev0/.github/workflows/test-publish.yml +0 -29
  113. qbraid-cli-0.8.0.dev0/.idea/workspace.xml +0 -151
  114. qbraid-cli-0.8.0.dev0/.readthedocs.yml +0 -14
  115. qbraid-cli-0.8.0.dev0/CONTRIBUTING.md +0 -63
  116. qbraid-cli-0.8.0.dev0/MANIFEST.IN +0 -4
  117. qbraid-cli-0.8.0.dev0/PKG-INFO +0 -124
  118. qbraid-cli-0.8.0.dev0/README.md +0 -82
  119. qbraid-cli-0.8.0.dev0/docs/_static/api-key.png +0 -0
  120. qbraid-cli-0.8.0.dev0/docs/_static/cards/jupyter.png +0 -0
  121. qbraid-cli-0.8.0.dev0/docs/_static/cards/python.png +0 -0
  122. qbraid-cli-0.8.0.dev0/docs/_static/cards/terminal.png +0 -0
  123. qbraid-cli-0.8.0.dev0/docs/cli/configure.rst +0 -60
  124. qbraid-cli-0.8.0.dev0/docs/cli/credits.rst +0 -23
  125. qbraid-cli-0.8.0.dev0/docs/cli/devices-list.rst +0 -35
  126. qbraid-cli-0.8.0.dev0/docs/cli/devices.rst +0 -17
  127. qbraid-cli-0.8.0.dev0/docs/cli/envs-activate.rst +0 -36
  128. qbraid-cli-0.8.0.dev0/docs/cli/envs-list.rst +0 -37
  129. qbraid-cli-0.8.0.dev0/docs/cli/envs-uninstall.rst +0 -40
  130. qbraid-cli-0.8.0.dev0/docs/cli/envs.rst +0 -25
  131. qbraid-cli-0.8.0.dev0/docs/cli/jobs-add.rst +0 -49
  132. qbraid-cli-0.8.0.dev0/docs/cli/jobs-disable.rst +0 -36
  133. qbraid-cli-0.8.0.dev0/docs/cli/jobs-enable.rst +0 -35
  134. qbraid-cli-0.8.0.dev0/docs/cli/jobs-list.rst +0 -35
  135. qbraid-cli-0.8.0.dev0/docs/cli/jobs.rst +0 -26
  136. qbraid-cli-0.8.0.dev0/docs/cli/kernels.rst +0 -31
  137. qbraid-cli-0.8.0.dev0/docs/cli/qbraid.rst +0 -68
  138. qbraid-cli-0.8.0.dev0/docs/index.rst +0 -109
  139. qbraid-cli-0.8.0.dev0/docs/requirements.txt +0 -3
  140. qbraid-cli-0.8.0.dev0/qbraid_cli/configure/__init__.py +0 -6
  141. qbraid-cli-0.8.0.dev0/qbraid_cli/configure/app.py +0 -152
  142. qbraid-cli-0.8.0.dev0/qbraid_cli/credits/__init__.py +0 -6
  143. qbraid-cli-0.8.0.dev0/qbraid_cli/credits/app.py +0 -30
  144. qbraid-cli-0.8.0.dev0/qbraid_cli/devices/__init__.py +0 -6
  145. qbraid-cli-0.8.0.dev0/qbraid_cli/devices/app.py +0 -72
  146. qbraid-cli-0.8.0.dev0/qbraid_cli/envs/__init__.py +0 -6
  147. qbraid-cli-0.8.0.dev0/qbraid_cli/envs/app.py +0 -222
  148. qbraid-cli-0.8.0.dev0/qbraid_cli/envs/create.py +0 -135
  149. qbraid-cli-0.8.0.dev0/qbraid_cli/jobs/__init__.py +0 -6
  150. qbraid-cli-0.8.0.dev0/qbraid_cli/jobs/app.py +0 -165
  151. qbraid-cli-0.8.0.dev0/qbraid_cli/kernels/__init__.py +0 -6
  152. qbraid-cli-0.8.0.dev0/qbraid_cli/kernels/app.py +0 -29
  153. qbraid-cli-0.8.0.dev0/qbraid_cli/main.py +0 -73
  154. qbraid-cli-0.8.0.dev0/qbraid_cli.egg-info/PKG-INFO +0 -124
  155. qbraid-cli-0.8.0.dev0/qbraid_cli.egg-info/SOURCES.txt +0 -71
  156. qbraid-cli-0.8.0.dev0/qbraid_cli.egg-info/requires.txt +0 -18
  157. qbraid-cli-0.8.0.dev0/requirements.txt +0 -6
  158. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/Makefile +0 -0
  159. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/_static/favicon.ico +0 -0
  160. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/_static/logo.png +0 -0
  161. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/_static/style/custom.css +0 -0
  162. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/_static/style/s4defs-roles.css +0 -0
  163. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/docs/make.bat +0 -0
  164. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli/__init__.py +0 -0
  165. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  166. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli.egg-info/entry_points.txt +0 -0
  167. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/qbraid_cli.egg-info/top_level.txt +0 -0
  168. {qbraid-cli-0.8.0.dev0 → qbraid_cli-0.9.5}/setup.cfg +0 -0
@@ -0,0 +1,4 @@
1
+ QBRAID_API_KEY= # YOURAPIKEY
2
+ QBRAID_ENVS_PATH= # default: ~/.qbraid/environments
3
+ QBRAID_CONFIG_FILE= # default: ~/.qbraid/qbraidrc
4
+ QBRAID_CLI_SHOW_PROGRESS= # default: true
@@ -12,6 +12,7 @@ body:
12
12
  attributes:
13
13
  label: Environment
14
14
  value: |
15
+ - **qBraid-CORE version**:
15
16
  - **qBraid-CLI version**:
16
17
  - **Python version**:
17
18
  - **Operating system**:
@@ -31,11 +32,3 @@ body:
31
32
  description: We warmly welcome any recommendations on potential fixes, insights, or considerations that contributors should keep in mind when working to resolve this issue.
32
33
  validations:
33
34
  required: false
34
-
35
- - type: checkboxes
36
- id: agreement
37
- attributes:
38
- label: 'Please confirm the following:'
39
- options:
40
- - label: 'I have searched the existing issues and confirm this is a new bug report.'
41
- required: true
@@ -23,12 +23,3 @@ body:
23
23
  description: "Do you have an idea for how this could be implemented? Please include those details here."
24
24
  validations:
25
25
  required: false
26
-
27
- - type: checkboxes
28
- id: agreement
29
- attributes:
30
- label: 'Please confirm the following:'
31
- description: 'Understanding that feature requests are evaluated for their applicability and benefit to the community, and not all requests may be implemented.'
32
- options:
33
- - label: 'I have searched the existing issues and confirm this is a new feature request.'
34
- required: true
@@ -0,0 +1,3 @@
1
+ <!-- Please link or tag any issues that is PR closes -->
2
+
3
+ # Changes
@@ -0,0 +1,71 @@
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
@@ -0,0 +1,128 @@
1
+ name: Open Docs PR
2
+
3
+ on:
4
+ pull_request:
5
+ types: [closed]
6
+
7
+ jobs:
8
+ generate-docs-assets:
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
+ outputs:
12
+ cli_version: ${{ steps.get_version.outputs.version }}
13
+ steps:
14
+ - name: Checkout code
15
+ uses: actions/checkout@v4
16
+ with:
17
+ ref: main
18
+
19
+ - name: Install dependencies
20
+ run: |
21
+ python -m pip install --upgrade pip setuptools build
22
+ python -m pip install -r docs/requirements.txt
23
+
24
+ - name: Build & install package
25
+ run: |
26
+ make build
27
+ tools/install_wheel_extras.sh dist --extra envs
28
+
29
+ - name: Get qbraid-cli version
30
+ id: get_version
31
+ run: |
32
+ VERSION=$(qbraid --version | grep -o '[0-9]*\.[0-9]*\.[0-9]*')
33
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
34
+
35
+ - name: Generate docs assets
36
+ run: |
37
+ make docs-mdx
38
+
39
+ - name: Upload docs assets
40
+ uses: actions/upload-artifact@v4
41
+ with:
42
+ name: api-reference
43
+ path: docs/tree/qbraid*.mdx
44
+
45
+ commit-and-pr:
46
+ 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 ')
47
+ runs-on: ubuntu-latest
48
+ needs: generate-docs-assets
49
+ permissions:
50
+ contents: write
51
+ pull-requests: write
52
+
53
+ steps:
54
+ - name: Download docs assets
55
+ uses: actions/download-artifact@v4
56
+ with:
57
+ name: api-reference
58
+ path: ./api-reference
59
+
60
+ - name: Checkout qBraid/docs repo
61
+ uses: actions/checkout@v4
62
+ with:
63
+ repository: qBraid/docs
64
+ token: ${{ secrets.BOT_TOKEN }}
65
+ path: ./qbraid_docs
66
+ ref: main
67
+
68
+ - name: Create feature branch
69
+ run: |
70
+ cd qbraid_docs
71
+ git checkout -b qbraid-cli-bot/${{ github.run_id }}
72
+
73
+ - name: Update docs in qBraid/docs
74
+ run: |
75
+ rm -f qbraid_docs/cli/api-reference/*
76
+ cp api-reference/qbraid*.mdx qbraid_docs/cli/api-reference/
77
+
78
+ - name: Inject version
79
+ run: |
80
+ VERSION=${{ needs.generate-docs-assets.outputs.cli_version }}
81
+ sed -i "6iVersion: [$VERSION](https://pypi.org/project/qbraid-cli/$VERSION)\n" qbraid_docs/cli/api-reference/qbraid.mdx
82
+
83
+ - name: Set up Node.js
84
+ uses: actions/setup-node@v4
85
+ with:
86
+ node-version: '22'
87
+
88
+ - name: Install dependencies
89
+ run: |
90
+ cd qbraid_docs
91
+ npm install
92
+
93
+ - name: Run prettier fixes
94
+ run: |
95
+ cd qbraid_docs
96
+ npx prettier --write cli/api-reference/qbraid*.mdx
97
+
98
+ - name: Setup Git config
99
+ run: |
100
+ git config --global user.name 'qbraidTeam'
101
+ git config --global user.email 'qbraid.team@qbraid.com'
102
+
103
+ - name: Commit and push changes
104
+ id: commit_and_push
105
+ run: |
106
+ cd qbraid_docs
107
+ git add cli/api-reference/
108
+ git commit -m "qBraid-CLI API reference docs update for version $VERSION"
109
+ git push origin qbraid-cli-bot/${{ github.run_id }}
110
+
111
+ - name: Create Pull Request
112
+ id: create_pr
113
+ run: |
114
+ cd qbraid_docs
115
+ VERSION=${{ needs.generate-docs-assets.outputs.cli_version }}
116
+ PR_URL=$(gh pr create -B main -H qbraid-cli-bot/${{ github.run_id }} --title "Update qBraid-CLI version $VERSION" --body "This PR updates the qBraid-CLI API reference docs for the latest release version $VERSION")
117
+ PR_NUMBER=$(echo "$PR_URL" | grep -o '[0-9]*$')
118
+ echo "url=$PR_URL" >> $GITHUB_OUTPUT
119
+ echo "number=$PR_NUMBER" >> $GITHUB_OUTPUT
120
+ env:
121
+ GH_TOKEN: ${{ secrets.BOT_TOKEN }}
122
+
123
+ - name: Summary
124
+ run: |
125
+ VERSION=${{ needs.generate-docs-assets.outputs.cli_version }}
126
+ PR_URL=${{ steps.create_pr.outputs.url }}
127
+ PR_NUMBER=${{ steps.create_pr.outputs.number }}
128
+ echo "Opened PR [#$PR_NUMBER]($PR_URL) to update CLI docs for version **$VERSION**." >> $GITHUB_STEP_SUMMARY
@@ -0,0 +1,41 @@
1
+ name: Build Docs
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ types: [opened, reopened, ready_for_review, synchronize]
7
+ push:
8
+ branches: ['main']
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build:
13
+ if: github.event.pull_request.draft == false
14
+ runs-on: ubuntu-latest
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v5
20
+ with:
21
+ python-version: '3.11'
22
+ cache: pip
23
+ - name: Install dependencies
24
+ run: |
25
+ python -m pip install --upgrade pip setuptools build
26
+ python -m pip install -r docs/requirements.txt
27
+ - name: Build & install package
28
+ run: |
29
+ python -m build .
30
+ tools/install_wheel_extras.sh dist --extra envs
31
+ - name: Generate docs assets
32
+ run: |
33
+ python -c "import pathlib; pathlib.Path('docs/tree').mkdir(parents=True, exist_ok=True)"
34
+ python -c "import glob, os; [os.remove(f) for f in glob.glob('docs/tree/*.rst')]"
35
+ typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
36
+ m2r docs/tree/qbraid.md
37
+ python -c "import os; os.remove('docs/tree/qbraid.md')"
38
+ python tools/split_rst.py docs/tree/qbraid.rst
39
+ - name: Build docs
40
+ run: |
41
+ sphinx-build -W -b html docs docs/build/html
@@ -0,0 +1,30 @@
1
+ name: Format
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ types: [opened, reopened, ready_for_review, synchronize]
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ check:
11
+ if: github.event.pull_request.draft == false
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+ - name: Install dependencies
21
+ run: |
22
+ pip install --upgrade pip
23
+ pip install black isort pylint qbraid-cli
24
+ - name: Check isort, black, pylint
25
+ run: |
26
+ black --check qbraid_cli tests tools
27
+ isort --check-only qbraid_cli tests tools
28
+ - name: Check copyright headers
29
+ run: |
30
+ qbraid admin headers qbraid_cli tests tools
@@ -0,0 +1,83 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ types: [opened, reopened, ready_for_review, synchronize]
7
+ push:
8
+ branches: ['main']
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ build:
13
+ if: github.event.pull_request.draft == false
14
+ runs-on: ubuntu-latest
15
+ strategy:
16
+ matrix:
17
+ python-version: ['3.11']
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+ - name: Set up Python ${{ matrix.python-version }}
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: ${{ matrix.python-version }}
25
+ cache: pip
26
+ - name: Upgrade pip and install build tools
27
+ run: |
28
+ pip install --upgrade pip
29
+ pip install setuptools wheel build
30
+ - name: Build the package
31
+ run: |
32
+ python -m build
33
+ - name: Upload built package
34
+ uses: actions/upload-artifact@v4
35
+ with:
36
+ name: built-package
37
+ path: dist/*.whl
38
+
39
+ test:
40
+ if: github.event.pull_request.draft == false
41
+ needs: build
42
+ runs-on: ${{ matrix.os }}
43
+ strategy:
44
+ matrix:
45
+ os: [ubuntu-latest, windows-latest]
46
+ python-version: ['3.9', '3.10', '3.11', '3.12']
47
+
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - name: Set up Python ${{ matrix.python-version }}
51
+ uses: actions/setup-python@v5
52
+ with:
53
+ python-version: ${{ matrix.python-version }}
54
+ cache: pip
55
+ - name: Download built package
56
+ uses: actions/download-artifact@v4
57
+ with:
58
+ name: built-package
59
+ path: dist
60
+ - name: Install package
61
+ run: |
62
+ if ($env:RUNNER_OS -eq "Windows") {
63
+ Get-ChildItem dist/*.whl | ForEach-Object { pip install $_.FullName }
64
+ } else {
65
+ pip install dist/*.whl
66
+ }
67
+ shell: pwsh
68
+ - name: Install testing dependencies
69
+ run: |
70
+ pip install pytest pytest-cov qbraid-core[environments]
71
+ - name: Run tests with pytest
72
+ run: |
73
+ pytest --cov=qbraid_cli tests/ --cov-report=html --cov-report=xml --cov-report=term --cov-config=pyproject.toml
74
+ env:
75
+ QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
76
+ - name: Upload coverage to Codecov
77
+ if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
78
+ uses: codecov/codecov-action@v4.4.1
79
+ with:
80
+ token: ${{ secrets.CODECOV_TOKEN }}
81
+ fail_ci_if_error: false
82
+ files: ./build/coverage/coverage.xml
83
+ verbose: true
@@ -0,0 +1,38 @@
1
+ name: Pre-release to PyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ pypi-publish:
8
+ name: Build pre-release dist & upload to PyPI
9
+ environment: publish
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ with:
14
+ fetch-depth: 1
15
+
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v5
18
+ with:
19
+ python-version: '3.11'
20
+
21
+ - name: Install build dependencies
22
+ run: python -m pip install -U pip wheel build toml-cli qbraid-core
23
+
24
+ - name: Build binary wheel + source tarball
25
+ id: build-dev
26
+ run: |
27
+ export PRE_RELEASE_VERSION=$(python tools/stamp_pre_release.py qbraid_cli)
28
+ [[ "$PRE_RELEASE_VERSION" =~ .*(-a\.|-b\.|-rc\.).* ]] && echo "Deploying pre-release version '$PRE_RELEASE_VERSION'" || (echo "not pre-release version"; exit 0)
29
+ out_dir="${PWD}/dist"
30
+ tools/create_dev_build.sh $PRE_RELEASE_VERSION "${out_dir}"
31
+ echo "dir=$out_dir" >> $GITHUB_OUTPUT
32
+
33
+ - name: Publish pre-release package to PyPI
34
+ uses: pypa/gh-action-pypi-publish@release/v1
35
+ with:
36
+ user: __token__
37
+ password: ${{ secrets.PYPI_API_TOKEN }}
38
+ packages-dir: ${{ steps.build-dev.outputs.dir }}
@@ -1,23 +1,22 @@
1
1
  name: Publish to PyPI
2
2
 
3
3
  on:
4
- release:
5
- types: [published]
6
4
  workflow_dispatch:
7
5
 
8
6
  jobs:
9
7
  pypi-publish:
10
8
  name: Build dist & upload to PyPI
9
+ environment: publish
11
10
  runs-on: ubuntu-latest
12
11
  steps:
13
- - uses: actions/checkout@v3
12
+ - uses: actions/checkout@v4
14
13
  with:
15
14
  fetch-depth: 1
16
15
 
17
16
  - name: Set up Python
18
- uses: actions/setup-python@v4
17
+ uses: actions/setup-python@v5
19
18
  with:
20
- python-version: '3.10'
19
+ python-version: '3.11'
21
20
 
22
21
  - name: Build binary wheel + source tarball
23
22
  run: |
@@ -0,0 +1,36 @@
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 }}
@@ -3,6 +3,9 @@ __pycache__/
3
3
  *.py[cod]
4
4
  *$py.class
5
5
 
6
+ .DS_Store
7
+ .vscode
8
+
6
9
  # C extensions
7
10
  *.so
8
11
 
@@ -28,6 +31,7 @@ MANIFEST
28
31
 
29
32
  # ignore autogenerated _version.py file
30
33
  qbraid_cli/_version.py
34
+ docs/tree/*
31
35
 
32
36
  # PyInstaller
33
37
  # Usually these files are written by a python script from a template
@@ -160,4 +164,4 @@ cython_debug/
160
164
  # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161
165
  # and can be added to the global gitignore or merged into this file. For a more nuclear
162
166
  # option (not recommended) you can uncomment the following to ignore the entire idea folder.
163
- #.idea/
167
+ .idea/
@@ -0,0 +1,23 @@
1
+ # Read the Docs configuration file
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ # Required
5
+ version: 2
6
+
7
+ # Set the version of Python and other tools you might need
8
+ build:
9
+ os: ubuntu-20.04
10
+ tools:
11
+ python: "3.10"
12
+ commands:
13
+ - python -m pip install -r docs/requirements.txt
14
+ - python -m pip install build
15
+ - python -m build .
16
+ - tools/install_wheel_extras.sh dist --extra envs
17
+ - mkdir -p docs/tree
18
+ - rm -f docs/tree/*.rst
19
+ - typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
20
+ - m2r docs/tree/qbraid.md
21
+ - rm docs/tree/qbraid.md
22
+ - python tools/split_rst.py docs/tree/qbraid.rst
23
+ - sphinx-build -W -b html docs $READTHEDOCS_OUTPUT/html
@@ -0,0 +1,122 @@
1
+ # Contributing
2
+
3
+ [![CI](https://github.com/qBraid/qBraid-CLI/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/qBraid/qBraid-CLI/actions/workflows/main.yml)
4
+ [![codecov](https://codecov.io/gh/qBraid/qBraid-CLI/graph/badge.svg?token=wVNrLILy9c)](https://codecov.io/gh/qBraid/qBraid-CLI)
5
+
6
+ Welcome! We're delighted that you're interested in contributing. Your help is essential for keeping the project great.
7
+
8
+ ## Getting Started
9
+
10
+ Before you start working on a new feature or a fix, here's how you can contribute:
11
+
12
+ 1. **Fork the repository**: Visit the GitHub page of our project and use the "Fork" button to create a copy of the project in your own GitHub account.
13
+ 2. **Create a Development Branch**: After forking, clone the repository to your local machine and create a new branch for your development. Use a descriptive name for your branch, such as `feature-<feature-name>` or `bugfix-<bug-description>`.
14
+ 3. **Commit Your Changes**: Make your changes in your development branch and commit them. Be sure to write clear, concise commit messages.
15
+ 4. **Push to Your Fork**: Push your changes to your forked repository on GitHub.
16
+ 5. **Create a Pull Request**: Go to the original project repository and click on "Pull Requests", then click the "New Pull Request" button
17
+
18
+ ### Development install
19
+
20
+ You can install the qBraid-CLI from source by cloning this repository and running a pip install command in the root directory:
21
+
22
+ ```bash
23
+ git clone https://github.com/qBraid/qBraid-CLI.git
24
+ cd qBraid-CLI
25
+ pip install -e .
26
+ ```
27
+
28
+ *Note*: The current CLI configuration assumes a Linux-based filesystem. However, our goal is to move towards a platform agnostic version soon.
29
+
30
+ You can verify that the setup has been successful by checking the qBraid-CLI version with the following command:
31
+
32
+ ```bash
33
+ qbraid --version
34
+ ```
35
+
36
+ To view available `make` commands, run:
37
+
38
+ ```bash
39
+ make help
40
+ ```
41
+
42
+ To test out changes on the command line with re-installing each time:
43
+
44
+ ```bash
45
+ python3 qbraid_cli/main.py [OPTIONS] COMMAND [ARGS]...
46
+ ```
47
+
48
+ ## Testing
49
+
50
+ Install test dependencies:
51
+
52
+ ```bash
53
+ pip install pytest
54
+ ```
55
+
56
+ And run tests:
57
+
58
+ ```bash
59
+ pytest tests
60
+ ```
61
+
62
+ You can also run tests with make:
63
+
64
+ ```bash
65
+ make test
66
+ ```
67
+
68
+ ## Build docs
69
+
70
+ To generate the API reference documentation locally, install the necessary requirements:
71
+
72
+ ```bash
73
+ pip install -r docs/requirements.txt
74
+ ```
75
+
76
+ And then run
77
+
78
+ ```bash
79
+ make docs
80
+ ```
81
+
82
+ Alternatively, you can generate command tree `.rst` files step-by-step:
83
+
84
+ ```bash
85
+ mkdir docs/tree
86
+ typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
87
+ m2r docs/tree/qbraid.md
88
+ rm docs/tree/qbraid.md
89
+ python tools/split_rst.py docs/tree/qbraid.rst
90
+ ```
91
+
92
+ And then, build the docs:
93
+
94
+ ```bash
95
+ sphinx-build -W -b html docs docs/build/html
96
+ ```
97
+
98
+ You can view the generated documentation in your browser (on OS X) using:
99
+
100
+ ```bash
101
+ open docs/build/html/index.html
102
+ ```
103
+
104
+ ## Code style
105
+
106
+ For code style, our project uses a combination of [isort](https://github.com/PyCQA/isort), [pylint](https://github.com/pylint-dev/pylint), [black](https://github.com/psf/black), and [mypy](https://github.com/python/mypy). Specific configurations for these tools should be added to [`pyproject.toml`](pyproject.toml).
107
+
108
+ Install linters:
109
+
110
+ ```bash
111
+ pip install black isort pylint mypy
112
+ ```
113
+
114
+ Run the following and make changes as needed to satisfy format checks:
115
+
116
+ ```bash
117
+ black qbraid_cli tests tools
118
+ isort qbraid_cli tests tools
119
+ pylint qbraid_cli tests tools
120
+ mypy qbraid_cli tests tools
121
+ qbraid admin headers qbraid_cli tests tools --type=default --fix
122
+ ```