cloudos-cli 2.76.4__tar.gz → 2.78.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 (54) hide show
  1. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/PKG-INFO +220 -2
  2. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/README.md +219 -1
  3. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/__main__.py +159 -7
  4. cloudos_cli-2.78.0/cloudos_cli/_version.py +1 -0
  5. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/clos.py +185 -3
  6. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/PKG-INFO +220 -2
  7. cloudos_cli-2.76.4/cloudos_cli/_version.py +0 -1
  8. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/LICENSE +0 -0
  9. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/__init__.py +0 -0
  10. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/configure/__init__.py +0 -0
  11. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/configure/configure.py +0 -0
  12. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/cost/__init__.py +0 -0
  13. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/cost/cost.py +0 -0
  14. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/datasets/__init__.py +0 -0
  15. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/datasets/datasets.py +0 -0
  16. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/import_wf/__init__.py +0 -0
  17. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/import_wf/import_wf.py +0 -0
  18. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/jobs/__init__.py +0 -0
  19. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/jobs/job.py +0 -0
  20. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/link/__init__.py +0 -0
  21. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/link/link.py +0 -0
  22. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/logging/__init__.py +0 -0
  23. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/logging/logger.py +0 -0
  24. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/procurement/__init__.py +0 -0
  25. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/procurement/images.py +0 -0
  26. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/queue/__init__.py +0 -0
  27. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/queue/queue.py +0 -0
  28. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/related_analyses/__init__.py +0 -0
  29. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
  30. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/__init__.py +0 -0
  31. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/array_job.py +0 -0
  32. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/cloud.py +0 -0
  33. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/details.py +0 -0
  34. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/errors.py +0 -0
  35. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/last_wf.py +0 -0
  36. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/requests.py +0 -0
  37. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli/utils/resources.py +0 -0
  38. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
  39. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  40. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
  41. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/requires.txt +0 -0
  42. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/cloudos_cli.egg-info/top_level.txt +0 -0
  43. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/setup.cfg +0 -0
  44. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/setup.py +0 -0
  45. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/__init__.py +0 -0
  46. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/functions_for_pytest.py +0 -0
  47. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_cli_project_create.py +0 -0
  48. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_cost/__init__.py +0 -0
  49. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_cost/test_job_cost.py +0 -0
  50. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_error_messages.py +0 -0
  51. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_logging/__init__.py +0 -0
  52. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_logging/test_logger.py +0 -0
  53. {cloudos_cli-2.76.4 → cloudos_cli-2.78.0}/tests/test_related_analyses/__init__.py +0 -0
  54. {cloudos_cli-2.76.4 → cloudos_cli-2.78.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.76.4
3
+ Version: 2.78.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
@@ -80,6 +80,8 @@ Python package for interacting with CloudOS
80
80
  - [Get Job Costs](#get-job-costs)
81
81
  - [Get Job Related Analyses](#get-job-related-analyses)
82
82
  - [Delete Job Results](#delete-job-results)
83
+ - [Archive Jobs](#archive-jobs)
84
+ - [Unarchive Jobs](#unarchive-jobs)
83
85
  - [Bash Jobs](#bash-jobs)
84
86
  - [Send Array Job](#send-array-job)
85
87
  - [Submit a Bash Array Job](#submit-a-bash-array-job)
@@ -967,7 +969,8 @@ cloudos job resume \
967
969
 
968
970
  Aborts jobs in the CloudOS workspace that are either running or initializing. It can be used with one or more job IDs provided as a comma-separated string using the `--job-ids` parameter.
969
971
 
970
- Example:
972
+ ##### Basic Usage
973
+
971
974
  ```bash
972
975
  cloudos job abort --profile my_profile --job-ids "680a3cf80e56949775c02f16"
973
976
  ```
@@ -977,6 +980,29 @@ Aborting jobs...
977
980
  Job 680a3cf80e56949775c02f16 aborted successfully.
978
981
  ```
979
982
 
983
+ ##### Force Abort
984
+
985
+ The `--force` flag allows you to abort jobs faster as it removes the running infrastructure. When using this flag, be aware that some data might be lost (it could be results or logs, based on what the job is performing at the moment of the forced abort).
986
+
987
+ ```bash
988
+ cloudos job abort --profile my_profile --job-ids "680a3cf80e56949775c02f16" --force
989
+ ```
990
+
991
+ ```console
992
+ Aborting jobs...
993
+ Warning: Using --force to abort job 680a3cf80e56949775c02f16. Some data might be lost.
994
+ Job 680a3cf80e56949775c02f16 aborted successfully.
995
+ ```
996
+
997
+ ##### Additional Options
998
+
999
+ - `--workspace-id`: The CloudOS workspace ID (can be set in profile)
1000
+ - `--apikey`: Your CloudOS API key (can be set in profile)
1001
+ - `--cloudos-url`: The CloudOS URL (default: https://cloudos.lifebit.ai)
1002
+ - `--verbose`: Print detailed information messages
1003
+ - `--disable-ssl-verification`: Disable SSL certificate verification (not recommended)
1004
+ - `--ssl-cert`: Path to your SSL certificate file
1005
+
980
1006
  #### Get Job Details
981
1007
 
982
1008
  Details of a job, including cost, status, and timestamps, can be retrieved with:
@@ -1469,6 +1495,198 @@ Selected job does not have 'Results' information.
1469
1495
 
1470
1496
  For bulk deletion of job results and working directories across multiple jobs in a project, see the [delete_project_jobs.sh utility script](docs/utils/delete_project_jobs.md) in the `utils` folder. This script allows you to efficiently delete results and/or working directories for all jobs in a project.
1471
1497
 
1498
+ #### Archive Jobs
1499
+
1500
+ CloudOS allows you to archive completed jobs to organize and manage your analysis history.
1501
+
1502
+ > [!NOTE]
1503
+ > Archiving jobs does not delete any data or results. It simply adds metadata to mark jobs as archived for organizational purposes.
1504
+
1505
+ > [!IMPORTANT]
1506
+ > **Admin Permissions Required**: Only workspace administrators can archive jobs belonging to other users. Regular users can only archive their own jobs.
1507
+
1508
+ **Archive a Single Job**
1509
+
1510
+ To archive a single job, use the `job archive` command with the job ID:
1511
+
1512
+ ```bash
1513
+ cloudos job archive --profile my_profile --job-ids 69413101b07d5f5bb46891b4
1514
+ ```
1515
+
1516
+ The expected output will confirm successful archiving:
1517
+
1518
+ ```console
1519
+ Archiving jobs...
1520
+ Job '69413101b07d5f5bb46891b4' archived successfully.
1521
+ ```
1522
+
1523
+ **Archive Multiple Jobs**
1524
+
1525
+ You can archive multiple jobs simultaneously by providing a comma-separated list of job IDs:
1526
+
1527
+ ```bash
1528
+ cloudos job archive --profile my_profile --job-ids "job1,job2,job3"
1529
+ ```
1530
+
1531
+ This will archive all valid job IDs in a single operation:
1532
+
1533
+ ```console
1534
+ Archiving jobs...
1535
+ 3 jobs archived successfully: job1, job2, job3
1536
+ ```
1537
+
1538
+ **Verbose Output**
1539
+
1540
+ For detailed information about the archiving process, use the `--verbose` flag:
1541
+
1542
+ ```bash
1543
+ cloudos job archive --profile my_profile --job-ids 69413101b07d5f5bb46891b4 --verbose
1544
+ ```
1545
+
1546
+ This provides additional details about the operation:
1547
+
1548
+ ```console
1549
+ Archiving jobs...
1550
+ ...Preparing objects
1551
+ The following Cloudos object was created:
1552
+ Cloudos(cloudos_url='https://cloudos.lifebit.ai', apikey='***', cromwell_token=None)
1553
+
1554
+ Archiving jobs in the following workspace: workspace_123
1555
+ Job 69413101b07d5f5bb46891b4 found with status: completed
1556
+ Job '69413101b07d5f5bb46891b4' archived successfully.
1557
+ ```
1558
+
1559
+ **Error Handling**
1560
+
1561
+ The archive command handles various scenarios gracefully:
1562
+
1563
+ - **Invalid Job IDs**: Jobs that don't exist are skipped with a warning message
1564
+ - **Mixed Valid/Invalid**: Valid jobs are archived, invalid ones are reported
1565
+ - **Empty Job List**: Providing empty job IDs results in a clear error message
1566
+
1567
+ Example with mixed valid and invalid job IDs:
1568
+
1569
+ ```bash
1570
+ cloudos job archive --profile my_profile --job-ids "valid_job,invalid_job"
1571
+ ```
1572
+
1573
+ ```console
1574
+ Archiving jobs...
1575
+ Failed to get status for job invalid_job, please make sure it exists in the workspace: Job not found
1576
+ Job 'valid_job' archived successfully.
1577
+ ```
1578
+
1579
+ **Command Options**
1580
+
1581
+ - `--job-ids`: One or more job IDs to archive (comma-separated for multiple)
1582
+ - `--verbose`: Display detailed information about the archiving process
1583
+ - `--profile`: Use a specific configuration profile
1584
+ - `--workspace-id`: Specify the workspace ID (if not using profiles)
1585
+ - `--apikey`: Your CloudOS API key (if not using profiles)
1586
+
1587
+ > [!TIP]
1588
+ > Use the `cloudos job list` command to identify jobs you want to archive. You can filter by status, project, or other criteria to find specific jobs for archiving.
1589
+
1590
+ #### Unarchive Jobs
1591
+
1592
+ CloudOS allows you to restore archived jobs back to their active state. Unarchiving removes the archived status while preserving all job data, results, and history.
1593
+
1594
+ > [!NOTE]
1595
+ > Unarchiving jobs does not modify any data or results. It simply removes the archived metadata flag, making jobs appear as regular (non-archived) jobs again.
1596
+
1597
+ > [!IMPORTANT]
1598
+ > **Admin Permissions Required**: Only workspace administrators can unarchive jobs belonging to other users. Regular users can only unarchive their own jobs.
1599
+
1600
+ **Unarchive a Single Job**
1601
+
1602
+ To unarchive a single archived job, use the `job unarchive` command with the job ID:
1603
+
1604
+ ```bash
1605
+ cloudos job unarchive --profile my_profile --job-ids 6929d62fe63b3cba2b32261a
1606
+ ```
1607
+
1608
+ The expected output will confirm successful unarchiving:
1609
+
1610
+ ```console
1611
+ Unarchiving jobs...
1612
+ Job '6929d62fe63b3cba2b32261a' unarchived successfully.
1613
+ ```
1614
+
1615
+ **Unarchive Multiple Jobs**
1616
+
1617
+ You can unarchive multiple jobs simultaneously by providing a comma-separated list of job IDs:
1618
+
1619
+ ```bash
1620
+ cloudos job unarchive --profile my_profile --job-ids "job1,job2,job3"
1621
+ ```
1622
+
1623
+ This will unarchive all valid job IDs in a single operation:
1624
+
1625
+ ```console
1626
+ Unarchiving jobs...
1627
+ 3 jobs unarchived successfully: job1, job2, job3
1628
+ ```
1629
+
1630
+ **Verbose Output**
1631
+
1632
+ For detailed information about the unarchiving process, use the `--verbose` flag:
1633
+
1634
+ ```bash
1635
+ cloudos job unarchive --profile my_profile --job-ids 6929d62fe63b3cba2b32261a --verbose
1636
+ ```
1637
+
1638
+ This provides additional details about the operation:
1639
+
1640
+ ```console
1641
+ Unarchiving jobs...
1642
+ ...Preparing objects
1643
+ The following Cloudos object was created:
1644
+ Cloudos(cloudos_url='https://cloudos.lifebit.ai', apikey='***', cromwell_token=None)
1645
+
1646
+ Unarchiving jobs in the following workspace: workspace_123
1647
+ Job 6929d62fe63b3cba2b32261a found with status: completed
1648
+ Job '6929d62fe63b3cba2b32261a' unarchived successfully.
1649
+ ```
1650
+
1651
+ **Error Handling**
1652
+
1653
+ The unarchive command handles various scenarios gracefully:
1654
+
1655
+ - **Invalid Job IDs**: Jobs that don't exist are skipped with a warning message
1656
+ - **Mixed Valid/Invalid**: Valid jobs are unarchived, invalid ones are reported
1657
+ - **Empty Job List**: Providing empty job IDs results in a clear error message
1658
+
1659
+ Example with mixed valid and invalid job IDs:
1660
+
1661
+ ```bash
1662
+ cloudos job unarchive --profile my_profile --job-ids "valid_job,invalid_job"
1663
+ ```
1664
+
1665
+ ```console
1666
+ Unarchiving jobs...
1667
+ Failed to get status for job invalid_job, please make sure it exists in the workspace: Job not found
1668
+ Job 'valid_job' unarchived successfully.
1669
+ ```
1670
+
1671
+ **Command Options**
1672
+
1673
+ - `--job-ids`: One or more job IDs to unarchive (comma-separated for multiple)
1674
+ - `--verbose`: Display detailed information about the unarchiving process
1675
+ - `--profile`: Use a specific configuration profile
1676
+ - `--workspace-id`: Specify the workspace ID (if not using profiles)
1677
+ - `--apikey`: Your CloudOS API key (if not using profiles)
1678
+
1679
+ **Managing Job Lifecycle**
1680
+
1681
+ Use the archive and unarchive commands together to manage your job organization:
1682
+
1683
+ 1. **Archive completed jobs** to keep your workspace organized
1684
+ 2. **Unarchive when needed** to access or review historical analyses
1685
+ 3. **Combine with filtering** using `cloudos job list` to manage jobs in bulk
1686
+
1687
+ > [!TIP]
1688
+ > Archived jobs remain fully accessible - archiving is purely for organizational purposes. Use `cloudos job list` with appropriate filters to view and manage both archived and active jobs.
1689
+
1472
1690
  ### Bash Jobs
1473
1691
  Execute bash scripts on CloudOS for custom processing workflows. Bash jobs allow you to run shell commands with custom parameters and are ideal for data preprocessing or simple computational tasks.
1474
1692
 
@@ -45,6 +45,8 @@ Python package for interacting with CloudOS
45
45
  - [Get Job Costs](#get-job-costs)
46
46
  - [Get Job Related Analyses](#get-job-related-analyses)
47
47
  - [Delete Job Results](#delete-job-results)
48
+ - [Archive Jobs](#archive-jobs)
49
+ - [Unarchive Jobs](#unarchive-jobs)
48
50
  - [Bash Jobs](#bash-jobs)
49
51
  - [Send Array Job](#send-array-job)
50
52
  - [Submit a Bash Array Job](#submit-a-bash-array-job)
@@ -932,7 +934,8 @@ cloudos job resume \
932
934
 
933
935
  Aborts jobs in the CloudOS workspace that are either running or initializing. It can be used with one or more job IDs provided as a comma-separated string using the `--job-ids` parameter.
934
936
 
935
- Example:
937
+ ##### Basic Usage
938
+
936
939
  ```bash
937
940
  cloudos job abort --profile my_profile --job-ids "680a3cf80e56949775c02f16"
938
941
  ```
@@ -942,6 +945,29 @@ Aborting jobs...
942
945
  Job 680a3cf80e56949775c02f16 aborted successfully.
943
946
  ```
944
947
 
948
+ ##### Force Abort
949
+
950
+ The `--force` flag allows you to abort jobs faster as it removes the running infrastructure. When using this flag, be aware that some data might be lost (it could be results or logs, based on what the job is performing at the moment of the forced abort).
951
+
952
+ ```bash
953
+ cloudos job abort --profile my_profile --job-ids "680a3cf80e56949775c02f16" --force
954
+ ```
955
+
956
+ ```console
957
+ Aborting jobs...
958
+ Warning: Using --force to abort job 680a3cf80e56949775c02f16. Some data might be lost.
959
+ Job 680a3cf80e56949775c02f16 aborted successfully.
960
+ ```
961
+
962
+ ##### Additional Options
963
+
964
+ - `--workspace-id`: The CloudOS workspace ID (can be set in profile)
965
+ - `--apikey`: Your CloudOS API key (can be set in profile)
966
+ - `--cloudos-url`: The CloudOS URL (default: https://cloudos.lifebit.ai)
967
+ - `--verbose`: Print detailed information messages
968
+ - `--disable-ssl-verification`: Disable SSL certificate verification (not recommended)
969
+ - `--ssl-cert`: Path to your SSL certificate file
970
+
945
971
  #### Get Job Details
946
972
 
947
973
  Details of a job, including cost, status, and timestamps, can be retrieved with:
@@ -1434,6 +1460,198 @@ Selected job does not have 'Results' information.
1434
1460
 
1435
1461
  For bulk deletion of job results and working directories across multiple jobs in a project, see the [delete_project_jobs.sh utility script](docs/utils/delete_project_jobs.md) in the `utils` folder. This script allows you to efficiently delete results and/or working directories for all jobs in a project.
1436
1462
 
1463
+ #### Archive Jobs
1464
+
1465
+ CloudOS allows you to archive completed jobs to organize and manage your analysis history.
1466
+
1467
+ > [!NOTE]
1468
+ > Archiving jobs does not delete any data or results. It simply adds metadata to mark jobs as archived for organizational purposes.
1469
+
1470
+ > [!IMPORTANT]
1471
+ > **Admin Permissions Required**: Only workspace administrators can archive jobs belonging to other users. Regular users can only archive their own jobs.
1472
+
1473
+ **Archive a Single Job**
1474
+
1475
+ To archive a single job, use the `job archive` command with the job ID:
1476
+
1477
+ ```bash
1478
+ cloudos job archive --profile my_profile --job-ids 69413101b07d5f5bb46891b4
1479
+ ```
1480
+
1481
+ The expected output will confirm successful archiving:
1482
+
1483
+ ```console
1484
+ Archiving jobs...
1485
+ Job '69413101b07d5f5bb46891b4' archived successfully.
1486
+ ```
1487
+
1488
+ **Archive Multiple Jobs**
1489
+
1490
+ You can archive multiple jobs simultaneously by providing a comma-separated list of job IDs:
1491
+
1492
+ ```bash
1493
+ cloudos job archive --profile my_profile --job-ids "job1,job2,job3"
1494
+ ```
1495
+
1496
+ This will archive all valid job IDs in a single operation:
1497
+
1498
+ ```console
1499
+ Archiving jobs...
1500
+ 3 jobs archived successfully: job1, job2, job3
1501
+ ```
1502
+
1503
+ **Verbose Output**
1504
+
1505
+ For detailed information about the archiving process, use the `--verbose` flag:
1506
+
1507
+ ```bash
1508
+ cloudos job archive --profile my_profile --job-ids 69413101b07d5f5bb46891b4 --verbose
1509
+ ```
1510
+
1511
+ This provides additional details about the operation:
1512
+
1513
+ ```console
1514
+ Archiving jobs...
1515
+ ...Preparing objects
1516
+ The following Cloudos object was created:
1517
+ Cloudos(cloudos_url='https://cloudos.lifebit.ai', apikey='***', cromwell_token=None)
1518
+
1519
+ Archiving jobs in the following workspace: workspace_123
1520
+ Job 69413101b07d5f5bb46891b4 found with status: completed
1521
+ Job '69413101b07d5f5bb46891b4' archived successfully.
1522
+ ```
1523
+
1524
+ **Error Handling**
1525
+
1526
+ The archive command handles various scenarios gracefully:
1527
+
1528
+ - **Invalid Job IDs**: Jobs that don't exist are skipped with a warning message
1529
+ - **Mixed Valid/Invalid**: Valid jobs are archived, invalid ones are reported
1530
+ - **Empty Job List**: Providing empty job IDs results in a clear error message
1531
+
1532
+ Example with mixed valid and invalid job IDs:
1533
+
1534
+ ```bash
1535
+ cloudos job archive --profile my_profile --job-ids "valid_job,invalid_job"
1536
+ ```
1537
+
1538
+ ```console
1539
+ Archiving jobs...
1540
+ Failed to get status for job invalid_job, please make sure it exists in the workspace: Job not found
1541
+ Job 'valid_job' archived successfully.
1542
+ ```
1543
+
1544
+ **Command Options**
1545
+
1546
+ - `--job-ids`: One or more job IDs to archive (comma-separated for multiple)
1547
+ - `--verbose`: Display detailed information about the archiving process
1548
+ - `--profile`: Use a specific configuration profile
1549
+ - `--workspace-id`: Specify the workspace ID (if not using profiles)
1550
+ - `--apikey`: Your CloudOS API key (if not using profiles)
1551
+
1552
+ > [!TIP]
1553
+ > Use the `cloudos job list` command to identify jobs you want to archive. You can filter by status, project, or other criteria to find specific jobs for archiving.
1554
+
1555
+ #### Unarchive Jobs
1556
+
1557
+ CloudOS allows you to restore archived jobs back to their active state. Unarchiving removes the archived status while preserving all job data, results, and history.
1558
+
1559
+ > [!NOTE]
1560
+ > Unarchiving jobs does not modify any data or results. It simply removes the archived metadata flag, making jobs appear as regular (non-archived) jobs again.
1561
+
1562
+ > [!IMPORTANT]
1563
+ > **Admin Permissions Required**: Only workspace administrators can unarchive jobs belonging to other users. Regular users can only unarchive their own jobs.
1564
+
1565
+ **Unarchive a Single Job**
1566
+
1567
+ To unarchive a single archived job, use the `job unarchive` command with the job ID:
1568
+
1569
+ ```bash
1570
+ cloudos job unarchive --profile my_profile --job-ids 6929d62fe63b3cba2b32261a
1571
+ ```
1572
+
1573
+ The expected output will confirm successful unarchiving:
1574
+
1575
+ ```console
1576
+ Unarchiving jobs...
1577
+ Job '6929d62fe63b3cba2b32261a' unarchived successfully.
1578
+ ```
1579
+
1580
+ **Unarchive Multiple Jobs**
1581
+
1582
+ You can unarchive multiple jobs simultaneously by providing a comma-separated list of job IDs:
1583
+
1584
+ ```bash
1585
+ cloudos job unarchive --profile my_profile --job-ids "job1,job2,job3"
1586
+ ```
1587
+
1588
+ This will unarchive all valid job IDs in a single operation:
1589
+
1590
+ ```console
1591
+ Unarchiving jobs...
1592
+ 3 jobs unarchived successfully: job1, job2, job3
1593
+ ```
1594
+
1595
+ **Verbose Output**
1596
+
1597
+ For detailed information about the unarchiving process, use the `--verbose` flag:
1598
+
1599
+ ```bash
1600
+ cloudos job unarchive --profile my_profile --job-ids 6929d62fe63b3cba2b32261a --verbose
1601
+ ```
1602
+
1603
+ This provides additional details about the operation:
1604
+
1605
+ ```console
1606
+ Unarchiving jobs...
1607
+ ...Preparing objects
1608
+ The following Cloudos object was created:
1609
+ Cloudos(cloudos_url='https://cloudos.lifebit.ai', apikey='***', cromwell_token=None)
1610
+
1611
+ Unarchiving jobs in the following workspace: workspace_123
1612
+ Job 6929d62fe63b3cba2b32261a found with status: completed
1613
+ Job '6929d62fe63b3cba2b32261a' unarchived successfully.
1614
+ ```
1615
+
1616
+ **Error Handling**
1617
+
1618
+ The unarchive command handles various scenarios gracefully:
1619
+
1620
+ - **Invalid Job IDs**: Jobs that don't exist are skipped with a warning message
1621
+ - **Mixed Valid/Invalid**: Valid jobs are unarchived, invalid ones are reported
1622
+ - **Empty Job List**: Providing empty job IDs results in a clear error message
1623
+
1624
+ Example with mixed valid and invalid job IDs:
1625
+
1626
+ ```bash
1627
+ cloudos job unarchive --profile my_profile --job-ids "valid_job,invalid_job"
1628
+ ```
1629
+
1630
+ ```console
1631
+ Unarchiving jobs...
1632
+ Failed to get status for job invalid_job, please make sure it exists in the workspace: Job not found
1633
+ Job 'valid_job' unarchived successfully.
1634
+ ```
1635
+
1636
+ **Command Options**
1637
+
1638
+ - `--job-ids`: One or more job IDs to unarchive (comma-separated for multiple)
1639
+ - `--verbose`: Display detailed information about the unarchiving process
1640
+ - `--profile`: Use a specific configuration profile
1641
+ - `--workspace-id`: Specify the workspace ID (if not using profiles)
1642
+ - `--apikey`: Your CloudOS API key (if not using profiles)
1643
+
1644
+ **Managing Job Lifecycle**
1645
+
1646
+ Use the archive and unarchive commands together to manage your job organization:
1647
+
1648
+ 1. **Archive completed jobs** to keep your workspace organized
1649
+ 2. **Unarchive when needed** to access or review historical analyses
1650
+ 3. **Combine with filtering** using `cloudos job list` to manage jobs in bulk
1651
+
1652
+ > [!TIP]
1653
+ > Archived jobs remain fully accessible - archiving is purely for organizational purposes. Use `cloudos job list` with appropriate filters to view and manage both archived and active jobs.
1654
+
1437
1655
  ### Bash Jobs
1438
1656
  Execute bash scripts on CloudOS for custom processing workflows. Bash jobs allow you to run shell commands with custom parameters and are ideal for data preprocessing or simple computational tasks.
1439
1657