qbraid-cli 0.7.0__tar.gz → 0.8.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (140) hide show
  1. qbraid_cli-0.8.0/.env.example +3 -0
  2. qbraid_cli-0.8.0/.github/ISSUE_TEMPLATE/bug_report.yml +41 -0
  3. qbraid_cli-0.8.0/.github/ISSUE_TEMPLATE/feature_request.yml +34 -0
  4. qbraid_cli-0.8.0/.github/PULL_REQUEST_TEMPLATE.md +3 -0
  5. qbraid_cli-0.8.0/.github/workflows/docs.yml +39 -0
  6. qbraid_cli-0.8.0/.github/workflows/format.yml +34 -0
  7. qbraid_cli-0.8.0/.github/workflows/main.yml +72 -0
  8. qbraid_cli-0.8.0/.github/workflows/publish.yml +32 -0
  9. qbraid_cli-0.8.0/.github/workflows/test-publish.yml +29 -0
  10. qbraid_cli-0.8.0/.gitignore +164 -0
  11. qbraid_cli-0.8.0/.readthedocs.yml +22 -0
  12. qbraid_cli-0.8.0/CONTRIBUTING.md +112 -0
  13. qbraid_cli-0.8.0/MANIFEST.IN +5 -0
  14. qbraid_cli-0.8.0/Makefile +52 -0
  15. qbraid_cli-0.8.0/PKG-INFO +143 -0
  16. {qbraid-cli-0.7.0 → qbraid_cli-0.8.0}/README.md +43 -31
  17. qbraid_cli-0.8.0/docs/Makefile +21 -0
  18. qbraid_cli-0.8.0/docs/_static/api-key.png +0 -0
  19. qbraid_cli-0.8.0/docs/_static/cards/jupyter.png +0 -0
  20. qbraid_cli-0.8.0/docs/_static/cards/python.png +0 -0
  21. qbraid_cli-0.8.0/docs/_static/cards/terminal.png +0 -0
  22. qbraid_cli-0.8.0/docs/_static/favicon.ico +0 -0
  23. qbraid_cli-0.8.0/docs/_static/logo.png +0 -0
  24. qbraid_cli-0.8.0/docs/_static/style/custom.css +269 -0
  25. qbraid_cli-0.8.0/docs/_static/style/s4defs-roles.css +329 -0
  26. qbraid_cli-0.8.0/docs/cli/configure.rst +60 -0
  27. qbraid_cli-0.8.0/docs/cli/credits.rst +23 -0
  28. qbraid_cli-0.8.0/docs/cli/devices-list.rst +35 -0
  29. qbraid_cli-0.8.0/docs/cli/devices.rst +17 -0
  30. qbraid_cli-0.8.0/docs/cli/envs-activate.rst +36 -0
  31. qbraid_cli-0.8.0/docs/cli/envs-list.rst +37 -0
  32. qbraid_cli-0.8.0/docs/cli/envs-uninstall.rst +40 -0
  33. qbraid_cli-0.8.0/docs/cli/envs.rst +25 -0
  34. qbraid_cli-0.8.0/docs/cli/jobs-add.rst +49 -0
  35. qbraid_cli-0.8.0/docs/cli/jobs-disable.rst +36 -0
  36. qbraid_cli-0.8.0/docs/cli/jobs-enable.rst +35 -0
  37. qbraid_cli-0.8.0/docs/cli/jobs-list.rst +35 -0
  38. qbraid_cli-0.8.0/docs/cli/jobs.rst +26 -0
  39. qbraid_cli-0.8.0/docs/cli/kernels.rst +31 -0
  40. qbraid_cli-0.8.0/docs/cli/qbraid.rst +68 -0
  41. qbraid_cli-0.8.0/docs/conf.py +75 -0
  42. qbraid_cli-0.8.0/docs/guide/overview.rst +109 -0
  43. qbraid_cli-0.8.0/docs/index.rst +112 -0
  44. qbraid_cli-0.8.0/docs/make.bat +36 -0
  45. qbraid_cli-0.8.0/docs/requirements.txt +7 -0
  46. qbraid_cli-0.8.0/pyproject.toml +79 -0
  47. qbraid_cli-0.8.0/qbraid_cli/_version.py +16 -0
  48. qbraid_cli-0.8.0/qbraid_cli/admin/__init__.py +9 -0
  49. qbraid_cli-0.8.0/qbraid_cli/admin/app.py +50 -0
  50. qbraid_cli-0.8.0/qbraid_cli/admin/headers.py +193 -0
  51. qbraid_cli-0.8.0/qbraid_cli/admin/validation.py +33 -0
  52. qbraid_cli-0.8.0/qbraid_cli/configure/__init__.py +9 -0
  53. qbraid_cli-0.8.0/qbraid_cli/configure/actions.py +111 -0
  54. qbraid_cli-0.8.0/qbraid_cli/configure/app.py +77 -0
  55. qbraid_cli-0.8.0/qbraid_cli/credits/__init__.py +9 -0
  56. qbraid_cli-0.8.0/qbraid_cli/credits/app.py +32 -0
  57. qbraid_cli-0.8.0/qbraid_cli/devices/__init__.py +9 -0
  58. qbraid_cli-0.8.0/qbraid_cli/devices/app.py +80 -0
  59. qbraid_cli-0.8.0/qbraid_cli/devices/validation.py +26 -0
  60. qbraid_cli-0.8.0/qbraid_cli/envs/__init__.py +9 -0
  61. qbraid_cli-0.8.0/qbraid_cli/envs/activate.py +65 -0
  62. qbraid_cli-0.8.0/qbraid_cli/envs/app.py +270 -0
  63. qbraid_cli-0.8.0/qbraid_cli/envs/create.py +128 -0
  64. qbraid_cli-0.8.0/qbraid_cli/envs/data_handling.py +140 -0
  65. qbraid_cli-0.8.0/qbraid_cli/exceptions.py +24 -0
  66. qbraid_cli-0.8.0/qbraid_cli/handlers.py +168 -0
  67. qbraid_cli-0.8.0/qbraid_cli/jobs/__init__.py +9 -0
  68. qbraid_cli-0.8.0/qbraid_cli/jobs/app.py +149 -0
  69. qbraid_cli-0.8.0/qbraid_cli/jobs/toggle_braket.py +185 -0
  70. qbraid_cli-0.8.0/qbraid_cli/jobs/validation.py +93 -0
  71. qbraid_cli-0.8.0/qbraid_cli/kernels/__init__.py +9 -0
  72. qbraid_cli-0.8.0/qbraid_cli/kernels/app.py +111 -0
  73. qbraid_cli-0.8.0/qbraid_cli/main.py +80 -0
  74. qbraid_cli-0.8.0/qbraid_cli.egg-info/PKG-INFO +143 -0
  75. qbraid_cli-0.8.0/qbraid_cli.egg-info/SOURCES.txt +128 -0
  76. qbraid_cli-0.8.0/qbraid_cli.egg-info/entry_points.txt +2 -0
  77. qbraid_cli-0.8.0/qbraid_cli.egg-info/requires.txt +23 -0
  78. qbraid_cli-0.8.0/tests/__init__.py +0 -0
  79. qbraid_cli-0.8.0/tests/test_configure/__init__.py +0 -0
  80. qbraid_cli-0.8.0/tests/test_configure/test_configure_set.py +37 -0
  81. qbraid_cli-0.8.0/tests/test_configure/test_prompt_for_config.py +39 -0
  82. qbraid_cli-0.8.0/tests/test_configure/test_validate_input.py +54 -0
  83. qbraid_cli-0.8.0/tests/test_credits/__init__.py +0 -0
  84. qbraid_cli-0.8.0/tests/test_credits/test_credits_value.py +41 -0
  85. qbraid_cli-0.8.0/tests/test_devices/__init__.py +0 -0
  86. qbraid_cli-0.8.0/tests/test_devices/test_devices_list.py +87 -0
  87. qbraid_cli-0.8.0/tests/test_devices/test_validations.py +72 -0
  88. qbraid_cli-0.8.0/tests/test_envs/__init__.py +0 -0
  89. qbraid_cli-0.8.0/tests/test_envs/test_activate/__init__.py +0 -0
  90. qbraid_cli-0.8.0/tests/test_envs/test_activate/test_activate_pyenv.py +70 -0
  91. qbraid_cli-0.8.0/tests/test_envs/test_activate/test_find_shell_rc.py +54 -0
  92. qbraid_cli-0.8.0/tests/test_envs/test_activate/test_print_activate_command.py +38 -0
  93. qbraid_cli-0.8.0/tests/test_envs/test_app/__init__.py +0 -0
  94. qbraid_cli-0.8.0/tests/test_envs/test_app/test_envs_activate.py +42 -0
  95. qbraid_cli-0.8.0/tests/test_envs/test_app/test_envs_create.py +67 -0
  96. qbraid_cli-0.8.0/tests/test_envs/test_app/test_envs_list.py +37 -0
  97. qbraid_cli-0.8.0/tests/test_envs/test_app/test_envs_remove.py +31 -0
  98. qbraid_cli-0.8.0/tests/test_envs/test_create/__init__.py +0 -0
  99. qbraid_cli-0.8.0/tests/test_envs/test_create/test_create_qbraid_env_assets.py +82 -0
  100. qbraid_cli-0.8.0/tests/test_envs/test_create/test_replace_str.py +25 -0
  101. qbraid_cli-0.8.0/tests/test_envs/test_create/test_update_state_json.py +61 -0
  102. qbraid_cli-0.8.0/tests/test_envs/test_data_handling/__init__.py +0 -0
  103. qbraid_cli-0.8.0/tests/test_envs/test_data_handling/test_installed_envs_data.py +87 -0
  104. qbraid_cli-0.8.0/tests/test_envs/test_data_handling/test_is_valid_env_name.py +43 -0
  105. qbraid_cli-0.8.0/tests/test_envs/test_data_handling/test_request_delete_env.py +31 -0
  106. qbraid_cli-0.8.0/tests/test_envs/test_data_handling/test_validate_env_name.py +31 -0
  107. qbraid_cli-0.8.0/tests/test_jobs/__init__.py +0 -0
  108. qbraid_cli-0.8.0/tests/test_jobs/test_app/__init__.py +0 -0
  109. qbraid_cli-0.8.0/tests/test_jobs/test_app/test_jobs_disable.py +51 -0
  110. qbraid_cli-0.8.0/tests/test_jobs/test_app/test_jobs_enable.py +69 -0
  111. qbraid_cli-0.8.0/tests/test_jobs/test_app/test_jobs_list.py +62 -0
  112. qbraid_cli-0.8.0/tests/test_jobs/test_app/test_jobs_state.py +32 -0
  113. qbraid_cli-0.8.0/tests/test_jobs/test_toggle_braket/__init__.py +0 -0
  114. qbraid_cli-0.8.0/tests/test_jobs/test_toggle_braket/test_confirm_updates.py +52 -0
  115. qbraid_cli-0.8.0/tests/test_jobs/test_toggle_braket/test_disable_braket.py +100 -0
  116. qbraid_cli-0.8.0/tests/test_jobs/test_toggle_braket/test_enable_braket.py +105 -0
  117. qbraid_cli-0.8.0/tests/test_jobs/test_toggle_braket/test_get_package_data.py +185 -0
  118. qbraid_cli-0.8.0/tests/test_jobs/test_validation/__init__.py +0 -0
  119. qbraid_cli-0.8.0/tests/test_jobs/test_validation/test_get_state.py +62 -0
  120. qbraid_cli-0.8.0/tests/test_jobs/test_validation/test_handle_jobs_state.py +64 -0
  121. qbraid_cli-0.8.0/tests/test_jobs/test_validation/test_run_progress_get_state.py +43 -0
  122. qbraid_cli-0.8.0/tests/test_jobs/test_validation/test_validate_library.py +35 -0
  123. qbraid_cli-0.8.0/tests/test_kernels/__init__.py +0 -0
  124. qbraid_cli-0.8.0/tests/test_kernels/test_kernels_list.py +74 -0
  125. qbraid_cli-0.8.0/tools/split_rst.py +116 -0
  126. qbraid_cli-0.8.0/tools/verify_headers.py +209 -0
  127. qbraid-cli-0.7.0/PKG-INFO +0 -118
  128. qbraid-cli-0.7.0/qbraid_cli/_version.py +0 -7
  129. qbraid-cli-0.7.0/qbraid_cli/bin/qbraid.sh +0 -1317
  130. qbraid-cli-0.7.0/qbraid_cli/configure.py +0 -87
  131. qbraid-cli-0.7.0/qbraid_cli/wrapper.py +0 -91
  132. qbraid-cli-0.7.0/qbraid_cli.egg-info/PKG-INFO +0 -118
  133. qbraid-cli-0.7.0/qbraid_cli.egg-info/SOURCES.txt +0 -13
  134. qbraid-cli-0.7.0/qbraid_cli.egg-info/entry_points.txt +0 -2
  135. qbraid-cli-0.7.0/qbraid_cli.egg-info/requires.txt +0 -13
  136. qbraid-cli-0.7.0/setup.py +0 -76
  137. {qbraid-cli-0.7.0 → qbraid_cli-0.8.0}/qbraid_cli/__init__.py +0 -0
  138. {qbraid-cli-0.7.0 → qbraid_cli-0.8.0}/qbraid_cli.egg-info/dependency_links.txt +0 -0
  139. {qbraid-cli-0.7.0 → qbraid_cli-0.8.0}/qbraid_cli.egg-info/top_level.txt +0 -0
  140. {qbraid-cli-0.7.0 → qbraid_cli-0.8.0}/setup.cfg +0 -0
@@ -0,0 +1,3 @@
1
+ QBRAID_API_KEY= # YOURAPIKEY
2
+ QBRAID_ENVS_PATH= # default: ~/.qbraid/environments
3
+ QBRAID_CONFIG_FILE= # default: ~/.qbraid/qbraidrc
@@ -0,0 +1,41 @@
1
+ name: Bug report 🚩
2
+ description: Create a report to help us improve
3
+ title: "[BUG] "
4
+ labels: [bug]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: "Thanks for taking the time to fill out our bug report form."
10
+
11
+ - type: textarea
12
+ attributes:
13
+ label: Environment
14
+ value: |
15
+ - **qBraid-CLI version**:
16
+ - **Python version**:
17
+ - **Operating system**:
18
+ validations:
19
+ required: true
20
+
21
+ - type: textarea
22
+ attributes:
23
+ label: What happened?
24
+ description: Please provide a detailed description of the bug, accompanied by a minimal code example that demonstrates how the error(s) can be reproduced.
25
+ validations:
26
+ required: true
27
+
28
+ - type: textarea
29
+ attributes:
30
+ label: Suggestions (Optional)
31
+ 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
+ validations:
33
+ 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
@@ -0,0 +1,34 @@
1
+ name: Feature request 💡
2
+ description: Suggest an idea for this project
3
+ title: "[FEATURE] "
4
+ labels: [enhancement]
5
+
6
+ body:
7
+ - type: markdown
8
+ attributes:
9
+ value: "Thank you for taking the time to suggest a feature. Please fill out the details below to help us understand your idea better."
10
+
11
+ - type: textarea
12
+ id: feature-description
13
+ attributes:
14
+ label: Feature Description
15
+ description: "Describe the feature you'd like and the problem it solves. Include any specific use cases that illustrate its benefits."
16
+ placeholder: "Please describe the feature in detail."
17
+ validations:
18
+ required: true
19
+
20
+ - type: textarea
21
+ attributes:
22
+ label: Implementation (Optional)
23
+ description: "Do you have an idea for how this could be implemented? Please include those details here."
24
+ validations:
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,39 @@
1
+ name: Build Docs
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ push:
7
+ branches: ['main']
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - uses: actions/checkout@v3
16
+ - name: Set up Python
17
+ uses: actions/setup-python@v4
18
+ with:
19
+ python-version: '3.10'
20
+ cache: pip
21
+ - name: Install dependencies
22
+ run: |
23
+ python -m pip install --upgrade pip setuptools
24
+ python -m pip install -r docs/requirements.txt
25
+ - name: Build & install package
26
+ run: |
27
+ python -m build .
28
+ python -m pip install dist/*.whl
29
+ - name: Generate docs assets
30
+ run: |
31
+ python -c "import pathlib; pathlib.Path('docs/tree').mkdir(parents=True, exist_ok=True)"
32
+ python -c "import glob, os; [os.remove(f) for f in glob.glob('docs/tree/*.rst')]"
33
+ typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
34
+ m2r docs/tree/qbraid.md
35
+ python -c "import os; os.remove('docs/tree/qbraid.md')"
36
+ python tools/split_rst.py docs/tree/qbraid.rst
37
+ - name: Build docs
38
+ run: |
39
+ sphinx-build -W -b html docs docs/build/html
@@ -0,0 +1,34 @@
1
+ name: Formatting check
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ main:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+ - name: Set up Python
15
+ uses: actions/setup-python@v4
16
+ with:
17
+ python-version: '3.10'
18
+ - name: Install dependencies
19
+ run: |
20
+ pip install --upgrade pip
21
+ pip install black isort pylint
22
+ - name: Check isort, black, pylint
23
+ run: |
24
+ black --check qbraid_cli tests tools
25
+ isort --check-only qbraid_cli tests tools
26
+ # if pylint qbraid_cli tests tools --disable=C0415,R0914,W0511 2>&1 | grep 'Your code has been rated at 10\.00/10' > /dev/null; then
27
+ # echo "Perfect pylint score!"
28
+ # else
29
+ # echo "Pylint score is not 10/10."
30
+ # exit 1
31
+ # fi
32
+ - name: Check copyright headers
33
+ run: |
34
+ python tools/verify_headers.py qbraid_cli tests tools --skip qbraid_cli/_version.py
@@ -0,0 +1,72 @@
1
+ name: CI
2
+
3
+ on:
4
+ pull_request:
5
+ branches: ['main']
6
+ push:
7
+ branches: ['main']
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ python-version: ['3.11']
16
+
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ - name: Set up Python ${{ matrix.python-version }}
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+ cache: pip
24
+ - name: Upgrade pip and install build tools
25
+ run: |
26
+ pip install --upgrade pip
27
+ pip install setuptools wheel build
28
+ - name: Build the package
29
+ run: |
30
+ python -m build
31
+ - name: Upload built package
32
+ uses: actions/upload-artifact@v3
33
+ with:
34
+ name: built-package
35
+ path: dist/*.whl
36
+
37
+ test:
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']
44
+
45
+ steps:
46
+ - uses: actions/checkout@v3
47
+ - name: Set up Python ${{ matrix.python-version }}
48
+ uses: actions/setup-python@v4
49
+ with:
50
+ python-version: ${{ matrix.python-version }}
51
+ cache: pip
52
+ - name: Download built package
53
+ uses: actions/download-artifact@v3
54
+ with:
55
+ name: built-package
56
+ path: dist
57
+ - name: Install package
58
+ run: |
59
+ if ($env:RUNNER_OS -eq "Windows") {
60
+ Get-ChildItem dist/*.whl | ForEach-Object { pip install $_.FullName }
61
+ } else {
62
+ pip install dist/*.whl
63
+ }
64
+ shell: pwsh
65
+ - name: Install testing dependencies
66
+ run: |
67
+ pip install pytest
68
+ - name: Run tests with pytest
69
+ run: |
70
+ pytest
71
+ env:
72
+ QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
@@ -0,0 +1,32 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ pypi-publish:
10
+ name: Build dist & upload to PyPI
11
+ environment: publish
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ with:
16
+ fetch-depth: 1
17
+
18
+ - name: Set up Python
19
+ uses: actions/setup-python@v4
20
+ with:
21
+ python-version: '3.10'
22
+
23
+ - name: Build binary wheel + source tarball
24
+ run: |
25
+ python3 -m pip install --upgrade pip build
26
+ python3 -m build
27
+
28
+ - name: Publish package to PyPI
29
+ uses: pypa/gh-action-pypi-publish@release/v1
30
+ with:
31
+ user: __token__
32
+ password: ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,29 @@
1
+ name: Publish to TestPyPI
2
+
3
+ on:
4
+ workflow_dispatch:
5
+
6
+ jobs:
7
+ pypi-publish:
8
+ name: Build dist & upload to TestPyPI
9
+ runs-on: ubuntu-latest
10
+ steps:
11
+ - uses: actions/checkout@v3
12
+ with:
13
+ fetch-depth: 1
14
+
15
+ - name: Set up Python
16
+ uses: actions/setup-python@v4
17
+ with:
18
+ python-version: '3.10'
19
+
20
+ - name: Build binary wheel + source tarball
21
+ run: |
22
+ python3 -m pip install --upgrade pip build
23
+ python3 -m build
24
+ - name: Publish package to TestPyPI
25
+ uses: pypa/gh-action-pypi-publish@release/v1
26
+ with:
27
+ user: __token__
28
+ password: ${{ secrets.TEST_PYPI_API_TOKEN }}
29
+ repository-url: https://test.pypi.org/legacy/
@@ -0,0 +1,164 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # ignore autogenerated _version.py file
30
+ qbraid_cli/_version.py
31
+ docs/tree/*
32
+
33
+ # PyInstaller
34
+ # Usually these files are written by a python script from a template
35
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
36
+ *.manifest
37
+ *.spec
38
+
39
+ # Installer logs
40
+ pip-log.txt
41
+ pip-delete-this-directory.txt
42
+
43
+ # Unit test / coverage reports
44
+ htmlcov/
45
+ .tox/
46
+ .nox/
47
+ .coverage
48
+ .coverage.*
49
+ .cache
50
+ nosetests.xml
51
+ coverage.xml
52
+ *.cover
53
+ *.py,cover
54
+ .hypothesis/
55
+ .pytest_cache/
56
+ cover/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+ db.sqlite3-journal
67
+
68
+ # Flask stuff:
69
+ instance/
70
+ .webassets-cache
71
+
72
+ # Scrapy stuff:
73
+ .scrapy
74
+
75
+ # Sphinx documentation
76
+ docs/_build/
77
+
78
+ # PyBuilder
79
+ .pybuilder/
80
+ target/
81
+
82
+ # Jupyter Notebook
83
+ .ipynb_checkpoints
84
+
85
+ # IPython
86
+ profile_default/
87
+ ipython_config.py
88
+
89
+ # pyenv
90
+ # For a library or package, you might want to ignore these files since the code is
91
+ # intended to run in multiple environments; otherwise, check them in:
92
+ # .python-version
93
+
94
+ # pipenv
95
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
96
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
97
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
98
+ # install all needed dependencies.
99
+ #Pipfile.lock
100
+
101
+ # poetry
102
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
103
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
104
+ # commonly ignored for libraries.
105
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
106
+ #poetry.lock
107
+
108
+ # pdm
109
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
110
+ #pdm.lock
111
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
112
+ # in version control.
113
+ # https://pdm.fming.dev/#use-with-ide
114
+ .pdm.toml
115
+
116
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
117
+ __pypackages__/
118
+
119
+ # Celery stuff
120
+ celerybeat-schedule
121
+ celerybeat.pid
122
+
123
+ # SageMath parsed files
124
+ *.sage.py
125
+
126
+ # Environments
127
+ .env
128
+ .venv
129
+ env/
130
+ venv/
131
+ ENV/
132
+ env.bak/
133
+ venv.bak/
134
+
135
+ # Spyder project settings
136
+ .spyderproject
137
+ .spyproject
138
+
139
+ # Rope project settings
140
+ .ropeproject
141
+
142
+ # mkdocs documentation
143
+ /site
144
+
145
+ # mypy
146
+ .mypy_cache/
147
+ .dmypy.json
148
+ dmypy.json
149
+
150
+ # Pyre type checker
151
+ .pyre/
152
+
153
+ # pytype static type analyzer
154
+ .pytype/
155
+
156
+ # Cython debug symbols
157
+ cython_debug/
158
+
159
+ # PyCharm
160
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
161
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
162
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
163
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
164
+ .idea/
@@ -0,0 +1,22 @@
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
+ - pip install -r docs/requirements.txt
14
+ - python -m build .
15
+ - python -m pip install dist/*.whl
16
+ - mkdir -p docs/tree
17
+ - rm -f docs/tree/*.rst
18
+ - typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
19
+ - m2r docs/tree/qbraid.md
20
+ - rm docs/tree/qbraid.md
21
+ - python tools/split_rst.py docs/tree/qbraid.rst
22
+ - sphinx-build -W -b html docs $READTHEDOCS_OUTPUT/html
@@ -0,0 +1,112 @@
1
+ # Contributing
2
+
3
+ Welcome! We're delighted that you're interested in contributing. Your help is essential for keeping the project great.
4
+
5
+ ## Getting Started
6
+
7
+ Before you start working on a new feature or a fix, here's how you can contribute:
8
+
9
+ 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.
10
+ 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>`.
11
+ 3. **Commit Your Changes**: Make your changes in your development branch and commit them. Be sure to write clear, concise commit messages.
12
+ 4. **Push to Your Fork**: Push your changes to your forked repository on GitHub.
13
+ 5. **Create a Pull Request**: Go to the original project repository and click on "Pull Requests", then click the "New Pull Request" button
14
+
15
+ ### Development install
16
+
17
+ You can install the qBraid-CLI from source by cloning this repository and running a pip install command in the root directory:
18
+
19
+ ```bash
20
+ git clone https://github.com/qBraid/qBraid-CLI.git
21
+ cd qBraid-CLI
22
+ pip install -e .
23
+ ```
24
+
25
+ *Note*: The current CLI configuration assumes a Linux-based filesystem. However, our goal is to move towards a platform agnostic version soon.
26
+
27
+ You can verify that the setup has been successful by checking the qBraid-CLI version with the following command:
28
+
29
+ ```bash
30
+ qbraid --version
31
+ ```
32
+
33
+ To view available `make` commands, run:
34
+
35
+ ```shell
36
+ make help
37
+ ```
38
+
39
+ ## Testing
40
+
41
+ Install test dependencies:
42
+
43
+ ```shell
44
+ pip install pytest
45
+ ```
46
+
47
+ And run tests:
48
+
49
+ ```shell
50
+ pytest tests
51
+ ```
52
+
53
+ You can also run tests with make:
54
+
55
+ ```shell
56
+ make test
57
+ ```
58
+
59
+ ## Build docs
60
+
61
+ To generate the API reference documentation locally, install the necessary requirements:
62
+
63
+ ```shell
64
+ pip install -r docs/requirements.txt
65
+ ```
66
+
67
+ And then run
68
+
69
+ ```shell
70
+ make docs
71
+ ```
72
+
73
+ Alternatively, you can generate command tree `.rst` files step-by-step:
74
+
75
+ ```shell
76
+ mkdir docs/tree
77
+ typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
78
+ m2r docs/tree/qbraid.md
79
+ rm docs/tree/qbraid.md
80
+ python tools/split_rst.py docs/tree/qbraid.rst
81
+ ```
82
+
83
+ And then, build the docs:
84
+
85
+ ```shell
86
+ sphinx-build -W -b html docs docs/build/html
87
+ ```
88
+
89
+ You can view the generated documentation in your browser (on OS X) using:
90
+
91
+ ```shell
92
+ open docs/build/html/index.html
93
+ ```
94
+
95
+ ## Code style
96
+
97
+ For code style, our project uses a combination of [isort](https://github.com/PyCQA/isort), [pylint](https://github.com/pylint-dev/pylint),
98
+ and [black](https://github.com/psf/black). Specific configurations for these tools should be added to [`pyproject.toml`](pyproject.toml).
99
+
100
+ Install linters:
101
+
102
+ ```shell
103
+ pip install black isort pylint
104
+ ```
105
+
106
+ Run the following and make changes as needed to satisfy format checks:
107
+
108
+ ```shell
109
+ black qbraid_cli tests tools
110
+ isort qbraid_cli tests tools
111
+ pylint qbraid_cli tests tools
112
+ ```
@@ -0,0 +1,5 @@
1
+ include *.txt *.md
2
+ recursive-include docs *.txt *.rst *.py *.png *.ico
3
+ recursive-include qbraid_cli *.py
4
+ prune docs/build/
5
+ prune docs/cli/
@@ -0,0 +1,52 @@
1
+ .PHONY: help docs clean build check_dependencies
2
+
3
+ DOCS_DIR := docs
4
+ BUILD_DIR := $(DOCS_DIR)/build
5
+ TREE_DIR := $(DOCS_DIR)/tree
6
+ DIST_DIR := dist
7
+ SRC_DIR := qbraid_cli
8
+ TOOLS_DIR := tools
9
+ TESTS_DIR := tests
10
+
11
+ .DEFAULT_GOAL := help
12
+
13
+ help: ## Display this help message
14
+ @echo "Available commands:"
15
+ @echo
16
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}'
17
+ @echo
18
+
19
+ docs: check_dependencies_docs check_build_version ## Generate documentation
20
+ @python -c "import pathlib; pathlib.Path('$(TREE_DIR)').mkdir(parents=True, exist_ok=True)"
21
+ @python -c "import glob, os; [os.remove(f) for f in glob.glob('$(TREE_DIR)/*.rst')]"
22
+ @typer qbraid_cli.main utils docs --name=qbraid --output=$(TREE_DIR)/qbraid.md
23
+ @m2r $(TREE_DIR)/qbraid.md
24
+ @python -c "import os; os.remove('$(TREE_DIR)/qbraid.md')"
25
+ @python $(TOOLS_DIR)/split_rst.py $(TREE_DIR)/qbraid.rst
26
+ @sphinx-build -W -b html $(DOCS_DIR) $(BUILD_DIR)
27
+
28
+ test: check_dependencies_test ## Run tests with pytest
29
+ @python -m pytest $(TESTS_DIR)
30
+
31
+ clean: ## Clean up generated docs and build artifacts
32
+ @python -c "import shutil; shutil.rmtree('$(BUILD_DIR)', ignore_errors=True)"
33
+ @python -c "import shutil; shutil.rmtree('$(TREE_DIR)', ignore_errors=True)"
34
+ @python -c "import shutil; shutil.rmtree('$(DIST_DIR)', ignore_errors=True)"
35
+ @python -c "import os; os.remove('$(SRC_DIR)/_version.py') if os.path.exists('$(SRC_DIR)/_version.py') else None"
36
+
37
+ build: check_dependencies_build ## Build the package
38
+ @python -m build .
39
+
40
+ check_build_version:
41
+ @python -c "import os; assert os.path.exists('$(SRC_DIR)/_version.py'), 'Error: $(SRC_DIR)/_version.py does not exist. Please \'make build\' before proceeding.'"
42
+
43
+ check_dependencies_docs:
44
+ @command -v typer >/dev/null 2>&1 || { echo >&2 "Error: Python 'typer-cli' module is not installed. Please install it to proceed."; exit 1; }
45
+ @command -v m2r >/dev/null 2>&1 || { echo >&2 "Error: Python 'm2r' module is not installed. Please install it to proceed."; exit 1; }
46
+ @command -v sphinx-build >/dev/null 2>&1 || { echo >&2 "Error: Python 'sphinx' module is not installed. Please install it to proceed."; exit 1; }
47
+
48
+ check_dependencies_test:
49
+ @python -c "import pytest" 2>/dev/null || { echo >&2 "Error: Python 'pytest' module is not installed. Please install it to proceed."; exit 1; }
50
+
51
+ check_dependencies_build:
52
+ @python -c "import build" 2>/dev/null || { echo >&2 "Error: Python 'build' module is not installed. Please install it to proceed."; exit 1; }