cloudos-cli 2.90.1__tar.gz → 2.91.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.90.1 → cloudos_cli-2.91.0}/PKG-INFO +55 -39
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/README.md +54 -38
- cloudos_cli-2.91.0/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/datasets/cli.py +15 -74
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/interactive_session/cli.py +95 -334
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/interactive_session/interactive_session.py +15 -22
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/link/cli.py +49 -21
- cloudos_cli-2.91.0/cloudos_cli/link/link.py +996 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/PKG-INFO +55 -39
- cloudos_cli-2.90.1/cloudos_cli/_version.py +0 -1
- cloudos_cli-2.90.1/cloudos_cli/link/link.py +0 -718
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/LICENSE +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/__main__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/bash/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/bash/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/clos.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/configure/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/configure/configure.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/constants.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/cost/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/cost/cost.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/cromwell/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/cromwell/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/datasets/datasets.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/interactive_session/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/jobs/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/jobs/job.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/link/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/logging/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/logging/logger.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/procurement/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/procurement/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/procurement/images.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/projects/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/projects/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/queue/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/related_analyses/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/array_job.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/cli_helpers.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/last_wf.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/nextflow_version.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/workflows/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli/workflows/cli.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/setup.cfg +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/setup.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/functions_for_pytest.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_cli_project_create.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_cost/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_cost/test_job_cost.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_details.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_error_messages.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_interactive_session/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_interactive_session/test_create_session.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_interactive_session/test_list_sessions.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_logging/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_logging/test_logger.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_nextflow_version.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.0}/tests/test_related_analyses/__init__.py +0 -0
- {cloudos_cli-2.90.1 → cloudos_cli-2.91.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.91.0
|
|
4
4
|
Summary: Python package for interacting with the Lifebit Platform
|
|
5
5
|
Home-page: https://github.com/lifebit-ai/cloudos-cli
|
|
6
6
|
Author: David Piñeyro
|
|
@@ -109,11 +109,11 @@ Python package for interacting with Lifebit Platform
|
|
|
109
109
|
- [Move Files](#move-files)
|
|
110
110
|
- [Rename Files](#rename-files)
|
|
111
111
|
- [Copy Files](#copy-files)
|
|
112
|
-
- [Link
|
|
112
|
+
- [Link Files and Folders to Interactive Analysis](#link-files-and-folders-to-interactive-analysis)
|
|
113
113
|
- [Create Folder](#create-folder)
|
|
114
114
|
- [Remove Files or Folders](#remove-files-or-folders)
|
|
115
115
|
- [Link](#link)
|
|
116
|
-
- [Link Folders to Interactive Analysis](#link-folders-to-interactive-analysis)
|
|
116
|
+
- [Link Files and Folders to Interactive Analysis](#link-files-and-folders-to-interactive-analysis-1)
|
|
117
117
|
- [Procurement](#procurement)
|
|
118
118
|
- [List Procurement Images](#list-procurement-images)
|
|
119
119
|
- [Set Procurement Organization Image](#set-procurement-organization-image)
|
|
@@ -2183,7 +2183,7 @@ cloudos interactive-session create \
|
|
|
2183
2183
|
|
|
2184
2184
|
**Data & Storage Management:**
|
|
2185
2185
|
- `--mount`: Mount a data file into the session. Supports both Lifebit Platform datasets and S3 files (AWS only). Format: `project_name/dataset_path` (e.g., `leila-test/Data/file.csv`) or `s3://bucket/path/to/file` (e.g., `s3://my-bucket/data/file.csv`). Can be used multiple times.
|
|
2186
|
-
- `--link`: Link a folder into the session for read
|
|
2186
|
+
- `--link`: Link a file or folder into the session for read access (AWS only). Supports S3 files/folders (e.g., `s3://my-bucket/data/file.csv`, `s3://my-bucket/data/`) and File Explorer files/folders (e.g., `my-project/Data/file.csv`, `my-project/Data/results`). S3 paths whose last segment contains a `.` are treated as files; paths ending with `/` or without an extension are treated as folders. Multiple items can be specified using multiple `--link` flags or as comma-separated paths in a single `--link` argument.
|
|
2187
2187
|
**Note:** Linking is not supported on Azure. Use Lifebit Platform File Explorer for data access.
|
|
2188
2188
|
|
|
2189
2189
|
**Backend-Specific:**
|
|
@@ -2198,7 +2198,7 @@ cloudos interactive-session create \
|
|
|
2198
2198
|
|
|
2199
2199
|
CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
|
|
2200
2200
|
- **Mount files** (`--mount`): Files are copied into the session's mounted-data volume. Supports CloudOS File Explorer files and S3 files (AWS only).
|
|
2201
|
-
- **Link folders** (`--link`):
|
|
2201
|
+
- **Link files/folders** (`--link`): Files and folders are mounted as read-accessible items in the session (AWS only). Supports S3 files, S3 folders, and Lifebit Platform File Explorer files and folders. Linked items appear with unique mount names based on the item name. Maximum 100 items per session.
|
|
2202
2202
|
|
|
2203
2203
|
|
|
2204
2204
|
**Data Mounting Examples**
|
|
@@ -2572,7 +2572,7 @@ The command automatically loads from profile (via `@with_profile_config` decorat
|
|
|
2572
2572
|
|
|
2573
2573
|
#### Resume Interactive Session
|
|
2574
2574
|
|
|
2575
|
-
Resume a paused interactive session with optional configuration updates. You can change instance type, storage, cost limit, auto-shutdown time
|
|
2575
|
+
Resume a paused interactive session with optional configuration updates. You can change instance type, storage, cost limit, and auto-shutdown time when resuming.
|
|
2576
2576
|
|
|
2577
2577
|
|
|
2578
2578
|
**Basic Usage**
|
|
@@ -2604,19 +2604,6 @@ cloudos interactive-session resume \
|
|
|
2604
2604
|
--shutdown-in 12h
|
|
2605
2605
|
```
|
|
2606
2606
|
|
|
2607
|
-
**Mount Additional Data**
|
|
2608
|
-
|
|
2609
|
-
Resume and mount additional files:
|
|
2610
|
-
|
|
2611
|
-
```bash
|
|
2612
|
-
cloudos interactive-session resume \
|
|
2613
|
-
--session-id <SESSION_ID> \
|
|
2614
|
-
--profile my_profile \
|
|
2615
|
-
--mount my-project/Data/new-dataset.csv \
|
|
2616
|
-
--mount s3://my-bucket/data/file.txt
|
|
2617
|
-
```
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
2607
|
**Configuration Updates**
|
|
2621
2608
|
|
|
2622
2609
|
All configuration parameters are optional. If not specified, the session resumes with its previous configuration.
|
|
@@ -2626,6 +2613,8 @@ All configuration parameters are optional. If not specified, the session resumes
|
|
|
2626
2613
|
- `--cost-limit <USD>` - Update compute cost limit (-1 for unlimited)
|
|
2627
2614
|
- `--shutdown-in <DURATION>` - Update auto-shutdown time (e.g., 8h, 2d)
|
|
2628
2615
|
|
|
2616
|
+
> To link or mount data to a running session, use `cloudos link` or `cloudos datasets link` after the session has resumed.
|
|
2617
|
+
|
|
2629
2618
|
### Datasets
|
|
2630
2619
|
|
|
2631
2620
|
Manage files and folders within your Lifebit Platform File Explorer programmatically. These commands provide comprehensive file management capabilities for organizing research data and results.
|
|
@@ -2753,31 +2742,44 @@ cloudos datasets cp AnalysesResults/my_analysis/results/my_plot.png Data/plots
|
|
|
2753
2742
|
```
|
|
2754
2743
|
|
|
2755
2744
|
|
|
2756
|
-
#### Link
|
|
2745
|
+
#### Link Files and Folders to Interactive Analysis
|
|
2757
2746
|
|
|
2758
|
-
Connect external S3 buckets or
|
|
2747
|
+
Connect external S3 buckets, S3 files, or File Explorer files/folders to your interactive analysis sessions. This provides direct access to data without needing to copy files.
|
|
2759
2748
|
|
|
2760
|
-
This subcommand
|
|
2749
|
+
This subcommand uses the `--session-id` option to access the correct interactive session. This option can be added to the CLI or defined in a profile, for convenience.
|
|
2761
2750
|
|
|
2762
2751
|
```bash
|
|
2763
|
-
cloudos datasets link <
|
|
2752
|
+
cloudos datasets link <PATH> --profile <profile> --session-id <SESSION_ID>
|
|
2764
2753
|
```
|
|
2765
2754
|
|
|
2766
|
-
|
|
2755
|
+
Link an S3 folder:
|
|
2767
2756
|
```console
|
|
2768
2757
|
cloudos datasets link s3://bucket/path/folder --profile test --session-id 1234
|
|
2769
2758
|
```
|
|
2770
2759
|
|
|
2771
|
-
|
|
2772
|
-
```
|
|
2773
|
-
cloudos datasets link
|
|
2760
|
+
Link an S3 file:
|
|
2761
|
+
```console
|
|
2762
|
+
cloudos datasets link s3://bucket/path/data.csv --profile test --session-id 1234
|
|
2763
|
+
```
|
|
2764
|
+
|
|
2765
|
+
Link a File Explorer folder (requires `--project-name`):
|
|
2766
|
+
```console
|
|
2767
|
+
cloudos datasets link "Data/HLA" --project-name my-project --session-id 1234
|
|
2768
|
+
```
|
|
2769
|
+
|
|
2770
|
+
Link a File Explorer file (requires `--project-name`):
|
|
2771
|
+
```console
|
|
2772
|
+
cloudos datasets link "Data/observations.csv" --project-name my-project --session-id 1234
|
|
2774
2773
|
```
|
|
2775
2774
|
|
|
2776
2775
|
> [!NOTE]
|
|
2777
2776
|
> If running the CLI inside a jupyter session, the pre-configured CLI installation will have the session ID already installed and only the `--apikey` needs to be added.
|
|
2778
2777
|
|
|
2779
2778
|
> [!NOTE]
|
|
2780
|
-
> Virtual folders in File Explorer
|
|
2779
|
+
> Virtual folders in File Explorer (folders created in File Explorer that are not actual storage locations) cannot be linked.
|
|
2780
|
+
|
|
2781
|
+
> [!NOTE]
|
|
2782
|
+
> A maximum of 100 items can be linked per session. If the new items combined with already-linked items exceed this limit, the entire request is rejected.
|
|
2781
2783
|
|
|
2782
2784
|
#### Create Folder
|
|
2783
2785
|
|
|
@@ -2807,11 +2809,11 @@ cloudos datasets rm <path> --profile my_profile
|
|
|
2807
2809
|
|
|
2808
2810
|
### Link
|
|
2809
2811
|
|
|
2810
|
-
The `cloudos link` command provides a unified interface for linking folders to interactive analysis sessions. This command consolidates functionality previously available through separate commands (`cloudos job results --link`, `cloudos job workdir --link`, `cloudos job logs --link`, and `cloudos datasets link`) into a single, intuitive interface.
|
|
2812
|
+
The `cloudos link` command provides a unified interface for linking files and folders to interactive analysis sessions. This command consolidates functionality previously available through separate commands (`cloudos job results --link`, `cloudos job workdir --link`, `cloudos job logs --link`, and `cloudos datasets link`) into a single, intuitive interface.
|
|
2811
2813
|
|
|
2812
|
-
#### Link Folders to Interactive Analysis
|
|
2814
|
+
#### Link Files and Folders to Interactive Analysis
|
|
2813
2815
|
|
|
2814
|
-
Link job-related folders or custom S3 paths to your interactive analysis sessions for direct access to data without needing to copy files.
|
|
2816
|
+
Link job-related folders or custom S3/File Explorer paths (files and folders) to your interactive analysis sessions for direct access to data without needing to copy files.
|
|
2815
2817
|
|
|
2816
2818
|
**Two modes of operation:**
|
|
2817
2819
|
|
|
@@ -2819,8 +2821,10 @@ Link job-related folders or custom S3 paths to your interactive analysis session
|
|
|
2819
2821
|
- By default, links results, workdir, and logs folders
|
|
2820
2822
|
- Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
|
|
2821
2823
|
|
|
2822
|
-
2. **Direct path linking** (PATH argument): Links specific S3 or File Explorer paths.
|
|
2823
|
-
|
|
2824
|
+
2. **Direct path linking** (PATH argument): Links specific S3 or File Explorer paths (files or folders). Supports a single path or comma-separated multiple paths.
|
|
2825
|
+
- S3 paths whose last segment contains a `.` are treated as files (e.g., `s3://bucket/data/file.csv`)
|
|
2826
|
+
- S3 paths ending with `/` or without an extension are treated as folders
|
|
2827
|
+
- File Explorer paths can point to either files or folders — the CLI detects the type automatically
|
|
2824
2828
|
|
|
2825
2829
|
**Basic usage:**
|
|
2826
2830
|
|
|
@@ -2832,16 +2836,28 @@ cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
|
|
|
2832
2836
|
cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
|
|
2833
2837
|
cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
|
|
2834
2838
|
|
|
2835
|
-
# Link a single S3
|
|
2836
|
-
cloudos link s3://bucket/folder --session-id <SESSION_ID> --profile my_profile
|
|
2839
|
+
# Link a single S3 folder
|
|
2840
|
+
cloudos link s3://bucket/folder/ --session-id <SESSION_ID> --profile my_profile
|
|
2841
|
+
|
|
2842
|
+
# Link a single S3 file
|
|
2843
|
+
cloudos link s3://bucket/data/file.csv --session-id <SESSION_ID> --profile my_profile
|
|
2837
2844
|
|
|
2838
|
-
# Link multiple S3 paths (comma-separated)
|
|
2839
|
-
cloudos link s3://bucket1/data
|
|
2845
|
+
# Link multiple S3 paths (comma-separated, files and folders mixed)
|
|
2846
|
+
cloudos link s3://bucket1/data/,s3://bucket2/results/file.csv --session-id <SESSION_ID> --profile my_profile
|
|
2840
2847
|
|
|
2841
|
-
# Link a File Explorer
|
|
2848
|
+
# Link a File Explorer folder (path is RELATIVE to --project-name; do NOT prepend the project)
|
|
2842
2849
|
cloudos link "Data/MyFolder" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2850
|
+
|
|
2851
|
+
# Link a File Explorer file (path is RELATIVE to --project-name)
|
|
2852
|
+
cloudos link "Data/file.csv" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2853
|
+
|
|
2854
|
+
# Link several File Explorer items at once (all in the same project)
|
|
2855
|
+
cloudos link "Data/MyFolder,Data/file.csv,Results/run-1" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2843
2856
|
```
|
|
2844
2857
|
|
|
2858
|
+
> [!IMPORTANT]
|
|
2859
|
+
> **`cloudos link` is single-project for File Explorer paths.** All File Explorer items linked in one invocation must belong to the project named in `--project-name`. The path must be relative to that project — prepending the project name to the path (e.g. `my-project/Data/file.csv`) is rejected. To link items from a different project, run `cloudos link` again with a different `--project-name`.
|
|
2860
|
+
|
|
2845
2861
|
**Command options:**
|
|
2846
2862
|
|
|
2847
2863
|
|
|
@@ -2851,7 +2867,7 @@ cloudos link "Data/MyFolder" --project-name my-project --session-id <SESSION_ID>
|
|
|
2851
2867
|
- `--workspace-id`: The specific Lifebit Platform workspace ID (required)
|
|
2852
2868
|
- `--session-id`: The specific Lifebit Platform interactive session ID (required)
|
|
2853
2869
|
- `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
|
|
2854
|
-
- `--project-name`: Lifebit Platform project name
|
|
2870
|
+
- `--project-name`: Lifebit Platform project name. Required when any PATH is a File Explorer path. All FE paths in one invocation must belong to this project and must be RELATIVE to it (do not prepend the project name)
|
|
2855
2871
|
- `--results`: Link only results folder (only works with `--job-id`)
|
|
2856
2872
|
- `--workdir`: Link only working directory (only works with `--job-id`)
|
|
2857
2873
|
- `--logs`: Link only logs folder (only works with `--job-id`)
|
|
@@ -74,11 +74,11 @@ Python package for interacting with Lifebit Platform
|
|
|
74
74
|
- [Move Files](#move-files)
|
|
75
75
|
- [Rename Files](#rename-files)
|
|
76
76
|
- [Copy Files](#copy-files)
|
|
77
|
-
- [Link
|
|
77
|
+
- [Link Files and Folders to Interactive Analysis](#link-files-and-folders-to-interactive-analysis)
|
|
78
78
|
- [Create Folder](#create-folder)
|
|
79
79
|
- [Remove Files or Folders](#remove-files-or-folders)
|
|
80
80
|
- [Link](#link)
|
|
81
|
-
- [Link Folders to Interactive Analysis](#link-folders-to-interactive-analysis)
|
|
81
|
+
- [Link Files and Folders to Interactive Analysis](#link-files-and-folders-to-interactive-analysis-1)
|
|
82
82
|
- [Procurement](#procurement)
|
|
83
83
|
- [List Procurement Images](#list-procurement-images)
|
|
84
84
|
- [Set Procurement Organization Image](#set-procurement-organization-image)
|
|
@@ -2148,7 +2148,7 @@ cloudos interactive-session create \
|
|
|
2148
2148
|
|
|
2149
2149
|
**Data & Storage Management:**
|
|
2150
2150
|
- `--mount`: Mount a data file into the session. Supports both Lifebit Platform datasets and S3 files (AWS only). Format: `project_name/dataset_path` (e.g., `leila-test/Data/file.csv`) or `s3://bucket/path/to/file` (e.g., `s3://my-bucket/data/file.csv`). Can be used multiple times.
|
|
2151
|
-
- `--link`: Link a folder into the session for read
|
|
2151
|
+
- `--link`: Link a file or folder into the session for read access (AWS only). Supports S3 files/folders (e.g., `s3://my-bucket/data/file.csv`, `s3://my-bucket/data/`) and File Explorer files/folders (e.g., `my-project/Data/file.csv`, `my-project/Data/results`). S3 paths whose last segment contains a `.` are treated as files; paths ending with `/` or without an extension are treated as folders. Multiple items can be specified using multiple `--link` flags or as comma-separated paths in a single `--link` argument.
|
|
2152
2152
|
**Note:** Linking is not supported on Azure. Use Lifebit Platform File Explorer for data access.
|
|
2153
2153
|
|
|
2154
2154
|
**Backend-Specific:**
|
|
@@ -2163,7 +2163,7 @@ cloudos interactive-session create \
|
|
|
2163
2163
|
|
|
2164
2164
|
CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
|
|
2165
2165
|
- **Mount files** (`--mount`): Files are copied into the session's mounted-data volume. Supports CloudOS File Explorer files and S3 files (AWS only).
|
|
2166
|
-
- **Link folders** (`--link`):
|
|
2166
|
+
- **Link files/folders** (`--link`): Files and folders are mounted as read-accessible items in the session (AWS only). Supports S3 files, S3 folders, and Lifebit Platform File Explorer files and folders. Linked items appear with unique mount names based on the item name. Maximum 100 items per session.
|
|
2167
2167
|
|
|
2168
2168
|
|
|
2169
2169
|
**Data Mounting Examples**
|
|
@@ -2537,7 +2537,7 @@ The command automatically loads from profile (via `@with_profile_config` decorat
|
|
|
2537
2537
|
|
|
2538
2538
|
#### Resume Interactive Session
|
|
2539
2539
|
|
|
2540
|
-
Resume a paused interactive session with optional configuration updates. You can change instance type, storage, cost limit, auto-shutdown time
|
|
2540
|
+
Resume a paused interactive session with optional configuration updates. You can change instance type, storage, cost limit, and auto-shutdown time when resuming.
|
|
2541
2541
|
|
|
2542
2542
|
|
|
2543
2543
|
**Basic Usage**
|
|
@@ -2569,19 +2569,6 @@ cloudos interactive-session resume \
|
|
|
2569
2569
|
--shutdown-in 12h
|
|
2570
2570
|
```
|
|
2571
2571
|
|
|
2572
|
-
**Mount Additional Data**
|
|
2573
|
-
|
|
2574
|
-
Resume and mount additional files:
|
|
2575
|
-
|
|
2576
|
-
```bash
|
|
2577
|
-
cloudos interactive-session resume \
|
|
2578
|
-
--session-id <SESSION_ID> \
|
|
2579
|
-
--profile my_profile \
|
|
2580
|
-
--mount my-project/Data/new-dataset.csv \
|
|
2581
|
-
--mount s3://my-bucket/data/file.txt
|
|
2582
|
-
```
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
2572
|
**Configuration Updates**
|
|
2586
2573
|
|
|
2587
2574
|
All configuration parameters are optional. If not specified, the session resumes with its previous configuration.
|
|
@@ -2591,6 +2578,8 @@ All configuration parameters are optional. If not specified, the session resumes
|
|
|
2591
2578
|
- `--cost-limit <USD>` - Update compute cost limit (-1 for unlimited)
|
|
2592
2579
|
- `--shutdown-in <DURATION>` - Update auto-shutdown time (e.g., 8h, 2d)
|
|
2593
2580
|
|
|
2581
|
+
> To link or mount data to a running session, use `cloudos link` or `cloudos datasets link` after the session has resumed.
|
|
2582
|
+
|
|
2594
2583
|
### Datasets
|
|
2595
2584
|
|
|
2596
2585
|
Manage files and folders within your Lifebit Platform File Explorer programmatically. These commands provide comprehensive file management capabilities for organizing research data and results.
|
|
@@ -2718,31 +2707,44 @@ cloudos datasets cp AnalysesResults/my_analysis/results/my_plot.png Data/plots
|
|
|
2718
2707
|
```
|
|
2719
2708
|
|
|
2720
2709
|
|
|
2721
|
-
#### Link
|
|
2710
|
+
#### Link Files and Folders to Interactive Analysis
|
|
2722
2711
|
|
|
2723
|
-
Connect external S3 buckets or
|
|
2712
|
+
Connect external S3 buckets, S3 files, or File Explorer files/folders to your interactive analysis sessions. This provides direct access to data without needing to copy files.
|
|
2724
2713
|
|
|
2725
|
-
This subcommand
|
|
2714
|
+
This subcommand uses the `--session-id` option to access the correct interactive session. This option can be added to the CLI or defined in a profile, for convenience.
|
|
2726
2715
|
|
|
2727
2716
|
```bash
|
|
2728
|
-
cloudos datasets link <
|
|
2717
|
+
cloudos datasets link <PATH> --profile <profile> --session-id <SESSION_ID>
|
|
2729
2718
|
```
|
|
2730
2719
|
|
|
2731
|
-
|
|
2720
|
+
Link an S3 folder:
|
|
2732
2721
|
```console
|
|
2733
2722
|
cloudos datasets link s3://bucket/path/folder --profile test --session-id 1234
|
|
2734
2723
|
```
|
|
2735
2724
|
|
|
2736
|
-
|
|
2737
|
-
```
|
|
2738
|
-
cloudos datasets link
|
|
2725
|
+
Link an S3 file:
|
|
2726
|
+
```console
|
|
2727
|
+
cloudos datasets link s3://bucket/path/data.csv --profile test --session-id 1234
|
|
2728
|
+
```
|
|
2729
|
+
|
|
2730
|
+
Link a File Explorer folder (requires `--project-name`):
|
|
2731
|
+
```console
|
|
2732
|
+
cloudos datasets link "Data/HLA" --project-name my-project --session-id 1234
|
|
2733
|
+
```
|
|
2734
|
+
|
|
2735
|
+
Link a File Explorer file (requires `--project-name`):
|
|
2736
|
+
```console
|
|
2737
|
+
cloudos datasets link "Data/observations.csv" --project-name my-project --session-id 1234
|
|
2739
2738
|
```
|
|
2740
2739
|
|
|
2741
2740
|
> [!NOTE]
|
|
2742
2741
|
> If running the CLI inside a jupyter session, the pre-configured CLI installation will have the session ID already installed and only the `--apikey` needs to be added.
|
|
2743
2742
|
|
|
2744
2743
|
> [!NOTE]
|
|
2745
|
-
> Virtual folders in File Explorer
|
|
2744
|
+
> Virtual folders in File Explorer (folders created in File Explorer that are not actual storage locations) cannot be linked.
|
|
2745
|
+
|
|
2746
|
+
> [!NOTE]
|
|
2747
|
+
> A maximum of 100 items can be linked per session. If the new items combined with already-linked items exceed this limit, the entire request is rejected.
|
|
2746
2748
|
|
|
2747
2749
|
#### Create Folder
|
|
2748
2750
|
|
|
@@ -2772,11 +2774,11 @@ cloudos datasets rm <path> --profile my_profile
|
|
|
2772
2774
|
|
|
2773
2775
|
### Link
|
|
2774
2776
|
|
|
2775
|
-
The `cloudos link` command provides a unified interface for linking folders to interactive analysis sessions. This command consolidates functionality previously available through separate commands (`cloudos job results --link`, `cloudos job workdir --link`, `cloudos job logs --link`, and `cloudos datasets link`) into a single, intuitive interface.
|
|
2777
|
+
The `cloudos link` command provides a unified interface for linking files and folders to interactive analysis sessions. This command consolidates functionality previously available through separate commands (`cloudos job results --link`, `cloudos job workdir --link`, `cloudos job logs --link`, and `cloudos datasets link`) into a single, intuitive interface.
|
|
2776
2778
|
|
|
2777
|
-
#### Link Folders to Interactive Analysis
|
|
2779
|
+
#### Link Files and Folders to Interactive Analysis
|
|
2778
2780
|
|
|
2779
|
-
Link job-related folders or custom S3 paths to your interactive analysis sessions for direct access to data without needing to copy files.
|
|
2781
|
+
Link job-related folders or custom S3/File Explorer paths (files and folders) to your interactive analysis sessions for direct access to data without needing to copy files.
|
|
2780
2782
|
|
|
2781
2783
|
**Two modes of operation:**
|
|
2782
2784
|
|
|
@@ -2784,8 +2786,10 @@ Link job-related folders or custom S3 paths to your interactive analysis session
|
|
|
2784
2786
|
- By default, links results, workdir, and logs folders
|
|
2785
2787
|
- Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
|
|
2786
2788
|
|
|
2787
|
-
2. **Direct path linking** (PATH argument): Links specific S3 or File Explorer paths.
|
|
2788
|
-
|
|
2789
|
+
2. **Direct path linking** (PATH argument): Links specific S3 or File Explorer paths (files or folders). Supports a single path or comma-separated multiple paths.
|
|
2790
|
+
- S3 paths whose last segment contains a `.` are treated as files (e.g., `s3://bucket/data/file.csv`)
|
|
2791
|
+
- S3 paths ending with `/` or without an extension are treated as folders
|
|
2792
|
+
- File Explorer paths can point to either files or folders — the CLI detects the type automatically
|
|
2789
2793
|
|
|
2790
2794
|
**Basic usage:**
|
|
2791
2795
|
|
|
@@ -2797,16 +2801,28 @@ cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
|
|
|
2797
2801
|
cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
|
|
2798
2802
|
cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
|
|
2799
2803
|
|
|
2800
|
-
# Link a single S3
|
|
2801
|
-
cloudos link s3://bucket/folder --session-id <SESSION_ID> --profile my_profile
|
|
2804
|
+
# Link a single S3 folder
|
|
2805
|
+
cloudos link s3://bucket/folder/ --session-id <SESSION_ID> --profile my_profile
|
|
2806
|
+
|
|
2807
|
+
# Link a single S3 file
|
|
2808
|
+
cloudos link s3://bucket/data/file.csv --session-id <SESSION_ID> --profile my_profile
|
|
2802
2809
|
|
|
2803
|
-
# Link multiple S3 paths (comma-separated)
|
|
2804
|
-
cloudos link s3://bucket1/data
|
|
2810
|
+
# Link multiple S3 paths (comma-separated, files and folders mixed)
|
|
2811
|
+
cloudos link s3://bucket1/data/,s3://bucket2/results/file.csv --session-id <SESSION_ID> --profile my_profile
|
|
2805
2812
|
|
|
2806
|
-
# Link a File Explorer
|
|
2813
|
+
# Link a File Explorer folder (path is RELATIVE to --project-name; do NOT prepend the project)
|
|
2807
2814
|
cloudos link "Data/MyFolder" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2815
|
+
|
|
2816
|
+
# Link a File Explorer file (path is RELATIVE to --project-name)
|
|
2817
|
+
cloudos link "Data/file.csv" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2818
|
+
|
|
2819
|
+
# Link several File Explorer items at once (all in the same project)
|
|
2820
|
+
cloudos link "Data/MyFolder,Data/file.csv,Results/run-1" --project-name my-project --session-id <SESSION_ID> --profile my_profile
|
|
2808
2821
|
```
|
|
2809
2822
|
|
|
2823
|
+
> [!IMPORTANT]
|
|
2824
|
+
> **`cloudos link` is single-project for File Explorer paths.** All File Explorer items linked in one invocation must belong to the project named in `--project-name`. The path must be relative to that project — prepending the project name to the path (e.g. `my-project/Data/file.csv`) is rejected. To link items from a different project, run `cloudos link` again with a different `--project-name`.
|
|
2825
|
+
|
|
2810
2826
|
**Command options:**
|
|
2811
2827
|
|
|
2812
2828
|
|
|
@@ -2816,7 +2832,7 @@ cloudos link "Data/MyFolder" --project-name my-project --session-id <SESSION_ID>
|
|
|
2816
2832
|
- `--workspace-id`: The specific Lifebit Platform workspace ID (required)
|
|
2817
2833
|
- `--session-id`: The specific Lifebit Platform interactive session ID (required)
|
|
2818
2834
|
- `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
|
|
2819
|
-
- `--project-name`: Lifebit Platform project name
|
|
2835
|
+
- `--project-name`: Lifebit Platform project name. Required when any PATH is a File Explorer path. All FE paths in one invocation must belong to this project and must be RELATIVE to it (do not prepend the project name)
|
|
2820
2836
|
- `--results`: Link only results folder (only works with `--job-id`)
|
|
2821
2837
|
- `--workdir`: Link only working directory (only works with `--job-id`)
|
|
2822
2838
|
- `--logs`: Link only logs folder (only works with `--job-id`)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.91.0'
|
|
@@ -754,13 +754,15 @@ def link(ctx,
|
|
|
754
754
|
ssl_cert,
|
|
755
755
|
profile):
|
|
756
756
|
"""
|
|
757
|
-
Link a folder (S3 or File Explorer) to an active interactive analysis.
|
|
757
|
+
Link a file or folder (S3 or File Explorer) to an active interactive analysis.
|
|
758
758
|
|
|
759
|
-
PATH [path]: the full path to the S3 folder
|
|
760
|
-
|
|
759
|
+
PATH [path]: the full path to the S3 file/folder, or a path RELATIVE to
|
|
760
|
+
the project named in --project-name for File Explorer items. Do NOT
|
|
761
|
+
prepend the project name to File Explorer paths.
|
|
762
|
+
E.g.: 's3://bucket-name/folder/subfolder', 's3://bucket/data/file.csv',
|
|
763
|
+
'Data/Downloads', 'Data/file.csv'.
|
|
761
764
|
"""
|
|
762
765
|
if not path.startswith("s3://") and project_name is None:
|
|
763
|
-
# for non-s3 paths we need the project, for S3 we don't
|
|
764
766
|
raise click.UsageError("When using File Explorer paths '--project-name' needs to be defined")
|
|
765
767
|
|
|
766
768
|
verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert)
|
|
@@ -774,75 +776,14 @@ def link(ctx,
|
|
|
774
776
|
verify=verify_ssl
|
|
775
777
|
)
|
|
776
778
|
|
|
777
|
-
# Minimal folder validation and improved error messages
|
|
778
|
-
is_s3 = path.startswith("s3://")
|
|
779
|
-
is_folder = True
|
|
780
|
-
if is_s3:
|
|
781
|
-
# S3 path validation - use heuristics to determine if it's likely a folder
|
|
782
|
-
try:
|
|
783
|
-
# If path ends with '/', it's likely a folder
|
|
784
|
-
if path.endswith('/'):
|
|
785
|
-
is_folder = True
|
|
786
|
-
else:
|
|
787
|
-
# Check the last part of the path
|
|
788
|
-
path_parts = path.rstrip("/").split("/")
|
|
789
|
-
if path_parts:
|
|
790
|
-
last_part = path_parts[-1]
|
|
791
|
-
# If the last part has no dot, it's likely a folder
|
|
792
|
-
if '.' not in last_part:
|
|
793
|
-
is_folder = True
|
|
794
|
-
else:
|
|
795
|
-
# If it has a dot, it might be a file - set to None for warning
|
|
796
|
-
is_folder = None
|
|
797
|
-
else:
|
|
798
|
-
# Empty path parts, set to None for uncertainty
|
|
799
|
-
is_folder = None
|
|
800
|
-
except Exception:
|
|
801
|
-
# If we can't parse the S3 path, set to None for uncertainty
|
|
802
|
-
is_folder = None
|
|
803
|
-
else:
|
|
804
|
-
# File Explorer path validation (existing logic)
|
|
805
|
-
try:
|
|
806
|
-
datasets = Datasets(
|
|
807
|
-
cloudos_url=cloudos_url,
|
|
808
|
-
apikey=apikey,
|
|
809
|
-
workspace_id=workspace_id,
|
|
810
|
-
project_name=project_name,
|
|
811
|
-
verify=verify_ssl,
|
|
812
|
-
cromwell_token=None
|
|
813
|
-
)
|
|
814
|
-
parts = path.strip("/").split("/")
|
|
815
|
-
parent_path = "/".join(parts[:-1]) if len(parts) > 1 else ""
|
|
816
|
-
item_name = parts[-1]
|
|
817
|
-
contents = datasets.list_folder_content(parent_path)
|
|
818
|
-
found = None
|
|
819
|
-
for item in contents.get("folders", []):
|
|
820
|
-
if item.get("name") == item_name:
|
|
821
|
-
found = item
|
|
822
|
-
break
|
|
823
|
-
if not found:
|
|
824
|
-
for item in contents.get("files", []):
|
|
825
|
-
if item.get("name") == item_name:
|
|
826
|
-
found = item
|
|
827
|
-
break
|
|
828
|
-
if found and ("folderType" not in found):
|
|
829
|
-
is_folder = False
|
|
830
|
-
except Exception:
|
|
831
|
-
is_folder = None
|
|
832
|
-
|
|
833
|
-
if is_folder is False:
|
|
834
|
-
if is_s3:
|
|
835
|
-
raise ValueError("The S3 path appears to point to a file, not a folder. You can only link folders. Please link the parent folder instead.")
|
|
836
|
-
else:
|
|
837
|
-
raise ValueError("Linking files or virtual folders is not supported. Link the S3 parent folder instead.", err=True)
|
|
838
|
-
return
|
|
839
|
-
elif is_folder is None and is_s3:
|
|
840
|
-
click.secho("Unable to verify whether the S3 path is a folder. Proceeding with linking; " +
|
|
841
|
-
"however, if the operation fails, please confirm that you are linking a folder rather than a file.", fg='yellow', bold=True)
|
|
842
|
-
|
|
843
779
|
try:
|
|
844
|
-
link_p.link_folder(path, session_id)
|
|
780
|
+
succeeded = link_p.link_folder(path, session_id)
|
|
845
781
|
except Exception as e:
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
782
|
+
raise ValueError(f"Could not link item. {e}")
|
|
783
|
+
|
|
784
|
+
if not succeeded:
|
|
785
|
+
click.secho(
|
|
786
|
+
"Linking did not complete successfully. See errors above.",
|
|
787
|
+
fg='red', err=True,
|
|
788
|
+
)
|
|
789
|
+
raise SystemExit(1)
|