cloudos-cli 2.81.2__tar.gz → 2.82.0__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.
Files changed (70) hide show
  1. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/PKG-INFO +55 -16
  2. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/README.md +54 -15
  3. cloudos_cli-2.82.0/cloudos_cli/_version.py +1 -0
  4. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/projects/cli.py +22 -9
  5. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/queue/cli.py +18 -11
  6. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/details.py +374 -0
  7. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/workflows/cli.py +20 -8
  8. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/PKG-INFO +55 -16
  9. cloudos_cli-2.81.2/cloudos_cli/_version.py +0 -1
  10. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/LICENSE +0 -0
  11. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/__init__.py +0 -0
  12. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/__main__.py +0 -0
  13. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/bash/__init__.py +0 -0
  14. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/bash/cli.py +0 -0
  15. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/clos.py +0 -0
  16. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/configure/__init__.py +0 -0
  17. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/configure/cli.py +0 -0
  18. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/configure/configure.py +0 -0
  19. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/constants.py +0 -0
  20. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/cost/__init__.py +0 -0
  21. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/cost/cost.py +0 -0
  22. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/cromwell/__init__.py +0 -0
  23. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/cromwell/cli.py +0 -0
  24. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/datasets/__init__.py +0 -0
  25. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/datasets/cli.py +0 -0
  26. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/datasets/datasets.py +0 -0
  27. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/import_wf/__init__.py +0 -0
  28. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/import_wf/import_wf.py +0 -0
  29. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/jobs/__init__.py +0 -0
  30. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/jobs/cli.py +0 -0
  31. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/jobs/job.py +0 -0
  32. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/link/__init__.py +0 -0
  33. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/link/cli.py +0 -0
  34. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/link/link.py +0 -0
  35. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/logging/__init__.py +0 -0
  36. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/logging/logger.py +0 -0
  37. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/procurement/__init__.py +0 -0
  38. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/procurement/cli.py +0 -0
  39. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/procurement/images.py +0 -0
  40. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/projects/__init__.py +0 -0
  41. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/queue/__init__.py +0 -0
  42. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/queue/queue.py +0 -0
  43. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/related_analyses/__init__.py +0 -0
  44. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
  45. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/__init__.py +0 -0
  46. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/array_job.py +0 -0
  47. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/cli_helpers.py +0 -0
  48. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/cloud.py +0 -0
  49. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/errors.py +0 -0
  50. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/last_wf.py +0 -0
  51. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/requests.py +0 -0
  52. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/utils/resources.py +0 -0
  53. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli/workflows/__init__.py +0 -0
  54. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
  55. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  56. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
  57. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/requires.txt +0 -0
  58. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/cloudos_cli.egg-info/top_level.txt +0 -0
  59. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/setup.cfg +0 -0
  60. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/setup.py +0 -0
  61. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/__init__.py +0 -0
  62. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/functions_for_pytest.py +0 -0
  63. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_cli_project_create.py +0 -0
  64. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_cost/__init__.py +0 -0
  65. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_cost/test_job_cost.py +0 -0
  66. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_error_messages.py +0 -0
  67. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_logging/__init__.py +0 -0
  68. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_logging/test_logger.py +0 -0
  69. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_related_analyses/__init__.py +0 -0
  70. {cloudos_cli-2.81.2 → cloudos_cli-2.82.0}/tests/test_related_analyses/test_related_analyses.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudos_cli
3
- Version: 2.81.2
3
+ Version: 2.82.0
4
4
  Summary: Python package for interacting with CloudOS
5
5
  Home-page: https://github.com/lifebit-ai/cloudos-cli
6
6
  Author: David Piñeyro
@@ -365,11 +365,21 @@ Projects in CloudOS provide logical separation of datasets, workflows, and resul
365
365
 
366
366
  #### List Projects
367
367
 
368
- You can get a summary of all available workspace projects in two different formats:
369
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
370
- - **JSON**: All available information from projects in JSON format
368
+ You can get a summary of all available workspace projects in three different output formats using the `--output-format` option:
371
369
 
372
- To get a CSV table with all available projects for a given workspace:
370
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
371
+ - **csv**: Saves project data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
372
+ - **json**: Saves complete project information to a JSON file with all available fields
373
+
374
+ To display projects as a formatted table in the terminal:
375
+
376
+ ```bash
377
+ cloudos project list --profile my_profile
378
+ # or explicitly:
379
+ cloudos project list --profile my_profile --output-format stdout
380
+ ```
381
+
382
+ To save projects to a CSV file with all available fields:
373
383
 
374
384
  ```bash
375
385
  cloudos project list --profile my_profile --output-format csv --all-fields
@@ -383,7 +393,7 @@ Executing list...
383
393
  Project list saved to project_list.csv
384
394
  ```
385
395
 
386
- To get the same information in JSON format:
396
+ To save the same information in JSON format:
387
397
 
388
398
  ```bash
389
399
  cloudos project list --profile my_profile --output-format json
@@ -406,13 +416,28 @@ The expected output is something similar to:
406
416
 
407
417
  ### Queue
408
418
 
409
- Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings". You can get a summary of all available workspace job queues in two formats:
410
- - **CSV**: A table with a selection of the available job queue information. You can get all information using the `--all-fields` flag
411
- - **JSON**: All available information from job queues in JSON format
419
+ Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings".
420
+
421
+ > [!NOTE]
422
+ > **Azure Platform**: Queue listing is not available for CloudOS workspaces configured to use Azure execution platform, as Azure does not use AWS batch queues.
412
423
 
413
424
  #### List Queues
414
425
 
415
- This command allows you to view available computational queues and their configurations. Example command for getting all available job queues in JSON format:
426
+ This command allows you to view available computational queues and their configurations. You can get a summary of all available workspace job queues in three different output formats using the `--output-format` option:
427
+
428
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
429
+ - **csv**: Saves queue data to a CSV file with a selection of available queue information, or all information using the `--all-fields` flag
430
+ - **json**: Saves complete queue information to a JSON file with all available fields
431
+
432
+ To display queues as a formatted table in the terminal:
433
+
434
+ ```bash
435
+ cloudos queue list --profile my_profile
436
+ # or explicitly:
437
+ cloudos queue list --profile my_profile --output-format stdout
438
+ ```
439
+
440
+ To save all available job queues in JSON format:
416
441
 
417
442
  ```bash
418
443
  cloudos queue list --profile my_profile --output-format json --output-basename "available_queues"
@@ -424,7 +449,11 @@ Executing list...
424
449
  Job queue list saved to available_queues.json
425
450
  ```
426
451
 
427
- This command will output the list of available job queues in JSON format and save it to a file named `available_queues.json`. You can use `--output-format csv` for a CSV file, or omit `--output-basename` to print to the console.
452
+ To save queue data to a CSV file:
453
+
454
+ ```bash
455
+ cloudos queue list --profile my_profile --output-format csv
456
+ ```
428
457
 
429
458
  > NOTE: The queue name that is visible in CloudOS and must be used with the `--job-queue` parameter is the one in the `label` field.
430
459
 
@@ -437,11 +466,21 @@ Platform workflows (those provided by CloudOS in your workspace as modules) run
437
466
 
438
467
  #### List All Available Workflows
439
468
 
440
- You can get a summary of all available workspace workflows in two different formats:
441
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
442
- - **JSON**: All available information from workflows in JSON format
469
+ You can get a list of all available workspace workflows in three different output formats using the `--output-format` option:
470
+
471
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
472
+ - **csv**: Saves workflow data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
473
+ - **json**: Saves complete workflow information to a JSON file with all available fields
474
+
475
+ To display the list of workflows as a formatted table in the terminal:
476
+
477
+ ```bash
478
+ cloudos workflow list --profile my_profile
479
+ # or explicitly:
480
+ cloudos workflow list --profile my_profile --output-format stdout
481
+ ```
443
482
 
444
- To get a CSV table with all available workflows for a given workspace:
483
+ To save the list of workflows to a CSV file with all available fields:
445
484
 
446
485
  ```bash
447
486
  cloudos workflow list --profile my_profile --output-format csv --all-fields
@@ -455,7 +494,7 @@ Executing list...
455
494
  Workflow list saved to workflow_list.csv
456
495
  ```
457
496
 
458
- To get the same information in JSON format:
497
+ To save the same information in JSON format:
459
498
 
460
499
  ```bash
461
500
  cloudos workflow list --profile my_profile --output-format json
@@ -330,11 +330,21 @@ Projects in CloudOS provide logical separation of datasets, workflows, and resul
330
330
 
331
331
  #### List Projects
332
332
 
333
- You can get a summary of all available workspace projects in two different formats:
334
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
335
- - **JSON**: All available information from projects in JSON format
333
+ You can get a summary of all available workspace projects in three different output formats using the `--output-format` option:
336
334
 
337
- To get a CSV table with all available projects for a given workspace:
335
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
336
+ - **csv**: Saves project data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
337
+ - **json**: Saves complete project information to a JSON file with all available fields
338
+
339
+ To display projects as a formatted table in the terminal:
340
+
341
+ ```bash
342
+ cloudos project list --profile my_profile
343
+ # or explicitly:
344
+ cloudos project list --profile my_profile --output-format stdout
345
+ ```
346
+
347
+ To save projects to a CSV file with all available fields:
338
348
 
339
349
  ```bash
340
350
  cloudos project list --profile my_profile --output-format csv --all-fields
@@ -348,7 +358,7 @@ Executing list...
348
358
  Project list saved to project_list.csv
349
359
  ```
350
360
 
351
- To get the same information in JSON format:
361
+ To save the same information in JSON format:
352
362
 
353
363
  ```bash
354
364
  cloudos project list --profile my_profile --output-format json
@@ -371,13 +381,28 @@ The expected output is something similar to:
371
381
 
372
382
  ### Queue
373
383
 
374
- Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings". You can get a summary of all available workspace job queues in two formats:
375
- - **CSV**: A table with a selection of the available job queue information. You can get all information using the `--all-fields` flag
376
- - **JSON**: All available information from job queues in JSON format
384
+ Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings".
385
+
386
+ > [!NOTE]
387
+ > **Azure Platform**: Queue listing is not available for CloudOS workspaces configured to use Azure execution platform, as Azure does not use AWS batch queues.
377
388
 
378
389
  #### List Queues
379
390
 
380
- This command allows you to view available computational queues and their configurations. Example command for getting all available job queues in JSON format:
391
+ This command allows you to view available computational queues and their configurations. You can get a summary of all available workspace job queues in three different output formats using the `--output-format` option:
392
+
393
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
394
+ - **csv**: Saves queue data to a CSV file with a selection of available queue information, or all information using the `--all-fields` flag
395
+ - **json**: Saves complete queue information to a JSON file with all available fields
396
+
397
+ To display queues as a formatted table in the terminal:
398
+
399
+ ```bash
400
+ cloudos queue list --profile my_profile
401
+ # or explicitly:
402
+ cloudos queue list --profile my_profile --output-format stdout
403
+ ```
404
+
405
+ To save all available job queues in JSON format:
381
406
 
382
407
  ```bash
383
408
  cloudos queue list --profile my_profile --output-format json --output-basename "available_queues"
@@ -389,7 +414,11 @@ Executing list...
389
414
  Job queue list saved to available_queues.json
390
415
  ```
391
416
 
392
- This command will output the list of available job queues in JSON format and save it to a file named `available_queues.json`. You can use `--output-format csv` for a CSV file, or omit `--output-basename` to print to the console.
417
+ To save queue data to a CSV file:
418
+
419
+ ```bash
420
+ cloudos queue list --profile my_profile --output-format csv
421
+ ```
393
422
 
394
423
  > NOTE: The queue name that is visible in CloudOS and must be used with the `--job-queue` parameter is the one in the `label` field.
395
424
 
@@ -402,11 +431,21 @@ Platform workflows (those provided by CloudOS in your workspace as modules) run
402
431
 
403
432
  #### List All Available Workflows
404
433
 
405
- You can get a summary of all available workspace workflows in two different formats:
406
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
407
- - **JSON**: All available information from workflows in JSON format
434
+ You can get a list of all available workspace workflows in three different output formats using the `--output-format` option:
435
+
436
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
437
+ - **csv**: Saves workflow data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
438
+ - **json**: Saves complete workflow information to a JSON file with all available fields
439
+
440
+ To display the list of workflows as a formatted table in the terminal:
441
+
442
+ ```bash
443
+ cloudos workflow list --profile my_profile
444
+ # or explicitly:
445
+ cloudos workflow list --profile my_profile --output-format stdout
446
+ ```
408
447
 
409
- To get a CSV table with all available workflows for a given workspace:
448
+ To save the list of workflows to a CSV file with all available fields:
410
449
 
411
450
  ```bash
412
451
  cloudos workflow list --profile my_profile --output-format csv --all-fields
@@ -420,7 +459,7 @@ Executing list...
420
459
  Workflow list saved to workflow_list.csv
421
460
  ```
422
461
 
423
- To get the same information in JSON format:
462
+ To save the same information in JSON format:
424
463
 
425
464
  ```bash
426
465
  cloudos workflow list --profile my_profile --output-format json
@@ -0,0 +1 @@
1
+ __version__ = '2.82.0'
@@ -7,6 +7,7 @@ from cloudos_cli.clos import Cloudos
7
7
  from cloudos_cli.utils.resources import ssl_selector
8
8
  from cloudos_cli.configure.configure import with_profile_config, CLOUDOS_URL
9
9
  from cloudos_cli.utils.cli_helpers import pass_debug_to_subcommands
10
+ from cloudos_cli.utils.details import create_project_list_table
10
11
 
11
12
 
12
13
  @click.group(cls=pass_debug_to_subcommands())
@@ -34,9 +35,13 @@ def project():
34
35
  default='project_list',
35
36
  required=False)
36
37
  @click.option('--output-format',
37
- help='The desired file format (file extension) for the output. Default=csv.',
38
- type=click.Choice(['csv', 'json'], case_sensitive=False),
39
- default='csv')
38
+ help=('Output format for project list. Options: '
39
+ 'stdout (display as interactive table in terminal), '
40
+ 'csv (save as comma-separated values file), '
41
+ 'json (save as JSON file with full API response). '
42
+ 'Default=stdout.'),
43
+ type=click.Choice(['stdout', 'csv', 'json'], case_sensitive=False),
44
+ default='stdout')
40
45
  @click.option('--all-fields',
41
46
  help=('Whether to collect all available fields from projects or ' +
42
47
  'just the preconfigured selected fields. Only applicable ' +
@@ -70,11 +75,12 @@ def list_projects(ctx,
70
75
  disable_ssl_verification,
71
76
  ssl_cert,
72
77
  profile):
73
- """Collect all projects from a CloudOS workspace in CSV format."""
78
+ """Collect and display all projects from a CloudOS workspace."""
74
79
  # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator
75
80
 
76
81
  verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert)
77
- outfile = output_basename + '.' + output_format
82
+ if output_format != 'stdout':
83
+ outfile = output_basename + '.' + output_format
78
84
  print('Executing list...')
79
85
  if verbose:
80
86
  print('\t...Preparing objects')
@@ -93,25 +99,32 @@ def list_projects(ctx,
93
99
  if not isinstance(page, int) or page < 1:
94
100
  raise ValueError('Please, use a positive integer (>= 1) for the --page parameter')
95
101
  my_projects_r = cl.get_project_list(workspace_id, verify_ssl, page=page, get_all=get_all)
102
+
103
+ # Print informative message if no projects found
96
104
  if len(my_projects_r) == 0:
97
105
  if ctx.get_parameter_source('page') == click.core.ParameterSource.DEFAULT:
98
- print('A total of 0 projects collected. This is likely because your workspace ' +
106
+ print('\tA total of 0 projects collected. This is likely because your workspace ' +
99
107
  'has no projects created yet.')
100
108
  else:
101
- print('A total of 0 projects collected. This is likely because the --page you ' +
109
+ print('\tA total of 0 projects collected. This is likely because the --page you ' +
102
110
  'requested does not exist. Please, try a smaller number for --page or collect all the ' +
103
111
  'projects by not using --page parameter.')
112
+
113
+ # Generate output files (even if empty, for consistency with automation)
114
+ if output_format == 'stdout':
115
+ create_project_list_table(my_projects_r, cloudos_url)
104
116
  elif output_format == 'csv':
105
117
  my_projects = cl.process_project_list(my_projects_r, all_fields)
106
118
  my_projects.to_csv(outfile, index=False)
107
119
  print(f'\tProject list collected with a total of {my_projects.shape[0]} projects.')
120
+ print(f'\tProject list saved to {outfile}')
108
121
  elif output_format == 'json':
109
122
  with open(outfile, 'w') as o:
110
123
  o.write(json.dumps(my_projects_r))
111
124
  print(f'\tProject list collected with a total of {len(my_projects_r)} projects.')
125
+ print(f'\tProject list saved to {outfile}')
112
126
  else:
113
- raise ValueError('Unrecognised output format. Please use one of [csv|json]')
114
- print(f'\tProject list saved to {outfile}')
127
+ raise ValueError('Unrecognised output format. Please use one of [stdout|csv|json]')
115
128
 
116
129
 
117
130
  @project.command('create')
@@ -6,6 +6,7 @@ from cloudos_cli.queue.queue import Queue
6
6
  from cloudos_cli.utils.resources import ssl_selector
7
7
  from cloudos_cli.configure.configure import with_profile_config, CLOUDOS_URL
8
8
  from cloudos_cli.utils.cli_helpers import pass_debug_to_subcommands
9
+ from cloudos_cli.utils.details import create_queue_list_table
9
10
 
10
11
 
11
12
  # Create the queue group
@@ -34,11 +35,15 @@ def queue():
34
35
  default='job_queue_list',
35
36
  required=False)
36
37
  @click.option('--output-format',
37
- help='The desired file format (file extension) for the output. Default=csv.',
38
- type=click.Choice(['csv', 'json'], case_sensitive=False),
39
- default='csv')
38
+ help=('Output format for queue list. Options: '
39
+ 'stdout (display as interactive table in terminal), '
40
+ 'csv (save as comma-separated values file), '
41
+ 'json (save as JSON file with full API response). '
42
+ 'Default=stdout.'),
43
+ type=click.Choice(['stdout', 'csv', 'json'], case_sensitive=False),
44
+ default='stdout')
40
45
  @click.option('--all-fields',
41
- help=('Whether to collect all available fields from workflows or ' +
46
+ help=('Whether to collect all available fields from queues or ' +
42
47
  'just the preconfigured selected fields. Only applicable ' +
43
48
  'when --output-format=csv'),
44
49
  is_flag=True)
@@ -61,24 +66,26 @@ def list_queues(ctx,
61
66
  disable_ssl_verification,
62
67
  ssl_cert,
63
68
  profile):
64
- """Collect all available job queues from a CloudOS workspace."""
69
+ """Collect and display all available job queues from a CloudOS workspace."""
65
70
  # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator
66
71
 
67
72
  verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert)
68
- outfile = output_basename + '.' + output_format
69
73
  print('Executing list...')
70
74
  j_queue = Queue(cloudos_url, apikey, None, workspace_id, verify=verify_ssl)
71
75
  my_queues = j_queue.get_job_queues()
72
76
  if len(my_queues) == 0:
73
- raise ValueError('No AWS batch queues found. Please, make sure that your CloudOS supports AWS bath queues')
74
- if output_format == 'csv':
77
+ raise ValueError('No AWS batch queues found. Please, make sure that your CloudOS supports AWS batch queues')
78
+ if output_format == 'stdout':
79
+ create_queue_list_table(my_queues, cloudos_url)
80
+ elif output_format == 'csv':
81
+ outfile = output_basename + '.' + output_format
75
82
  queues_processed = j_queue.process_queue_list(my_queues, all_fields)
76
83
  queues_processed.to_csv(outfile, index=False)
77
84
  print(f'\tJob queue list collected with a total of {queues_processed.shape[0]} queues.')
85
+ print(f'\tJob queue list saved to {outfile}')
78
86
  elif output_format == 'json':
87
+ outfile = output_basename + '.' + output_format
79
88
  with open(outfile, 'w') as o:
80
89
  o.write(json.dumps(my_queues))
81
90
  print(f'\tJob queue list collected with a total of {len(my_queues)} queues.')
82
- else:
83
- raise ValueError('Unrecognised output format. Please use one of [csv|json]')
84
- print(f'\tJob queue list saved to {outfile}')
91
+ print(f'\tJob queue list saved to {outfile}')
@@ -4,6 +4,7 @@ from rich.table import Table
4
4
  import json
5
5
  import csv
6
6
  import os
7
+ import sys
7
8
 
8
9
 
9
10
  def get_path(param, param_kind_map, execution_platform, storage_provider, mode="parameters"):
@@ -646,3 +647,376 @@ def create_job_list_table(jobs, cloudos_url, pagination_metadata=None, selected_
646
647
  total_pages = (total_jobs + page_size - 1) // page_size if total_jobs > 0 else 1
647
648
 
648
649
  console.print(f"\n[cyan]Showing {len(jobs)} of {total_jobs} total jobs | Page {current_page} of {total_pages}[/cyan]")
650
+
651
+
652
+ def create_workflow_list_table(workflows, cloudos_url="https://cloudos.lifebit.ai", page_size=10):
653
+ """Display workflows in a rich formatted table with pagination.
654
+
655
+ Parameters
656
+ ----------
657
+ workflows : list
658
+ A list of dicts, each corresponding to a workflow.
659
+ cloudos_url : str
660
+ The CloudOS URL for creating hyperlinks.
661
+ page_size : int
662
+ Number of workflows to display per page. Default is 10.
663
+ """
664
+ console = Console()
665
+
666
+ # Handle empty workflow list
667
+ if len(workflows) == 0:
668
+ console.print("\n[yellow]No workflows found in this workspace.[/yellow]")
669
+ return
670
+
671
+ # Prepare rows data
672
+ rows = []
673
+ for workflow in workflows:
674
+ # Get workflow ID for the hyperlink
675
+ workflow_id = str(workflow.get("_id", "N/A"))
676
+ workflow_url = f"{cloudos_url}/app/advanced-analytics/pipelines-and-tools/workspace/{workflow_id}"
677
+
678
+ # Name with hyperlink
679
+ name = str(workflow.get("name", "N/A"))
680
+ name_with_link = f"[link={workflow_url}]{name}[/link]"
681
+
682
+ # Archived status
683
+ # archived_status = workflow.get("archived", {})
684
+ # if isinstance(archived_status, dict):
685
+ # archived = str(archived_status.get("status", "N/A"))
686
+ # else:
687
+ # archived = str(archived_status)
688
+
689
+ # Repository name
690
+ repository = workflow.get("repository", {})
691
+ repo_name = str(repository.get("name", "N/A"))
692
+ repo_url = str(repository.get("url", "N/A"))
693
+
694
+ # Create hyperlink for repository name if URL is available
695
+ if repo_url != "N/A" and repo_url:
696
+ repo_name_with_link = f"[link={repo_url}]{repo_name}[/link]"
697
+ else:
698
+ repo_name_with_link = repo_name
699
+
700
+ # Repository platform
701
+ #repo_platform = str(repository.get("platform", "N/A"))
702
+
703
+ # Repository URL
704
+ #repo_url = str(repository.get("url", "N/A"))
705
+
706
+ # Is private
707
+ # is_private = str(repository.get("isPrivate", "N/A"))
708
+
709
+ rows.append([
710
+ name_with_link,
711
+ #archived,
712
+ repo_name_with_link,
713
+ #repo_platform,
714
+ #repo_url,
715
+ #is_private
716
+ ])
717
+
718
+ # Pagination
719
+ current_page = 0
720
+ total_pages = (len(rows) + page_size - 1) // page_size if len(rows) > 0 else 1
721
+ show_error = None # Track error messages to display
722
+
723
+ while True:
724
+ start = current_page * page_size
725
+ end = start + page_size
726
+
727
+ # Clear console first
728
+ console.clear()
729
+
730
+ # Create and display table
731
+ table = Table(title="Workflow List")
732
+
733
+ # Add columns
734
+ table.add_column("Name", style="green", overflow="fold")
735
+ #table.add_column("Archived", style="yellow", no_wrap=True)
736
+ table.add_column("Repository", style="cyan", overflow="fold")
737
+ #table.add_column("Platform", style="green", no_wrap=True)
738
+ #table.add_column("Repository URL", style="blue", overflow="fold")
739
+ #table.add_column("Private", style="red", no_wrap=True)
740
+
741
+ # Get rows for current page
742
+ page_rows = rows[start:end]
743
+
744
+ # Add rows to table
745
+ for row in page_rows:
746
+ table.add_row(*row)
747
+
748
+ # Print table
749
+ console.print(table)
750
+
751
+ # Display total count and page info
752
+ console.print(f"\n[cyan]Total workflows:[/cyan] {len(workflows)}")
753
+ if total_pages > 1:
754
+ console.print(f"[cyan]Page:[/cyan] {current_page + 1} of {total_pages}")
755
+ console.print(f"[cyan]Workflows on this page:[/cyan] {len(page_rows)}")
756
+
757
+ # Show error message if any
758
+ if show_error:
759
+ console.print(show_error)
760
+ show_error = None # Reset error after displaying
761
+
762
+ # Show pagination controls
763
+ if total_pages > 1:
764
+ # Check if we're in an interactive environment
765
+ if not sys.stdin.isatty():
766
+ console.print("\n[yellow]Note: Pagination not available in non-interactive mode. Showing page 1 of {0}.[/yellow]".format(total_pages))
767
+ console.print("[yellow]Run in an interactive terminal to navigate through all pages.[/yellow]")
768
+ break
769
+
770
+ console.print(f"\n[bold cyan]n[/] = next, [bold cyan]p[/] = prev, [bold cyan]q[/] = quit")
771
+
772
+ # Get user input for navigation
773
+ try:
774
+ choice = input(">>> ").strip().lower()
775
+ except (EOFError, KeyboardInterrupt):
776
+ # Handle non-interactive environments or user interrupt
777
+ console.print("\n[yellow]Pagination interrupted.[/yellow]")
778
+ break
779
+
780
+ if choice in ("q", "quit"):
781
+ break
782
+ elif choice in ("n", "next"):
783
+ if current_page < total_pages - 1:
784
+ current_page += 1
785
+ else:
786
+ show_error = "[red]Invalid choice. Already on the last page.[/red]"
787
+ elif choice in ("p", "prev"):
788
+ if current_page > 0:
789
+ current_page -= 1
790
+ else:
791
+ show_error = "[red]Invalid choice. Already on the first page.[/red]"
792
+ else:
793
+ show_error = "[red]Invalid choice. Please enter 'n' (next), 'p' (prev), or 'q' (quit).[/red]"
794
+ else:
795
+ # Only one page, no need for input, just exit
796
+ break
797
+
798
+
799
+ def create_queue_list_table(queues, cloudos_url="https://cloudos.lifebit.ai"):
800
+ """Display job queues in a rich formatted table.
801
+
802
+ Parameters
803
+ ----------
804
+ queues : list
805
+ A list of dicts, each corresponding to a job queue.
806
+ cloudos_url : str
807
+ The CloudOS URL for context (currently not used for hyperlinks).
808
+
809
+ Returns
810
+ -------
811
+ None
812
+ Prints the formatted table to console.
813
+ """
814
+ console = Console()
815
+
816
+ # Handle empty queue list
817
+ if len(queues) == 0:
818
+ console.print("\n[yellow]No job queues found in this workspace.[/yellow]")
819
+ return
820
+
821
+ # Create table
822
+ table = Table(title="Job Queue List")
823
+
824
+ # Add columns
825
+ table.add_column("Label", style="green", overflow="fold", min_width=10)
826
+ table.add_column("Default", style="cyan", no_wrap=True, min_width=7, justify="center")
827
+ table.add_column("Resource Type", style="magenta", overflow="fold", min_width=12)
828
+ table.add_column("Status", style="yellow", no_wrap=True, min_width=8, justify="center")
829
+
830
+ # Process each queue
831
+ for queue in queues:
832
+ # Label
833
+ label = str(queue.get("label", "N/A"))
834
+
835
+ # Default (show as checkmark or dash)
836
+ is_default = queue.get("isDefault", False)
837
+ if is_default:
838
+ default_display = "[bold green]Default[/bold green]"
839
+ else:
840
+ default_display = "[dim]—[/dim]"
841
+
842
+ # Resource Type
843
+ resource_type = str(queue.get("resourceType", "N/A"))
844
+ if not resource_type or resource_type == "":
845
+ resource_type = "N/A"
846
+ elif resource_type == "teamBatchJobQueue":
847
+ resource_type = "Batch Queues"
848
+
849
+ # Status with checkmark/X icons
850
+ status_raw = str(queue.get("status", "N/A"))
851
+ if status_raw.lower() == "ready":
852
+ status = "[bold green]Ready[/bold green]"
853
+ else:
854
+ status = "[bold red]Not Ready[/bold red]"
855
+
856
+ # Add row
857
+ table.add_row(label, default_display, resource_type, status)
858
+
859
+ # Print table
860
+ console.print(table)
861
+
862
+ # Display total count
863
+ console.print(f"\n[cyan]Total job queues:[/cyan] {len(queues)}")
864
+
865
+
866
+ def create_project_list_table(projects, cloudos_url="https://cloudos.lifebit.ai", page_size=10):
867
+ """Display projects in a rich formatted table with pagination.
868
+
869
+ Parameters
870
+ ----------
871
+ projects : list
872
+ A list of dicts, each corresponding to a project.
873
+ cloudos_url : str
874
+ The CloudOS URL for creating hyperlinks.
875
+ page_size : int
876
+ Number of projects to display per page. Default is 10.
877
+ """
878
+ console = Console()
879
+
880
+ # Handle empty project list
881
+ if len(projects) == 0:
882
+ console.print("\n[yellow]No projects found in this workspace.[/yellow]")
883
+ return
884
+
885
+ # Prepare rows data
886
+ rows = []
887
+ for project in projects:
888
+ # Name with hyperlink
889
+ project_id = str(project.get("_id", "N/A"))
890
+ project_url = f"{cloudos_url}/app/data-science/datasets/projects/{project_id}"
891
+ name = str(project.get("name", "N/A"))
892
+ name_with_link = f"[link={project_url}]{name}[/link]"
893
+
894
+ # User (combine name and surname)
895
+ user_info = project.get("user", {})
896
+ user_name = user_info.get("name", "")
897
+ user_surname = user_info.get("surname", "")
898
+ if user_name and user_surname:
899
+ user = f"{user_name} {user_surname}"
900
+ elif user_name:
901
+ user = user_name
902
+ elif user_surname:
903
+ user = user_surname
904
+ else:
905
+ user = "N/A"
906
+
907
+ # Created date (format: yyyy.mm.dd)
908
+ created_at = project.get("createdAt")
909
+ if created_at:
910
+ try:
911
+ created_dt = datetime.fromisoformat(str(created_at).replace('Z', '+00:00'))
912
+ created = created_dt.strftime('%Y.%m.%d')
913
+ except (ValueError, TypeError):
914
+ created = "N/A"
915
+ else:
916
+ created = "N/A"
917
+
918
+ # Updated date (format: yyyy.mm.dd)
919
+ updated_at = project.get("updatedAt")
920
+ if updated_at:
921
+ try:
922
+ updated_dt = datetime.fromisoformat(str(updated_at).replace('Z', '+00:00'))
923
+ updated = updated_dt.strftime('%Y.%m.%d')
924
+ except (ValueError, TypeError):
925
+ updated = "N/A"
926
+ else:
927
+ updated = "N/A"
928
+
929
+ # Job count
930
+ job_count = str(project.get("jobCount", 0))
931
+
932
+ # Notebook session count
933
+ notebook_count = str(project.get("notebookSessionCount", 0))
934
+
935
+ rows.append([
936
+ name_with_link,
937
+ user,
938
+ created,
939
+ updated,
940
+ job_count,
941
+ notebook_count
942
+ ])
943
+
944
+ # Pagination
945
+ current_page = 0
946
+ total_pages = (len(rows) + page_size - 1) // page_size if len(rows) > 0 else 1
947
+ show_error = None # Track error messages to display
948
+
949
+ while True:
950
+ start = current_page * page_size
951
+ end = start + page_size
952
+
953
+ # Clear console first
954
+ console.clear()
955
+
956
+ # Create and display table
957
+ table = Table(title="Project List")
958
+
959
+ # Add columns
960
+ table.add_column("Name", style="green", overflow="fold", min_width=15)
961
+ table.add_column("User", style="cyan", overflow="ellipsis", min_width=12, max_width=20)
962
+ table.add_column("Created", style="magenta", no_wrap=True, min_width=10)
963
+ table.add_column("Updated", style="blue", no_wrap=True, min_width=10)
964
+ table.add_column("Jobs", style="yellow", no_wrap=True, min_width=4, justify="right")
965
+ table.add_column("Notebooks", style="white", no_wrap=True, min_width=9, justify="right")
966
+
967
+ # Get rows for current page
968
+ page_rows = rows[start:end]
969
+
970
+ # Add rows to table
971
+ for row in page_rows:
972
+ table.add_row(*row)
973
+
974
+ # Print table
975
+ console.print(table)
976
+
977
+ # Display total count and page info
978
+ console.print(f"\n[cyan]Total projects:[/cyan] {len(projects)}")
979
+ if total_pages > 1:
980
+ console.print(f"[cyan]Page:[/cyan] {current_page + 1} of {total_pages}")
981
+ console.print(f"[cyan]Projects on this page:[/cyan] {len(page_rows)}")
982
+
983
+ # Show error message if any
984
+ if show_error:
985
+ console.print(show_error)
986
+ show_error = None # Reset error after displaying
987
+
988
+ # Show pagination controls
989
+ if total_pages > 1:
990
+ # Check if we're in an interactive environment
991
+ if not sys.stdin.isatty():
992
+ console.print("\n[yellow]Note: Pagination not available in non-interactive mode. Showing page 1 of {0}.[/yellow]".format(total_pages))
993
+ console.print("[yellow]Run in an interactive terminal to navigate through all pages.[/yellow]")
994
+ break
995
+
996
+ console.print(f"\n[bold cyan]n[/] = next, [bold cyan]p[/] = prev, [bold cyan]q[/] = quit")
997
+
998
+ # Get user input for navigation
999
+ try:
1000
+ choice = input(">>> ").strip().lower()
1001
+ except (EOFError, KeyboardInterrupt):
1002
+ # Handle non-interactive environments or user interrupt
1003
+ console.print("\n[yellow]Pagination interrupted.[/yellow]")
1004
+ break
1005
+
1006
+ if choice in ("q", "quit"):
1007
+ break
1008
+ elif choice in ("n", "next"):
1009
+ if current_page < total_pages - 1:
1010
+ current_page += 1
1011
+ else:
1012
+ show_error = "[red]Invalid choice. Already on the last page.[/red]"
1013
+ elif choice in ("p", "prev"):
1014
+ if current_page > 0:
1015
+ current_page -= 1
1016
+ else:
1017
+ show_error = "[red]Invalid choice. Already on the first page.[/red]"
1018
+ else:
1019
+ show_error = "[red]Invalid choice. Please enter 'n' (next), 'p' (prev), or 'q' (quit).[/red]"
1020
+ else:
1021
+ # Only one page, no need for input, just exit
1022
+ break
@@ -7,6 +7,7 @@ from cloudos_cli.import_wf.import_wf import ImportWorflow
7
7
  from cloudos_cli.utils.resources import ssl_selector
8
8
  from cloudos_cli.configure.configure import with_profile_config, CLOUDOS_URL
9
9
  from cloudos_cli.utils.cli_helpers import pass_debug_to_subcommands
10
+ from cloudos_cli.utils.details import create_workflow_list_table
10
11
 
11
12
 
12
13
  # Create the workflow group
@@ -35,9 +36,13 @@ def workflow():
35
36
  default='workflow_list',
36
37
  required=False)
37
38
  @click.option('--output-format',
38
- help='The desired file format (file extension) for the output. Default=csv.',
39
- type=click.Choice(['csv', 'json'], case_sensitive=False),
40
- default='csv')
39
+ help=('Output format for workflow list. Options: '
40
+ 'stdout (display as interactive table in terminal), '
41
+ 'csv (save as comma-separated values file), '
42
+ 'json (save as JSON file with full API response). '
43
+ 'Default=stdout.'),
44
+ type=click.Choice(['stdout', 'csv', 'json'], case_sensitive=False),
45
+ default='stdout')
41
46
  @click.option('--all-fields',
42
47
  help=('Whether to collect all available fields from workflows or ' +
43
48
  'just the preconfigured selected fields. Only applicable ' +
@@ -66,11 +71,13 @@ def list_workflows(ctx,
66
71
  disable_ssl_verification,
67
72
  ssl_cert,
68
73
  profile):
69
- """Collect all workflows from a CloudOS workspace in CSV format."""
74
+ """Collect and display workflows from a CloudOS workspace."""
70
75
  # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator
71
76
 
72
77
  verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert)
73
- outfile = output_basename + '.' + output_format
78
+ # Only set outfile if not using stdout
79
+ if output_format != 'stdout':
80
+ outfile = output_basename + '.' + output_format
74
81
  print('Executing list...')
75
82
  if verbose:
76
83
  print('\t...Preparing objects')
@@ -81,17 +88,22 @@ def list_workflows(ctx,
81
88
  print('\tSearching for workflows in the following workspace: ' +
82
89
  f'{workspace_id}')
83
90
  my_workflows_r = cl.get_workflow_list(workspace_id, verify=verify_ssl)
84
- if output_format == 'csv':
91
+
92
+ if output_format == 'stdout':
93
+ # Display as table with pagination
94
+ create_workflow_list_table(my_workflows_r, cloudos_url)
95
+ elif output_format == 'csv':
85
96
  my_workflows = cl.process_workflow_list(my_workflows_r, all_fields)
86
97
  my_workflows.to_csv(outfile, index=False)
87
98
  print(f'\tWorkflow list collected with a total of {my_workflows.shape[0]} workflows.')
99
+ print(f'\tWorkflow list saved to {outfile}')
88
100
  elif output_format == 'json':
89
101
  with open(outfile, 'w') as o:
90
102
  o.write(json.dumps(my_workflows_r))
91
103
  print(f'\tWorkflow list collected with a total of {len(my_workflows_r)} workflows.')
104
+ print(f'\tWorkflow list saved to {outfile}')
92
105
  else:
93
- raise ValueError('Unrecognised output format. Please use one of [csv|json]')
94
- print(f'\tWorkflow list saved to {outfile}')
106
+ raise ValueError('Unrecognised output format. Please use one of [stdout|csv|json]')
95
107
 
96
108
 
97
109
  @workflow.command('import')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudos_cli
3
- Version: 2.81.2
3
+ Version: 2.82.0
4
4
  Summary: Python package for interacting with CloudOS
5
5
  Home-page: https://github.com/lifebit-ai/cloudos-cli
6
6
  Author: David Piñeyro
@@ -365,11 +365,21 @@ Projects in CloudOS provide logical separation of datasets, workflows, and resul
365
365
 
366
366
  #### List Projects
367
367
 
368
- You can get a summary of all available workspace projects in two different formats:
369
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
370
- - **JSON**: All available information from projects in JSON format
368
+ You can get a summary of all available workspace projects in three different output formats using the `--output-format` option:
371
369
 
372
- To get a CSV table with all available projects for a given workspace:
370
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
371
+ - **csv**: Saves project data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
372
+ - **json**: Saves complete project information to a JSON file with all available fields
373
+
374
+ To display projects as a formatted table in the terminal:
375
+
376
+ ```bash
377
+ cloudos project list --profile my_profile
378
+ # or explicitly:
379
+ cloudos project list --profile my_profile --output-format stdout
380
+ ```
381
+
382
+ To save projects to a CSV file with all available fields:
373
383
 
374
384
  ```bash
375
385
  cloudos project list --profile my_profile --output-format csv --all-fields
@@ -383,7 +393,7 @@ Executing list...
383
393
  Project list saved to project_list.csv
384
394
  ```
385
395
 
386
- To get the same information in JSON format:
396
+ To save the same information in JSON format:
387
397
 
388
398
  ```bash
389
399
  cloudos project list --profile my_profile --output-format json
@@ -406,13 +416,28 @@ The expected output is something similar to:
406
416
 
407
417
  ### Queue
408
418
 
409
- Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings". You can get a summary of all available workspace job queues in two formats:
410
- - **CSV**: A table with a selection of the available job queue information. You can get all information using the `--all-fields` flag
411
- - **JSON**: All available information from job queues in JSON format
419
+ Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings".
420
+
421
+ > [!NOTE]
422
+ > **Azure Platform**: Queue listing is not available for CloudOS workspaces configured to use Azure execution platform, as Azure does not use AWS batch queues.
412
423
 
413
424
  #### List Queues
414
425
 
415
- This command allows you to view available computational queues and their configurations. Example command for getting all available job queues in JSON format:
426
+ This command allows you to view available computational queues and their configurations. You can get a summary of all available workspace job queues in three different output formats using the `--output-format` option:
427
+
428
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
429
+ - **csv**: Saves queue data to a CSV file with a selection of available queue information, or all information using the `--all-fields` flag
430
+ - **json**: Saves complete queue information to a JSON file with all available fields
431
+
432
+ To display queues as a formatted table in the terminal:
433
+
434
+ ```bash
435
+ cloudos queue list --profile my_profile
436
+ # or explicitly:
437
+ cloudos queue list --profile my_profile --output-format stdout
438
+ ```
439
+
440
+ To save all available job queues in JSON format:
416
441
 
417
442
  ```bash
418
443
  cloudos queue list --profile my_profile --output-format json --output-basename "available_queues"
@@ -424,7 +449,11 @@ Executing list...
424
449
  Job queue list saved to available_queues.json
425
450
  ```
426
451
 
427
- This command will output the list of available job queues in JSON format and save it to a file named `available_queues.json`. You can use `--output-format csv` for a CSV file, or omit `--output-basename` to print to the console.
452
+ To save queue data to a CSV file:
453
+
454
+ ```bash
455
+ cloudos queue list --profile my_profile --output-format csv
456
+ ```
428
457
 
429
458
  > NOTE: The queue name that is visible in CloudOS and must be used with the `--job-queue` parameter is the one in the `label` field.
430
459
 
@@ -437,11 +466,21 @@ Platform workflows (those provided by CloudOS in your workspace as modules) run
437
466
 
438
467
  #### List All Available Workflows
439
468
 
440
- You can get a summary of all available workspace workflows in two different formats:
441
- - **CSV**: A table with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
442
- - **JSON**: All available information from workflows in JSON format
469
+ You can get a list of all available workspace workflows in three different output formats using the `--output-format` option:
470
+
471
+ - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
472
+ - **csv**: Saves workflow data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
473
+ - **json**: Saves complete workflow information to a JSON file with all available fields
474
+
475
+ To display the list of workflows as a formatted table in the terminal:
476
+
477
+ ```bash
478
+ cloudos workflow list --profile my_profile
479
+ # or explicitly:
480
+ cloudos workflow list --profile my_profile --output-format stdout
481
+ ```
443
482
 
444
- To get a CSV table with all available workflows for a given workspace:
483
+ To save the list of workflows to a CSV file with all available fields:
445
484
 
446
485
  ```bash
447
486
  cloudos workflow list --profile my_profile --output-format csv --all-fields
@@ -455,7 +494,7 @@ Executing list...
455
494
  Workflow list saved to workflow_list.csv
456
495
  ```
457
496
 
458
- To get the same information in JSON format:
497
+ To save the same information in JSON format:
459
498
 
460
499
  ```bash
461
500
  cloudos workflow list --profile my_profile --output-format json
@@ -1 +0,0 @@
1
- __version__ = '2.81.2'
File without changes
File without changes
File without changes