cloudos-cli 2.75.0__tar.gz → 2.75.1__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 (54) hide show
  1. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/PKG-INFO +1 -1
  2. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/__main__.py +32 -32
  3. cloudos_cli-2.75.1/cloudos_cli/_version.py +1 -0
  4. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/clos.py +13 -13
  5. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/cost/cost.py +1 -1
  6. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/jobs/job.py +8 -8
  7. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/link/link.py +2 -2
  8. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/PKG-INFO +1 -1
  9. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/SOURCES.txt +1 -0
  10. cloudos_cli-2.75.1/tests/test_error_messages.py +856 -0
  11. cloudos_cli-2.75.0/cloudos_cli/_version.py +0 -1
  12. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/LICENSE +0 -0
  13. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/README.md +0 -0
  14. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/__init__.py +0 -0
  15. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/configure/__init__.py +0 -0
  16. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/configure/configure.py +0 -0
  17. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/cost/__init__.py +0 -0
  18. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/datasets/__init__.py +0 -0
  19. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/datasets/datasets.py +0 -0
  20. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/import_wf/__init__.py +0 -0
  21. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/import_wf/import_wf.py +0 -0
  22. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/jobs/__init__.py +0 -0
  23. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/link/__init__.py +0 -0
  24. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/logging/__init__.py +0 -0
  25. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/logging/logger.py +0 -0
  26. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/procurement/__init__.py +0 -0
  27. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/procurement/images.py +0 -0
  28. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/queue/__init__.py +0 -0
  29. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/queue/queue.py +0 -0
  30. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/related_analyses/__init__.py +0 -0
  31. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/related_analyses/related_analyses.py +0 -0
  32. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/__init__.py +0 -0
  33. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/array_job.py +0 -0
  34. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/cloud.py +0 -0
  35. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/details.py +0 -0
  36. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/errors.py +0 -0
  37. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/last_wf.py +0 -0
  38. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/requests.py +0 -0
  39. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli/utils/resources.py +0 -0
  40. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  41. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/entry_points.txt +0 -0
  42. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/requires.txt +0 -0
  43. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/cloudos_cli.egg-info/top_level.txt +0 -0
  44. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/setup.cfg +0 -0
  45. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/setup.py +0 -0
  46. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/__init__.py +0 -0
  47. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/functions_for_pytest.py +0 -0
  48. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_cli_project_create.py +0 -0
  49. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_cost/__init__.py +0 -0
  50. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_cost/test_job_cost.py +0 -0
  51. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_logging/__init__.py +0 -0
  52. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_logging/test_logger.py +0 -0
  53. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/tests/test_related_analyses/__init__.py +0 -0
  54. {cloudos_cli-2.75.0 → cloudos_cli-2.75.1}/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.75.0
3
+ Version: 2.75.1
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
@@ -702,9 +702,9 @@ def job_status(ctx,
702
702
  print(f'\tTo further check your job status you can either go to {j_url} ' +
703
703
  'or repeat the command you just used.')
704
704
  except BadRequestException as e:
705
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
705
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
706
706
  except Exception as e:
707
- raise ValueError(f"Failed to retrieve working directory for job '{job_id}': {str(e)}")
707
+ raise ValueError(f"Failed to retrieve working directory for job '{job_id}'. {str(e)}")
708
708
 
709
709
 
710
710
  @job.command('workdir')
@@ -889,9 +889,9 @@ def job_workdir(ctx,
889
889
  link_client.link_folder(workdir.strip(), session_id)
890
890
 
891
891
  except BadRequestException as e:
892
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
892
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
893
893
  except Exception as e:
894
- raise ValueError(f"Failed to retrieve working directory for job '{job_id}': {str(e)}")
894
+ raise ValueError(f"Failed to retrieve working directory for job '{job_id}'. {str(e)}")
895
895
 
896
896
  # Delete workdir directory if requested
897
897
  if delete:
@@ -919,9 +919,9 @@ def job_workdir(ctx,
919
919
  job.delete_job_results(job_id, "workDirectory", verify=verify_ssl)
920
920
  click.secho('\nIntermediate results directories deleted successfully.', fg='green', bold=True)
921
921
  except BadRequestException as e:
922
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
922
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
923
923
  except Exception as e:
924
- raise ValueError(f"Failed to retrieve intermediate results for job '{job_id}': {str(e)}")
924
+ raise ValueError(f"Failed to retrieve intermediate results for job '{job_id}'. {str(e)}")
925
925
  else:
926
926
  if yes:
927
927
  click.secho("\n'--yes' flag is ignored when '--delete' is not specified.", fg='yellow', bold=True)
@@ -1030,9 +1030,9 @@ def job_logs(ctx,
1030
1030
  print('\tNo logs found to link.')
1031
1031
 
1032
1032
  except BadRequestException as e:
1033
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
1033
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
1034
1034
  except Exception as e:
1035
- raise ValueError(f"Failed to retrieve logs for job '{job_id}': {str(e)}")
1035
+ raise ValueError(f"Failed to retrieve logs for job '{job_id}'. {str(e)}")
1036
1036
 
1037
1037
 
1038
1038
  @job.command('results')
@@ -1247,9 +1247,9 @@ def job_results(ctx,
1247
1247
  if yes:
1248
1248
  click.secho("\n'--yes' flag is ignored when '--delete' is not specified.", fg='yellow', bold=True)
1249
1249
  except BadRequestException as e:
1250
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
1250
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
1251
1251
  except Exception as e:
1252
- raise ValueError(f"Failed to retrieve results for job '{job_id}': {str(e)}")
1252
+ raise ValueError(f"Failed to retrieve results for job '{job_id}'. {str(e)}")
1253
1253
 
1254
1254
 
1255
1255
  @job.command('details')
@@ -1328,9 +1328,9 @@ def job_details(ctx,
1328
1328
  if '403' in str(e) or 'Forbidden' in str(e):
1329
1329
  raise ValueError("API can only show job details of your own jobs, cannot see other user's job details.")
1330
1330
  else:
1331
- raise ValueError(f"Job '{job_id}' not found or not accessible: {str(e)}")
1331
+ raise ValueError(f"Job '{job_id}' not found or not accessible. {str(e)}")
1332
1332
  except Exception as e:
1333
- raise ValueError(f"Failed to retrieve details for job '{job_id}': {str(e)}")
1333
+ raise ValueError(f"Failed to retrieve details for job '{job_id}'. {str(e)}")
1334
1334
  create_job_details(json.loads(j_details.content), job_id, output_format, output_basename, parameters, cloudos_url)
1335
1335
 
1336
1336
 
@@ -1860,9 +1860,9 @@ def clone_resume(ctx,
1860
1860
  print(f"Job successfully {mode}d. New job ID: {cloned_resumed_job_id}")
1861
1861
 
1862
1862
  except BadRequestException as e:
1863
- raise ValueError(f"Failed to {mode} job. Job '{job_id}' not found or not accessible: {str(e)}")
1863
+ raise ValueError(f"Failed to {mode} job. Job '{job_id}' not found or not accessible. {str(e)}")
1864
1864
  except Exception as e:
1865
- raise ValueError(f"Failed to {mode} job. Failed to {action} job '{job_id}': {str(e)}")
1865
+ raise ValueError(f"Failed to {mode} job. Failed to {action} job '{job_id}'. {str(e)}")
1866
1866
 
1867
1867
 
1868
1868
  # Apply the best Click solution: Set specific help text for each command registration
@@ -3217,7 +3217,7 @@ def list_files(ctx,
3217
3217
  console.print(item['name'])
3218
3218
 
3219
3219
  except Exception as e:
3220
- raise ValueError(f"Failed to list files for project '{project_name}': {str(e)}")
3220
+ raise ValueError(f"Failed to list files for project '{project_name}'. {str(e)}")
3221
3221
 
3222
3222
 
3223
3223
  @datasets.command(name="mv")
@@ -3281,7 +3281,7 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac
3281
3281
  try:
3282
3282
  source_contents = source_client.list_folder_content(source_parent_path)
3283
3283
  except Exception as e:
3284
- raise ValueError(f"Could not resolve source path '{source_path}': {str(e)}")
3284
+ raise ValueError(f"Could not resolve source path '{source_path}'. {str(e)}")
3285
3285
 
3286
3286
  found_source = None
3287
3287
  for collection in ["files", "folders"]:
@@ -3322,7 +3322,7 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac
3322
3322
  raise ValueError(f"Unrecognized folderType '{folder_type}' for destination '{destination_path}'")
3323
3323
 
3324
3324
  except Exception as e:
3325
- raise ValueError(f"Could not resolve destination path '{destination_path}': {str(e)}")
3325
+ raise ValueError(f"Could not resolve destination path '{destination_path}'. {str(e)}")
3326
3326
  print(f"Moving {source_kind} '{source_item_name}' to '{destination_path}' " +
3327
3327
  f"in project '{destination_project_name} ...")
3328
3328
  # === Perform Move ===
@@ -3337,9 +3337,9 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac
3337
3337
  click.secho(f"{source_kind} '{source_item_name}' moved to '{destination_path}' " +
3338
3338
  f"in project '{destination_project_name}'.", fg="green", bold=True)
3339
3339
  else:
3340
- raise ValueError(f"Move failed: {response.status_code} - {response.text}")
3340
+ raise ValueError(f"Move failed. {response.status_code} - {response.text}")
3341
3341
  except Exception as e:
3342
- raise ValueError(f"Move operation failed: {str(e)}")
3342
+ raise ValueError(f"Move operation failed. {str(e)}")
3343
3343
 
3344
3344
 
3345
3345
  @datasets.command(name="rename")
@@ -3392,7 +3392,7 @@ def renaming_item(ctx,
3392
3392
  try:
3393
3393
  contents = client.list_folder_content(parent_path)
3394
3394
  except Exception as e:
3395
- raise ValueError(f"Could not list contents at '{parent_path or '[project root]'}': {str(e)}")
3395
+ raise ValueError(f"Could not list contents at '{parent_path or '[project root]'}'. {str(e)}")
3396
3396
 
3397
3397
  # Search for file/folder
3398
3398
  found_item = None
@@ -3420,9 +3420,9 @@ def renaming_item(ctx,
3420
3420
  bold=True
3421
3421
  )
3422
3422
  else:
3423
- raise ValueError(f"Rename failed: {response.status_code} - {response.text}")
3423
+ raise ValueError(f"Rename failed. {response.status_code} - {response.text}")
3424
3424
  except Exception as e:
3425
- raise ValueError(f"Rename operation failed: {str(e)}")
3425
+ raise ValueError(f"Rename operation failed. {str(e)}")
3426
3426
 
3427
3427
 
3428
3428
  @datasets.command(name="cp")
@@ -3490,7 +3490,7 @@ def copy_item_cli(ctx,
3490
3490
  source_content = source_client.list_folder_content(source_parent)
3491
3491
  dest_content = dest_client.list_folder_content(dest_parent)
3492
3492
  except Exception as e:
3493
- raise ValueError(f"Could not access paths: {str(e)}")
3493
+ raise ValueError(f"Could not access paths. {str(e)}")
3494
3494
  # Find the source item
3495
3495
  source_item = None
3496
3496
  for item in source_content.get('files', []) + source_content.get('folders', []):
@@ -3532,9 +3532,9 @@ def copy_item_cli(ctx,
3532
3532
  if response.ok:
3533
3533
  click.secho("Item copied successfully.", fg="green", bold=True)
3534
3534
  else:
3535
- raise ValueError(f"Copy failed: {response.status_code} - {response.text}")
3535
+ raise ValueError(f"Copy failed. {response.status_code} - {response.text}")
3536
3536
  except Exception as e:
3537
- raise ValueError(f"Copy operation failed: {str(e)}")
3537
+ raise ValueError(f"Copy operation failed. {str(e)}")
3538
3538
 
3539
3539
 
3540
3540
  @datasets.command(name="mkdir")
@@ -3593,7 +3593,7 @@ def mkdir_item(ctx,
3593
3593
  try:
3594
3594
  contents = client.list_folder_content(parent_of_parent_path)
3595
3595
  except Exception as e:
3596
- raise ValueError(f"Could not list contents at '{parent_of_parent_path}': {str(e)}")
3596
+ raise ValueError(f"Could not list contents at '{parent_of_parent_path}'. {str(e)}")
3597
3597
 
3598
3598
  # Find the parent folder in the contents
3599
3599
  folder_info = next(
@@ -3621,9 +3621,9 @@ def mkdir_item(ctx,
3621
3621
  if response.ok:
3622
3622
  click.secho(f"Folder '{folder_name}' created under '{parent_path}'", fg="green", bold=True)
3623
3623
  else:
3624
- raise ValueError(f"Folder creation failed: {response.status_code} - {response.text}")
3624
+ raise ValueError(f"Folder creation failed. {response.status_code} - {response.text}")
3625
3625
  except Exception as e:
3626
- raise ValueError(f"Folder creation failed: {str(e)}")
3626
+ raise ValueError(f"Folder creation failed. {str(e)}")
3627
3627
 
3628
3628
 
3629
3629
  @datasets.command(name="rm")
@@ -3675,7 +3675,7 @@ def rm_item(ctx,
3675
3675
  try:
3676
3676
  contents = client.list_folder_content(parent_path)
3677
3677
  except Exception as e:
3678
- raise ValueError(f"Could not list contents at '{parent_path or '[project root]'}': {str(e)}")
3678
+ raise ValueError(f"Could not list contents at '{parent_path or '[project root]'}'. {str(e)}")
3679
3679
 
3680
3680
  found_item = None
3681
3681
  for item in contents.get('files', []) + contents.get('folders', []):
@@ -3710,9 +3710,9 @@ def rm_item(ctx,
3710
3710
  )
3711
3711
  click.secho("This item will still be available on your Cloud Provider.", fg="yellow")
3712
3712
  else:
3713
- raise ValueError(f"Removal failed: {response.status_code} - {response.text}")
3713
+ raise ValueError(f"Removal failed. {response.status_code} - {response.text}")
3714
3714
  except Exception as e:
3715
- raise ValueError(f"Remove operation failed: {str(e)}")
3715
+ raise ValueError(f"Remove operation failed. {str(e)}")
3716
3716
 
3717
3717
 
3718
3718
  @datasets.command(name="link")
@@ -3833,7 +3833,7 @@ def link(ctx,
3833
3833
  except Exception as e:
3834
3834
  if is_s3:
3835
3835
  print("If you are linking an S3 path, please ensure it is a folder.")
3836
- raise ValueError(f"Could not link folder: {e}")
3836
+ raise ValueError(f"Could not link folder. {e}")
3837
3837
 
3838
3838
 
3839
3839
  @images.command(name="ls")
@@ -0,0 +1 @@
1
+ __version__ = '2.75.1'
@@ -422,7 +422,7 @@ class Cloudos:
422
422
  if r_json["status"] =='initializing' or r_json["status"] =='scheduled':
423
423
  raise ValueError("Logs are not yet available. The job is still initializing.")
424
424
  if "logs" not in r_json:
425
- raise ValueError("ERROR: Logs are not available.")
425
+ raise ValueError("Logs are not available.")
426
426
  else:
427
427
  logs_obj = r_json["logs"]
428
428
  cloud_name, cloud_meta, cloud_storage = find_cloud(self.cloudos_url, self.apikey, workspace_id, logs_obj)
@@ -651,7 +651,7 @@ class Cloudos:
651
651
  try:
652
652
  project_content = ds.list_project_content()
653
653
  except Exception as e:
654
- raise ValueError(f"Failed to list project content for project '{project_name}': {str(e)}")
654
+ raise ValueError(f"Failed to list project content for project '{project_name}'. {str(e)}")
655
655
 
656
656
  # Find the Analysis Results folder ID
657
657
  analysis_results_id = None
@@ -669,7 +669,7 @@ class Cloudos:
669
669
  response = self.get_folder_items_deletion_status(analysis_results_id, workspace_id, verify)
670
670
  content = json.loads(response.content)
671
671
  except Exception as e:
672
- raise ValueError(f"Failed to get items from Analyses Results folder: {str(e)}")
672
+ raise ValueError(f"Failed to get items from Analyses Results folder. {str(e)}")
673
673
 
674
674
  # The API response contains folders and files arrays
675
675
  # Find the entry matching our job_id
@@ -948,7 +948,7 @@ class Cloudos:
948
948
  else:
949
949
  raise ValueError(f"User '{filter_owner}' not found.")
950
950
  except Exception as e:
951
- raise ValueError(f"Error resolving user '{filter_owner}': {str(e)}")
951
+ raise ValueError(f"Error resolving user '{filter_owner}'. {str(e)}")
952
952
 
953
953
  def get_cromwell_status(self, workspace_id, verify=True):
954
954
  """Get Cromwell server status from CloudOS.
@@ -1143,7 +1143,7 @@ class Cloudos:
1143
1143
  else:
1144
1144
  raise ValueError(f"Project '{filter_project}' not found.")
1145
1145
  except Exception as e:
1146
- raise ValueError(f"Error resolving project '{filter_project}': {str(e)}")
1146
+ raise ValueError(f"Error resolving project '{filter_project}'. {str(e)}")
1147
1147
 
1148
1148
  # Resolve workflow name to ID
1149
1149
  if filter_workflow:
@@ -1160,7 +1160,7 @@ class Cloudos:
1160
1160
  else:
1161
1161
  raise ValueError(f"Workflow '{filter_workflow}' not found.")
1162
1162
  except Exception as e:
1163
- raise ValueError(f"Error resolving workflow '{filter_workflow}': {str(e)}")
1163
+ raise ValueError(f"Error resolving workflow '{filter_workflow}'. {str(e)}")
1164
1164
 
1165
1165
  # Get current user ID for filter_only_mine
1166
1166
  if filter_only_mine:
@@ -1172,7 +1172,7 @@ class Cloudos:
1172
1172
  else:
1173
1173
  raise ValueError("Could not retrieve current user information.")
1174
1174
  except Exception as e:
1175
- raise ValueError(f"Error getting current user info: {str(e)}")
1175
+ raise ValueError(f"Error getting current user info. {str(e)}")
1176
1176
 
1177
1177
  # Resolve owner username to user ID
1178
1178
  if filter_owner:
@@ -1240,7 +1240,7 @@ class Cloudos:
1240
1240
  else:
1241
1241
  raise ValueError(f"The environment is not a batch environment so queues do not exist. Please remove the --filter-queue option.")
1242
1242
  except Exception as e:
1243
- raise ValueError(f"Error filtering by queue '{filter_queue}': {str(e)}")
1243
+ raise ValueError(f"Error filtering by queue '{filter_queue}'. {str(e)}")
1244
1244
 
1245
1245
  # --- Apply limit after all filtering ---
1246
1246
  if use_pagination_mode and target_job_count != 'all' and isinstance(target_job_count, int) and target_job_count > 0:
@@ -1585,7 +1585,7 @@ class Cloudos:
1585
1585
  # make unique
1586
1586
  wt = list(dict.fromkeys(wt_all))
1587
1587
  if len(wt) > 1:
1588
- raise ValueError(f'More than one workflow type detected for {workflow_name}: {wt}')
1588
+ raise ValueError(f'More than one workflow type ("{wt}") detected for "{workflow_name}". ')
1589
1589
  return str(wt[0])
1590
1590
 
1591
1591
  def is_module(self, workflow_name, workspace_id, verify=True, last=False):
@@ -1769,7 +1769,7 @@ class Cloudos:
1769
1769
  repository_project = workflow_url.split('/')[4]
1770
1770
  repository_id = repository_name
1771
1771
  else:
1772
- raise ValueError(f'Your repository platform is not supported: {platform_url}. ' +
1772
+ raise ValueError(f'Your repository platform "{platform_url}" is not supported. ' +
1773
1773
  'Please use either GitHub or BitbucketServer.')
1774
1774
  repository_name = workflow_url.split('/')[-1]
1775
1775
 
@@ -1989,7 +1989,7 @@ class Cloudos:
1989
1989
  pag_content = json.loads(response.content)
1990
1990
  max_pagination = pag_content["paginationMetadata"]["Pagination-Count"]
1991
1991
  if max_pagination == 0:
1992
- raise ValueError(f'No workflow found with name: {workflow_name} in workspace: {workspace_id}')
1992
+ raise ValueError(f'No workflow found with name "{workflow_name}" in workspace "{workspace_id}"')
1993
1993
 
1994
1994
  return max_pagination
1995
1995
 
@@ -2045,9 +2045,9 @@ class Cloudos:
2045
2045
  wf = [wf.get("name") for wf in content.get("workflows", []) if wf.get("name") == workflow_name]
2046
2046
 
2047
2047
  if len(wf) == 0 or len(content["workflows"]) == 0:
2048
- raise ValueError(f'No workflow found with name: {workflow_name} in workspace: {workspace_id}')
2048
+ raise ValueError(f'No workflow found with name "{workflow_name}" in workspace "{workspace_id}"')
2049
2049
  if len(wf) > 1 and not last:
2050
- raise ValueError(f'More than one workflow found with name: {workflow_name}. ' + \
2050
+ raise ValueError(f'More than one workflow found with name "{workflow_name}". ' + \
2051
2051
  "To run the last imported workflow use '--last' flag.")
2052
2052
  else:
2053
2053
  content = youngest_workflow_id_by_name(content, workflow_name)
@@ -256,4 +256,4 @@ class CostViewer:
256
256
  else:
257
257
  raise ValueError(f"{str(e)}")
258
258
  except Exception as e:
259
- raise ValueError(f"[Error] An unexpected error occurred: {str(e)}")
259
+ raise ValueError(f"An unexpected error occurred. {str(e)}")
@@ -391,7 +391,7 @@ class Job(Cloudos):
391
391
  "textValue": p_value}
392
392
  workflow_params.append(param)
393
393
  if len(workflow_params) == 0:
394
- raise ValueError(f'The provided parameters are not valid: {parameter}')
394
+ raise ValueError(f'The provided parameters "{parameter}" are not valid. ')
395
395
  if len(example_parameters) > 0:
396
396
  for example_param in example_parameters:
397
397
  workflow_params.append(example_param)
@@ -1101,7 +1101,7 @@ class Job(Cloudos):
1101
1101
  source_job_id, field="status", verify=verify
1102
1102
  )
1103
1103
  except Exception as e:
1104
- raise ValueError(f"The job status cannot be retrieved: {e}")
1104
+ raise ValueError(f"The job status cannot be retrieved. {e}")
1105
1105
 
1106
1106
  allowed_statuses = {"completed", "aborted", "failed"}
1107
1107
  if status not in allowed_statuses:
@@ -1191,7 +1191,7 @@ class Job(Cloudos):
1191
1191
  if not queue_id:
1192
1192
  raise ValueError(f"Queue with name '{queue_name}' not found in workspace '{self.workspace_id}'")
1193
1193
  except Exception as e:
1194
- raise ValueError(f"Error filtering by queue '{queue_name}': {str(e)}")
1194
+ raise ValueError(f"Error filtering by queue '{queue_name}'. {str(e)}")
1195
1195
  else:
1196
1196
  print("Azure workspace does not use job queues, option '--job-queue' is ignored.\n")
1197
1197
 
@@ -1469,11 +1469,11 @@ class Job(Cloudos):
1469
1469
  # NoContent - successful deletion
1470
1470
  return {"message": "Results deleted successfully", "status": "deleted"}
1471
1471
  elif response.status_code == 400:
1472
- raise ValueError(f"Operation not permitted: Your workspace does not have the option to delete {'results' if mode == 'analysisResults' else 'intermediate'} folders enabled. Please consult with the organisation owner to enable this feature.")
1472
+ raise ValueError(f"Operation not permitted. Your workspace does not have the option to delete {'results' if mode == 'analysisResults' else 'intermediate'} folders enabled. Please consult with the organisation owner to enable this feature.")
1473
1473
  elif response.status_code == 401:
1474
- raise ValueError("Unauthorized: Invalid or missing API key.")
1474
+ raise ValueError("Unauthorized. Invalid or missing API key.")
1475
1475
  elif response.status_code == 403:
1476
- raise ValueError("Forbidden: You don't have permission to delete this folder.")
1476
+ raise ValueError("Forbidden. You don't have permission to delete this folder.")
1477
1477
  elif response.status_code == 404:
1478
1478
  if response.content:
1479
1479
  try:
@@ -1484,9 +1484,9 @@ class Job(Cloudos):
1484
1484
  error_message = f"Job with ID '{job_id}' not found or data does not exist."
1485
1485
  raise ValueError(error_message)
1486
1486
  elif response.status_code == 409:
1487
- raise ValueError("Conflict: The folder cannot be deleted due to a conflict (e.g., folder is not empty or has dependencies).")
1487
+ raise ValueError("Conflict. The folder cannot be deleted due to a conflict (e.g., folder is not empty or has dependencies).")
1488
1488
  elif response.status_code == 500:
1489
- raise ValueError("Internal server error: The server encountered an error while processing the deletion request.")
1489
+ raise ValueError("Internal server error. The server encountered an error while processing the deletion request.")
1490
1490
  elif response.status_code >= 400:
1491
1491
  raise BadRequestException(response)
1492
1492
 
@@ -82,7 +82,7 @@ class Link(Cloudos):
82
82
  if r.status_code == 403:
83
83
  raise ValueError(f"Provided {type_folder} folder already exists with 'mounted' status")
84
84
  elif r.status_code == 401:
85
- raise ValueError(f"Forbidden: Invalid API key or insufficient permissions")
85
+ raise ValueError(f"Forbidden. Invalid API key or insufficient permissions.")
86
86
  elif r.status_code == 400:
87
87
  r_content = json.loads(r.content)
88
88
  if r_content["message"] == "Invalid Supported DataItem folderType. Supported values are S3Folder":
@@ -236,7 +236,7 @@ class Link(Cloudos):
236
236
  r = retry_requests_get(url, headers=headers, verify=self.verify)
237
237
 
238
238
  if r.status_code == 401:
239
- raise ValueError("Forbidden: Invalid API key or insufficient permissions")
239
+ raise ValueError("Forbidden. Invalid API key or insufficient permissions.")
240
240
  elif r.status_code == 404:
241
241
  raise ValueError(f"Interactive session {session_id} not found")
242
242
  elif r.status_code != 200:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cloudos_cli
3
- Version: 2.75.0
3
+ Version: 2.75.1
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
@@ -42,6 +42,7 @@ cloudos_cli/utils/resources.py
42
42
  tests/__init__.py
43
43
  tests/functions_for_pytest.py
44
44
  tests/test_cli_project_create.py
45
+ tests/test_error_messages.py
45
46
  tests/test_cost/__init__.py
46
47
  tests/test_cost/test_job_cost.py
47
48
  tests/test_logging/__init__.py