qbraid-cli 0.10.2__tar.gz → 0.10.4__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.10.2 → qbraid_cli-0.10.4}/.github/workflows/ci-pr-target.yml +1 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/main.yml +1 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/LICENSE +6 -4
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/PKG-INFO +5 -4
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/README.md +1 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/requirements.txt +1 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/pyproject.toml +2 -2
- qbraid_cli-0.10.4/qbraid_cli/_version.py +21 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/configure/actions.py +11 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/files/app.py +4 -4
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/PKG-INFO +5 -4
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/SOURCES.txt +1 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/requires.txt +1 -1
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/configure/test_configure_commands.py +2 -0
- qbraid_cli-0.10.4/tests/configure/test_configure_default.py +54 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/configure/test_configure_prompt_for_config.py +24 -7
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/files/test_files_commands.py +4 -4
- qbraid_cli-0.10.2/qbraid_cli/_version.py +0 -16
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.env.example +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/dependabot.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/bump-version.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/docs-pr.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/docs.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/format.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/pre-release.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/publish.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.github/workflows/tag-on-merge.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.gitignore +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/.readthedocs.yml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/CONTRIBUTING.md +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/MANIFEST.IN +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/Makefile +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/Makefile +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/_static/favicon.ico +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/_static/logo.png +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/_static/style/custom.css +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/_static/style/s4defs-roles.css +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/conf.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/index.rst +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/docs/make.bat +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/account/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/account/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/admin/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/admin/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/admin/headers.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/admin/validation.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/chat/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/chat/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/configure/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/configure/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/devices/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/devices/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/devices/validation.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/envs/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/envs/activate.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/envs/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/envs/create.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/envs/data_handling.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/exceptions.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/files/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/handlers.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/jobs/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/jobs/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/jobs/toggle_braket.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/jobs/validation.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/kernels/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/kernels/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/main.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/pip/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/pip/app.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/pip/hooks.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli/py.typed +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/dependency_links.txt +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/entry_points.txt +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/qbraid_cli.egg-info/top_level.txt +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/setup.cfg +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/account/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/account/test_account_credits.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/admin/test_headers.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/configure/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/configure/test_configure_set.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/configure/test_configure_validate_input.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/conftest.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/devices/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/devices/test_devices_list.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/devices/test_devices_validations.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_activate.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_activate_find_shell_rc.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_activate_print_command.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_activate_pyenv.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_create_from_yaml.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_list.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/envs/test_envs_remove.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/files/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_disable.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_enable.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_list.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_state.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_toggle_braket_confirm.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_toggle_braket_disable.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_toggle_braket_enable.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_toggle_braket_get_data.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_validate_get_state.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_validate_handle_state.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/jobs/test_jobs_validate_library.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/kernels/__init__.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/kernels/test_kernels_list.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/resources/envs/correct.yaml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/resources/envs/icon.png +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tests/resources/envs/incorrect.yaml +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/bump_version.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/create_dev_build.sh +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/install_wheel_extras.sh +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/split_md.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/split_rst.py +0 -0
- {qbraid_cli-0.10.2 → qbraid_cli-0.10.4}/tools/stamp_pre_release.py +0 -0
|
@@ -73,7 +73,7 @@ jobs:
|
|
|
73
73
|
QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
|
|
74
74
|
- name: Upload coverage to Codecov
|
|
75
75
|
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
|
|
76
|
-
uses: codecov/codecov-action@v5.
|
|
76
|
+
uses: codecov/codecov-action@v5.4.2
|
|
77
77
|
with:
|
|
78
78
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
79
79
|
fail_ci_if_error: false
|
|
@@ -76,7 +76,7 @@ jobs:
|
|
|
76
76
|
QBRAID_API_KEY: ${{ secrets.QBRAID_API_KEY }}
|
|
77
77
|
- name: Upload coverage to Codecov
|
|
78
78
|
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
|
|
79
|
-
uses: codecov/codecov-action@v5.
|
|
79
|
+
uses: codecov/codecov-action@v5.4.2
|
|
80
80
|
with:
|
|
81
81
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
82
82
|
fail_ci_if_error: false
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
qBraid
|
|
1
|
+
qBraid Commercial Software License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2025, qBraid Development Team
|
|
4
4
|
|
|
5
5
|
All rights reserved.
|
|
6
6
|
|
|
7
|
-
This license agreement ("License") is between the qBraid Development Team ("Author") and you, the Licensee.
|
|
7
|
+
This license agreement ("License") is between the qBraid Development Team ("Author") and you, the Licensee. This software and associated documentation files (the "Software") may only be used by authorized qBraid customers who have agreed to qBraid's Terms of Service and have a valid subscription or license agreement with qBraid. By using or distributing this Software, you agree to the following terms:
|
|
8
8
|
|
|
9
9
|
1. Grant of License.
|
|
10
10
|
|
|
@@ -24,7 +24,7 @@ This license agreement ("License") is between the qBraid Development Team ("Auth
|
|
|
24
24
|
|
|
25
25
|
5. Attribution
|
|
26
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
|
|
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 CLI authored by the qBraid Development Team."
|
|
28
28
|
|
|
29
29
|
6. Disclaimer of Warranty.
|
|
30
30
|
|
|
@@ -39,3 +39,5 @@ This license agreement ("License") is between the qBraid Development Team ("Auth
|
|
|
39
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
40
|
|
|
41
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.
|
|
42
|
+
|
|
43
|
+
For licensing inquiries, please contact: contact@qbraid.com
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.4
|
|
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
|
|
@@ -30,7 +30,7 @@ License-File: LICENSE
|
|
|
30
30
|
Requires-Dist: typer>=0.12.1
|
|
31
31
|
Requires-Dist: rich>=10.11.0
|
|
32
32
|
Requires-Dist: click
|
|
33
|
-
Requires-Dist: qbraid-core
|
|
33
|
+
Requires-Dist: qbraid-core<0.1.39,>=0.1.35
|
|
34
34
|
Provides-Extra: jobs
|
|
35
35
|
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
36
36
|
Provides-Extra: envs
|
|
@@ -40,6 +40,7 @@ Requires-Dist: isort; extra == "dev"
|
|
|
40
40
|
Requires-Dist: black; extra == "dev"
|
|
41
41
|
Requires-Dist: pytest; extra == "dev"
|
|
42
42
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
43
|
+
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
45
46
|
|
|
@@ -87,7 +88,7 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
87
88
|
[account.qbraid.com](https://account.qbraid.com/)
|
|
88
89
|
2. Copy your API Key token from the left side of
|
|
89
90
|
your [account page](https://account.qbraid.com/):
|
|
90
|
-
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
91
|
+
3. Save your API key from step 2 in local [configuration file](https://docs.qbraid.com/cli/user-guide/config-files) `~/.qbraid/qbraidrc` using:
|
|
91
92
|
|
|
92
93
|
```bash
|
|
93
94
|
$ qbraid configure
|
|
@@ -44,7 +44,7 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
44
44
|
[account.qbraid.com](https://account.qbraid.com/)
|
|
45
45
|
2. Copy your API Key token from the left side of
|
|
46
46
|
your [account page](https://account.qbraid.com/):
|
|
47
|
-
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
47
|
+
3. Save your API key from step 2 in local [configuration file](https://docs.qbraid.com/cli/user-guide/config-files) `~/.qbraid/qbraidrc` using:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
$ qbraid configure
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qbraid-cli"
|
|
7
|
-
version = "0.10.
|
|
7
|
+
version = "0.10.4"
|
|
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
|
"typer>=0.12.1",
|
|
32
32
|
"rich>=10.11.0",
|
|
33
33
|
"click",
|
|
34
|
-
"qbraid-core>=0.1.
|
|
34
|
+
"qbraid-core>=0.1.35,<0.1.39",
|
|
35
35
|
]
|
|
36
36
|
requires-python = ">= 3.9"
|
|
37
37
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# file generated by setuptools-scm
|
|
2
|
+
# don't change, don't track in version control
|
|
3
|
+
|
|
4
|
+
__all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
|
|
5
|
+
|
|
6
|
+
TYPE_CHECKING = False
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from typing import Tuple
|
|
9
|
+
from typing import Union
|
|
10
|
+
|
|
11
|
+
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
12
|
+
else:
|
|
13
|
+
VERSION_TUPLE = object
|
|
14
|
+
|
|
15
|
+
version: str
|
|
16
|
+
__version__: str
|
|
17
|
+
__version_tuple__: VERSION_TUPLE
|
|
18
|
+
version_tuple: VERSION_TUPLE
|
|
19
|
+
|
|
20
|
+
__version__ = version = '0.1.dev1+g1a542ad'
|
|
21
|
+
__version_tuple__ = version_tuple = (0, 1, 'dev1', 'g1a542ad')
|
|
@@ -15,6 +15,8 @@ import typer
|
|
|
15
15
|
from qbraid_core.config import (
|
|
16
16
|
DEFAULT_CONFIG_SECTION,
|
|
17
17
|
DEFAULT_ENDPOINT_URL,
|
|
18
|
+
DEFAULT_ORGANIZATION,
|
|
19
|
+
DEFAULT_WORKSPACE,
|
|
18
20
|
USER_CONFIG_PATH,
|
|
19
21
|
load_config,
|
|
20
22
|
save_config,
|
|
@@ -92,10 +94,18 @@ def default_action(section: str = DEFAULT_CONFIG_SECTION):
|
|
|
92
94
|
if section not in config:
|
|
93
95
|
config[section] = {}
|
|
94
96
|
|
|
95
|
-
default_values = {
|
|
97
|
+
default_values = {
|
|
98
|
+
"url": DEFAULT_ENDPOINT_URL,
|
|
99
|
+
"organization": DEFAULT_ORGANIZATION,
|
|
100
|
+
"workspace": DEFAULT_WORKSPACE,
|
|
101
|
+
}
|
|
96
102
|
|
|
97
103
|
config[section]["url"] = prompt_for_config(config, section, "url", default_values)
|
|
98
104
|
config[section]["api-key"] = prompt_for_config(config, section, "api-key", default_values)
|
|
105
|
+
config[section]["organization"] = prompt_for_config(
|
|
106
|
+
config, section, "organization", default_values
|
|
107
|
+
)
|
|
108
|
+
config[section]["workspace"] = prompt_for_config(config, section, "workspace", default_values)
|
|
99
109
|
|
|
100
110
|
for key in list(config[section]):
|
|
101
111
|
if not config[section][key]:
|
|
@@ -69,9 +69,9 @@ def files_upload(
|
|
|
69
69
|
handle_error("Error", "File too large. Must be less than 10MB for direct upload.")
|
|
70
70
|
|
|
71
71
|
def upload_file() -> dict[str, Any]:
|
|
72
|
-
from qbraid_core.services.
|
|
72
|
+
from qbraid_core.services.storage import FileStorageClient
|
|
73
73
|
|
|
74
|
-
client =
|
|
74
|
+
client = FileStorageClient()
|
|
75
75
|
data = client.upload_file(
|
|
76
76
|
filepath, namespace=namespace, object_path=object_path, overwrite=overwrite
|
|
77
77
|
)
|
|
@@ -119,9 +119,9 @@ def files_download(
|
|
|
119
119
|
"""Download a file from qBraid storage."""
|
|
120
120
|
|
|
121
121
|
def download_file() -> Path:
|
|
122
|
-
from qbraid_core.services.
|
|
122
|
+
from qbraid_core.services.storage import FileStorageClient
|
|
123
123
|
|
|
124
|
-
client =
|
|
124
|
+
client = FileStorageClient()
|
|
125
125
|
file_path = client.download_file(
|
|
126
126
|
object_path, namespace=namespace, save_path=save_path, overwrite=overwrite
|
|
127
127
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.4
|
|
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
|
|
@@ -30,7 +30,7 @@ License-File: LICENSE
|
|
|
30
30
|
Requires-Dist: typer>=0.12.1
|
|
31
31
|
Requires-Dist: rich>=10.11.0
|
|
32
32
|
Requires-Dist: click
|
|
33
|
-
Requires-Dist: qbraid-core
|
|
33
|
+
Requires-Dist: qbraid-core<0.1.39,>=0.1.35
|
|
34
34
|
Provides-Extra: jobs
|
|
35
35
|
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
36
36
|
Provides-Extra: envs
|
|
@@ -40,6 +40,7 @@ Requires-Dist: isort; extra == "dev"
|
|
|
40
40
|
Requires-Dist: black; extra == "dev"
|
|
41
41
|
Requires-Dist: pytest; extra == "dev"
|
|
42
42
|
Requires-Dist: pytest-cov; extra == "dev"
|
|
43
|
+
Dynamic: license-file
|
|
43
44
|
|
|
44
45
|
<img width="full" alt="qbraid_cli" src="https://qbraid-static.s3.amazonaws.com/logos/qbraid-cli-banner.png">
|
|
45
46
|
|
|
@@ -87,7 +88,7 @@ After installation, you must configure your account credentials to use the CLI l
|
|
|
87
88
|
[account.qbraid.com](https://account.qbraid.com/)
|
|
88
89
|
2. Copy your API Key token from the left side of
|
|
89
90
|
your [account page](https://account.qbraid.com/):
|
|
90
|
-
3. Save your API key from step 2 in local configuration file `~/.qbraid/qbraidrc` using:
|
|
91
|
+
3. Save your API key from step 2 in local [configuration file](https://docs.qbraid.com/cli/user-guide/config-files) `~/.qbraid/qbraidrc` using:
|
|
91
92
|
|
|
92
93
|
```bash
|
|
93
94
|
$ qbraid configure
|
|
@@ -78,6 +78,7 @@ tests/account/test_account_credits.py
|
|
|
78
78
|
tests/admin/test_headers.py
|
|
79
79
|
tests/configure/__init__.py
|
|
80
80
|
tests/configure/test_configure_commands.py
|
|
81
|
+
tests/configure/test_configure_default.py
|
|
81
82
|
tests/configure/test_configure_prompt_for_config.py
|
|
82
83
|
tests/configure/test_configure_set.py
|
|
83
84
|
tests/configure/test_configure_validate_input.py
|
|
@@ -41,6 +41,7 @@ def test_configure_list_with_values(capsys):
|
|
|
41
41
|
"api-key": "abcdef123456",
|
|
42
42
|
"refresh-token": "xyz987654321",
|
|
43
43
|
"url": "https://example.com",
|
|
44
|
+
"organization": "test-org",
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
mock_load_config = MagicMock(return_value=mock_config)
|
|
@@ -54,6 +55,7 @@ def test_configure_list_with_values(capsys):
|
|
|
54
55
|
assert "*****321" in captured.out # last 3 chars of refresh-token
|
|
55
56
|
# Check that non-sensitive values are shown in full
|
|
56
57
|
assert "https://example.com" in captured.out
|
|
58
|
+
assert "test-org" in captured.out
|
|
57
59
|
|
|
58
60
|
|
|
59
61
|
def test_configure_get_success(capsys):
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Copyright (c) 2024, qBraid Development Team
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Unit tests for the default_action function in the configure app.
|
|
6
|
+
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import configparser
|
|
10
|
+
from unittest.mock import patch
|
|
11
|
+
|
|
12
|
+
from qbraid_cli.configure.actions import default_action
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def test_default_action():
|
|
16
|
+
"""Test default_action method with mocked dependencies."""
|
|
17
|
+
with (
|
|
18
|
+
patch("qbraid_cli.configure.actions.load_config") as mock_load_config,
|
|
19
|
+
patch("qbraid_cli.configure.actions.prompt_for_config") as mock_prompt,
|
|
20
|
+
patch("qbraid_cli.configure.actions.handle_filesystem_operation") as mock_handle_fs,
|
|
21
|
+
patch("qbraid_cli.configure.actions.Console") as mock_console,
|
|
22
|
+
):
|
|
23
|
+
# Setup mock returns
|
|
24
|
+
config = configparser.ConfigParser()
|
|
25
|
+
config.add_section("default")
|
|
26
|
+
mock_load_config.return_value = config
|
|
27
|
+
|
|
28
|
+
# Setup prompt_for_config to return different values
|
|
29
|
+
mock_prompt.side_effect = [
|
|
30
|
+
"https://new.example.com", # url
|
|
31
|
+
"api-key-123", # api-key
|
|
32
|
+
"new-organization", # organization
|
|
33
|
+
"new-workspace", # workspace
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
# Create mock console
|
|
37
|
+
mock_console_instance = mock_console.return_value
|
|
38
|
+
|
|
39
|
+
# Call the function to test
|
|
40
|
+
default_action()
|
|
41
|
+
|
|
42
|
+
# Verify config load/save was called
|
|
43
|
+
mock_load_config.assert_called_once()
|
|
44
|
+
|
|
45
|
+
# Verify prompt_for_config was called 4 times
|
|
46
|
+
assert mock_prompt.call_count == 4
|
|
47
|
+
|
|
48
|
+
# Verify handle_filesystem_operation was called to save config
|
|
49
|
+
mock_handle_fs.assert_called_once()
|
|
50
|
+
|
|
51
|
+
# Verify console.print was called with success message
|
|
52
|
+
mock_console_instance.print.assert_called_once_with(
|
|
53
|
+
"\n[bold green]Configuration updated successfully."
|
|
54
|
+
)
|
|
@@ -9,17 +9,34 @@ Unit tests for the prompt_for_config function in the configure app.
|
|
|
9
9
|
import configparser
|
|
10
10
|
from unittest.mock import patch
|
|
11
11
|
|
|
12
|
-
from qbraid_cli.configure.actions import prompt_for_config
|
|
12
|
+
from qbraid_cli.configure.actions import default_action, prompt_for_config
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
def
|
|
16
|
-
"""Test prompt_for_config when the user enters
|
|
15
|
+
def test_enter_new_values():
|
|
16
|
+
"""Test prompt_for_config when the user enters new values for multiple settings."""
|
|
17
17
|
config = configparser.ConfigParser()
|
|
18
18
|
config.add_section("Settings")
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
|
|
20
|
+
# Initial values
|
|
21
|
+
settings = [
|
|
22
|
+
("url", "http://example.com", "http://newexample.com"),
|
|
23
|
+
("organization", "default-org", "new-org"),
|
|
24
|
+
("workspace", "default-workspace", "new-workspace"),
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
# Setup config with initial values
|
|
28
|
+
for key, initial_value, _ in settings:
|
|
29
|
+
config.set("Settings", key, initial_value)
|
|
30
|
+
|
|
31
|
+
# Test each setting one by one
|
|
32
|
+
results = {}
|
|
33
|
+
for key, _, new_value in settings:
|
|
34
|
+
with patch("typer.prompt", return_value=new_value):
|
|
35
|
+
results[key] = prompt_for_config(config, "Settings", key)
|
|
36
|
+
|
|
37
|
+
# Verify the results
|
|
38
|
+
for key, _, new_value in settings:
|
|
39
|
+
assert results[key] == new_value, f"Should return the new value for {key}"
|
|
23
40
|
|
|
24
41
|
|
|
25
42
|
def test_new_value_validation():
|
|
@@ -28,7 +28,7 @@ def test_files_upload(runner, tmp_path):
|
|
|
28
28
|
test_file = tmp_path / "test_file.txt"
|
|
29
29
|
test_file.write_text("Test content")
|
|
30
30
|
|
|
31
|
-
with patch("qbraid_core.services.
|
|
31
|
+
with patch("qbraid_core.services.storage.FileStorageClient") as mock_client:
|
|
32
32
|
mock_client.return_value.upload_file.return_value = {
|
|
33
33
|
"namespace": "user",
|
|
34
34
|
"objectPath": "test_file.txt",
|
|
@@ -47,7 +47,7 @@ def test_files_upload_with_options(runner, tmp_path):
|
|
|
47
47
|
test_file = tmp_path / "test_file.txt"
|
|
48
48
|
test_file.write_text("Test content")
|
|
49
49
|
|
|
50
|
-
with patch("qbraid_core.services.
|
|
50
|
+
with patch("qbraid_core.services.storage.FileStorageClient") as mock_client:
|
|
51
51
|
mock_client.return_value.upload_file.return_value = {
|
|
52
52
|
"namespace": "custom",
|
|
53
53
|
"objectPath": "folder/test_file.txt",
|
|
@@ -74,7 +74,7 @@ def test_files_upload_with_options(runner, tmp_path):
|
|
|
74
74
|
|
|
75
75
|
def test_files_download(runner, tmp_path):
|
|
76
76
|
"""Test the `files download` command."""
|
|
77
|
-
with patch("qbraid_core.services.
|
|
77
|
+
with patch("qbraid_core.services.storage.FileStorageClient") as mock_client:
|
|
78
78
|
mock_client.return_value.download_file.return_value = tmp_path / "downloaded_file.txt"
|
|
79
79
|
|
|
80
80
|
result = runner.invoke(files_app, ["download", "test_file.txt"])
|
|
@@ -89,7 +89,7 @@ def test_files_download_with_options(runner, tmp_path):
|
|
|
89
89
|
save_path = tmp_path / "custom_folder"
|
|
90
90
|
save_path.mkdir()
|
|
91
91
|
|
|
92
|
-
with patch("qbraid_core.services.
|
|
92
|
+
with patch("qbraid_core.services.storage.FileStorageClient") as mock_client:
|
|
93
93
|
mock_client.return_value.download_file.return_value = save_path / "downloaded_file.txt"
|
|
94
94
|
|
|
95
95
|
result = runner.invoke(
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# file generated by setuptools_scm
|
|
2
|
-
# don't change, don't track in version control
|
|
3
|
-
TYPE_CHECKING = False
|
|
4
|
-
if TYPE_CHECKING:
|
|
5
|
-
from typing import Tuple, Union
|
|
6
|
-
VERSION_TUPLE = Tuple[Union[int, str], ...]
|
|
7
|
-
else:
|
|
8
|
-
VERSION_TUPLE = object
|
|
9
|
-
|
|
10
|
-
version: str
|
|
11
|
-
__version__: str
|
|
12
|
-
__version_tuple__: VERSION_TUPLE
|
|
13
|
-
version_tuple: VERSION_TUPLE
|
|
14
|
-
|
|
15
|
-
__version__ = version = '0.1.dev1+g08385f6'
|
|
16
|
-
__version_tuple__ = version_tuple = (0, 1, 'dev1', 'g08385f6')
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|