qbraid-cli 0.10.4__py3-none-any.whl → 0.10.6__py3-none-any.whl
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/_version.py +2 -2
- qbraid_cli/envs/app.py +25 -22
- qbraid_cli/envs/create.py +3 -2
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/METADATA +3 -3
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/RECORD +9 -9
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/WHEEL +1 -1
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/entry_points.txt +0 -0
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/licenses/LICENSE +0 -0
- {qbraid_cli-0.10.4.dist-info → qbraid_cli-0.10.6.dist-info}/top_level.txt +0 -0
qbraid_cli/_version.py
CHANGED
qbraid_cli/envs/app.py
CHANGED
|
@@ -51,7 +51,7 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
env_details_in_cli = name is not None and env_description != ""
|
|
54
|
-
|
|
54
|
+
env_config = None
|
|
55
55
|
if env_details_in_cli and file_path:
|
|
56
56
|
handle_error(
|
|
57
57
|
error_type="ArgumentConflictError",
|
|
@@ -68,12 +68,12 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
68
68
|
else:
|
|
69
69
|
try:
|
|
70
70
|
if file_path:
|
|
71
|
-
|
|
71
|
+
env_config: EnvironmentConfig = EnvironmentConfig.from_yaml(file_path)
|
|
72
72
|
except ValueError as err:
|
|
73
73
|
handle_error(error_type="YamlValidationError", message=str(err))
|
|
74
74
|
|
|
75
75
|
if not name:
|
|
76
|
-
name =
|
|
76
|
+
name = env_config.name
|
|
77
77
|
|
|
78
78
|
def create_environment(*args, **kwargs) -> "tuple[dict, EMC]":
|
|
79
79
|
"""Create a qBraid environment."""
|
|
@@ -99,42 +99,46 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
99
99
|
|
|
100
100
|
return env_path, python_version
|
|
101
101
|
|
|
102
|
-
if not
|
|
103
|
-
|
|
102
|
+
if not env_config:
|
|
103
|
+
env_config = EnvironmentConfig(
|
|
104
104
|
name=name,
|
|
105
105
|
description=env_description,
|
|
106
106
|
)
|
|
107
107
|
|
|
108
|
-
|
|
108
|
+
create_env_out: tuple[dict, EMC] = run_progress_task(
|
|
109
109
|
create_environment,
|
|
110
|
-
|
|
110
|
+
env_config,
|
|
111
111
|
description="Validating request...",
|
|
112
112
|
error_message="Failed to create qBraid environment",
|
|
113
113
|
)
|
|
114
114
|
|
|
115
|
-
|
|
115
|
+
environment, emc = create_env_out
|
|
116
|
+
slug = environment.get("slug")
|
|
117
|
+
|
|
118
|
+
local_data_out: tuple[Path, str] = run_progress_task(
|
|
116
119
|
gather_local_data,
|
|
117
120
|
description="Solving environment...",
|
|
118
121
|
error_message="Failed to create qBraid environment",
|
|
119
122
|
)
|
|
120
123
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
env_path, python_version = local_data_out
|
|
125
|
+
|
|
126
|
+
env_config.name = environment.get("displayName")
|
|
127
|
+
env_config.shell_prompt = environment.get("prompt")
|
|
128
|
+
env_config.description = environment.get("description")
|
|
129
|
+
env_config.tags = environment.get("tags")
|
|
130
|
+
env_config.kernel_name = environment.get("kernelName")
|
|
127
131
|
|
|
128
132
|
slug_path = env_path / slug
|
|
129
133
|
description = "None" if description == "" else description
|
|
130
134
|
|
|
131
135
|
typer.echo("## qBraid Metadata ##\n")
|
|
132
|
-
typer.echo(f" name: {
|
|
133
|
-
typer.echo(f" description: {description}")
|
|
134
|
-
typer.echo(f" tags: {tags}")
|
|
136
|
+
typer.echo(f" name: {env_config.name}")
|
|
137
|
+
typer.echo(f" description: {env_config.description}")
|
|
138
|
+
typer.echo(f" tags: {env_config.tags}")
|
|
135
139
|
typer.echo(f" slug: {slug}")
|
|
136
|
-
typer.echo(f" shellPrompt: {
|
|
137
|
-
typer.echo(f" kernelName: {kernel_name}")
|
|
140
|
+
typer.echo(f" shellPrompt: {env_config.shell_prompt}")
|
|
141
|
+
typer.echo(f" kernelName: {env_config.kernel_name}")
|
|
138
142
|
|
|
139
143
|
typer.echo("\n\n## Environment Plan ##\n")
|
|
140
144
|
typer.echo(f" location: {slug_path}")
|
|
@@ -150,9 +154,8 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
150
154
|
run_progress_task(
|
|
151
155
|
create_qbraid_env_assets,
|
|
152
156
|
slug,
|
|
153
|
-
prompt,
|
|
154
|
-
kernel_name,
|
|
155
157
|
slug_path,
|
|
158
|
+
env_config,
|
|
156
159
|
description="Generating qBraid assets...",
|
|
157
160
|
error_message="Failed to create qBraid environment",
|
|
158
161
|
)
|
|
@@ -160,7 +163,7 @@ def envs_create( # pylint: disable=too-many-statements
|
|
|
160
163
|
run_progress_task(
|
|
161
164
|
create_venv,
|
|
162
165
|
slug_path,
|
|
163
|
-
|
|
166
|
+
env_config.shell_prompt,
|
|
164
167
|
description="Creating virtual environment...",
|
|
165
168
|
error_message="Failed to create qBraid environment",
|
|
166
169
|
)
|
qbraid_cli/envs/create.py
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
Module supporting 'qbraid envs create' command.
|
|
6
6
|
|
|
7
7
|
"""
|
|
8
|
+
from qbraid_core.services.environments.schema import EnvironmentConfig
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
def create_venv(*args, **kwargs) -> None:
|
|
@@ -21,9 +22,9 @@ def update_state_json(*ags, **kwargs) -> None:
|
|
|
21
22
|
return update_state(*ags, **kwargs)
|
|
22
23
|
|
|
23
24
|
|
|
24
|
-
def create_qbraid_env_assets(slug: str,
|
|
25
|
+
def create_qbraid_env_assets(slug: str, slug_path: str, env_config: EnvironmentConfig) -> None:
|
|
25
26
|
"""Create a qBraid environment including python venv, PS1 configs,
|
|
26
27
|
kernel resource files, and qBraid state.json."""
|
|
27
28
|
from qbraid_core.services.environments.create import create_qbraid_env_assets as create_assets
|
|
28
29
|
|
|
29
|
-
return create_assets(slug,
|
|
30
|
+
return create_assets(slug, slug_path, env_config)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: qbraid-cli
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.6
|
|
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,11 +30,11 @@ 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<0.
|
|
33
|
+
Requires-Dist: qbraid-core<0.2,>=0.1.41
|
|
34
34
|
Provides-Extra: jobs
|
|
35
35
|
Requires-Dist: amazon-braket-sdk>=1.48.1; extra == "jobs"
|
|
36
36
|
Provides-Extra: envs
|
|
37
|
-
Requires-Dist: qbraid-core[environments]; extra == "envs"
|
|
37
|
+
Requires-Dist: qbraid-core[environments]<0.2,>=0.1.41; extra == "envs"
|
|
38
38
|
Provides-Extra: dev
|
|
39
39
|
Requires-Dist: isort; extra == "dev"
|
|
40
40
|
Requires-Dist: black; extra == "dev"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
qbraid_cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
qbraid_cli/_version.py,sha256=
|
|
2
|
+
qbraid_cli/_version.py,sha256=sdKAJx2O9MyMOWKPhmLMjrEaHBGify7UEi83jFKJhxU,513
|
|
3
3
|
qbraid_cli/exceptions.py,sha256=KjlhYJhSHMVazaNiBjD_Ur06w4sekP8zRsFzBdyIpno,672
|
|
4
4
|
qbraid_cli/handlers.py,sha256=B9H1Qw6yx8izrqp9OGR2TgSJa_mxA8KLXUkX8LB7Feg,7650
|
|
5
5
|
qbraid_cli/main.py,sha256=aSOQyoRRvKBJBcx8VtU4zKZ2WHvGKHhw8I-WiRwPxcE,3926
|
|
@@ -20,8 +20,8 @@ qbraid_cli/devices/app.py,sha256=q8AQ8o05JXODsaFR_16_S3UtLWPzwC2qi0bVw2h7RJ8,254
|
|
|
20
20
|
qbraid_cli/devices/validation.py,sha256=YhShyUufgrKnx2XjXOXF-PqFJYklJT9CgeqIwKcNam4,809
|
|
21
21
|
qbraid_cli/envs/__init__.py,sha256=1-cMvrATsddYxcetPJWxq6bEOqJWMktGdhoZ4qm8euA,172
|
|
22
22
|
qbraid_cli/envs/activate.py,sha256=VpvVYSfQDlcmlNWJOgkLIQ2p8YXPPLG8Jbl5t8GHUDw,2140
|
|
23
|
-
qbraid_cli/envs/app.py,sha256=
|
|
24
|
-
qbraid_cli/envs/create.py,sha256=
|
|
23
|
+
qbraid_cli/envs/app.py,sha256=4Xdh7A2nAw5eUGJgTyTWssw39czwq6q6_iM5rGFxmm4,10158
|
|
24
|
+
qbraid_cli/envs/create.py,sha256=gF2wS09IYeQX71xLDabtLVgr_BxKLVP9Pt5XrNSRCS0,1052
|
|
25
25
|
qbraid_cli/envs/data_handling.py,sha256=Ibnp2yJoUDpivb_sNqi0suYgJZNat_LmM6Ya0Ovez5s,1288
|
|
26
26
|
qbraid_cli/files/__init__.py,sha256=3_yhgFoNcviEtS6B75uJBrfFFUjsrMcccCNEntJ54xU,175
|
|
27
27
|
qbraid_cli/files/app.py,sha256=9PHYyrhZ84cVGQGCc6tmsS3yoPZL5jGzmf3j6H6vzU8,3771
|
|
@@ -34,9 +34,9 @@ qbraid_cli/kernels/app.py,sha256=n-iyWJHy7_ML6qk4pp-v_rQkGA7WfnZMG8gyiCFGO1c,294
|
|
|
34
34
|
qbraid_cli/pip/__init__.py,sha256=tJtU0rxn-ODogNh5Y4pp_BgDQXMN-3JY1QGj0OZHwjQ,169
|
|
35
35
|
qbraid_cli/pip/app.py,sha256=jkk-djductrDOJIRYfHK_7WDJ12f0zOT3MMkiZp97oM,1365
|
|
36
36
|
qbraid_cli/pip/hooks.py,sha256=jkIeev3cOd-cmaoJSdSqbmhTYCs6z1we84FMqa3ZoZw,2124
|
|
37
|
-
qbraid_cli-0.10.
|
|
38
|
-
qbraid_cli-0.10.
|
|
39
|
-
qbraid_cli-0.10.
|
|
40
|
-
qbraid_cli-0.10.
|
|
41
|
-
qbraid_cli-0.10.
|
|
42
|
-
qbraid_cli-0.10.
|
|
37
|
+
qbraid_cli-0.10.6.dist-info/licenses/LICENSE,sha256=3KvWfsaXBCqbZ4qwk5jN9CQXE53tQeaZTySN5a-CCgQ,2753
|
|
38
|
+
qbraid_cli-0.10.6.dist-info/METADATA,sha256=oPGqYzy4DA1d7HTgZqa9bEzg0SKC-XeP9u2sP7yEiD4,7621
|
|
39
|
+
qbraid_cli-0.10.6.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
40
|
+
qbraid_cli-0.10.6.dist-info/entry_points.txt,sha256=c5ZJ7NjbxhDqMpou9q5F03_b_KG34HzFDijIDmEIwgQ,47
|
|
41
|
+
qbraid_cli-0.10.6.dist-info/top_level.txt,sha256=LTYJgeYSCHo9Il8vZu0yIPuGdGyNaIw6iRy6BeoZo8o,11
|
|
42
|
+
qbraid_cli-0.10.6.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|