Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quantum] Show progress messages and dots before executing commands #4480

Merged
merged 3 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/quantum/azext_quantum/operations/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def build(cmd, target_id=None, project=None):
logger.debug("Building project with arguments:")
logger.debug(args)

print("Building project...")

import subprocess
result = subprocess.run(args, stdout=subprocess.PIPE, check=False)

Expand Down Expand Up @@ -181,6 +183,8 @@ def submit(cmd, program_args, resource_group_name=None, workspace_name=None, loc
args = _generate_submit_args(program_args, ws, target, token, project, job_name, shots, storage, job_params)
_set_cli_version()

print("Submitting job...")

import subprocess
result = subprocess.run(args, stdout=subprocess.PIPE, check=False)

Expand Down
3 changes: 3 additions & 0 deletions src/quantum/azext_quantum/operations/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ def create(cmd, resource_group_name=None, workspace_name=None, location=None, st
credentials = _get_data_credentials(cmd.cli_ctx, info.subscription)
arm_client = ResourceManagementClient(credentials, info.subscription)

# Show the first progress indicator dot before starting ARM template deployment
print('.', end='', flush=True)

deployment_async_operation = arm_client.deployments.begin_create_or_update(
info.resource_group,
workspace_name, # Note: This is actually specifying a the deployment name, but workspace_name is used here in test_quantum_workspace.py
Expand Down