qbraid-cli 0.8.1__tar.gz → 0.8.1a0__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.
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/workflows/docs.yml +1 -1
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/workflows/main.yml +3 -15
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.readthedocs.yml +1 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/CONTRIBUTING.md +17 -15
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/MANIFEST.IN +1 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/PKG-INFO +22 -14
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/README.md +10 -9
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/index.rst +1 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/pyproject.toml +4 -26
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/_version.py +2 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/admin/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/admin/app.py +4 -3
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/configure/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/credits/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/devices/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/envs/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/envs/app.py +36 -26
- qbraid_cli-0.8.1a0/qbraid_cli/envs/create.py +128 -0
- qbraid_cli-0.8.1a0/qbraid_cli/envs/data_handling.py +140 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/jobs/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/kernels/__init__.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/kernels/app.py +1 -3
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/main.py +0 -2
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli.egg-info/PKG-INFO +22 -14
- qbraid_cli-0.8.1a0/qbraid_cli.egg-info/SOURCES.txt +129 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli.egg-info/requires.txt +12 -3
- {qbraid_cli-0.8.1/tests/credits → qbraid_cli-0.8.1a0/tests/test_credits}/test_credits_value.py +11 -11
- {qbraid_cli-0.8.1/tests/envs → qbraid_cli-0.8.1a0/tests/test_envs/test_app}/test_envs_remove.py +3 -6
- qbraid_cli-0.8.1/tests/envs/test_envs_create_qbraid_env_assets.py → qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_create_qbraid_env_assets.py +3 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_replace_str.py +25 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_update_state_json.py +61 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/__init__.py +0 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_installed_envs_data.py +87 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_is_valid_env_name.py +43 -0
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_request_delete_env.py +31 -0
- qbraid_cli-0.8.1/tests/envs/test_envs_create_validate_env_name.py → qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_validate_env_name.py +0 -38
- qbraid_cli-0.8.1a0/tests/test_jobs/__init__.py +0 -0
- qbraid_cli-0.8.1a0/tests/test_jobs/test_app/__init__.py +0 -0
- qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/__init__.py +0 -0
- qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/__init__.py +0 -0
- qbraid_cli-0.8.1/tests/jobs/test_jobs_validate_get_state.py → qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_get_state.py +1 -33
- qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_run_progress_get_state.py +43 -0
- qbraid_cli-0.8.1a0/tests/test_kernels/__init__.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/tools/split_rst.py +0 -3
- qbraid_cli-0.8.1a0/tools/stamp_pre_release.py +68 -0
- qbraid_cli-0.8.1/LICENSE +0 -41
- qbraid_cli-0.8.1/docs/requirements.txt +0 -7
- qbraid_cli-0.8.1/qbraid_cli/admin/buildlogs.py +0 -114
- qbraid_cli-0.8.1/qbraid_cli/envs/create.py +0 -61
- qbraid_cli-0.8.1/qbraid_cli/envs/data_handling.py +0 -46
- qbraid_cli-0.8.1/qbraid_cli/pip/__init__.py +0 -11
- qbraid_cli-0.8.1/qbraid_cli/pip/app.py +0 -49
- qbraid_cli-0.8.1/qbraid_cli/pip/hooks.py +0 -73
- qbraid_cli-0.8.1/qbraid_cli.egg-info/SOURCES.txt +0 -125
- qbraid_cli-0.8.1/ruff.toml +0 -62
- qbraid_cli-0.8.1/tools/split_md.py +0 -179
- qbraid_cli-0.8.1/tools/stamp_pre_release.py +0 -48
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.env.example +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/workflows/format.yml +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/workflows/pre-release.yml +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.github/workflows/publish.yml +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/.gitignore +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/Makefile +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/Makefile +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/api-key.png +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/cards/jupyter.png +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/cards/python.png +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/cards/terminal.png +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/favicon.ico +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/logo.png +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/style/custom.css +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/_static/style/s4defs-roles.css +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/configure.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/credits.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/devices-list.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/devices.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/envs-activate.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/envs-list.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/envs-uninstall.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/envs.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/jobs-add.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/jobs-disable.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/jobs-enable.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/jobs-list.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/jobs.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/kernels.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/cli/qbraid.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/conf.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/guide/overview.rst +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/docs/make.bat +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/configure/actions.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/credits/app.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/jobs/toggle_braket.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli/jobs/validation.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/setup.cfg +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/tests/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/configure → qbraid_cli-0.8.1a0/tests/test_configure}/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/configure → qbraid_cli-0.8.1a0/tests/test_configure}/test_configure_set.py +0 -0
- /qbraid_cli-0.8.1/tests/configure/test_configure_prompt_for_config.py → /qbraid_cli-0.8.1a0/tests/test_configure/test_prompt_for_config.py +0 -0
- /qbraid_cli-0.8.1/tests/configure/test_configure_validate_input.py → /qbraid_cli-0.8.1a0/tests/test_configure/test_validate_input.py +0 -0
- {qbraid_cli-0.8.1/tests/credits → qbraid_cli-0.8.1a0/tests/test_credits}/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/devices → qbraid_cli-0.8.1a0/tests/test_devices}/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/devices → qbraid_cli-0.8.1a0/tests/test_devices}/test_devices_list.py +0 -0
- /qbraid_cli-0.8.1/tests/devices/test_devices_validations.py → /qbraid_cli-0.8.1a0/tests/test_devices/test_validations.py +0 -0
- {qbraid_cli-0.8.1/tests/envs → qbraid_cli-0.8.1a0/tests/test_envs}/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/jobs → qbraid_cli-0.8.1a0/tests/test_envs/test_activate}/__init__.py +0 -0
- /qbraid_cli-0.8.1/tests/envs/test_envs_activate_pyenv.py → /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_activate_pyenv.py +0 -0
- /qbraid_cli-0.8.1/tests/envs/test_envs_activate_find_shell_rc.py → /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_find_shell_rc.py +0 -0
- /qbraid_cli-0.8.1/tests/envs/test_envs_activate_print_command.py → /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_print_activate_command.py +0 -0
- {qbraid_cli-0.8.1/tests/kernels → qbraid_cli-0.8.1a0/tests/test_envs/test_app}/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/envs → qbraid_cli-0.8.1a0/tests/test_envs/test_app}/test_envs_activate.py +0 -0
- {qbraid_cli-0.8.1/tests/envs → qbraid_cli-0.8.1a0/tests/test_envs/test_app}/test_envs_create.py +0 -0
- {qbraid_cli-0.8.1/tests/envs → qbraid_cli-0.8.1a0/tests/test_envs/test_app}/test_envs_list.py +0 -0
- /qbraid_cli-0.8.1/qbraid_cli/py.typed → /qbraid_cli-0.8.1a0/tests/test_envs/test_create/__init__.py +0 -0
- {qbraid_cli-0.8.1/tests/jobs → qbraid_cli-0.8.1a0/tests/test_jobs/test_app}/test_jobs_disable.py +0 -0
- {qbraid_cli-0.8.1/tests/jobs → qbraid_cli-0.8.1a0/tests/test_jobs/test_app}/test_jobs_enable.py +0 -0
- {qbraid_cli-0.8.1/tests/jobs → qbraid_cli-0.8.1a0/tests/test_jobs/test_app}/test_jobs_list.py +0 -0
- {qbraid_cli-0.8.1/tests/jobs → qbraid_cli-0.8.1a0/tests/test_jobs/test_app}/test_jobs_state.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_toggle_braket_confirm.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_confirm_updates.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_toggle_braket_disable.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_disable_braket.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_toggle_braket_enable.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_enable_braket.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_toggle_braket_get_data.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_get_package_data.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_validate_handle_state.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_handle_jobs_state.py +0 -0
- /qbraid_cli-0.8.1/tests/jobs/test_jobs_validate_library.py → /qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_validate_library.py +0 -0
- {qbraid_cli-0.8.1/tests/kernels → qbraid_cli-0.8.1a0/tests/test_kernels}/test_kernels_list.py +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/tools/create_dev_build.sh +0 -0
- {qbraid_cli-0.8.1 → qbraid_cli-0.8.1a0}/tools/install_wheel_extras.sh +0 -0
|
@@ -21,11 +21,11 @@ jobs:
|
|
|
21
21
|
- name: Install dependencies
|
|
22
22
|
run: |
|
|
23
23
|
python -m pip install --upgrade pip setuptools build
|
|
24
|
-
python -m pip install -r docs/requirements.txt
|
|
25
24
|
- name: Build & install package
|
|
26
25
|
run: |
|
|
27
26
|
python -m build .
|
|
28
27
|
python -m pip install dist/*.whl
|
|
28
|
+
tools/install_wheel_extras.sh dist --extra docs
|
|
29
29
|
- name: Generate docs assets
|
|
30
30
|
run: |
|
|
31
31
|
python -c "import pathlib; pathlib.Path('docs/tree').mkdir(parents=True, exist_ok=True)"
|
|
@@ -64,21 +64,9 @@ jobs:
|
|
|
64
64
|
shell: pwsh
|
|
65
65
|
- name: Install testing dependencies
|
|
66
66
|
run: |
|
|
67
|
-
pip install pytest
|
|
67
|
+
pip install pytest
|
|
68
68
|
- name: Run tests with pytest
|
|
69
69
|
run: |
|
|
70
|
-
|
|
71
|
-
coverage combine
|
|
72
|
-
coverage report
|
|
73
|
-
coverage html
|
|
74
|
-
coverage xml
|
|
70
|
+
pytest
|
|
75
71
|
env:
|
|
76
|
-
QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
|
|
77
|
-
- name: Upload coverage to Codecov
|
|
78
|
-
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
|
|
79
|
-
uses: codecov/codecov-action@v3
|
|
80
|
-
with:
|
|
81
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
82
|
-
fail_ci_if_error: false
|
|
83
|
-
files: ./build/coverage/coverage.xml
|
|
84
|
-
verbose: true
|
|
72
|
+
QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
|
|
@@ -10,10 +10,9 @@ build:
|
|
|
10
10
|
tools:
|
|
11
11
|
python: "3.10"
|
|
12
12
|
commands:
|
|
13
|
-
- python -m pip install -r docs/requirements.txt
|
|
14
|
-
- python -m pip install build
|
|
15
13
|
- python -m build .
|
|
16
14
|
- python -m pip install dist/*.whl
|
|
15
|
+
- tools/install_wheel_extras.sh dist --extra docs
|
|
17
16
|
- mkdir -p docs/tree
|
|
18
17
|
- rm -f docs/tree/*.rst
|
|
19
18
|
- typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
|
|
@@ -32,7 +32,7 @@ qbraid --version
|
|
|
32
32
|
|
|
33
33
|
To view available `make` commands, run:
|
|
34
34
|
|
|
35
|
-
```
|
|
35
|
+
```shell
|
|
36
36
|
make help
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -40,19 +40,19 @@ make help
|
|
|
40
40
|
|
|
41
41
|
Install test dependencies:
|
|
42
42
|
|
|
43
|
-
```
|
|
43
|
+
```shell
|
|
44
44
|
pip install pytest
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
And run tests:
|
|
48
48
|
|
|
49
|
-
```
|
|
49
|
+
```shell
|
|
50
50
|
pytest tests
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
You can also run tests with make:
|
|
54
54
|
|
|
55
|
-
```
|
|
55
|
+
```shell
|
|
56
56
|
make test
|
|
57
57
|
```
|
|
58
58
|
|
|
@@ -60,19 +60,19 @@ make test
|
|
|
60
60
|
|
|
61
61
|
To generate the API reference documentation locally, install the necessary requirements:
|
|
62
62
|
|
|
63
|
-
```
|
|
63
|
+
```shell
|
|
64
64
|
pip install -r docs/requirements.txt
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
And then run
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```shell
|
|
70
70
|
make docs
|
|
71
71
|
```
|
|
72
72
|
|
|
73
73
|
Alternatively, you can generate command tree `.rst` files step-by-step:
|
|
74
74
|
|
|
75
|
-
```
|
|
75
|
+
```shell
|
|
76
76
|
mkdir docs/tree
|
|
77
77
|
typer qbraid_cli.main utils docs --name=qbraid --output=docs/tree/qbraid.md
|
|
78
78
|
m2r docs/tree/qbraid.md
|
|
@@ -82,29 +82,31 @@ python tools/split_rst.py docs/tree/qbraid.rst
|
|
|
82
82
|
|
|
83
83
|
And then, build the docs:
|
|
84
84
|
|
|
85
|
-
```
|
|
85
|
+
```shell
|
|
86
86
|
sphinx-build -W -b html docs docs/build/html
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
You can view the generated documentation in your browser (on OS X) using:
|
|
90
90
|
|
|
91
|
-
```
|
|
91
|
+
```shell
|
|
92
92
|
open docs/build/html/index.html
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
## Code style
|
|
96
96
|
|
|
97
|
-
For code style, our project uses [
|
|
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).
|
|
98
99
|
|
|
99
100
|
Install linters:
|
|
100
101
|
|
|
101
|
-
```
|
|
102
|
-
pip install
|
|
102
|
+
```shell
|
|
103
|
+
pip install black isort pylint
|
|
103
104
|
```
|
|
104
105
|
|
|
105
106
|
Run the following and make changes as needed to satisfy format checks:
|
|
106
107
|
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
```shell
|
|
109
|
+
black qbraid_cli tests tools
|
|
110
|
+
isort qbraid_cli tests tools
|
|
111
|
+
pylint qbraid_cli tests tools
|
|
110
112
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.1a0
|
|
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
|
|
@@ -26,19 +26,26 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
26
26
|
Classifier: Programming Language :: Python :: 3.12
|
|
27
27
|
Requires-Python: >=3.9
|
|
28
28
|
Description-Content-Type: text/markdown
|
|
29
|
-
License-File: LICENSE
|
|
30
29
|
Requires-Dist: typer>=0.12.1
|
|
31
30
|
Requires-Dist: rich>=10.11.0
|
|
32
31
|
Requires-Dist: jupyter_client<9.0.0,>=7.0.0
|
|
33
32
|
Requires-Dist: ipykernel
|
|
34
|
-
Requires-Dist: qbraid-core>=0.1.
|
|
33
|
+
Requires-Dist: qbraid-core>=0.1.4
|
|
35
34
|
Provides-Extra: jobs
|
|
36
35
|
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
37
36
|
Provides-Extra: dev
|
|
38
|
-
Requires-Dist: ruff; extra == "dev"
|
|
39
|
-
Requires-Dist: isort; extra == "dev"
|
|
40
37
|
Requires-Dist: black; extra == "dev"
|
|
38
|
+
Requires-Dist: isort; extra == "dev"
|
|
39
|
+
Requires-Dist: pylint; extra == "dev"
|
|
41
40
|
Requires-Dist: pytest; extra == "dev"
|
|
41
|
+
Provides-Extra: docs
|
|
42
|
+
Requires-Dist: sphinx<7.4.0,>=7.2.6; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-rtd-theme<2.1,>=1.3; extra == "docs"
|
|
44
|
+
Requires-Dist: docutils<0.22; extra == "docs"
|
|
45
|
+
Requires-Dist: toml; extra == "docs"
|
|
46
|
+
Requires-Dist: build; extra == "docs"
|
|
47
|
+
Requires-Dist: m2r; extra == "docs"
|
|
48
|
+
Requires-Dist: typer; extra == "docs"
|
|
42
49
|
|
|
43
50
|
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
44
51
|
|
|
@@ -47,6 +54,7 @@ Requires-Dist: pytest; extra == "dev"
|
|
|
47
54
|
[](https://pypi.org/project/qbraid-cli/)
|
|
48
55
|
[](https://pepy.tech/project/qbraid-cli)
|
|
49
56
|
[](https://github.com/qBraid/qBraid-Lab/issues)
|
|
57
|
+
[](https://discord.gg/KugF6Cnncm)
|
|
50
58
|
|
|
51
59
|
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
52
60
|
|
|
@@ -63,7 +71,7 @@ For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/p
|
|
|
63
71
|
|
|
64
72
|
You can also install the qBraid-CLI from PyPI with:
|
|
65
73
|
|
|
66
|
-
```
|
|
74
|
+
```shell
|
|
67
75
|
pip install qbraid-cli
|
|
68
76
|
```
|
|
69
77
|
|
|
@@ -77,13 +85,13 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
77
85
|
your [account page](https://account.qbraid.com/):
|
|
78
86
|
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
79
87
|
|
|
80
|
-
```
|
|
88
|
+
```shell
|
|
81
89
|
$ qbraid configure
|
|
82
90
|
```
|
|
83
91
|
|
|
84
92
|
## Basic Commands
|
|
85
93
|
|
|
86
|
-
```
|
|
94
|
+
```shell
|
|
87
95
|
$ qbraid
|
|
88
96
|
----------------------------------
|
|
89
97
|
* Welcome to the qBraid CLI! *
|
|
@@ -106,19 +114,19 @@ Reference Docs: https://docs.qbraid.com/projects/cli/en/stable/guide/overview.ht
|
|
|
106
114
|
|
|
107
115
|
A qBraid CLI command has the following structure:
|
|
108
116
|
|
|
109
|
-
```
|
|
117
|
+
```shell
|
|
110
118
|
$ qbraid <command> <subcommand> [options and parameters]
|
|
111
119
|
```
|
|
112
120
|
|
|
113
121
|
For example, to list installed environments, the command would be:
|
|
114
122
|
|
|
115
|
-
```
|
|
123
|
+
```shell
|
|
116
124
|
$ qbraid envs list
|
|
117
125
|
```
|
|
118
126
|
|
|
119
127
|
To view help documentation, use one of the following:
|
|
120
128
|
|
|
121
|
-
```
|
|
129
|
+
```shell
|
|
122
130
|
$ qbraid --help
|
|
123
131
|
$ qbraid <command> --help
|
|
124
132
|
$ qbraid <command> <subcommand> --help
|
|
@@ -126,7 +134,7 @@ $ qbraid <command> <subcommand> --help
|
|
|
126
134
|
|
|
127
135
|
For example:
|
|
128
136
|
|
|
129
|
-
```
|
|
137
|
+
```shell
|
|
130
138
|
$ qbraid --help
|
|
131
139
|
|
|
132
140
|
Usage: qbraid [OPTIONS] COMMAND [ARGS]...
|
|
@@ -150,7 +158,7 @@ Commands
|
|
|
150
158
|
|
|
151
159
|
To get the version of the qBraid CLI:
|
|
152
160
|
|
|
153
|
-
```
|
|
161
|
+
```shell
|
|
154
162
|
$ qbraid --version
|
|
155
163
|
```
|
|
156
164
|
|
|
@@ -158,7 +166,7 @@ $ qbraid --version
|
|
|
158
166
|
|
|
159
167
|
You can also access the CLI directly from within [Notebooks](https://docs.qbraid.com/projects/lab/en/latest/lab/notebooks.html) using IPython [magic commands](https://ipython.readthedocs.io/en/stable/interactive/magics.html). First, configure the qBraid magic commands extension using:
|
|
160
168
|
|
|
161
|
-
```
|
|
169
|
+
```shell
|
|
162
170
|
$ qbraid configure magic
|
|
163
171
|
```
|
|
164
172
|
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
[](https://pypi.org/project/qbraid-cli/)
|
|
6
6
|
[](https://pepy.tech/project/qbraid-cli)
|
|
7
7
|
[](https://github.com/qBraid/qBraid-Lab/issues)
|
|
8
|
+
[](https://discord.gg/KugF6Cnncm)
|
|
8
9
|
|
|
9
10
|
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
10
11
|
|
|
@@ -21,7 +22,7 @@ For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/p
|
|
|
21
22
|
|
|
22
23
|
You can also install the qBraid-CLI from PyPI with:
|
|
23
24
|
|
|
24
|
-
```
|
|
25
|
+
```shell
|
|
25
26
|
pip install qbraid-cli
|
|
26
27
|
```
|
|
27
28
|
|
|
@@ -35,13 +36,13 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
35
36
|
your [account page](https://account.qbraid.com/):
|
|
36
37
|
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
37
38
|
|
|
38
|
-
```
|
|
39
|
+
```shell
|
|
39
40
|
$ qbraid configure
|
|
40
41
|
```
|
|
41
42
|
|
|
42
43
|
## Basic Commands
|
|
43
44
|
|
|
44
|
-
```
|
|
45
|
+
```shell
|
|
45
46
|
$ qbraid
|
|
46
47
|
----------------------------------
|
|
47
48
|
* Welcome to the qBraid CLI! *
|
|
@@ -64,19 +65,19 @@ Reference Docs: https://docs.qbraid.com/projects/cli/en/stable/guide/overview.ht
|
|
|
64
65
|
|
|
65
66
|
A qBraid CLI command has the following structure:
|
|
66
67
|
|
|
67
|
-
```
|
|
68
|
+
```shell
|
|
68
69
|
$ qbraid <command> <subcommand> [options and parameters]
|
|
69
70
|
```
|
|
70
71
|
|
|
71
72
|
For example, to list installed environments, the command would be:
|
|
72
73
|
|
|
73
|
-
```
|
|
74
|
+
```shell
|
|
74
75
|
$ qbraid envs list
|
|
75
76
|
```
|
|
76
77
|
|
|
77
78
|
To view help documentation, use one of the following:
|
|
78
79
|
|
|
79
|
-
```
|
|
80
|
+
```shell
|
|
80
81
|
$ qbraid --help
|
|
81
82
|
$ qbraid <command> --help
|
|
82
83
|
$ qbraid <command> <subcommand> --help
|
|
@@ -84,7 +85,7 @@ $ qbraid <command> <subcommand> --help
|
|
|
84
85
|
|
|
85
86
|
For example:
|
|
86
87
|
|
|
87
|
-
```
|
|
88
|
+
```shell
|
|
88
89
|
$ qbraid --help
|
|
89
90
|
|
|
90
91
|
Usage: qbraid [OPTIONS] COMMAND [ARGS]...
|
|
@@ -108,7 +109,7 @@ Commands
|
|
|
108
109
|
|
|
109
110
|
To get the version of the qBraid CLI:
|
|
110
111
|
|
|
111
|
-
```
|
|
112
|
+
```shell
|
|
112
113
|
$ qbraid --version
|
|
113
114
|
```
|
|
114
115
|
|
|
@@ -116,7 +117,7 @@ $ qbraid --version
|
|
|
116
117
|
|
|
117
118
|
You can also access the CLI directly from within [Notebooks](https://docs.qbraid.com/projects/lab/en/latest/lab/notebooks.html) using IPython [magic commands](https://ipython.readthedocs.io/en/stable/interactive/magics.html). First, configure the qBraid magic commands extension using:
|
|
118
119
|
|
|
119
|
-
```
|
|
120
|
+
```shell
|
|
120
121
|
$ qbraid configure magic
|
|
121
122
|
```
|
|
122
123
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qbraid-cli"
|
|
7
|
-
version = "0.8.1"
|
|
7
|
+
version = "0.8.1-alpha"
|
|
8
8
|
description = "Command Line Interface for interacting with all parts of the qBraid platform."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "qBraid Development Team", email = "contact@qbraid.com" }]
|
|
@@ -31,7 +31,7 @@ dependencies = [
|
|
|
31
31
|
"rich>=10.11.0",
|
|
32
32
|
"jupyter_client>=7.0.0,<9.0.0",
|
|
33
33
|
"ipykernel",
|
|
34
|
-
"qbraid-core>=0.1.
|
|
34
|
+
"qbraid-core>=0.1.4",
|
|
35
35
|
]
|
|
36
36
|
requires-python = ">= 3.9"
|
|
37
37
|
|
|
@@ -44,7 +44,8 @@ Discord = "https://discord.gg/KugF6Cnncm"
|
|
|
44
44
|
|
|
45
45
|
[project.optional-dependencies]
|
|
46
46
|
jobs = ["amazon-braket-sdk>=1.48.1"]
|
|
47
|
-
dev = ["
|
|
47
|
+
dev = ["black", "isort", "pylint", "pytest"]
|
|
48
|
+
docs = ["sphinx>=7.2.6,<7.4.0", "sphinx-rtd-theme>=1.3,<2.1", "docutils<0.22", "toml", "build", "m2r", "typer"]
|
|
48
49
|
|
|
49
50
|
[project.scripts]
|
|
50
51
|
qbraid = "qbraid_cli.main:app"
|
|
@@ -76,26 +77,3 @@ ignore-paths = [
|
|
|
76
77
|
[tool.pytest.ini_options]
|
|
77
78
|
addopts = "-ra"
|
|
78
79
|
testpaths = ["tests"]
|
|
79
|
-
|
|
80
|
-
[tool.coverage.run]
|
|
81
|
-
parallel = true
|
|
82
|
-
source = ["qbraid_cli"]
|
|
83
|
-
|
|
84
|
-
[tool.coverage.report]
|
|
85
|
-
show_missing = true
|
|
86
|
-
skip_covered = true
|
|
87
|
-
ignore_errors = true
|
|
88
|
-
exclude_lines = [
|
|
89
|
-
"raise NotImplementedError",
|
|
90
|
-
"return NotImplemented",
|
|
91
|
-
"def __repr__",
|
|
92
|
-
"if __name__ == .__main__.:",
|
|
93
|
-
"if TYPE_CHECKING:",
|
|
94
|
-
"logger.debug"
|
|
95
|
-
]
|
|
96
|
-
|
|
97
|
-
[tool.coverage.html]
|
|
98
|
-
directory = "build/coverage"
|
|
99
|
-
|
|
100
|
-
[tool.coverage.xml]
|
|
101
|
-
output = "build/coverage/coverage.xml"
|
|
@@ -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+
|
|
16
|
-
__version_tuple__ = version_tuple = (0, 1, 'dev1', '
|
|
15
|
+
__version__ = version = '0.1.dev1+gc908824'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 1, 'dev1', 'gc908824')
|
|
@@ -3,20 +3,21 @@
|
|
|
3
3
|
|
|
4
4
|
"""
|
|
5
5
|
Module defining commands in the 'qbraid admin' namespace.
|
|
6
|
+
|
|
6
7
|
"""
|
|
7
8
|
|
|
8
9
|
from typing import List
|
|
9
10
|
|
|
10
11
|
import typer
|
|
11
12
|
|
|
12
|
-
from qbraid_cli.admin.buildlogs import buildlogs_app
|
|
13
13
|
from qbraid_cli.admin.headers import check_and_fix_headers
|
|
14
14
|
from qbraid_cli.admin.validation import validate_header_type, validate_paths_exist
|
|
15
15
|
|
|
16
|
+
# disable pretty_exceptions_show_locals to avoid printing sensative information in the traceback
|
|
16
17
|
admin_app = typer.Typer(
|
|
17
|
-
help="CI/CD commands for qBraid maintainers.",
|
|
18
|
+
help="CI/CD commands for qBraid maintainers.",
|
|
19
|
+
pretty_exceptions_show_locals=False,
|
|
18
20
|
)
|
|
19
|
-
admin_app.add_typer(buildlogs_app, name="buildlogs")
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
@admin_app.command(name="headers")
|
|
@@ -10,19 +10,14 @@ import shutil
|
|
|
10
10
|
import subprocess
|
|
11
11
|
import sys
|
|
12
12
|
from pathlib import Path
|
|
13
|
-
from typing import
|
|
13
|
+
from typing import Any, Dict, Optional, Tuple
|
|
14
14
|
|
|
15
15
|
import typer
|
|
16
16
|
from rich.console import Console
|
|
17
17
|
|
|
18
|
-
from qbraid_cli.envs.
|
|
19
|
-
from qbraid_cli.envs.data_handling import get_envs_data as installed_envs_data
|
|
20
|
-
from qbraid_cli.envs.data_handling import validate_env_name
|
|
18
|
+
from qbraid_cli.envs.data_handling import installed_envs_data, request_delete_env, validate_env_name
|
|
21
19
|
from qbraid_cli.handlers import QbraidException, run_progress_task
|
|
22
20
|
|
|
23
|
-
if TYPE_CHECKING:
|
|
24
|
-
from qbraid_core.services.environments.client import EnvironmentManagerClient as EMC
|
|
25
|
-
|
|
26
21
|
envs_app = typer.Typer(help="Manage qBraid environments.")
|
|
27
22
|
|
|
28
23
|
|
|
@@ -39,14 +34,25 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
39
34
|
),
|
|
40
35
|
) -> None:
|
|
41
36
|
"""Create a new qBraid environment."""
|
|
42
|
-
|
|
37
|
+
from .create import create_qbraid_env_assets, create_venv
|
|
38
|
+
|
|
39
|
+
def request_new_env(req_body: Dict[str, str]) -> Dict[str, Any]:
|
|
40
|
+
"""Send request to create new environment and return the slug."""
|
|
41
|
+
from qbraid_core import QbraidSession, RequestsApiError
|
|
42
|
+
|
|
43
|
+
session = QbraidSession()
|
|
44
|
+
|
|
45
|
+
try:
|
|
46
|
+
env_data = session.post("/environments/create", json=req_body).json()
|
|
47
|
+
except RequestsApiError as err:
|
|
48
|
+
raise QbraidException("Create environment request failed") from err
|
|
43
49
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
50
|
+
if env_data is None or len(env_data) == 0 or env_data.get("slug") is None:
|
|
51
|
+
raise QbraidException(
|
|
52
|
+
"Create environment request responsed with invalid environment data"
|
|
53
|
+
)
|
|
47
54
|
|
|
48
|
-
|
|
49
|
-
return client.create_environment(*args, **kwargs), client
|
|
55
|
+
return env_data
|
|
50
56
|
|
|
51
57
|
def gather_local_data() -> Tuple[Path, str]:
|
|
52
58
|
"""Gather environment data and return the slug."""
|
|
@@ -65,10 +71,20 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
65
71
|
|
|
66
72
|
return env_path, python_version
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
74
|
+
req_body = {
|
|
75
|
+
"name": name,
|
|
76
|
+
"description": description or "",
|
|
77
|
+
"tags": "", # comma separated list of tags
|
|
78
|
+
"code": "", # newline separated list of packages
|
|
79
|
+
"visibility": "private",
|
|
80
|
+
"kernelName": "",
|
|
81
|
+
"prompt": "",
|
|
82
|
+
"origin": "CLI",
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
environment = run_progress_task(
|
|
86
|
+
request_new_env,
|
|
87
|
+
req_body,
|
|
72
88
|
description="Validating request...",
|
|
73
89
|
error_message="Failed to create qBraid environment",
|
|
74
90
|
)
|
|
@@ -78,6 +94,7 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
78
94
|
description="Solving environment...",
|
|
79
95
|
error_message="Failed to create qBraid environment",
|
|
80
96
|
)
|
|
97
|
+
|
|
81
98
|
slug = environment.get("slug")
|
|
82
99
|
display_name = environment.get("displayName")
|
|
83
100
|
prompt = environment.get("prompt")
|
|
@@ -103,7 +120,7 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
103
120
|
user_confirmation = auto_confirm or typer.confirm("Proceed", default=True)
|
|
104
121
|
typer.echo("")
|
|
105
122
|
if not user_confirmation:
|
|
106
|
-
|
|
123
|
+
request_delete_env(slug)
|
|
107
124
|
typer.echo("qBraidSystemExit: Exiting.")
|
|
108
125
|
raise typer.Exit()
|
|
109
126
|
|
|
@@ -148,13 +165,6 @@ def envs_remove(
|
|
|
148
165
|
) -> None:
|
|
149
166
|
"""Delete a qBraid environment."""
|
|
150
167
|
|
|
151
|
-
def delete_environment(slug: str) -> None:
|
|
152
|
-
"""Delete a qBraid environment."""
|
|
153
|
-
from qbraid_core.services.environments.client import EnvironmentManagerClient
|
|
154
|
-
|
|
155
|
-
emc = EnvironmentManagerClient()
|
|
156
|
-
emc.delete_environment(slug)
|
|
157
|
-
|
|
158
168
|
def gather_local_data(env_name: str) -> Tuple[Path, str]:
|
|
159
169
|
"""Get environment path and slug from name (alias)."""
|
|
160
170
|
installed, aliases = installed_envs_data()
|
|
@@ -180,7 +190,7 @@ def envs_remove(
|
|
|
180
190
|
if auto_confirm or typer.confirm(confirmation_message, abort=True):
|
|
181
191
|
typer.echo("")
|
|
182
192
|
run_progress_task(
|
|
183
|
-
|
|
193
|
+
request_delete_env,
|
|
184
194
|
slug,
|
|
185
195
|
description="Deleting remote environment data...",
|
|
186
196
|
error_message="Failed to delete qBraid environment",
|