cloudos-cli 2.72.0__tar.gz → 2.74.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.
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/PKG-INFO +37 -1
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/README.md +36 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/__main__.py +144 -77
- cloudos_cli-2.74.0/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/PKG-INFO +37 -1
- cloudos_cli-2.72.0/cloudos_cli/_version.py +0 -1
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/LICENSE +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/clos.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/configure/configure.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/cost/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/cost/cost.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/datasets/datasets.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/jobs/job.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/link/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/link/link.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/logging/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/logging/logger.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/procurement/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/procurement/images.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/related_analyses/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/array_job.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/last_wf.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/setup.cfg +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/setup.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/functions_for_pytest.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_cli_project_create.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_cost/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_cost/test_job_cost.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_logging/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_logging/test_logger.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_related_analyses/__init__.py +0 -0
- {cloudos_cli-2.72.0 → cloudos_cli-2.74.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.
|
|
3
|
+
Version: 2.74.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
|
|
@@ -1451,6 +1451,9 @@ Selected job does not have 'Results' information.
|
|
|
1451
1451
|
> [!NOTE]
|
|
1452
1452
|
> The `--delete` flag is compatible with other `job results` options. You can combine it with `--verbose` for detailed logging, but cannot be used together with `--link` or `--status` flags.
|
|
1453
1453
|
|
|
1454
|
+
**Bulk Deletion**
|
|
1455
|
+
|
|
1456
|
+
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.
|
|
1454
1457
|
|
|
1455
1458
|
### Bash Jobs
|
|
1456
1459
|
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.
|
|
@@ -1669,6 +1672,39 @@ If you require more information on the files and folder listed, you can use the
|
|
|
1669
1672
|
- Virtual Name (the file or folder name)
|
|
1670
1673
|
- Storage Path
|
|
1671
1674
|
|
|
1675
|
+
**Output Format Options**
|
|
1676
|
+
|
|
1677
|
+
The `datasets ls` command supports different output formats using the `--output-format` option:
|
|
1678
|
+
|
|
1679
|
+
- **`stdout` (default)**: Displays results in the console with Rich formatting
|
|
1680
|
+
- Without `--details`: Simple list of file/folder names with color coding (blue underlined for folders)
|
|
1681
|
+
- With `--details`: Rich formatted table with all file information
|
|
1682
|
+
|
|
1683
|
+
- **`csv`**: Saves results to a CSV file
|
|
1684
|
+
- Without `--details`: CSV with two columns: "Name,Storage Path"
|
|
1685
|
+
- With `--details`: CSV with columns "Type, Owner, Size, Size (bytes), Last Updated, Virtual Name, Storage Path"
|
|
1686
|
+
|
|
1687
|
+
Examples:
|
|
1688
|
+
|
|
1689
|
+
```bash
|
|
1690
|
+
# Simple list to console (default)
|
|
1691
|
+
cloudos datasets ls Data --profile my_profile
|
|
1692
|
+
|
|
1693
|
+
# Detailed table in console
|
|
1694
|
+
cloudos datasets ls Data --details --profile my_profile
|
|
1695
|
+
|
|
1696
|
+
# Simple CSV output
|
|
1697
|
+
cloudos datasets ls Data --profile my_profile --output-format csv
|
|
1698
|
+
|
|
1699
|
+
# Detailed CSV output
|
|
1700
|
+
cloudos datasets ls Data --details --output-format csv --profile my_profile
|
|
1701
|
+
|
|
1702
|
+
# Custom output filename
|
|
1703
|
+
cloudos datasets ls Data --details --output-format csv --output-basename my_files --profile my_profile
|
|
1704
|
+
```
|
|
1705
|
+
|
|
1706
|
+
When using `--output-format csv`, you can optionally specify a custom base filename using `--output-basename`. If not provided, the filename will be auto-generated based on the path (e.g., `datasets_ls.csv`).
|
|
1707
|
+
|
|
1672
1708
|
#### Move Files
|
|
1673
1709
|
|
|
1674
1710
|
Relocate files and folders within the same project or across different projects. This is useful for reorganizing data and moving results to appropriate locations.
|
|
@@ -1416,6 +1416,9 @@ Selected job does not have 'Results' information.
|
|
|
1416
1416
|
> [!NOTE]
|
|
1417
1417
|
> The `--delete` flag is compatible with other `job results` options. You can combine it with `--verbose` for detailed logging, but cannot be used together with `--link` or `--status` flags.
|
|
1418
1418
|
|
|
1419
|
+
**Bulk Deletion**
|
|
1420
|
+
|
|
1421
|
+
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.
|
|
1419
1422
|
|
|
1420
1423
|
### Bash Jobs
|
|
1421
1424
|
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.
|
|
@@ -1634,6 +1637,39 @@ If you require more information on the files and folder listed, you can use the
|
|
|
1634
1637
|
- Virtual Name (the file or folder name)
|
|
1635
1638
|
- Storage Path
|
|
1636
1639
|
|
|
1640
|
+
**Output Format Options**
|
|
1641
|
+
|
|
1642
|
+
The `datasets ls` command supports different output formats using the `--output-format` option:
|
|
1643
|
+
|
|
1644
|
+
- **`stdout` (default)**: Displays results in the console with Rich formatting
|
|
1645
|
+
- Without `--details`: Simple list of file/folder names with color coding (blue underlined for folders)
|
|
1646
|
+
- With `--details`: Rich formatted table with all file information
|
|
1647
|
+
|
|
1648
|
+
- **`csv`**: Saves results to a CSV file
|
|
1649
|
+
- Without `--details`: CSV with two columns: "Name,Storage Path"
|
|
1650
|
+
- With `--details`: CSV with columns "Type, Owner, Size, Size (bytes), Last Updated, Virtual Name, Storage Path"
|
|
1651
|
+
|
|
1652
|
+
Examples:
|
|
1653
|
+
|
|
1654
|
+
```bash
|
|
1655
|
+
# Simple list to console (default)
|
|
1656
|
+
cloudos datasets ls Data --profile my_profile
|
|
1657
|
+
|
|
1658
|
+
# Detailed table in console
|
|
1659
|
+
cloudos datasets ls Data --details --profile my_profile
|
|
1660
|
+
|
|
1661
|
+
# Simple CSV output
|
|
1662
|
+
cloudos datasets ls Data --profile my_profile --output-format csv
|
|
1663
|
+
|
|
1664
|
+
# Detailed CSV output
|
|
1665
|
+
cloudos datasets ls Data --details --output-format csv --profile my_profile
|
|
1666
|
+
|
|
1667
|
+
# Custom output filename
|
|
1668
|
+
cloudos datasets ls Data --details --output-format csv --output-basename my_files --profile my_profile
|
|
1669
|
+
```
|
|
1670
|
+
|
|
1671
|
+
When using `--output-format csv`, you can optionally specify a custom base filename using `--output-basename`. If not provided, the filename will be auto-generated based on the path (e.g., `datasets_ls.csv`).
|
|
1672
|
+
|
|
1637
1673
|
#### Move Files
|
|
1638
1674
|
|
|
1639
1675
|
Relocate files and folders within the same project or across different projects. This is useful for reorganizing data and moving results to appropriate locations.
|
|
@@ -2997,6 +2997,16 @@ def run_bash_array_job(ctx,
|
|
|
2997
2997
|
'Details contains "Type", "Owner", "Size", "Last Updated", ' +
|
|
2998
2998
|
'"Virtual Name", "Storage Path".'),
|
|
2999
2999
|
is_flag=True)
|
|
3000
|
+
@click.option('--output-format',
|
|
3001
|
+
help=('The desired display for the output, either directly in standard output or saved as file. ' +
|
|
3002
|
+
'Default=stdout.'),
|
|
3003
|
+
type=click.Choice(['stdout', 'csv'], case_sensitive=False),
|
|
3004
|
+
default='stdout')
|
|
3005
|
+
@click.option('--output-basename',
|
|
3006
|
+
help=('Output file base name to save jobs details. ' +
|
|
3007
|
+
'Default=datasets_ls'),
|
|
3008
|
+
default='datasets_ls',
|
|
3009
|
+
required=False)
|
|
3000
3010
|
@click.pass_context
|
|
3001
3011
|
@with_profile_config(required_params=['apikey', 'workspace_id'])
|
|
3002
3012
|
def list_files(ctx,
|
|
@@ -3008,7 +3018,9 @@ def list_files(ctx,
|
|
|
3008
3018
|
project_name,
|
|
3009
3019
|
profile,
|
|
3010
3020
|
path,
|
|
3011
|
-
details
|
|
3021
|
+
details,
|
|
3022
|
+
output_format,
|
|
3023
|
+
output_basename):
|
|
3012
3024
|
"""List contents of a path within a CloudOS workspace dataset."""
|
|
3013
3025
|
verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert)
|
|
3014
3026
|
|
|
@@ -3024,89 +3036,144 @@ def list_files(ctx,
|
|
|
3024
3036
|
try:
|
|
3025
3037
|
result = datasets.list_folder_content(path)
|
|
3026
3038
|
contents = result.get("contents") or result.get("datasets", [])
|
|
3039
|
+
|
|
3027
3040
|
if not contents:
|
|
3028
3041
|
contents = result.get("files", []) + result.get("folders", [])
|
|
3029
3042
|
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
if is_folder:
|
|
3046
|
-
folder_type = item.get("folderType")
|
|
3047
|
-
if folder_type == "VirtualFolder":
|
|
3048
|
-
type_ = "virtual folder"
|
|
3049
|
-
elif folder_type == "S3Folder":
|
|
3050
|
-
type_ = "s3 folder"
|
|
3051
|
-
elif folder_type == "AzureBlobFolder":
|
|
3052
|
-
type_ = "azure folder"
|
|
3053
|
-
else:
|
|
3054
|
-
type_ = "folder"
|
|
3055
|
-
else:
|
|
3056
|
-
# Check if file is managed by Lifebit (user uploaded)
|
|
3057
|
-
is_managed_by_lifebit = item.get("isManagedByLifebit", False)
|
|
3058
|
-
if is_managed_by_lifebit:
|
|
3059
|
-
type_ = "file (user uploaded)"
|
|
3060
|
-
else:
|
|
3061
|
-
type_ = "file (virtual copy)"
|
|
3062
|
-
|
|
3063
|
-
user = item.get("user", {})
|
|
3064
|
-
if isinstance(user, dict):
|
|
3065
|
-
name = user.get("name", "").strip()
|
|
3066
|
-
surname = user.get("surname", "").strip()
|
|
3067
|
-
else:
|
|
3068
|
-
name = surname = ""
|
|
3069
|
-
if name and surname:
|
|
3070
|
-
owner = f"{name} {surname}"
|
|
3071
|
-
elif name:
|
|
3072
|
-
owner = name
|
|
3073
|
-
elif surname:
|
|
3074
|
-
owner = surname
|
|
3043
|
+
# Process items to extract data
|
|
3044
|
+
processed_items = []
|
|
3045
|
+
for item in contents:
|
|
3046
|
+
is_folder = "folderType" in item or item.get("isDir", False)
|
|
3047
|
+
type_ = "folder" if is_folder else "file"
|
|
3048
|
+
|
|
3049
|
+
# Enhanced type information
|
|
3050
|
+
if is_folder:
|
|
3051
|
+
folder_type = item.get("folderType")
|
|
3052
|
+
if folder_type == "VirtualFolder":
|
|
3053
|
+
type_ = "virtual folder"
|
|
3054
|
+
elif folder_type == "S3Folder":
|
|
3055
|
+
type_ = "s3 folder"
|
|
3056
|
+
elif folder_type == "AzureBlobFolder":
|
|
3057
|
+
type_ = "azure folder"
|
|
3075
3058
|
else:
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
filepath = item.get("name", "-")
|
|
3083
|
-
|
|
3084
|
-
if item.get("fileType") == "S3File" or item.get("folderType") == "S3Folder":
|
|
3085
|
-
bucket = item.get("s3BucketName")
|
|
3086
|
-
key = item.get("s3ObjectKey") or item.get("s3Prefix")
|
|
3087
|
-
s3_path = f"s3://{bucket}/{key}" if bucket and key else "-"
|
|
3088
|
-
elif item.get("fileType") == "AzureBlobFile" or item.get("folderType") == "AzureBlobFolder":
|
|
3089
|
-
account = item.get("blobStorageAccountName")
|
|
3090
|
-
container = item.get("blobContainerName")
|
|
3091
|
-
key = item.get("blobName") if item.get("fileType") == "AzureBlobFile" else item.get("blobPrefix")
|
|
3092
|
-
s3_path = f"az://{account}.blob.core.windows.net/{container}/{key}" if account and container and key else "-"
|
|
3059
|
+
type_ = "folder"
|
|
3060
|
+
else:
|
|
3061
|
+
# Check if file is managed by Lifebit (user uploaded)
|
|
3062
|
+
is_managed_by_lifebit = item.get("isManagedByLifebit", False)
|
|
3063
|
+
if is_managed_by_lifebit:
|
|
3064
|
+
type_ = "file (user uploaded)"
|
|
3093
3065
|
else:
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3066
|
+
type_ = "file (virtual copy)"
|
|
3067
|
+
|
|
3068
|
+
user = item.get("user", {})
|
|
3069
|
+
if isinstance(user, dict):
|
|
3070
|
+
name = user.get("name", "").strip()
|
|
3071
|
+
surname = user.get("surname", "").strip()
|
|
3072
|
+
else:
|
|
3073
|
+
name = surname = ""
|
|
3074
|
+
if name and surname:
|
|
3075
|
+
owner = f"{name} {surname}"
|
|
3076
|
+
elif name:
|
|
3077
|
+
owner = name
|
|
3078
|
+
elif surname:
|
|
3079
|
+
owner = surname
|
|
3080
|
+
else:
|
|
3081
|
+
owner = "-"
|
|
3082
|
+
|
|
3083
|
+
raw_size = item.get("sizeInBytes", item.get("size"))
|
|
3084
|
+
size = format_bytes(raw_size) if not is_folder and raw_size is not None else "-"
|
|
3085
|
+
|
|
3086
|
+
updated = item.get("updatedAt") or item.get("lastModified", "-")
|
|
3087
|
+
filepath = item.get("name", "-")
|
|
3088
|
+
|
|
3089
|
+
if item.get("fileType") == "S3File" or item.get("folderType") == "S3Folder":
|
|
3090
|
+
bucket = item.get("s3BucketName")
|
|
3091
|
+
key = item.get("s3ObjectKey") or item.get("s3Prefix")
|
|
3092
|
+
storage_path = f"s3://{bucket}/{key}" if bucket and key else "-"
|
|
3093
|
+
elif item.get("fileType") == "AzureBlobFile" or item.get("folderType") == "AzureBlobFolder":
|
|
3094
|
+
account = item.get("blobStorageAccountName")
|
|
3095
|
+
container = item.get("blobContainerName")
|
|
3096
|
+
key = item.get("blobName") if item.get("fileType") == "AzureBlobFile" else item.get("blobPrefix")
|
|
3097
|
+
storage_path = f"az://{account}.blob.core.windows.net/{container}/{key}" if account and container and key else "-"
|
|
3098
|
+
else:
|
|
3099
|
+
storage_path = "-"
|
|
3100
|
+
|
|
3101
|
+
processed_items.append({
|
|
3102
|
+
'type': type_,
|
|
3103
|
+
'owner': owner,
|
|
3104
|
+
'size': size,
|
|
3105
|
+
'raw_size': raw_size,
|
|
3106
|
+
'updated': updated,
|
|
3107
|
+
'name': filepath,
|
|
3108
|
+
'storage_path': storage_path,
|
|
3109
|
+
'is_folder': is_folder
|
|
3110
|
+
})
|
|
3111
|
+
|
|
3112
|
+
# Output handling
|
|
3113
|
+
if output_format == 'csv':
|
|
3114
|
+
import csv
|
|
3115
|
+
|
|
3116
|
+
csv_filename = f'{output_basename}.csv'
|
|
3117
|
+
|
|
3118
|
+
if details:
|
|
3119
|
+
# CSV with all details
|
|
3120
|
+
with open(csv_filename, 'w', newline='', encoding='utf-8') as csvfile:
|
|
3121
|
+
fieldnames = ['Type', 'Owner', 'Size', 'Size (bytes)', 'Last Updated', 'Virtual Name', 'Storage Path']
|
|
3122
|
+
writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
|
|
3123
|
+
writer.writeheader()
|
|
3124
|
+
|
|
3125
|
+
for item in processed_items:
|
|
3126
|
+
writer.writerow({
|
|
3127
|
+
'Type': item['type'],
|
|
3128
|
+
'Owner': item['owner'],
|
|
3129
|
+
'Size': item['size'],
|
|
3130
|
+
'Size (bytes)': item['raw_size'] if item['raw_size'] is not None else '',
|
|
3131
|
+
'Last Updated': item['updated'],
|
|
3132
|
+
'Virtual Name': item['name'],
|
|
3133
|
+
'Storage Path': item['storage_path']
|
|
3134
|
+
})
|
|
3135
|
+
else:
|
|
3136
|
+
# CSV with just names
|
|
3137
|
+
with open(csv_filename, 'w', newline='', encoding='utf-8') as csvfile:
|
|
3138
|
+
writer = csv.writer(csvfile)
|
|
3139
|
+
writer.writerow(['Name', 'Storage Path'])
|
|
3140
|
+
for item in processed_items:
|
|
3141
|
+
writer.writerow([item['name'], item['storage_path']])
|
|
3142
|
+
|
|
3143
|
+
click.secho(f'\nDatasets list saved to: {csv_filename}', fg='green', bold=True)
|
|
3144
|
+
|
|
3145
|
+
else: # stdout
|
|
3146
|
+
if details:
|
|
3147
|
+
console = Console(width=None)
|
|
3148
|
+
table = Table(show_header=True, header_style="bold white")
|
|
3149
|
+
table.add_column("Type", style="cyan", no_wrap=True)
|
|
3150
|
+
table.add_column("Owner", style="white")
|
|
3151
|
+
table.add_column("Size", style="magenta")
|
|
3152
|
+
table.add_column("Last Updated", style="green")
|
|
3153
|
+
table.add_column("Virtual Name", style="bold", overflow="fold")
|
|
3154
|
+
table.add_column("Storage Path", style="dim", no_wrap=False, overflow="fold", ratio=2)
|
|
3155
|
+
|
|
3156
|
+
for item in processed_items:
|
|
3157
|
+
style = Style(color="blue", underline=True) if item['is_folder'] else None
|
|
3158
|
+
table.add_row(
|
|
3159
|
+
item['type'],
|
|
3160
|
+
item['owner'],
|
|
3161
|
+
item['size'],
|
|
3162
|
+
item['updated'],
|
|
3163
|
+
item['name'],
|
|
3164
|
+
item['storage_path'],
|
|
3165
|
+
style=style
|
|
3166
|
+
)
|
|
3098
3167
|
|
|
3099
|
-
|
|
3168
|
+
console.print(table)
|
|
3100
3169
|
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
else:
|
|
3109
|
-
console.print(name)
|
|
3170
|
+
else:
|
|
3171
|
+
console = Console()
|
|
3172
|
+
for item in processed_items:
|
|
3173
|
+
if item['is_folder']:
|
|
3174
|
+
console.print(f"[blue underline]{item['name']}[/]")
|
|
3175
|
+
else:
|
|
3176
|
+
console.print(item['name'])
|
|
3110
3177
|
|
|
3111
3178
|
except Exception as e:
|
|
3112
3179
|
raise ValueError(f"Failed to list files for project '{project_name}': {str(e)}")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.74.0'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudos_cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.74.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
|
|
@@ -1451,6 +1451,9 @@ Selected job does not have 'Results' information.
|
|
|
1451
1451
|
> [!NOTE]
|
|
1452
1452
|
> The `--delete` flag is compatible with other `job results` options. You can combine it with `--verbose` for detailed logging, but cannot be used together with `--link` or `--status` flags.
|
|
1453
1453
|
|
|
1454
|
+
**Bulk Deletion**
|
|
1455
|
+
|
|
1456
|
+
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.
|
|
1454
1457
|
|
|
1455
1458
|
### Bash Jobs
|
|
1456
1459
|
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.
|
|
@@ -1669,6 +1672,39 @@ If you require more information on the files and folder listed, you can use the
|
|
|
1669
1672
|
- Virtual Name (the file or folder name)
|
|
1670
1673
|
- Storage Path
|
|
1671
1674
|
|
|
1675
|
+
**Output Format Options**
|
|
1676
|
+
|
|
1677
|
+
The `datasets ls` command supports different output formats using the `--output-format` option:
|
|
1678
|
+
|
|
1679
|
+
- **`stdout` (default)**: Displays results in the console with Rich formatting
|
|
1680
|
+
- Without `--details`: Simple list of file/folder names with color coding (blue underlined for folders)
|
|
1681
|
+
- With `--details`: Rich formatted table with all file information
|
|
1682
|
+
|
|
1683
|
+
- **`csv`**: Saves results to a CSV file
|
|
1684
|
+
- Without `--details`: CSV with two columns: "Name,Storage Path"
|
|
1685
|
+
- With `--details`: CSV with columns "Type, Owner, Size, Size (bytes), Last Updated, Virtual Name, Storage Path"
|
|
1686
|
+
|
|
1687
|
+
Examples:
|
|
1688
|
+
|
|
1689
|
+
```bash
|
|
1690
|
+
# Simple list to console (default)
|
|
1691
|
+
cloudos datasets ls Data --profile my_profile
|
|
1692
|
+
|
|
1693
|
+
# Detailed table in console
|
|
1694
|
+
cloudos datasets ls Data --details --profile my_profile
|
|
1695
|
+
|
|
1696
|
+
# Simple CSV output
|
|
1697
|
+
cloudos datasets ls Data --profile my_profile --output-format csv
|
|
1698
|
+
|
|
1699
|
+
# Detailed CSV output
|
|
1700
|
+
cloudos datasets ls Data --details --output-format csv --profile my_profile
|
|
1701
|
+
|
|
1702
|
+
# Custom output filename
|
|
1703
|
+
cloudos datasets ls Data --details --output-format csv --output-basename my_files --profile my_profile
|
|
1704
|
+
```
|
|
1705
|
+
|
|
1706
|
+
When using `--output-format csv`, you can optionally specify a custom base filename using `--output-basename`. If not provided, the filename will be auto-generated based on the path (e.g., `datasets_ls.csv`).
|
|
1707
|
+
|
|
1672
1708
|
#### Move Files
|
|
1673
1709
|
|
|
1674
1710
|
Relocate files and folders within the same project or across different projects. This is useful for reorganizing data and moving results to appropriate locations.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.72.0'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudos_cli-2.72.0 → cloudos_cli-2.74.0}/tests/test_related_analyses/test_related_analyses.py
RENAMED
|
File without changes
|