cloudos-cli 2.92.0__tar.gz → 2.93.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 (83) hide show
  1. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/PKG-INFO +117 -116
  2. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/README.md +116 -115
  3. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/__main__.py +0 -2
  4. cloudos_cli-2.93.1/cloudos_cli/_version.py +1 -0
  5. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/datasets/cli.py +11 -17
  6. cloudos_cli-2.93.1/cloudos_cli/interactive_session/__init__.py +5 -0
  7. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/interactive_session/cli.py +344 -99
  8. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/interactive_session/interactive_session.py +204 -234
  9. {cloudos_cli-2.92.0/cloudos_cli/link → cloudos_cli-2.93.1/cloudos_cli/interactive_session}/link.py +74 -117
  10. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/jobs/cli.py +1 -1
  11. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/PKG-INFO +117 -116
  12. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/SOURCES.txt +4 -3
  13. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_interactive_session/test_create_session.py +114 -21
  14. cloudos_cli-2.93.1/tests/test_interactive_session/test_link_error_handling.py +258 -0
  15. cloudos_cli-2.93.1/tests/test_interactive_session/test_link_session.py +280 -0
  16. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_interactive_session/test_list_sessions.py +149 -0
  17. cloudos_cli-2.93.1/tests/test_interactive_session/test_normalize_path.py +102 -0
  18. cloudos_cli-2.92.0/cloudos_cli/_version.py +0 -1
  19. cloudos_cli-2.92.0/cloudos_cli/interactive_session/__init__.py +0 -1
  20. cloudos_cli-2.92.0/cloudos_cli/link/__init__.py +0 -8
  21. cloudos_cli-2.92.0/cloudos_cli/link/cli.py +0 -224
  22. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/LICENSE +0 -0
  23. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/__init__.py +0 -0
  24. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/bash/__init__.py +0 -0
  25. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/bash/cli.py +0 -0
  26. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/clos.py +0 -0
  27. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/configure/__init__.py +0 -0
  28. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/configure/cli.py +0 -0
  29. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/configure/configure.py +0 -0
  30. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/constants.py +0 -0
  31. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/cost/__init__.py +0 -0
  32. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/cost/cost.py +0 -0
  33. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/cromwell/__init__.py +0 -0
  34. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/cromwell/cli.py +0 -0
  35. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/datasets/__init__.py +0 -0
  36. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/datasets/datasets.py +0 -0
  37. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/import_wf/__init__.py +0 -0
  38. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/import_wf/import_wf.py +0 -0
  39. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/jobs/__init__.py +0 -0
  40. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/jobs/job.py +0 -0
  41. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/logging/__init__.py +0 -0
  42. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/logging/logger.py +0 -0
  43. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/procurement/__init__.py +0 -0
  44. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/procurement/cli.py +0 -0
  45. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/procurement/images.py +0 -0
  46. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/projects/__init__.py +0 -0
  47. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/projects/cli.py +0 -0
  48. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/queue/__init__.py +0 -0
  49. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/queue/cli.py +0 -0
  50. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/queue/queue.py +0 -0
  51. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/related_analyses/__init__.py +0 -0
  52. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/related_analyses/related_analyses.py +0 -0
  53. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/__init__.py +0 -0
  54. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/array_job.py +0 -0
  55. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/cli_helpers.py +0 -0
  56. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/cloud.py +0 -0
  57. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/details.py +0 -0
  58. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/errors.py +0 -0
  59. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/last_wf.py +0 -0
  60. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/nextflow_version.py +0 -0
  61. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/requests.py +0 -0
  62. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/utils/resources.py +0 -0
  63. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/workflows/__init__.py +0 -0
  64. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli/workflows/cli.py +0 -0
  65. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  66. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/entry_points.txt +0 -0
  67. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/requires.txt +0 -0
  68. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/cloudos_cli.egg-info/top_level.txt +0 -0
  69. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/setup.cfg +0 -0
  70. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/setup.py +0 -0
  71. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/__init__.py +0 -0
  72. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/functions_for_pytest.py +0 -0
  73. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_cli_project_create.py +0 -0
  74. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_cost/__init__.py +0 -0
  75. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_cost/test_job_cost.py +0 -0
  76. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_details.py +0 -0
  77. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_error_messages.py +0 -0
  78. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_interactive_session/__init__.py +0 -0
  79. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_logging/__init__.py +0 -0
  80. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_logging/test_logger.py +0 -0
  81. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_nextflow_version.py +0 -0
  82. {cloudos_cli-2.92.0 → cloudos_cli-2.93.1}/tests/test_related_analyses/__init__.py +0 -0
  83. {cloudos_cli-2.92.0 → cloudos_cli-2.93.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.92.0
3
+ Version: 2.93.1
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
@@ -2182,9 +2182,9 @@ cloudos interactive-session create \
2182
2182
  - `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`)
2183
2183
 
2184
2184
  **Data & Storage Management:**
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 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
- **Note:** Linking is not supported on Azure. Use Lifebit Platform File Explorer for data access.
2185
+ - `--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. Use `--copy` to copy data into the session instead.
2186
+ - `--copy`: Copy data into the session instead of linking for read access. When specified, the paths provided by `--link` are copied into the session's data volume. Supports Lifebit Platform datasets (`project_name/Data/file.csv`) and S3 files (`s3://bucket/path/to/file`). AWS only for S3 files.
2187
+ **Note:** Linking is not supported on Azure. Use `--link --copy` to copy Lifebit Platform data into the session on Azure.
2188
2188
 
2189
2189
  **Backend-Specific:**
2190
2190
  - `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`)
@@ -2197,20 +2197,21 @@ cloudos interactive-session create \
2197
2197
  **Data Management**
2198
2198
 
2199
2199
  CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
2200
- - **Mount files** (`--mount`): Files are copied into the session's mounted-data volume. Supports CloudOS File Explorer files and S3 files (AWS only).
2200
+ - **Copy files** (`--link --copy`): Files are copied into the session's data volume. Supports Lifebit Platform File Explorer files and S3 files (AWS only).
2201
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
- **Data Mounting Examples**
2204
+ **Data Management Examples**
2205
2205
 
2206
- Mount a file from File Explorer:
2206
+ Copy a file from File Explorer into the session:
2207
2207
 
2208
2208
  ```bash
2209
2209
  cloudos interactive-session create \
2210
2210
  --profile my_profile \
2211
2211
  --name "Data Analysis" \
2212
2212
  --session-type jupyter \
2213
- --mount "my_project/training_data.csv"
2213
+ --link "my_project/training_data.csv" \
2214
+ --copy
2214
2215
  ```
2215
2216
 
2216
2217
  Link an S3 folder:
@@ -2613,7 +2614,114 @@ All configuration parameters are optional. If not specified, the session resumes
2613
2614
  - `--cost-limit <USD>` - Update compute cost limit (-1 for unlimited)
2614
2615
  - `--shutdown-in <DURATION>` - Update auto-shutdown time (e.g., 8h, 2d)
2615
2616
 
2616
- > To link or mount data to a running session, use `cloudos link` or `cloudos datasets link` after the session has resumed.
2617
+ > To link or copy data to a running session, use `cloudos interactive-session link` after the session has resumed.
2618
+
2619
+ ### Link
2620
+
2621
+ The `cloudos interactive-session link` command provides a unified interface for linking files and folders to interactive analysis sessions. It 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.
2622
+
2623
+ #### Link Files and Folders to Interactive Analysis
2624
+
2625
+ 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.
2626
+
2627
+ **Two modes of operation:**
2628
+
2629
+ 1. **Job-based linking** (`--job-id`): Links folders from a completed or running job
2630
+ - By default, links results, workdir, and logs folders
2631
+ - Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
2632
+
2633
+ 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.
2634
+ - S3 paths whose last segment contains a `.` are treated as files (e.g., `s3://bucket/data/file.csv`)
2635
+ - S3 paths ending with `/` or without an extension are treated as folders
2636
+ - File Explorer paths can point to either files or folders — the CLI detects the type automatically
2637
+ - If the first path segment is a standard top-level folder name (`Data`, `AnalysesResults`, `Analyses_Results`, `Analyses-Results`, `Cohorts`), the path is resolved against the profile project. Otherwise the first segment is treated as the project name (e.g. `other-project/Data/file.csv`).
2638
+
2639
+ **Basic usage:**
2640
+
2641
+ ```bash
2642
+ # Link all job folders (results, workdir, logs) - default behavior
2643
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
2644
+
2645
+ # Link only specific folders from a job
2646
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
2647
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
2648
+
2649
+ # Link a single S3 folder
2650
+ cloudos interactive-session link s3://bucket/folder/ --session-id <SESSION_ID> --profile my_profile
2651
+
2652
+ # Link a single S3 file
2653
+ cloudos interactive-session link s3://bucket/data/file.csv --session-id <SESSION_ID> --profile my_profile
2654
+
2655
+ # Link multiple S3 paths (comma-separated, files and folders mixed)
2656
+ cloudos interactive-session link s3://bucket1/data/,s3://bucket2/results/file.csv --session-id <SESSION_ID> --profile my_profile
2657
+
2658
+ # Link a File Explorer folder from the profile project
2659
+ cloudos interactive-session link Data/MyFolder --session-id <SESSION_ID> --profile my_profile
2660
+
2661
+ # Link a File Explorer file from a different project
2662
+ cloudos interactive-session link other-project/Data/file.csv --session-id <SESSION_ID> --profile my_profile
2663
+
2664
+ # Mix paths from the profile project, another project, and S3
2665
+ cloudos interactive-session link Data/MultiQC,other-project/Data/file.csv,s3://bucket/results/ --session-id <SESSION_ID> --profile my_profile
2666
+ ```
2667
+
2668
+ **Command options:**
2669
+
2670
+ - `PATH`: S3 or File Explorer path(s) to link (positional argument, required if `--job-id` is not provided). Supports comma-separated multiple paths for batch linking (e.g., `s3://bucket1/path1,s3://bucket2/path2`)
2671
+ - `--apikey` / `-k`: Your Lifebit Platform API key (required)
2672
+ - `--cloudos-url` / `-c`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai)
2673
+ - `--workspace-id`: The specific Lifebit Platform workspace ID (required)
2674
+ - `--session-id`: The specific Lifebit Platform interactive session ID (required)
2675
+ - `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
2676
+ - `--project-name`: Lifebit Platform project name (used as fallback for job-based linking)
2677
+ - `--results`: Link only results folder (only works with `--job-id`)
2678
+ - `--workdir`: Link only working directory (only works with `--job-id`)
2679
+ - `--logs`: Link only logs folder (only works with `--job-id`)
2680
+ - `--verbose`: Print detailed information messages
2681
+ - `--disable-ssl-verification`: Disable SSL certificate verification
2682
+ - `--ssl-cert`: Path to your SSL certificate file
2683
+ - `--profile`: Profile to use from the config file
2684
+
2685
+ **Examples:**
2686
+
2687
+ ```bash
2688
+ # Link all folders from a completed job
2689
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --profile my_profile
2690
+
2691
+ # Link only results from a job
2692
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --results --profile my_profile
2693
+
2694
+ # Link workdir and logs (but not results)
2695
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --workdir --logs --profile my_profile
2696
+
2697
+ # Link a single S3 bucket folder
2698
+ cloudos interactive-session link s3://my-bucket/analysis-results/2024 --session-id abc123 --profile my_profile
2699
+
2700
+ # Link multiple S3 folders in one command
2701
+ cloudos interactive-session link s3://bucket1/data,s3://bucket2/results,s3://bucket3/final-output --session-id abc123 --profile my_profile
2702
+
2703
+ # Link File Explorer paths from the profile project
2704
+ cloudos interactive-session link Data/MultiQC --session-id abc123 --profile my_profile
2705
+
2706
+ # Link File Explorer paths from multiple projects in one command
2707
+ cloudos interactive-session link leila-test/Data/MultiQC,Daniel_Test_Files/Data/20131219.populations.tsv --session-id abc123 --profile my_profile
2708
+ ```
2709
+
2710
+ **Error handling:**
2711
+
2712
+ The command provides clear error messages for common scenarios:
2713
+ - Job not completed (for results linking)
2714
+ - Folders not available or deleted
2715
+ - Job still initializing
2716
+ - Invalid paths or permissions
2717
+
2718
+ > [!NOTE]
2719
+ > If running the CLI inside a Jupyter session, the pre-configured CLI installation will have the session ID already configured and only the `--apikey` needs to be added.
2720
+
2721
+ > [!NOTE]
2722
+ > Azure Blob Storage paths (az://) are not supported for linking in Azure environments.
2723
+
2724
+ ---
2617
2725
 
2618
2726
  ### Datasets
2619
2727
 
@@ -2807,113 +2915,6 @@ cloudos datasets rm <path> --profile my_profile
2807
2915
 
2808
2916
  ---
2809
2917
 
2810
- ### Link
2811
-
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.
2813
-
2814
- #### Link Files and Folders to Interactive Analysis
2815
-
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.
2817
-
2818
- **Two modes of operation:**
2819
-
2820
- 1. **Job-based linking** (`--job-id`): Links folders from a completed or running job
2821
- - By default, links results, workdir, and logs folders
2822
- - Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
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
2828
-
2829
- **Basic usage:**
2830
-
2831
- ```bash
2832
- # Link all job folders (results, workdir, logs) - default behavior
2833
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
2834
-
2835
- # Link only specific folders from a job
2836
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
2837
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
2838
-
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
2844
-
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
2847
-
2848
- # Link a File Explorer folder (path is RELATIVE to --project-name; do NOT prepend the project)
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
2856
- ```
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
-
2861
- **Command options:**
2862
-
2863
-
2864
- - `PATH`: S3 or File Explorer path(s) to link (positional argument, required if `--job-id` is not provided). Supports comma-separated multiple paths for batch linking (e.g., `s3://bucket1/path1,s3://bucket2/path2`)
2865
- - `--apikey` / `-k`: Your Lifebit Platform API key (required)
2866
- - `--cloudos-url` / `-c`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai)
2867
- - `--workspace-id`: The specific Lifebit Platform workspace ID (required)
2868
- - `--session-id`: The specific Lifebit Platform interactive session ID (required)
2869
- - `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
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)
2871
- - `--results`: Link only results folder (only works with `--job-id`)
2872
- - `--workdir`: Link only working directory (only works with `--job-id`)
2873
- - `--logs`: Link only logs folder (only works with `--job-id`)
2874
- - `--verbose`: Print detailed information messages
2875
- - `--disable-ssl-verification`: Disable SSL certificate verification
2876
- - `--ssl-cert`: Path to your SSL certificate file
2877
- - `--profile`: Profile to use from the config file
2878
-
2879
- **Examples:**
2880
-
2881
- ```bash
2882
- # Link all folders from a completed job
2883
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --profile my_profile
2884
-
2885
- # Link only results from a job
2886
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --results --profile my_profile
2887
-
2888
- # Link workdir and logs (but not results)
2889
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --workdir --logs --profile my_profile
2890
-
2891
- # Link a single S3 bucket folder
2892
- cloudos link s3://my-bucket/analysis-results/2024 --session-id abc123 --profile my_profile
2893
-
2894
- # Link multiple S3 folders in one command
2895
- cloudos link s3://bucket1/data,s3://bucket2/results,s3://bucket3/final-output --session-id abc123 --profile my_profile
2896
-
2897
- # Mix different S3 prefixes from the same or different buckets
2898
- cloudos link s3://lifebit-datasets/pipelines/vep/,s3://lifebit-datasets/pipelines/phewas/,s3://my-results/output/ --session-id abc123 --profile my_profile
2899
- ```
2900
-
2901
- **Error handling:**
2902
-
2903
- The command provides clear error messages for common scenarios:
2904
- - Job not completed (for results linking)
2905
- - Folders not available or deleted
2906
- - Job still initializing
2907
- - Invalid paths or permissions
2908
-
2909
- > [!NOTE]
2910
- > If running the CLI inside a Jupyter session, the pre-configured CLI installation will have the session ID already configured and only the `--apikey` needs to be added.
2911
-
2912
- > [!NOTE]
2913
- > Azure Blob Storage paths (az://) are not supported for linking in Azure environments.
2914
-
2915
- ---
2916
-
2917
2918
  ### Procurement
2918
2919
 
2919
2920
  Lifebit Platform supports procurement functionality to manage and list images associated with organizations within a given procurement. This feature is useful for administrators and users who need to view available container images across different organizations in their procurement.
@@ -2147,9 +2147,9 @@ cloudos interactive-session create \
2147
2147
  - `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`)
2148
2148
 
2149
2149
  **Data & Storage Management:**
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 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
- **Note:** Linking is not supported on Azure. Use Lifebit Platform File Explorer for data access.
2150
+ - `--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. Use `--copy` to copy data into the session instead.
2151
+ - `--copy`: Copy data into the session instead of linking for read access. When specified, the paths provided by `--link` are copied into the session's data volume. Supports Lifebit Platform datasets (`project_name/Data/file.csv`) and S3 files (`s3://bucket/path/to/file`). AWS only for S3 files.
2152
+ **Note:** Linking is not supported on Azure. Use `--link --copy` to copy Lifebit Platform data into the session on Azure.
2153
2153
 
2154
2154
  **Backend-Specific:**
2155
2155
  - `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`)
@@ -2162,20 +2162,21 @@ cloudos interactive-session create \
2162
2162
  **Data Management**
2163
2163
 
2164
2164
  CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
2165
- - **Mount files** (`--mount`): Files are copied into the session's mounted-data volume. Supports CloudOS File Explorer files and S3 files (AWS only).
2165
+ - **Copy files** (`--link --copy`): Files are copied into the session's data volume. Supports Lifebit Platform File Explorer files and S3 files (AWS only).
2166
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
- **Data Mounting Examples**
2169
+ **Data Management Examples**
2170
2170
 
2171
- Mount a file from File Explorer:
2171
+ Copy a file from File Explorer into the session:
2172
2172
 
2173
2173
  ```bash
2174
2174
  cloudos interactive-session create \
2175
2175
  --profile my_profile \
2176
2176
  --name "Data Analysis" \
2177
2177
  --session-type jupyter \
2178
- --mount "my_project/training_data.csv"
2178
+ --link "my_project/training_data.csv" \
2179
+ --copy
2179
2180
  ```
2180
2181
 
2181
2182
  Link an S3 folder:
@@ -2578,7 +2579,114 @@ All configuration parameters are optional. If not specified, the session resumes
2578
2579
  - `--cost-limit <USD>` - Update compute cost limit (-1 for unlimited)
2579
2580
  - `--shutdown-in <DURATION>` - Update auto-shutdown time (e.g., 8h, 2d)
2580
2581
 
2581
- > To link or mount data to a running session, use `cloudos link` or `cloudos datasets link` after the session has resumed.
2582
+ > To link or copy data to a running session, use `cloudos interactive-session link` after the session has resumed.
2583
+
2584
+ ### Link
2585
+
2586
+ The `cloudos interactive-session link` command provides a unified interface for linking files and folders to interactive analysis sessions. It 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.
2587
+
2588
+ #### Link Files and Folders to Interactive Analysis
2589
+
2590
+ 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.
2591
+
2592
+ **Two modes of operation:**
2593
+
2594
+ 1. **Job-based linking** (`--job-id`): Links folders from a completed or running job
2595
+ - By default, links results, workdir, and logs folders
2596
+ - Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
2597
+
2598
+ 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.
2599
+ - S3 paths whose last segment contains a `.` are treated as files (e.g., `s3://bucket/data/file.csv`)
2600
+ - S3 paths ending with `/` or without an extension are treated as folders
2601
+ - File Explorer paths can point to either files or folders — the CLI detects the type automatically
2602
+ - If the first path segment is a standard top-level folder name (`Data`, `AnalysesResults`, `Analyses_Results`, `Analyses-Results`, `Cohorts`), the path is resolved against the profile project. Otherwise the first segment is treated as the project name (e.g. `other-project/Data/file.csv`).
2603
+
2604
+ **Basic usage:**
2605
+
2606
+ ```bash
2607
+ # Link all job folders (results, workdir, logs) - default behavior
2608
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
2609
+
2610
+ # Link only specific folders from a job
2611
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
2612
+ cloudos interactive-session link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
2613
+
2614
+ # Link a single S3 folder
2615
+ cloudos interactive-session link s3://bucket/folder/ --session-id <SESSION_ID> --profile my_profile
2616
+
2617
+ # Link a single S3 file
2618
+ cloudos interactive-session link s3://bucket/data/file.csv --session-id <SESSION_ID> --profile my_profile
2619
+
2620
+ # Link multiple S3 paths (comma-separated, files and folders mixed)
2621
+ cloudos interactive-session link s3://bucket1/data/,s3://bucket2/results/file.csv --session-id <SESSION_ID> --profile my_profile
2622
+
2623
+ # Link a File Explorer folder from the profile project
2624
+ cloudos interactive-session link Data/MyFolder --session-id <SESSION_ID> --profile my_profile
2625
+
2626
+ # Link a File Explorer file from a different project
2627
+ cloudos interactive-session link other-project/Data/file.csv --session-id <SESSION_ID> --profile my_profile
2628
+
2629
+ # Mix paths from the profile project, another project, and S3
2630
+ cloudos interactive-session link Data/MultiQC,other-project/Data/file.csv,s3://bucket/results/ --session-id <SESSION_ID> --profile my_profile
2631
+ ```
2632
+
2633
+ **Command options:**
2634
+
2635
+ - `PATH`: S3 or File Explorer path(s) to link (positional argument, required if `--job-id` is not provided). Supports comma-separated multiple paths for batch linking (e.g., `s3://bucket1/path1,s3://bucket2/path2`)
2636
+ - `--apikey` / `-k`: Your Lifebit Platform API key (required)
2637
+ - `--cloudos-url` / `-c`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai)
2638
+ - `--workspace-id`: The specific Lifebit Platform workspace ID (required)
2639
+ - `--session-id`: The specific Lifebit Platform interactive session ID (required)
2640
+ - `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
2641
+ - `--project-name`: Lifebit Platform project name (used as fallback for job-based linking)
2642
+ - `--results`: Link only results folder (only works with `--job-id`)
2643
+ - `--workdir`: Link only working directory (only works with `--job-id`)
2644
+ - `--logs`: Link only logs folder (only works with `--job-id`)
2645
+ - `--verbose`: Print detailed information messages
2646
+ - `--disable-ssl-verification`: Disable SSL certificate verification
2647
+ - `--ssl-cert`: Path to your SSL certificate file
2648
+ - `--profile`: Profile to use from the config file
2649
+
2650
+ **Examples:**
2651
+
2652
+ ```bash
2653
+ # Link all folders from a completed job
2654
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --profile my_profile
2655
+
2656
+ # Link only results from a job
2657
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --results --profile my_profile
2658
+
2659
+ # Link workdir and logs (but not results)
2660
+ cloudos interactive-session link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --workdir --logs --profile my_profile
2661
+
2662
+ # Link a single S3 bucket folder
2663
+ cloudos interactive-session link s3://my-bucket/analysis-results/2024 --session-id abc123 --profile my_profile
2664
+
2665
+ # Link multiple S3 folders in one command
2666
+ cloudos interactive-session link s3://bucket1/data,s3://bucket2/results,s3://bucket3/final-output --session-id abc123 --profile my_profile
2667
+
2668
+ # Link File Explorer paths from the profile project
2669
+ cloudos interactive-session link Data/MultiQC --session-id abc123 --profile my_profile
2670
+
2671
+ # Link File Explorer paths from multiple projects in one command
2672
+ cloudos interactive-session link leila-test/Data/MultiQC,Daniel_Test_Files/Data/20131219.populations.tsv --session-id abc123 --profile my_profile
2673
+ ```
2674
+
2675
+ **Error handling:**
2676
+
2677
+ The command provides clear error messages for common scenarios:
2678
+ - Job not completed (for results linking)
2679
+ - Folders not available or deleted
2680
+ - Job still initializing
2681
+ - Invalid paths or permissions
2682
+
2683
+ > [!NOTE]
2684
+ > If running the CLI inside a Jupyter session, the pre-configured CLI installation will have the session ID already configured and only the `--apikey` needs to be added.
2685
+
2686
+ > [!NOTE]
2687
+ > Azure Blob Storage paths (az://) are not supported for linking in Azure environments.
2688
+
2689
+ ---
2582
2690
 
2583
2691
  ### Datasets
2584
2692
 
@@ -2772,113 +2880,6 @@ cloudos datasets rm <path> --profile my_profile
2772
2880
 
2773
2881
  ---
2774
2882
 
2775
- ### Link
2776
-
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.
2778
-
2779
- #### Link Files and Folders to Interactive Analysis
2780
-
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.
2782
-
2783
- **Two modes of operation:**
2784
-
2785
- 1. **Job-based linking** (`--job-id`): Links folders from a completed or running job
2786
- - By default, links results, workdir, and logs folders
2787
- - Use `--results`, `--workdir`, or `--logs` flags to link only specific folders
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
2793
-
2794
- **Basic usage:**
2795
-
2796
- ```bash
2797
- # Link all job folders (results, workdir, logs) - default behavior
2798
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --profile my_profile
2799
-
2800
- # Link only specific folders from a job
2801
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --results --profile my_profile
2802
- cloudos link --job-id <JOB_ID> --session-id <SESSION_ID> --workdir --logs --profile my_profile
2803
-
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
2809
-
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
2812
-
2813
- # Link a File Explorer folder (path is RELATIVE to --project-name; do NOT prepend the project)
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
2821
- ```
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
-
2826
- **Command options:**
2827
-
2828
-
2829
- - `PATH`: S3 or File Explorer path(s) to link (positional argument, required if `--job-id` is not provided). Supports comma-separated multiple paths for batch linking (e.g., `s3://bucket1/path1,s3://bucket2/path2`)
2830
- - `--apikey` / `-k`: Your Lifebit Platform API key (required)
2831
- - `--cloudos-url` / `-c`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai)
2832
- - `--workspace-id`: The specific Lifebit Platform workspace ID (required)
2833
- - `--session-id`: The specific Lifebit Platform interactive session ID (required)
2834
- - `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default)
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)
2836
- - `--results`: Link only results folder (only works with `--job-id`)
2837
- - `--workdir`: Link only working directory (only works with `--job-id`)
2838
- - `--logs`: Link only logs folder (only works with `--job-id`)
2839
- - `--verbose`: Print detailed information messages
2840
- - `--disable-ssl-verification`: Disable SSL certificate verification
2841
- - `--ssl-cert`: Path to your SSL certificate file
2842
- - `--profile`: Profile to use from the config file
2843
-
2844
- **Examples:**
2845
-
2846
- ```bash
2847
- # Link all folders from a completed job
2848
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --profile my_profile
2849
-
2850
- # Link only results from a job
2851
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --results --profile my_profile
2852
-
2853
- # Link workdir and logs (but not results)
2854
- cloudos link --job-id 62c83a1191fe06013b7ef355 --session-id abc123 --workdir --logs --profile my_profile
2855
-
2856
- # Link a single S3 bucket folder
2857
- cloudos link s3://my-bucket/analysis-results/2024 --session-id abc123 --profile my_profile
2858
-
2859
- # Link multiple S3 folders in one command
2860
- cloudos link s3://bucket1/data,s3://bucket2/results,s3://bucket3/final-output --session-id abc123 --profile my_profile
2861
-
2862
- # Mix different S3 prefixes from the same or different buckets
2863
- cloudos link s3://lifebit-datasets/pipelines/vep/,s3://lifebit-datasets/pipelines/phewas/,s3://my-results/output/ --session-id abc123 --profile my_profile
2864
- ```
2865
-
2866
- **Error handling:**
2867
-
2868
- The command provides clear error messages for common scenarios:
2869
- - Job not completed (for results linking)
2870
- - Folders not available or deleted
2871
- - Job still initializing
2872
- - Invalid paths or permissions
2873
-
2874
- > [!NOTE]
2875
- > If running the CLI inside a Jupyter session, the pre-configured CLI installation will have the session ID already configured and only the `--apikey` needs to be added.
2876
-
2877
- > [!NOTE]
2878
- > Azure Blob Storage paths (az://) are not supported for linking in Azure environments.
2879
-
2880
- ---
2881
-
2882
2883
  ### Procurement
2883
2884
 
2884
2885
  Lifebit Platform supports procurement functionality to manage and list images associated with organizations within a given procurement. This feature is useful for administrators and users who need to view available container images across different organizations in their procurement.
@@ -24,7 +24,6 @@ from cloudos_cli.bash.cli import bash
24
24
  from cloudos_cli.procurement.cli import procurement
25
25
  from cloudos_cli.datasets.cli import datasets
26
26
  from cloudos_cli.configure.cli import configure
27
- from cloudos_cli.link.cli import link
28
27
  from cloudos_cli.interactive_session.cli import interactive_session
29
28
 
30
29
 
@@ -63,7 +62,6 @@ run_cloudos_cli.add_command(bash)
63
62
  run_cloudos_cli.add_command(procurement)
64
63
  run_cloudos_cli.add_command(datasets)
65
64
  run_cloudos_cli.add_command(configure)
66
- run_cloudos_cli.add_command(link)
67
65
  run_cloudos_cli.add_command(interactive_session)
68
66
 
69
67
  if __name__ == '__main__':
@@ -0,0 +1 @@
1
+ __version__ = '2.93.1'
@@ -4,7 +4,7 @@ import rich_click as click
4
4
  import csv
5
5
  import sys
6
6
  from cloudos_cli.datasets import Datasets
7
- from cloudos_cli.link import Link
7
+ from cloudos_cli.interactive_session.link import Link
8
8
  from cloudos_cli.utils.resources import ssl_selector, format_bytes
9
9
  from cloudos_cli.configure.configure import with_profile_config, CLOUDOS_URL
10
10
  from cloudos_cli.logging.logger import update_command_context_from_click
@@ -326,8 +326,8 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac
326
326
  if folder_type in ("VirtualFolder", "Folder"):
327
327
  target_kind = "Folder"
328
328
  elif folder_type == "S3Folder":
329
- raise ValueError(f"Unable to move item '{source_item_name}' to '{destination_path}'. " +
330
- "The destination is an S3 folder, and only virtual folders can be selected as valid move destinations.")
329
+ raise ValueError(f"Unable to move item '{source_item_name}' to '{destination_path}'. "
330
+ "The destination is an S3 folder, and only virtual folders can be selected as valid move destinations.")
331
331
  elif isinstance(folder_type, bool) and folder_type: # legacy dataset structure
332
332
  target_kind = "Dataset"
333
333
  else:
@@ -335,8 +335,8 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac
335
335
 
336
336
  except Exception as e:
337
337
  raise ValueError(f"Could not resolve destination path '{destination_path}'. {str(e)}")
338
- print(f"Moving {source_kind} '{source_item_name}' to '{destination_path}' " +
339
- f"in project '{destination_project_name} ...")
338
+ print(f"Moving {source_kind} '{source_item_name}' to '{destination_path}' "
339
+ f"in project '{destination_project_name} ...")
340
340
  # === Perform Move ===
341
341
  try:
342
342
  response = source_client.move_files_and_folders(
@@ -756,11 +756,10 @@ def link(ctx,
756
756
  """
757
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 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.
759
+ PATH [path]: the full path to the S3 file/folder or relative path in File Explorer
760
+ (relative to the project specified by --project-name).
762
761
  E.g.: 's3://bucket-name/folder/subfolder', 's3://bucket/data/file.csv',
763
- 'Data/Downloads', 'Data/file.csv'.
762
+ 'Data/Downloads', 'Data', or 'Data/file.csv'.
764
763
  """
765
764
  if not path.startswith("s3://") and project_name is None:
766
765
  raise click.UsageError("When using File Explorer paths '--project-name' needs to be defined")
@@ -777,13 +776,8 @@ def link(ctx,
777
776
  )
778
777
 
779
778
  try:
780
- succeeded = link_p.link_folder(path, session_id)
779
+ success = link_p.link_folder(path, session_id)
781
780
  except Exception as e:
782
781
  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)
782
+ if not success:
783
+ raise click.ClickException("Linking failed: mount verification did not reach 'mounted' status.")
@@ -0,0 +1,5 @@
1
+ """CloudOS interactive session module."""
2
+
3
+ from .link import Link
4
+
5
+ __all__ = ['Link']