qbraid-cli 0.8.1a0__tar.gz → 0.8.2__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.1a0 → qbraid_cli-0.8.2}/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/workflows/docs.yml +1 -1
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/workflows/main.yml +15 -3
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.readthedocs.yml +2 -1
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/CONTRIBUTING.md +15 -17
- qbraid_cli-0.8.2/LICENSE +41 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/MANIFEST.IN +2 -1
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/PKG-INFO +14 -22
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/README.md +9 -10
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/index.rst +2 -1
- qbraid_cli-0.8.2/docs/requirements.txt +7 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/pyproject.toml +26 -4
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/_version.py +2 -2
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/admin/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/admin/app.py +3 -4
- qbraid_cli-0.8.2/qbraid_cli/admin/buildlogs.py +114 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/configure/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/credits/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/devices/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/envs/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/envs/app.py +26 -36
- qbraid_cli-0.8.2/qbraid_cli/envs/create.py +61 -0
- qbraid_cli-0.8.2/qbraid_cli/envs/data_handling.py +46 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/jobs/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/jobs/toggle_braket.py +4 -7
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/kernels/__init__.py +2 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/kernels/app.py +3 -1
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/main.py +2 -0
- qbraid_cli-0.8.2/qbraid_cli/pip/__init__.py +11 -0
- qbraid_cli-0.8.2/qbraid_cli/pip/app.py +50 -0
- qbraid_cli-0.8.2/qbraid_cli/pip/hooks.py +73 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli.egg-info/PKG-INFO +14 -22
- qbraid_cli-0.8.2/qbraid_cli.egg-info/SOURCES.txt +125 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli.egg-info/requires.txt +3 -12
- qbraid_cli-0.8.2/ruff.toml +62 -0
- {qbraid_cli-0.8.1a0/tests/test_credits → qbraid_cli-0.8.2/tests/credits}/test_credits_value.py +13 -11
- qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_create_qbraid_env_assets.py → qbraid_cli-0.8.2/tests/envs/test_envs_create_qbraid_env_assets.py +0 -3
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_validate_env_name.py → qbraid_cli-0.8.2/tests/envs/test_envs_create_validate_env_name.py +38 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_app → qbraid_cli-0.8.2/tests/envs}/test_envs_remove.py +6 -3
- qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_get_package_data.py → qbraid_cli-0.8.2/tests/jobs/test_jobs_toggle_braket_get_data.py +17 -17
- qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_get_state.py → qbraid_cli-0.8.2/tests/jobs/test_jobs_validate_get_state.py +33 -1
- qbraid_cli-0.8.2/tools/split_md.py +179 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/tools/split_rst.py +3 -0
- qbraid_cli-0.8.2/tools/stamp_pre_release.py +18 -0
- qbraid_cli-0.8.1a0/qbraid_cli/envs/create.py +0 -128
- qbraid_cli-0.8.1a0/qbraid_cli/envs/data_handling.py +0 -140
- qbraid_cli-0.8.1a0/qbraid_cli.egg-info/SOURCES.txt +0 -129
- qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_replace_str.py +0 -25
- qbraid_cli-0.8.1a0/tests/test_envs/test_create/test_update_state_json.py +0 -61
- 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 +0 -87
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_is_valid_env_name.py +0 -43
- qbraid_cli-0.8.1a0/tests/test_envs/test_data_handling/test_request_delete_env.py +0 -31
- 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.1a0/tests/test_jobs/test_validation/test_run_progress_get_state.py +0 -43
- qbraid_cli-0.8.1a0/tests/test_kernels/__init__.py +0 -0
- qbraid_cli-0.8.1a0/tools/stamp_pre_release.py +0 -68
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.env.example +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/workflows/format.yml +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/workflows/pre-release.yml +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.github/workflows/publish.yml +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/.gitignore +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/Makefile +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/Makefile +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/api-key.png +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/cards/jupyter.png +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/cards/python.png +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/cards/terminal.png +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/favicon.ico +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/logo.png +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/style/custom.css +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/_static/style/s4defs-roles.css +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/configure.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/credits.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/devices-list.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/devices.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/envs-activate.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/envs-list.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/envs-uninstall.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/envs.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/jobs-add.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/jobs-disable.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/jobs-enable.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/jobs-list.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/jobs.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/kernels.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/cli/qbraid.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/conf.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/guide/overview.rst +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/docs/make.bat +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/configure/actions.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/credits/app.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli/jobs/validation.py +0 -0
- /qbraid_cli-0.8.1a0/tests/__init__.py → /qbraid_cli-0.8.2/qbraid_cli/py.typed +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/setup.cfg +0 -0
- {qbraid_cli-0.8.1a0/tests/test_configure → qbraid_cli-0.8.2/tests}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_credits → qbraid_cli-0.8.2/tests/configure}/__init__.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_configure/test_prompt_for_config.py → /qbraid_cli-0.8.2/tests/configure/test_configure_prompt_for_config.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_configure → qbraid_cli-0.8.2/tests/configure}/test_configure_set.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_configure/test_validate_input.py → /qbraid_cli-0.8.2/tests/configure/test_configure_validate_input.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_devices → qbraid_cli-0.8.2/tests/credits}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs → qbraid_cli-0.8.2/tests/devices}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_devices → qbraid_cli-0.8.2/tests/devices}/test_devices_list.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_devices/test_validations.py → /qbraid_cli-0.8.2/tests/devices/test_devices_validations.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_activate → qbraid_cli-0.8.2/tests/envs}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_app → qbraid_cli-0.8.2/tests/envs}/test_envs_activate.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_find_shell_rc.py → /qbraid_cli-0.8.2/tests/envs/test_envs_activate_find_shell_rc.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_print_activate_command.py → /qbraid_cli-0.8.2/tests/envs/test_envs_activate_print_command.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_envs/test_activate/test_activate_pyenv.py → /qbraid_cli-0.8.2/tests/envs/test_envs_activate_pyenv.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_app → qbraid_cli-0.8.2/tests/envs}/test_envs_create.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_app → qbraid_cli-0.8.2/tests/envs}/test_envs_list.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_app → qbraid_cli-0.8.2/tests/jobs}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_jobs/test_app → qbraid_cli-0.8.2/tests/jobs}/test_jobs_disable.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_jobs/test_app → qbraid_cli-0.8.2/tests/jobs}/test_jobs_enable.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_jobs/test_app → qbraid_cli-0.8.2/tests/jobs}/test_jobs_list.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_jobs/test_app → qbraid_cli-0.8.2/tests/jobs}/test_jobs_state.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_confirm_updates.py → /qbraid_cli-0.8.2/tests/jobs/test_jobs_toggle_braket_confirm.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_disable_braket.py → /qbraid_cli-0.8.2/tests/jobs/test_jobs_toggle_braket_disable.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_jobs/test_toggle_braket/test_enable_braket.py → /qbraid_cli-0.8.2/tests/jobs/test_jobs_toggle_braket_enable.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_handle_jobs_state.py → /qbraid_cli-0.8.2/tests/jobs/test_jobs_validate_handle_state.py +0 -0
- /qbraid_cli-0.8.1a0/tests/test_jobs/test_validation/test_validate_library.py → /qbraid_cli-0.8.2/tests/jobs/test_jobs_validate_library.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_envs/test_create → qbraid_cli-0.8.2/tests/kernels}/__init__.py +0 -0
- {qbraid_cli-0.8.1a0/tests/test_kernels → qbraid_cli-0.8.2/tests/kernels}/test_kernels_list.py +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/tools/create_dev_build.sh +0 -0
- {qbraid_cli-0.8.1a0 → qbraid_cli-0.8.2}/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
|
|
24
25
|
- name: Build & install package
|
|
25
26
|
run: |
|
|
26
27
|
python -m build .
|
|
27
28
|
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,9 +64,21 @@ jobs:
|
|
|
64
64
|
shell: pwsh
|
|
65
65
|
- name: Install testing dependencies
|
|
66
66
|
run: |
|
|
67
|
-
pip install pytest
|
|
67
|
+
pip install pytest coverage
|
|
68
68
|
- name: Run tests with pytest
|
|
69
69
|
run: |
|
|
70
|
-
pytest
|
|
70
|
+
coverage run -m pytest -x tests
|
|
71
|
+
coverage combine
|
|
72
|
+
coverage report
|
|
73
|
+
coverage html
|
|
74
|
+
coverage xml
|
|
71
75
|
env:
|
|
72
|
-
QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
|
|
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
|
|
@@ -10,9 +10,10 @@ 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
|
|
13
15
|
- python -m build .
|
|
14
16
|
- python -m pip install dist/*.whl
|
|
15
|
-
- tools/install_wheel_extras.sh dist --extra docs
|
|
16
17
|
- mkdir -p docs/tree
|
|
17
18
|
- rm -f docs/tree/*.rst
|
|
18
19
|
- 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
|
+
```bash
|
|
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
|
+
```bash
|
|
44
44
|
pip install pytest
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
And run tests:
|
|
48
48
|
|
|
49
|
-
```
|
|
49
|
+
```bash
|
|
50
50
|
pytest tests
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
You can also run tests with make:
|
|
54
54
|
|
|
55
|
-
```
|
|
55
|
+
```bash
|
|
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
|
+
```bash
|
|
64
64
|
pip install -r docs/requirements.txt
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
And then run
|
|
68
68
|
|
|
69
|
-
```
|
|
69
|
+
```bash
|
|
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
|
+
```bash
|
|
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,31 +82,29 @@ python tools/split_rst.py docs/tree/qbraid.rst
|
|
|
82
82
|
|
|
83
83
|
And then, build the docs:
|
|
84
84
|
|
|
85
|
-
```
|
|
85
|
+
```bash
|
|
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
|
+
```bash
|
|
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
|
|
98
|
-
and [black](https://github.com/psf/black). Specific configurations for these tools should be added to [`pyproject.toml`](pyproject.toml).
|
|
97
|
+
For code style, our project uses [ruff](https://github.com/astral-sh/ruff). Specific configurations for these tools should be added to [`pyproject.toml`](pyproject.toml).
|
|
99
98
|
|
|
100
99
|
Install linters:
|
|
101
100
|
|
|
102
|
-
```
|
|
103
|
-
pip install
|
|
101
|
+
```bash
|
|
102
|
+
pip install ruff qbraid-cli
|
|
104
103
|
```
|
|
105
104
|
|
|
106
105
|
Run the following and make changes as needed to satisfy format checks:
|
|
107
106
|
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
pylint qbraid_cli tests tools
|
|
107
|
+
```bash
|
|
108
|
+
ruff format qbraid_cli tests tools
|
|
109
|
+
qbraid admin headers qbraid_cli tests tools --type=default --fix
|
|
112
110
|
```
|
qbraid_cli-0.8.2/LICENSE
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
qBraid Closed-Source Software License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024, qBraid Development Team
|
|
4
|
+
|
|
5
|
+
All rights reserved.
|
|
6
|
+
|
|
7
|
+
This license agreement ("License") is between the qBraid Development Team ("Author") and you, the Licensee. By using or distributing the qBraid ("Software"), you agree to the following terms:
|
|
8
|
+
|
|
9
|
+
1. Grant of License.
|
|
10
|
+
|
|
11
|
+
Subject to the terms of this License, the Author grants you a non-exclusive, non-transferable license to use the Software for personal, academic, and educational purposes. Use of the Software for commercial purposes is strictly prohibited unless express permission is granted by the Author.
|
|
12
|
+
|
|
13
|
+
2. Distribution.
|
|
14
|
+
|
|
15
|
+
You may distribute the Software to others, provided that any such distribution is made under the same terms of this License. Modifications to the Software may not be distributed.
|
|
16
|
+
|
|
17
|
+
3. Modification.
|
|
18
|
+
|
|
19
|
+
You are permitted to modify the Software for personal use. You may contribute improvements or bug fixes back to the Author or the community, but you may not distribute the modifications.
|
|
20
|
+
|
|
21
|
+
4. Commercial Use.
|
|
22
|
+
|
|
23
|
+
The Software may not be used for commercial purposes without explicit, prior written permission from the Author. Permissions for commercial use will be considered on a case-by-case basis.
|
|
24
|
+
|
|
25
|
+
5. Attribution
|
|
26
|
+
|
|
27
|
+
If the Software is used in a non-private setting, including but not limited to academic work, commercial settings, or published literature, attribution must be given to the "qBraid Jupyter Environment Manager authored by the qBraid Development Team."
|
|
28
|
+
|
|
29
|
+
6. Disclaimer of Warranty.
|
|
30
|
+
|
|
31
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
|
|
32
|
+
|
|
33
|
+
7. Limitation of Liability.
|
|
34
|
+
|
|
35
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
36
|
+
|
|
37
|
+
8. Termination.
|
|
38
|
+
|
|
39
|
+
This License is effective until terminated. Your rights under this License will terminate automatically without notice from the Author if you fail to comply with any term(s) of this License.
|
|
40
|
+
|
|
41
|
+
By using the Software, you agree to be bound by the terms of this License. Redistribution of the Software or use of the Software other than as specifically authorized under this License is prohibited and may result in severe civil and criminal penalties.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.2
|
|
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,26 +26,19 @@ 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
|
|
29
30
|
Requires-Dist: typer>=0.12.1
|
|
30
31
|
Requires-Dist: rich>=10.11.0
|
|
31
32
|
Requires-Dist: jupyter_client<9.0.0,>=7.0.0
|
|
32
33
|
Requires-Dist: ipykernel
|
|
33
|
-
Requires-Dist: qbraid-core>=0.1.
|
|
34
|
+
Requires-Dist: qbraid-core>=0.1.13
|
|
34
35
|
Provides-Extra: jobs
|
|
35
36
|
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
36
37
|
Provides-Extra: dev
|
|
37
|
-
Requires-Dist:
|
|
38
|
+
Requires-Dist: ruff; extra == "dev"
|
|
38
39
|
Requires-Dist: isort; extra == "dev"
|
|
39
|
-
Requires-Dist:
|
|
40
|
+
Requires-Dist: black; extra == "dev"
|
|
40
41
|
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"
|
|
49
42
|
|
|
50
43
|
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
51
44
|
|
|
@@ -54,7 +47,6 @@ Requires-Dist: typer; extra == "docs"
|
|
|
54
47
|
[](https://pypi.org/project/qbraid-cli/)
|
|
55
48
|
[](https://pepy.tech/project/qbraid-cli)
|
|
56
49
|
[](https://github.com/qBraid/qBraid-Lab/issues)
|
|
57
|
-
[](https://discord.gg/KugF6Cnncm)
|
|
58
50
|
|
|
59
51
|
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
60
52
|
|
|
@@ -71,7 +63,7 @@ For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/p
|
|
|
71
63
|
|
|
72
64
|
You can also install the qBraid-CLI from PyPI with:
|
|
73
65
|
|
|
74
|
-
```
|
|
66
|
+
```bash
|
|
75
67
|
pip install qbraid-cli
|
|
76
68
|
```
|
|
77
69
|
|
|
@@ -85,13 +77,13 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
85
77
|
your [account page](https://account.qbraid.com/):
|
|
86
78
|
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
87
79
|
|
|
88
|
-
```
|
|
80
|
+
```bash
|
|
89
81
|
$ qbraid configure
|
|
90
82
|
```
|
|
91
83
|
|
|
92
84
|
## Basic Commands
|
|
93
85
|
|
|
94
|
-
```
|
|
86
|
+
```bash
|
|
95
87
|
$ qbraid
|
|
96
88
|
----------------------------------
|
|
97
89
|
* Welcome to the qBraid CLI! *
|
|
@@ -114,19 +106,19 @@ Reference Docs: https://docs.qbraid.com/projects/cli/en/stable/guide/overview.ht
|
|
|
114
106
|
|
|
115
107
|
A qBraid CLI command has the following structure:
|
|
116
108
|
|
|
117
|
-
```
|
|
109
|
+
```bash
|
|
118
110
|
$ qbraid <command> <subcommand> [options and parameters]
|
|
119
111
|
```
|
|
120
112
|
|
|
121
113
|
For example, to list installed environments, the command would be:
|
|
122
114
|
|
|
123
|
-
```
|
|
115
|
+
```bash
|
|
124
116
|
$ qbraid envs list
|
|
125
117
|
```
|
|
126
118
|
|
|
127
119
|
To view help documentation, use one of the following:
|
|
128
120
|
|
|
129
|
-
```
|
|
121
|
+
```bash
|
|
130
122
|
$ qbraid --help
|
|
131
123
|
$ qbraid <command> --help
|
|
132
124
|
$ qbraid <command> <subcommand> --help
|
|
@@ -134,7 +126,7 @@ $ qbraid <command> <subcommand> --help
|
|
|
134
126
|
|
|
135
127
|
For example:
|
|
136
128
|
|
|
137
|
-
```
|
|
129
|
+
```bash
|
|
138
130
|
$ qbraid --help
|
|
139
131
|
|
|
140
132
|
Usage: qbraid [OPTIONS] COMMAND [ARGS]...
|
|
@@ -158,7 +150,7 @@ Commands
|
|
|
158
150
|
|
|
159
151
|
To get the version of the qBraid CLI:
|
|
160
152
|
|
|
161
|
-
```
|
|
153
|
+
```bash
|
|
162
154
|
$ qbraid --version
|
|
163
155
|
```
|
|
164
156
|
|
|
@@ -166,7 +158,7 @@ $ qbraid --version
|
|
|
166
158
|
|
|
167
159
|
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:
|
|
168
160
|
|
|
169
|
-
```
|
|
161
|
+
```bash
|
|
170
162
|
$ qbraid configure magic
|
|
171
163
|
```
|
|
172
164
|
|
|
@@ -5,7 +5,6 @@
|
|
|
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)
|
|
9
8
|
|
|
10
9
|
Command Line Interface for interacting with all parts of the qBraid platform.
|
|
11
10
|
|
|
@@ -22,7 +21,7 @@ For help, see qBraid Lab User Guide: [Getting Started](https://docs.qbraid.com/p
|
|
|
22
21
|
|
|
23
22
|
You can also install the qBraid-CLI from PyPI with:
|
|
24
23
|
|
|
25
|
-
```
|
|
24
|
+
```bash
|
|
26
25
|
pip install qbraid-cli
|
|
27
26
|
```
|
|
28
27
|
|
|
@@ -36,13 +35,13 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
36
35
|
your [account page](https://account.qbraid.com/):
|
|
37
36
|
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
38
37
|
|
|
39
|
-
```
|
|
38
|
+
```bash
|
|
40
39
|
$ qbraid configure
|
|
41
40
|
```
|
|
42
41
|
|
|
43
42
|
## Basic Commands
|
|
44
43
|
|
|
45
|
-
```
|
|
44
|
+
```bash
|
|
46
45
|
$ qbraid
|
|
47
46
|
----------------------------------
|
|
48
47
|
* Welcome to the qBraid CLI! *
|
|
@@ -65,19 +64,19 @@ Reference Docs: https://docs.qbraid.com/projects/cli/en/stable/guide/overview.ht
|
|
|
65
64
|
|
|
66
65
|
A qBraid CLI command has the following structure:
|
|
67
66
|
|
|
68
|
-
```
|
|
67
|
+
```bash
|
|
69
68
|
$ qbraid <command> <subcommand> [options and parameters]
|
|
70
69
|
```
|
|
71
70
|
|
|
72
71
|
For example, to list installed environments, the command would be:
|
|
73
72
|
|
|
74
|
-
```
|
|
73
|
+
```bash
|
|
75
74
|
$ qbraid envs list
|
|
76
75
|
```
|
|
77
76
|
|
|
78
77
|
To view help documentation, use one of the following:
|
|
79
78
|
|
|
80
|
-
```
|
|
79
|
+
```bash
|
|
81
80
|
$ qbraid --help
|
|
82
81
|
$ qbraid <command> --help
|
|
83
82
|
$ qbraid <command> <subcommand> --help
|
|
@@ -85,7 +84,7 @@ $ qbraid <command> <subcommand> --help
|
|
|
85
84
|
|
|
86
85
|
For example:
|
|
87
86
|
|
|
88
|
-
```
|
|
87
|
+
```bash
|
|
89
88
|
$ qbraid --help
|
|
90
89
|
|
|
91
90
|
Usage: qbraid [OPTIONS] COMMAND [ARGS]...
|
|
@@ -109,7 +108,7 @@ Commands
|
|
|
109
108
|
|
|
110
109
|
To get the version of the qBraid CLI:
|
|
111
110
|
|
|
112
|
-
```
|
|
111
|
+
```bash
|
|
113
112
|
$ qbraid --version
|
|
114
113
|
```
|
|
115
114
|
|
|
@@ -117,7 +116,7 @@ $ qbraid --version
|
|
|
117
116
|
|
|
118
117
|
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:
|
|
119
118
|
|
|
120
|
-
```
|
|
119
|
+
```bash
|
|
121
120
|
$ qbraid configure magic
|
|
122
121
|
```
|
|
123
122
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qbraid-cli"
|
|
7
|
-
version = "0.8.
|
|
7
|
+
version = "0.8.2"
|
|
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.13",
|
|
35
35
|
]
|
|
36
36
|
requires-python = ">= 3.9"
|
|
37
37
|
|
|
@@ -44,8 +44,7 @@ Discord = "https://discord.gg/KugF6Cnncm"
|
|
|
44
44
|
|
|
45
45
|
[project.optional-dependencies]
|
|
46
46
|
jobs = ["amazon-braket-sdk>=1.48.1"]
|
|
47
|
-
dev = ["
|
|
48
|
-
docs = ["sphinx>=7.2.6,<7.4.0", "sphinx-rtd-theme>=1.3,<2.1", "docutils<0.22", "toml", "build", "m2r", "typer"]
|
|
47
|
+
dev = ["ruff", "isort", "black", "pytest"]
|
|
49
48
|
|
|
50
49
|
[project.scripts]
|
|
51
50
|
qbraid = "qbraid_cli.main:app"
|
|
@@ -77,3 +76,26 @@ ignore-paths = [
|
|
|
77
76
|
[tool.pytest.ini_options]
|
|
78
77
|
addopts = "-ra"
|
|
79
78
|
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+ga972fd5'
|
|
16
|
+
__version_tuple__ = version_tuple = (0, 1, 'dev1', 'ga972fd5')
|
|
@@ -3,21 +3,20 @@
|
|
|
3
3
|
|
|
4
4
|
"""
|
|
5
5
|
Module defining commands in the 'qbraid admin' namespace.
|
|
6
|
-
|
|
7
6
|
"""
|
|
8
7
|
|
|
9
8
|
from typing import List
|
|
10
9
|
|
|
11
10
|
import typer
|
|
12
11
|
|
|
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
|
|
17
16
|
admin_app = typer.Typer(
|
|
18
|
-
help="CI/CD commands for qBraid maintainers.",
|
|
19
|
-
pretty_exceptions_show_locals=False,
|
|
17
|
+
help="CI/CD commands for qBraid maintainers.", pretty_exceptions_show_locals=False
|
|
20
18
|
)
|
|
19
|
+
admin_app.add_typer(buildlogs_app, name="buildlogs")
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
@admin_app.command(name="headers")
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Copyright (c) 2024, qBraid Development Team
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Module defining commands in the 'qbraid admin buildlogs' namespace.
|
|
6
|
+
|
|
7
|
+
This module uses the Typer library to create CLI commands for managing Docker builds and logs
|
|
8
|
+
in an administrative context.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import json
|
|
12
|
+
|
|
13
|
+
import typer
|
|
14
|
+
from qbraid_core.exceptions import RequestsApiError
|
|
15
|
+
from qbraid_core.services.admin.client import AdminClient
|
|
16
|
+
from rich.console import Console
|
|
17
|
+
|
|
18
|
+
from qbraid_cli.handlers import handle_error
|
|
19
|
+
|
|
20
|
+
buildlogs_app = typer.Typer(
|
|
21
|
+
help="Manage qBraid containerized services logs.", pretty_exceptions_show_locals=False
|
|
22
|
+
)
|
|
23
|
+
console = Console()
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@buildlogs_app.command(name="get")
|
|
27
|
+
def get_docker_build_logs(
|
|
28
|
+
build_id: str = typer.Option(None, "--build_id", "-b", help="Name of the build ID")
|
|
29
|
+
) -> None:
|
|
30
|
+
"""
|
|
31
|
+
Fetches and displays Docker build logs for a specified build ID.
|
|
32
|
+
|
|
33
|
+
Args:
|
|
34
|
+
build_id (str, optional): The unique identifier for the Docker build.
|
|
35
|
+
|
|
36
|
+
This function queries the administrative backend to retrieve and display build logs.
|
|
37
|
+
If a build ID is provided, it will retrieve and display logs specific to that build ID.
|
|
38
|
+
If build ID not provided, fetches all logs.
|
|
39
|
+
"""
|
|
40
|
+
client = AdminClient()
|
|
41
|
+
|
|
42
|
+
build_log = client.get_docker_build_logs(build_id)
|
|
43
|
+
if build_id and "buildLogs" in build_log and build_log["buildLogs"]:
|
|
44
|
+
log_entry = build_log["buildLogs"][0]
|
|
45
|
+
console.print(log_entry)
|
|
46
|
+
else:
|
|
47
|
+
console.print(build_log)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
@buildlogs_app.command(name="post")
|
|
51
|
+
def post_docker_build_log(
|
|
52
|
+
data: str = typer.Option(..., "--data", "-d", help="Data to post to Docker logs")
|
|
53
|
+
) -> None:
|
|
54
|
+
"""
|
|
55
|
+
Posts a new Docker build log entry.
|
|
56
|
+
|
|
57
|
+
Args:
|
|
58
|
+
data (str): JSON string containing the data to be logged.
|
|
59
|
+
|
|
60
|
+
This command converts a JSON string into a dictionary and sends it to the backend service
|
|
61
|
+
to create a new Docker build log.
|
|
62
|
+
"""
|
|
63
|
+
client = AdminClient()
|
|
64
|
+
|
|
65
|
+
try:
|
|
66
|
+
data_dict = json.loads(data)
|
|
67
|
+
console.print(client.post_docker_build_logs(data_dict))
|
|
68
|
+
except RequestsApiError:
|
|
69
|
+
handle_error(message="Couldn't post a build_log.")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@buildlogs_app.command(name="put")
|
|
73
|
+
def put_docker_build_log(
|
|
74
|
+
build_id: str = typer.Option(..., "--build_id", "-b", help="Name of the build ID"),
|
|
75
|
+
data: str = typer.Option(..., "--data", "-d", help="Data to post to Docker logs"),
|
|
76
|
+
) -> None:
|
|
77
|
+
"""
|
|
78
|
+
Updates an existing Docker build log entry by a given build ID.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
build_id (str): The unique identifier of the Docker build to update.
|
|
82
|
+
data (str): JSON string containing the updated data for the log.
|
|
83
|
+
|
|
84
|
+
This command updates a Docker build log entry, identified by the provided build ID,
|
|
85
|
+
with the new data provided in JSON format.
|
|
86
|
+
"""
|
|
87
|
+
client = AdminClient()
|
|
88
|
+
|
|
89
|
+
try:
|
|
90
|
+
data_dict = json.loads(data)
|
|
91
|
+
console.print(client.put_docker_build_logs(build_id, data_dict))
|
|
92
|
+
except RequestsApiError:
|
|
93
|
+
handle_error(message="Couldn't post a build_log.")
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
@buildlogs_app.command(name="delete")
|
|
97
|
+
def delete_docker_build_log(
|
|
98
|
+
build_id: str = typer.Option(..., "--build_id", "-b", help="ID of the build log to delete")
|
|
99
|
+
) -> None:
|
|
100
|
+
"""
|
|
101
|
+
Deletes a Docker build log entry by a specified build ID.
|
|
102
|
+
|
|
103
|
+
Args:
|
|
104
|
+
build_id (str): The unique identifier of the Docker build log to delete.
|
|
105
|
+
|
|
106
|
+
This command sends a request to delete a Docker build log identified by the provided build ID.
|
|
107
|
+
"""
|
|
108
|
+
client = AdminClient()
|
|
109
|
+
|
|
110
|
+
console.print(client.delete_docker_build_logs(build_id))
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
if __name__ == "__main__":
|
|
114
|
+
buildlogs_app()
|