diff --git a/CHANGELOG.md b/CHANGELOG.md index 00de219a..40fcf297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ ## lifebit-ai/cloudos-cli: changelog +## v2.89.2 (2026-04-22) + +### Patch + +- Updated all user-facing references from "CloudOS" to "Lifebit Platform" in README and CLI help messages +- Technical identifiers (command names, package names, URLs) remain unchanged for backward compatibility + ## v2.89.1 (2026-04-17) ### Patch diff --git a/README.md b/README.md index 2311b78d..7725f21c 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![CI_tests](https://github.com/lifebit-ai/cloudos-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/lifebit-ai/cloudos-cli/actions/workflows/ci.yml) -Python package for interacting with CloudOS +Python package for interacting with Lifebit Platform --- @@ -168,26 +168,26 @@ To get general information about the tool: cloudos --help ``` ```console - - Usage: cloudos [OPTIONS] COMMAND [ARGS]... - - CloudOS python package: a package for interacting with CloudOS. - + +Usage: cloudos [OPTIONS] COMMAND [ARGS]... + +CloudOS python package: a package for interacting with Lifebit Platform. + ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --debug Show detailed error information and tracebacks │ │ --version Show the version and exit. │ │ --help Show this message and exit. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ bash CloudOS bash functionality. │ -│ configure CloudOS configuration. │ +│ bash Lifebit Platform bash functionality. │ +│ configure Lifebit Platform configuration. │ │ cromwell Cromwell server functionality: check status, start and stop. │ -│ datasets CloudOS datasets functionality. │ -│ job CloudOS job functionality: run, check and abort jobs in CloudOS. │ -│ procurement CloudOS procurement functionality. │ -│ project CloudOS project functionality: list and create projects in CloudOS. │ -│ queue CloudOS job queue functionality. │ -│ workflow CloudOS workflow functionality: list and import workflows. │ +│ datasets Lifebit Platform datasets functionality. │ +│ job Lifebit Platform job functionality: run, check and abort jobs in Lifebit Platform. │ +│ procurement Lifebit Platform procurement functionality. │ +│ project Lifebit Platform project functionality: list and create projects in Lifebit Platform. │ +│ queue Lifebit Platform job queue functionality. │ +│ workflow Lifebit Platform workflow functionality: list and import workflows. │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ``` @@ -198,14 +198,14 @@ cloudos job list --help ``` ```console Usage: cloudos job list [OPTIONS] - Collect workspace jobs from a CloudOS workspace in CSV or JSON format. + Collect workspace jobs from a Lifebit Platform workspace in CSV or JSON format. ╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────╮ -│ * --apikey -k TEXT Your CloudOS API key [required] │ -│ * --cloudos-url -c TEXT The CloudOS url you are trying to access to. │ +│ * --apikey -k TEXT Your Lifebit Platform API key [required] │ +│ * --cloudos-url -c TEXT The Lifebit Platform url you are trying to access to. │ │ Default=https://cloudos.lifebit.ai. │ │ [required] │ -│ * --workspace-id TEXT The specific CloudOS workspace id. [required] │ +│ * --workspace-id TEXT The specific Lifebit Platform workspace id. [required] │ │ --output-basename TEXT Output file base name to save jobs list. Default=joblist │ │ --output-format [csv|json] The desired file format (file extension) for the output. │ │ For json option --all-fields will be automatically set to │ @@ -251,7 +251,7 @@ In the same way, each implemented command has its own subcommands with its own ` ## Configuration -CloudOS CLI uses a profile-based configuration system to store your credentials and settings securely. This eliminates the need to provide authentication details with every command and allows you to work with multiple CloudOS environments. +CloudOS CLI uses a profile-based configuration system to store your credentials and settings securely. This eliminates the need to provide authentication details with every command and allows you to work with multiple Lifebit Platform environments. Configuration will be saved in the $HOME path folder regardless of operating system. Here, a new folder named `.cloudos` will be created, with files `credentials` and `config` also being created. The structure will look like: @@ -285,8 +285,8 @@ cloudos configure --profile {profile-name} The same prompts will appear, including the execution platform (aws or azure). If a profile with the same name already exists, the current parameters will appear in square brackets and can be overwritten or left unchanged by pressing Enter/Return. When configuring a profile, you can specify: -- **API Key**: Your CloudOS API credentials -- **CloudOS URL**: The CloudOS instance URL +- **API Key**: Your Lifebit Platform API credentials +- **Platform URL**: The Lifebit Platform instance URL - **Project Name**: Default project for commands - **Execution Platform**: `aws` (default) or `azure` - determines default instance types and available features - **Repository Platform**: Version control system (github, gitlab, etc.) @@ -339,7 +339,7 @@ See [Configuration](#configuration) section above for detailed information on se ### Project -Projects in CloudOS provide logical separation of datasets, workflows, and results, making it easier to manage complex research initiatives. You can list all available projects or create new ones using the CLI. +Projects in Lifebit Platform provide logical separation of datasets, workflows, and results, making it easier to manage complex research initiatives. You can list all available projects or create new ones using the CLI. #### List Projects @@ -379,7 +379,7 @@ cloudos project list --profile my_profile --output-format json #### Create Projects -You can create a new project in your CloudOS workspace using the `project create` command. This command requires the name of the new project and will return the project ID upon successful creation. +You can create a new project in your Lifebit Platform workspace using the `project create` command. This command requires the name of the new project and will return the project ID upon successful creation. ```bash cloudos project create --profile my_profile --new-project "My New Project" @@ -394,10 +394,10 @@ The expected output is something similar to: ### Queue -Job queues are required for running jobs using AWS batch executor. The available job queues in your CloudOS workspace are listed in the "Compute Resources" section in "Settings". +Job queues are required for running jobs using AWS batch executor. The available job queues in your Lifebit Platform workspace are listed in the "Compute Resources" section in "Settings". > [!NOTE] -> **Azure Platform**: Queue listing is not available for CloudOS workspaces configured to use Azure execution platform, as Azure does not use AWS batch queues. +> **Azure Platform**: Queue listing is not available for Lifebit Platform workspaces configured to use Azure execution platform, as Azure does not use AWS batch queues. #### List Queues @@ -439,11 +439,11 @@ To save queue data to a CSV file: cloudos queue list --profile my_profile --output-format csv ``` -> NOTE: The queue name that is visible in CloudOS and must be used with the `--job-queue` parameter is the one in the `label` field. +> NOTE: The queue name that is visible in Lifebit Platform and must be used with the `--job-queue` parameter is the one in the `label` field. **Job queues for platform workflows** -Platform workflows (those provided by CloudOS in your workspace as modules) run on separate and specific AWS batch queues (system queues). Therefore, CloudOS will automatically assign the valid queue and you should not specify any queue using the `--job-queue` parameter. Any attempt to use this parameter will be ignored. Examples of such platform workflows are "System Tools" and "Data Factory" workflows. +Platform workflows (those provided by Lifebit Platform in your workspace as modules) run on separate and specific AWS batch queues (system queues). Therefore, Lifebit Platform will automatically assign the valid queue and you should not specify any queue using the `--job-queue` parameter. Any attempt to use this parameter will be ignored. Examples of such platform workflows are "System Tools" and "Data Factory" workflows. ### Workflow @@ -490,19 +490,19 @@ Executing list... Workflow list saved to workflow_list.json ``` -The collected workflows are those that can be found in the "WORKSPACE TOOLS" section in CloudOS. +The collected workflows are those that can be found in the "WORKSPACE TOOLS" section in Lifebit Platform. #### Import a Nextflow Workflow -You can import new workflows to your CloudOS workspaces. The requirements are: +You can import new workflows to your Lifebit Platform workspaces. The requirements are: - The workflow must be a Nextflow pipeline - The workflow repository must be located at GitHub, GitLab or BitBucket Server (specified by the `--repository-platform` option. Available options: `github`, `gitlab` and `bitbucketServer`) -- If your repository is private, you must have access to the repository and have linked your GitHub, Gitlab or Bitbucket server accounts to CloudOS +- If your repository is private, you must have access to the repository and have linked your GitHub, Gitlab or Bitbucket server accounts to Lifebit Platform **Usage of the workflow import command** -To import GitHub workflows to CloudOS: +To import GitHub workflows to Lifebit Platform: ```bash # Example workflow to import: https://github.com/lifebit-ai/DeepVariant @@ -512,7 +512,7 @@ cloudos workflow import --profile my_profile --workflow-url "https://github.com/ The expected output will be: ```console -CloudOS workflow functionality: list and import workflows. +Lifebit Platform workflow functionality: list and import workflows. Executing workflow import... @@ -527,16 +527,16 @@ Optionally, you can add a link to your workflow documentation by providing the U cloudos workflow import --profile my_profile --workflow-url "https://github.com/lifebit-ai/DeepVariant" --workflow-name "new_name_for_the_github_workflow" --workflow-docs-link "https://github.com/lifebit-ai/DeepVariant/blob/master/README.md" --repository-platform github ``` -> NOTE: Importing workflows using cloudos-cli is not yet available in all CloudOS workspaces. If you try to use this feature in a non-prepared workspace you will get the following error message: `It seems your API key is not authorised. Please check if your workspace has support for importing workflows using cloudos-cli`. +> NOTE: Importing workflows using cloudos-cli is not yet available in all Lifebit Platform workspaces. If you try to use this feature in a non-prepared workspace you will get the following error message: `It seems your API key is not authorised. Please check if your workspace has support for importing workflows using cloudos-cli`. ### Nextflow Jobs -The job commands allow you to submit, monitor, and manage computational workflows on CloudOS. This includes both Nextflow pipelines and bash scripts, with support for various execution platforms. +The job commands allow you to submit, monitor, and manage computational workflows on Lifebit Platform. This includes both Nextflow pipelines and bash scripts, with support for various execution platforms. #### Submit a Job -You can submit Nextflow workflows to CloudOS using either configuration files or command-line parameters. Jobs can be configured with specific compute resources, execution platforms, parameters, etc. +You can submit Nextflow workflows to Lifebit Platform using either configuration files or command-line parameters. Jobs can be configured with specific compute resources, execution platforms, parameters, etc. First, configure your local environment to ease parameter input. We will try to submit a small toy example already available: @@ -616,7 +616,7 @@ If everything went well, you should see something like: ```console Executing run... - Job successfully launched to CloudOS, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/62c83a1191fe06013b7ef355 + Job successfully launched to Lifebit Platform, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/62c83a1191fe06013b7ef355 Your assigned job id is: 62c83a1191fe06013b7ef355 Your current job status is: initializing To further check your job status you can either go to https://cloudos.lifebit.ai/app/advanced-analytics/analyses/62c83a1191fe06013b7ef355 or use the following command: @@ -640,7 +640,7 @@ If the job takes less than `--wait-time` (3600 seconds by default), the previous ```console Executing run... - Job successfully launched to CloudOS, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/62c83a6191fe06013b7ef363 + Job successfully launched to Lifebit Platform, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/62c83a6191fe06013b7ef363 Your assigned job id is: 62c83a6191fe06013b7ef363 Please, wait until job completion or max wait time of 3600 seconds is reached. Your current job status is: initializing. @@ -677,7 +677,7 @@ cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos **AWS Executor Support** -CloudOS supports [AWS batch](https://www.nextflow.io/docs/latest/executor.html?highlight=executors#aws-batch) executor by default. +Lifebit Platform supports [AWS batch](https://www.nextflow.io/docs/latest/executor.html?highlight=executors#aws-batch) executor by default. You can specify the AWS batch queue to use from the ones available in your workspace (see [here](#list-job-queues)) by specifying its name with the `--job-queue` parameter. If none is specified, the most recent suitable queue in your workspace will be selected by default. Example command: @@ -686,13 +686,13 @@ Example command: cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos_cli/examples/rnatoy.config --resumable ``` -> Note: From cloudos-cli 2.7.0, the default executor is AWS batch. The previous Apache [ignite](https://www.nextflow.io/docs/latest/ignite.html#apache-ignite) executor is being removed progressively from CloudOS, so most likely will not be available in your CloudOS. Cloudos-cli still supports ignite during this period by adding the `--ignite` flag to the `cloudos job run` command. Please note that if you use the `--ignite` flag in a CloudOS without ignite support, the command will fail. +> Note: From cloudos-cli 2.7.0, the default executor is AWS batch. The previous Apache [ignite](https://www.nextflow.io/docs/latest/ignite.html#apache-ignite) executor is being removed progressively from Lifebit Platform, so most likely will not be available in your Lifebit Platform. Cloudos-cli still supports ignite during this period by adding the `--ignite` flag to the `cloudos job run` command. Please note that if you use the `--ignite` flag in a Lifebit Platform without ignite support, the command will fail. **Azure Execution Platform Support** -CloudOS can also be configured to use Microsoft Azure compute platforms. If your CloudOS is configured to use Azure, you will need to take into consideration the following: +Lifebit Platform can also be configured to use Microsoft Azure compute platforms. If your Lifebit Platform is configured to use Azure, you will need to take into consideration the following: -- When sending jobs to CloudOS using `cloudos job run` command, please use the option `--execution-platform azure` +- When sending jobs to Lifebit Platform using `cloudos job run` command, please use the option `--execution-platform azure` - Azure only supports Nextflow version `22.11.1-edge`. If you specify a different version, CloudOS CLI will display a warning and automatically use `22.11.1-edge` instead - Due to the lack of AWS batch queues in Azure, `cloudos queue list` command is not working @@ -704,7 +704,7 @@ cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos **HPC Execution Support** -CloudOS is also prepared to use an HPC compute infrastructure. For such cases, you will need to take into account the following for your job submissions using `cloudos job run` command: +Lifebit Platform is also prepared to use an HPC compute infrastructure. For such cases, you will need to take into account the following for your job submissions using `cloudos job run` command: - Use the following parameter: `--execution-platform hpc` - Indicate the HPC ID using: `--hpc-id XXXX` @@ -790,7 +790,7 @@ Jobs are displayed with colored visual status indicators: **Clickable Job IDs** -Job IDs in the table are clickable hyperlinks (when supported by your terminal) that open the job details page in CloudOS. +Job IDs in the table are clickable hyperlinks (when supported by your terminal) that open the job details page in Lifebit Platform. **Job Listing Control Options** @@ -931,7 +931,7 @@ cloudos job list --profile my_profile --last-n-jobs all --filter-workflow rnatoy #### Get Job Results -The following command allows you to get the path where CloudOS stores the output files for a job. This can be used only on your user's jobs and for jobs with "completed" status. +The following command allows you to get the path where Lifebit Platform stores the output files for a job. This can be used only on your user's jobs and for jobs with "completed" status. Example: ```bash @@ -1063,7 +1063,7 @@ cloudos job resume \ #### Abort Jobs -Aborts jobs in the CloudOS workspace that are either running or initializing. It can be used with one or more job IDs provided as a comma-separated string using the `--job-ids` parameter. +Aborts jobs in the Lifebit Platform workspace that are either running or initializing. It can be used with one or more job IDs provided as a comma-separated string using the `--job-ids` parameter. ##### Basic Usage @@ -1092,9 +1092,9 @@ Job 680a3cf80e56949775c02f16 aborted successfully. ##### Additional Options -- `--workspace-id`: The CloudOS workspace ID (can be set in profile) -- `--apikey`: Your CloudOS API key (can be set in profile) -- `--cloudos-url`: The CloudOS URL (default: https://cloudos.lifebit.ai) +- `--workspace-id`: The Lifebit Platform workspace ID (can be set in profile) +- `--apikey`: Your Lifebit Platform API key (can be set in profile) +- `--cloudos-url`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai) - `--verbose`: Print detailed information messages - `--disable-ssl-verification`: Disable SSL certificate verification (not recommended) - `--ssl-cert`: Path to your SSL certificate file @@ -1173,7 +1173,7 @@ This file can later be used when running a job with `cloudos job run --job-confi #### Get Job Workdir -To get the working directory of a job submitted to CloudOS: +To get the working directory of a job submitted to Lifebit Platform: ```shell cloudos job workdir \ @@ -1184,7 +1184,7 @@ cloudos job workdir \ The output should be something similar to: ```console -CloudOS job functionality: run, check and abort jobs in CloudOS. +Lifebit Platform job functionality: run, check and abort jobs in Lifebit Platform. Finding working directory path... Working directory for job 68747bac9e7fe38ec6e022ad: az://123456789000.blob.core.windows.net/cloudos-987652349087/projects/455654676/jobs/54678856765/work @@ -1262,9 +1262,9 @@ cloudos job logs --profile my_profile --job-id "12345678910" --link --session-id #### Get Job Costs -You can retrieve detailed cost information for any job in your CloudOS workspace using the `job cost` command. This provides insights into compute costs, storage usage, and runtime metrics to help optimize workflows and manage expenses. +You can retrieve detailed cost information for any job in your Lifebit Platform workspace using the `job cost` command. This provides insights into compute costs, storage usage, and runtime metrics to help optimize workflows and manage expenses. -The cost information is retrieved from CloudOS and can be displayed in multiple formats: +The cost information is retrieved from Lifebit Platform and can be displayed in multiple formats: - **Console display**: Rich formatted tables with pagination for easy viewing - **CSV**: Structured data for analysis and reporting @@ -1409,9 +1409,9 @@ cat 62c83a1191fe06013b7ef355_costs.json #### Get Job Related Analyses -You can view related jobs that share the same working directory in a CloudOS workspace by using the `job related` command. This feature helps track job lineages, resume workflows, and understand job relationships. +You can view related jobs that share the same working directory in a Lifebit Platform workspace by using the `job related` command. This feature helps track job lineages, resume workflows, and understand job relationships. -The information is retrieved from CloudOS and can be displayed in multiple formats: +The information is retrieved from Lifebit Platform and can be displayed in multiple formats: - **Console display**: Rich formatted tables with pagination - **JSON**: Complete job data for programmatic processing @@ -1449,7 +1449,7 @@ The table displays key information for each related job: - **Status**: Current job state (initializing, running, completed, aborting, aborted, failed) - **Name**: Job name assigned when submitted - **Owner**: User who submitted the job (first name and last name) -- **ID**: Job identifier in CloudOS +- **ID**: Job identifier in Lifebit Platform - **Submit time**: When the job was submitted (formatted as YYYY-MM-DD HH:MM:SS) - **Run time**: Actual execution time (formatted as hours, minutes, seconds) - **Total Cost**: Compute cost in USD @@ -1517,7 +1517,7 @@ Related analyses are particularly useful for: #### Delete Job Results -CloudOS allows you to permanently delete job results directories to manage storage and clean up completed analyses. This feature provides a safe way to remove final analysis results with built-in confirmation prompts and status tracking. +Lifebit Platform allows you to permanently delete job results directories to manage storage and clean up completed analyses. This feature provides a safe way to remove final analysis results with built-in confirmation prompts and status tracking. > [!WARNING] > Deleting job results is **irreversible**. All data and backups will be permanently removed and cannot be recovered. Use this feature with caution. @@ -1593,7 +1593,7 @@ For bulk deletion of job results and working directories across multiple jobs in #### Archive Jobs -CloudOS allows you to archive completed jobs to organize and manage your analysis history. +Lifebit Platform allows you to archive completed jobs to organize and manage your analysis history. > [!NOTE] > Archiving jobs does not delete any data or results. It simply adds metadata to mark jobs as archived for organizational purposes. @@ -1678,14 +1678,14 @@ Job 'valid_job' archived successfully. - `--verbose`: Display detailed information about the archiving process - `--profile`: Use a specific configuration profile - `--workspace-id`: Specify the workspace ID (if not using profiles) -- `--apikey`: Your CloudOS API key (if not using profiles) +- `--apikey`: Your Lifebit Platform API key (if not using profiles) > [!TIP] > Use the `cloudos job list` command to identify jobs you want to archive. You can filter by status, project, or other criteria to find specific jobs for archiving. #### Unarchive Jobs -CloudOS allows you to restore archived jobs back to their active state. Unarchiving removes the archived status while preserving all job data, results, and history. +Lifebit Platform allows you to restore archived jobs back to their active state. Unarchiving removes the archived status while preserving all job data, results, and history. > [!NOTE] > Unarchiving jobs does not modify any data or results. It simply removes the archived metadata flag, making jobs appear as regular (non-archived) jobs again. @@ -1770,7 +1770,7 @@ Job 'valid_job' unarchived successfully. - `--verbose`: Display detailed information about the unarchiving process - `--profile`: Use a specific configuration profile - `--workspace-id`: Specify the workspace ID (if not using profiles) -- `--apikey`: Your CloudOS API key (if not using profiles) +- `--apikey`: Your Lifebit Platform API key (if not using profiles) **Managing Job Lifecycle** @@ -1784,12 +1784,12 @@ Use the archive and unarchive commands together to manage your job organization: > Archived jobs remain fully accessible - archiving is purely for organizational purposes. Use `cloudos job list` with appropriate filters to view and manage both archived and active jobs. ### Bash Jobs -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. +Execute bash scripts on Lifebit Platform 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. #### Send Array Job -A bash job can be sent to CloudOS using the command `bash` and the subcommand `job`. In this case, the `--workflow-name` must be a bash job already present in the platform. Bash jobs are identified by bash icon (unlike Nextflow jobs, which are identified with Nextflow icon). +A bash job can be sent to Lifebit Platform using the command `bash` and the subcommand `job`. In this case, the `--workflow-name` must be a bash job already present in the platform. Bash jobs are identified by bash icon (unlike Nextflow jobs, which are identified with Nextflow icon). ```bash cloudos bash job \ @@ -1813,9 +1813,9 @@ Each `--parameter` can have a different prefix, either '--', '-', or '', dependi If everything went well, you should see something like: ```console -CloudOS bash functionality. +Lifebit Platform bash functionality. - Job successfully launched to CloudOS, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/682622d09f305de717327334 + Job successfully launched to Lifebit Platform, please check the following link: https://cloudos.lifebit.ai/app/advanced-analytics/analyses/682622d09f305de717327334 Your assigned job id is: 682622d09f305de717327334 Your current job status is: initializing @@ -2147,8 +2147,8 @@ cloudos interactive-session create \ - `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`) **Data & Storage Management:** -- `--mount`: Mount a data file into the session. Supports both CloudOS 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. -- `--link`: Link a folder into the session for read/write access (AWS only). Supports S3 folders and CloudOS folders. Format: `s3://bucket/prefix` (e.g., `s3://my-bucket/data/`) or `project_name/folder_path` (e.g., `leila-test/AnalysesResults/analysis_id/results`). Can be used multiple times. **Note:** Linking is not supported on Azure. Use CloudOS file explorer for data access. +- `--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. +- `--link`: Link a folder into the session for read/write access (AWS only). Supports S3 folders and Lifebit Platform folders. Format: `s3://bucket/prefix` (e.g., `s3://my-bucket/data/`) or `project_name/folder_path` (e.g., `leila-test/AnalysesResults/analysis_id/results`). Can be used multiple times. **Note:** Linking is not supported on Azure. Use Lifebit Platform file explorer for data access. **Backend-Specific:** - `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`) @@ -2498,7 +2498,7 @@ The command automatically loads from profile (via `@with_profile_config` decorat **Optional Overrides from Profile:** - `--apikey` (optional): Override API key from profile -- `--cloudos-url` (optional): Override CloudOS URL from profile +- `--cloudos-url` (optional): Override Lifebit Platform URL from profile - `--workspace-id` (optional): Override workspace ID from profile **Optional Behavior Flags:** @@ -2571,11 +2571,11 @@ All configuration parameters are optional. If not specified, the session resumes ### Datasets -Manage files and folders within your CloudOS File Explorer programmatically. These commands provide comprehensive file management capabilities for organizing research data and results. +Manage files and folders within your Lifebit Platform File Explorer programmatically. These commands provide comprehensive file management capabilities for organizing research data and results. #### List Files -Browse files and folders within your CloudOS projects. Use the `--details` flag to get comprehensive information about file ownership, sizes, and modification dates. +Browse files and folders within your Lifebit Platform projects. Use the `--details` flag to get comprehensive information about file ownership, sizes, and modification dates. ```bash cloudos datasets ls --profile @@ -2735,7 +2735,7 @@ cloudos datasets mkdir --profile my_profile #### Remove Files or Folders -Remove unnecessary files or empty folders from your File Explorer. Note that this removes files from CloudOS but not from underlying cloud storage. +Remove unnecessary files or empty folders from your File Explorer. Note that this removes files from Lifebit Platform but not from underlying cloud storage. > [!NOTE] > Files and folders can be removed in the `Data` datasets and its subfolders. @@ -2784,12 +2784,12 @@ cloudos link "Data/MyFolder" --project-name my-project --session-id **Command options:** - `PATH`: S3 path to link (positional argument, required if `--job-id` is not provided) -- `--apikey` / `-k`: Your CloudOS API key (required) -- `--cloudos-url` / `-c`: The CloudOS URL (default: https://cloudos.lifebit.ai) -- `--workspace-id`: The specific CloudOS workspace ID (required) -- `--session-id`: The specific CloudOS interactive session ID (required) -- `--job-id`: The job ID in CloudOS (links results, workdir, and logs by default) -- `--project-name`: CloudOS project name (required for File Explorer paths) +- `--apikey` / `-k`: Your Lifebit Platform API key (required) +- `--cloudos-url` / `-c`: The Lifebit Platform URL (default: https://cloudos.lifebit.ai) +- `--workspace-id`: The specific Lifebit Platform workspace ID (required) +- `--session-id`: The specific Lifebit Platform interactive session ID (required) +- `--job-id`: The job ID in Lifebit Platform (links results, workdir, and logs by default) +- `--project-name`: Lifebit Platform project name (required for File Explorer paths) - `--results`: Link only results folder (only works with `--job-id`) - `--workdir`: Link only working directory (only works with `--job-id`) - `--logs`: Link only logs folder (only works with `--job-id`) @@ -2833,7 +2833,7 @@ The command provides clear error messages for common scenarios: ### Procurement -CloudOS 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. +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. #### List Procurement Images @@ -2849,9 +2849,9 @@ cloudos procurement images ls \ **Command options:** -- `--apikey` / `-k`: Your CloudOS API key (required) -- `--cloudos-url` / `-c`: The CloudOS URL you are trying to access (default: https://cloudos.lifebit.ai) -- `--procurement-id`: The specific CloudOS procurement ID (required) +- `--apikey` / `-k`: Your Lifebit Platform API key (required) +- `--cloudos-url` / `-c`: The Lifebit Platform URL you are trying to access (default: https://cloudos.lifebit.ai) +- `--procurement-id`: The specific Lifebit Platform procurement ID (required) - `--page`: The response page number (default: 1) - `--limit`: The page size limit (default: 10) - `--disable-ssl-verification`: Disable SSL certificate verification @@ -2885,7 +2885,7 @@ This is particularly useful for understanding what container images are availabl #### Set Procurement Organization Image -You can set a custom image ID or name for an organization within a procurement using the `cloudos procurement images set` command. This allows you to override the default CloudOS images with your own custom images for specific organizations. +You can set a custom image ID or name for an organization within a procurement using the `cloudos procurement images set` command. This allows you to override the default Lifebit Platform images with your own custom images for specific organizations. To set a custom image for an organization, use the following command: @@ -2895,11 +2895,11 @@ cloudos procurement images set --profile procurement_profile --image-type "JobDe **Set command options:** -- `--apikey` / `-k`: Your CloudOS API key (required) -- `--cloudos-url` / `-c`: The CloudOS URL you are trying to access (default: https://cloudos.lifebit.ai) -- `--procurement-id`: The specific CloudOS procurement ID (required) +- `--apikey` / `-k`: Your Lifebit Platform API key (required) +- `--cloudos-url` / `-c`: The Lifebit Platform URL you are trying to access (default: https://cloudos.lifebit.ai) +- `--procurement-id`: The specific Lifebit Platform procurement ID (required) - `--organisation-id`: The organization ID where the change will be applied (required) -- `--image-type`: The CloudOS resource image type (required). Possible values: +- `--image-type`: The Lifebit Platform resource image type (required). Possible values: - `RegularInteractiveSessions` - `SparkInteractiveSessions` - `RStudioInteractiveSessions` @@ -2924,7 +2924,7 @@ cloudos procurement images set --profile procurement_profile --image-type "JobDe #### Reset Procurement Organization Image -You can reset an organization's image configuration back to CloudOS defaults using the `cloudos procurement images reset` command. This removes any custom image configurations and restores the original CloudOS defaults. +You can reset an organization's image configuration back to Lifebit Platform defaults using the `cloudos procurement images reset` command. This removes any custom image configurations and restores the original Lifebit Platform defaults. To reset an organization's image to defaults, use the following command: @@ -2934,11 +2934,11 @@ cloudos procurement images reset --profile procurement_profile --image-type "Job **Reset command options:** -- `--apikey` / `-k`: Your CloudOS API key (required) -- `--cloudos-url` / `-c`: The CloudOS URL you are trying to access (default: https://cloudos.lifebit.ai) -- `--procurement-id`: The specific CloudOS procurement ID (required) +- `--apikey` / `-k`: Your Lifebit Platform API key (required) +- `--cloudos-url` / `-c`: The Lifebit Platform URL you are trying to access (default: https://cloudos.lifebit.ai) +- `--procurement-id`: The specific Lifebit Platform procurement ID (required) - `--organisation-id`: The organization ID where the change will be applied (required) -- `--image-type`: The CloudOS resource image type (required). Same values as for `set` command +- `--image-type`: The Lifebit Platform resource image type (required). Same values as for `set` command - `--provider`: The cloud provider (required). Currently only `aws` is supported - `--region`: The cloud region (required). Currently only AWS regions are supported - `--disable-ssl-verification`: Disable SSL certificate verification @@ -2948,7 +2948,7 @@ cloudos procurement images reset --profile procurement_profile --image-type "Job **Reset command example:** ```bash -# Reset image configuration to CloudOS defaults +# Reset image configuration to Lifebit Platform defaults cloudos procurement images reset --profile procurement_profile --image-type "JobDefault" --provider "aws" --region "us-east-1" --procurement-id "your_procurement_id_here" --organisation-id "your_organization_id" ``` @@ -2957,7 +2957,7 @@ cloudos procurement images reset --profile procurement_profile --image-type "Job #### Manage Cromwell Server -In order to run WDL pipelines, a Cromwell server in CloudOS should be running. This server can be accessed to check its status, restart it or stop it, using the following commands: +In order to run WDL pipelines, a Cromwell server in Lifebit Platform should be running. This server can be accessed to check its status, restart it or stop it, using the following commands: ```bash # Check Cromwell status @@ -2995,7 +2995,7 @@ Stopping Cromwell server... To run WDL workflows, `cloudos job run` command can be used normally, but adding two extra parameters: -- `--wdl-mainfile`: name of the mainFile (*.wdl) file used by the CloudOS workflow. +- `--wdl-mainfile`: name of the mainFile (*.wdl) file used by the Lifebit Platform workflow. - `--wdl-importsfile` [Optional]: name of the workflow imported file (importsFile, *.zip). All the rest of the `cloudos job run` functionality is available. @@ -3044,7 +3044,7 @@ Executing run... --workspace-id $WORKSPACE_ID ******************************************************************************* - Job successfully launched to CloudOS, please check the following link: **** + Job successfully launched to Lifebit Platform, please check the following link: **** Your assigned job id is: **** Please, wait until job completion or max wait time of 3600 seconds is reached. Your current job status is: initializing. diff --git a/cloudos_cli/__main__.py b/cloudos_cli/__main__.py index f0963c81..58236fd0 100644 --- a/cloudos_cli/__main__.py +++ b/cloudos_cli/__main__.py @@ -38,7 +38,7 @@ @click.version_option(__version__) @click.pass_context def run_cloudos_cli(ctx): - """CloudOS python package: a package for interacting with CloudOS.""" + """CloudOS CLI python package: a package for interacting with Lifebit Platform.""" update_command_context_from_click(ctx) ctx.ensure_object(dict) diff --git a/cloudos_cli/_version.py b/cloudos_cli/_version.py index 5dc69f79..61428804 100644 --- a/cloudos_cli/_version.py +++ b/cloudos_cli/_version.py @@ -1 +1 @@ -__version__ = '2.89.1' +__version__ = '2.89.2' diff --git a/cloudos_cli/bash/cli.py b/cloudos_cli/bash/cli.py index b5b8f137..2639ecf0 100644 --- a/cloudos_cli/bash/cli.py +++ b/cloudos_cli/bash/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS bash job management.""" +"""CLI commands for Lifebit Platform bash job management.""" import rich_click as click import cloudos_cli.jobs.job as jb @@ -14,31 +14,31 @@ @click.group(cls=pass_debug_to_subcommands()) def bash(): - """CloudOS bash-specific job functionality.""" + """Lifebit Platform bash-specific job functionality.""" print(bash.__doc__ + '\n') @bash.command('job') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('--command', help='The command to run in the bash job.', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--project-name', - help='The name of a CloudOS project.', + help='The name of a Lifebit Platform project.', required=True) @click.option('--workflow-name', - help='The name of a CloudOS workflow or pipeline.', + help='The name of a Lifebit Platform workflow or pipeline.', required=True) @click.option('--last', help=('When the workflows are duplicated, use the latest imported workflow (by date).'), @@ -88,7 +88,7 @@ def bash(): help='Name of the repository platform of the workflow. Default=github.', default='github') @click.option('--execution-platform', - help='Name of the execution platform implemented in your CloudOS. Default=aws.', + help='Name of the execution platform implemented in your Lifebit Platform. Default=aws.', default='aws') @click.option('--cost-limit', help='Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).', @@ -138,7 +138,7 @@ def run_bash_job(ctx, disable_ssl_verification, ssl_cert, profile): - """Run a bash job in CloudOS.""" + """Run a bash job in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -226,23 +226,23 @@ def run_bash_job(ctx, @bash.command('array-job') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('--command', help='The command to run in the bash job.') @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--project-name', - help='The name of a CloudOS project.', + help='The name of a Lifebit Platform project.', required=True) @click.option('--workflow-name', - help='The name of a CloudOS workflow or pipeline.', + help='The name of a Lifebit Platform workflow or pipeline.', required=True) @click.option('--last', help=('When the workflows are duplicated, use the latest imported workflow (by date).'), @@ -296,7 +296,7 @@ def run_bash_job(ctx, help='Name of the repository platform of the workflow. Default=github.', default='github') @click.option('--execution-platform', - help='Name of the execution platform implemented in your CloudOS. Default=aws.', + help='Name of the execution platform implemented in your Lifebit Platform. Default=aws.', type=click.Choice(['aws', 'azure', 'hpc']), default='aws') @click.option('--cost-limit', @@ -388,7 +388,7 @@ def run_bash_array_job(ctx, array_parameter, custom_script_path, custom_script_project): - """Run a bash array job in CloudOS.""" + """Run a bash array job in Lifebit Platform.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) if not list_columns and not (command or custom_script_path): diff --git a/cloudos_cli/clos.py b/cloudos_cli/clos.py index 1fcd5db8..600bc27c 100644 --- a/cloudos_cli/clos.py +++ b/cloudos_cli/clos.py @@ -21,9 +21,9 @@ class Cloudos: Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. cromwell_token : string Cromwell server token. If None, apikey will be used instead. """ @@ -32,14 +32,14 @@ class Cloudos: cromwell_token: str def get_job_status(self, j_id, workspace_id=None, verify=True): - """Get job status from CloudOS. + """Get job status from Lifebit Platform. Parameters ---------- j_id : string - The CloudOS job id of the job just launched. + The Lifebit Platform job id of the job just launched. workspace_id : string - The CloudOS workspace id from to check the job status. + The Lifebit Platform workspace id from to check the job status. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -69,14 +69,14 @@ def get_job_status(self, j_id, workspace_id=None, verify=True): def wait_job_completion(self, job_id, workspace_id, wait_time=3600, request_interval=30, verbose=False, verify=True): - """Checks job status from CloudOS and wait for its complation. + """Checks job status from Lifebit Platform and wait for its complation. Parameters ---------- job_id : string - The CloudOS job id of the job just launched. + The Lifebit Platform job id of the job just launched. workspace_id : string - The CloudOS workspace id from to check the job status. + The Lifebit Platform workspace id from to check the job status. wait_time : int Max time to wait (in seconds) to job completion. request_interval : int @@ -541,9 +541,9 @@ def get_folder_items_deletion_status(self, folder_id, workspace_id, verify=True) Parameters ---------- folder_id : str - The CloudOS folder ID. + The Lifebit Platform folder ID. workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. verify : [bool | str], optional Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -587,9 +587,9 @@ def get_results_deletion_status(self, job_id, workspace_id, verify=True): Parameters ---------- job_id : str - The CloudOS job ID. + The Lifebit Platform job ID. workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. verify : [bool | str], optional Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -740,9 +740,9 @@ def get_folder_deletion_status(self, folder_id, workspace_id, verify=True): Parameters ---------- folder_id : str - The CloudOS folder ID. + The Lifebit Platform folder ID. workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. verify : [bool | str], optional Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -787,9 +787,9 @@ def get_workdir_deletion_status(self, job_id, workspace_id, verify=True): Parameters ---------- job_id : str - The CloudOS job ID. + The Lifebit Platform job ID. workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. verify : [bool | str], optional Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -901,7 +901,7 @@ def resolve_user_id(self, filter_owner, workspace_id, verify=True): filter_owner : str The username or display name to search for. workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. verify : [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -926,7 +926,7 @@ def resolve_user_id(self, filter_owner, workspace_id, verify=True): "q": filter_owner, "teamId": workspace_id } - # Note: this endpoint may not be open in all CloudOS instances + # Note: this endpoint may not be open in all Lifebit Platform instances user_search_r = retry_requests_get(f"{self.cloudos_url}/api/v1/users/search-assist", params=search_params, headers=search_headers, verify=verify) if user_search_r.status_code >= 400: @@ -951,12 +951,12 @@ def resolve_user_id(self, filter_owner, workspace_id, verify=True): raise ValueError(f"Error resolving user '{filter_owner}'. {str(e)}") def get_cromwell_status(self, workspace_id, verify=True): - """Get Cromwell server status from CloudOS. + """Get Cromwell server status from Lifebit Platform. Parameters ---------- workspace_id : string - The CloudOS workspace id from to check the Cromwell status. + The Lifebit Platform workspace id from to check the Cromwell status. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -982,7 +982,7 @@ def cromwell_switch(self, workspace_id, action, verify=True): Parameters ---------- workspace_id : string - The CloudOS workspace id in which restart/stop Cromwell status. + The Lifebit Platform workspace id in which restart/stop Cromwell status. action : string [restart|stop] The action to perform. verify: [bool|string] @@ -1009,7 +1009,7 @@ def get_job_list(self, workspace_id, last_n_jobs=None, page=None, page_size=None verify=True, filter_status=None, filter_job_name=None, filter_project=None, filter_workflow=None, filter_job_id=None, filter_only_mine=False, filter_owner=None, filter_queue=None, last=False): - """Get jobs from a CloudOS workspace with optional filtering. + """Get jobs from a Lifebit Platform workspace with optional filtering. Fetches jobs page by page, applies all filters after fetching. Stops when enough jobs are collected or no more jobs are available. @@ -1017,7 +1017,7 @@ def get_job_list(self, workspace_id, last_n_jobs=None, page=None, page_size=None Parameters ---------- workspace_id : string - The CloudOS workspace id from to collect the jobs. + The Lifebit Platform workspace id from to collect the jobs. last_n_jobs : [int | 'all'], default=None How many of the last jobs from the user to retrieve. You can specify a very large int or 'all' to get all user's jobs. When specified, page @@ -1476,12 +1476,12 @@ def save_job_list_to_csv(self, my_jobs_df, filename='my_jobs.csv'): def get_workflow_list(self, workspace_id, verify=True, get_all=True, page=1, page_size=10, max_page_size=100, archived_status=False): - """Get all the workflows from a CloudOS workspace. + """Get all the workflows from a Lifebit Platform workspace. Parameters ---------- workspace_id : string - The CloudOS workspace id from to collect the workflows. + The Lifebit Platform workspace id from to collect the workflows. verify : [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1590,7 +1590,7 @@ def detect_workflow(self, workflow_name, workspace_id, verify=True, last=False): workflow_name : string Name of the workflow. workspace_id : string - The CloudOS workspace id from to collect the workflows. + The Lifebit Platform workspace id from to collect the workflows. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1620,7 +1620,7 @@ def is_module(self, workflow_name, workspace_id, verify=True, last=False): workflow_name : string Name of the workflow. workspace_id : string - The CloudOS workspace id from to collect the workflows. + The Lifebit Platform workspace id from to collect the workflows. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1649,12 +1649,12 @@ def is_module(self, workflow_name, workspace_id, verify=True, last=False): def get_project_list(self, workspace_id, verify=True, get_all=True, page=1, page_size=10, max_page_size=100): - """Get all the project from a CloudOS workspace. + """Get all the project from a Lifebit Platform workspace. Parameters ---------- workspace_id : string - The CloudOS workspace id from to collect the projects. + The Lifebit Platform workspace id from to collect the projects. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1752,16 +1752,16 @@ def process_project_list(r, all_fields=False): def workflow_import(self, workspace_id, workflow_url, workflow_name, repository_project_id, workflow_docs_link='', repository_id=None, verify=True): - """Imports workflows to CloudOS. + """Imports workflows to Lifebit Platform. Parameters ---------- workspace_id : string - The CloudOS workspace id from to collect the projects. + The Lifebit Platform workspace id from to collect the projects. workflow_url : string The URL of the workflow. Only Github or Bitbucket are allowed. workflow_name : string - A name for the imported pipeline in CloudOS. + A name for the imported pipeline in Lifebit Platform. repository_project_id : int The repository project ID. workflow_docs_link : string @@ -1863,7 +1863,7 @@ def abort_job(self, job, workspace_id, verify=True, force=False): Parameters ---------- job : string - The CloudOS job id of the job to abort. + The Lifebit Platform job id of the job to abort. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1895,9 +1895,9 @@ def _update_job_archive_status(self, job_ids, workspace_id, archive_status, veri Parameters ---------- job_ids : list - The CloudOS job ids of the jobs to update. + The Lifebit Platform job ids of the jobs to update. workspace_id : string - The CloudOS workspace id. + The Lifebit Platform workspace id. archive_status : bool True to archive jobs, False to unarchive jobs. verify: [bool|string] @@ -1955,9 +1955,9 @@ def archive_jobs(self, job_ids, workspace_id, verify=True): Parameters ---------- job_ids : list - The CloudOS job ids of the jobs to archive. + The Lifebit Platform job ids of the jobs to archive. workspace_id : string - The CloudOS workspace id. + The Lifebit Platform workspace id. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1976,9 +1976,9 @@ def unarchive_jobs(self, job_ids, workspace_id, verify=True): Parameters ---------- job_ids : list - The CloudOS job ids of the jobs to unarchive. + The Lifebit Platform job ids of the jobs to unarchive. workspace_id : string - The CloudOS workspace id. + The Lifebit Platform workspace id. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1999,7 +1999,7 @@ def check_jobs_archive_status(self, job_ids, workspace_id, target_archived_state job_ids : list List of job IDs to check. workspace_id : str - The CloudOS workspace id. + The Lifebit Platform workspace id. target_archived_state : bool True if checking for archiving operation, False if checking for unarchiving operation. verify : [bool | str], optional @@ -2074,7 +2074,7 @@ def get_project_id_from_name(self, workspace_id, project_name, verify=True): Parameters ---------- workspace_id : str - The CloudOS workspace ID to search for the project. + The Lifebit Platform workspace ID to search for the project. project_name : str The name of the project to search for. verify : [bool | str], optional @@ -2110,12 +2110,12 @@ def get_project_id_from_name(self, workspace_id, project_name, verify=True): return project_id def create_project(self, workspace_id, project_name, verify=True): - """Create a new project in CloudOS. + """Create a new project in Lifebit Platform. Parameters ---------- workspace_id : str - The CloudOS workspace ID where the project will be created. + The Lifebit Platform workspace ID where the project will be created. project_name : str The name for the new project. verify : [bool | str], optional @@ -2161,7 +2161,7 @@ def get_workflow_max_pagination(self, workspace_id, workflow_name, verify=True): Parameters ---------- workspace_id : str - The CloudOS workspace ID to search for the workflow. + The Lifebit Platform workspace ID to search for the workflow. workflow_name : str The name of the workflow to search for. verify : [bool | str], optional @@ -2202,7 +2202,7 @@ def get_workflow_content(self, workspace_id, workflow_name, verify=True, last=Fa Parameters ---------- workspace_id : str - The CloudOS workspace ID to search for the workflow. + The Lifebit Platform workspace ID to search for the workflow. workflow_name : str The name of the workflow to search for. verify : [bool | str], optional @@ -2265,12 +2265,12 @@ def workflow_content_query(self, workspace_id, workflow_name, verify=True, query def get_interactive_session_list(self, team_id, page=None, limit=None, status=None, owner_only=False, include_archived=False, verify=True): - """Get interactive sessions from a CloudOS team. + """Get interactive sessions from a Lifebit Platform team. Parameters ---------- team_id : string - The CloudOS team id (workspace id) to retrieve sessions from. + The Lifebit Platform team id (workspace id) to retrieve sessions from. page : int, optional Page number for pagination. Default=1. limit : int, optional @@ -2385,7 +2385,7 @@ def create_interactive_session(self, team_id, payload, verify=True): Parameters ---------- team_id : string - The CloudOS team id (workspace id) to create session in. + The Lifebit Platform team id (workspace id) to create session in. payload : dict Complete session creation payload with configuration, data items, etc. verify: [bool|string], default=True @@ -2437,7 +2437,7 @@ def resume_interactive_session(self, session_id, team_id, payload, verify=True): session_id : string The session ID (MongoDB ObjectId) to resume. team_id : string - The CloudOS team id (workspace id) where the session is running. + The Lifebit Platform team id (workspace id) where the session is running. payload : dict Resume payload with optional dataItems and newInteractiveSessionConfiguration. verify: [bool|string], default=True @@ -2491,7 +2491,7 @@ def abort_interactive_session(self, session_id, team_id, upload_on_close=True, f session_id : string The session ID (MongoDB ObjectId) to abort. team_id : string - The CloudOS team id (workspace id) where the session is running. + The Lifebit Platform team id (workspace id) where the session is running. upload_on_close : bool, optional If True, save session data to S3 before terminating. Default=True. force_abort : bool, optional diff --git a/cloudos_cli/configure/cli.py b/cloudos_cli/configure/cli.py index 67409f15..9c0cc34c 100644 --- a/cloudos_cli/configure/cli.py +++ b/cloudos_cli/configure/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS configuration management.""" +"""CLI commands for Lifebit Platform configuration management.""" import rich_click as click from cloudos_cli.configure.configure import ConfigurationProfile @@ -14,7 +14,7 @@ help='Make the profile the default one.') @click.pass_context def configure(ctx, profile, make_default): - """CloudOS configuration.""" + """Lifebit Platform configuration.""" print(configure.__doc__ + '\n') update_command_context_from_click(ctx) profile = profile or ctx.obj['profile'] diff --git a/cloudos_cli/configure/configure.py b/cloudos_cli/configure/configure.py index b84af227..680b61df 100644 --- a/cloudos_cli/configure/configure.py +++ b/cloudos_cli/configure/configure.py @@ -574,7 +574,7 @@ def load_profile_and_validate_data(self, ctx, init_profile, cloudos_url_default, resolved_cloudos_url = resolved_params.get('cloudos_url', '') if not resolved_cloudos_url: click.secho( - f"No CloudOS URL provided via CLI or profile. Falling back to default: {cloudos_url_default}", + f"No Lifebit Platform URL provided via CLI or profile. Falling back to default: {cloudos_url_default}", fg="yellow", bold=True ) @@ -626,8 +626,8 @@ def with_profile_config(required_params=None): ---------- required_params : list, optional List of parameter names that can currently be added in a profile. Common values: - - 'apikey': CloudOS API key - - 'workspace_id': CloudOS workspace ID + - 'apikey': Lifebit Platform API key + - 'workspace_id': Lifebit Platform workspace ID - 'project_name': Project name - 'workflow_name': Workflow/pipeline name - 'session_id': Interactive session ID @@ -637,9 +637,9 @@ def with_profile_config(required_params=None): Example ------- @job.command('details') - @click.option('--apikey', help='Your CloudOS API key', required=True) - @click.option('--workspace-id', help='The specific CloudOS workspace id.', required=True) - @click.option('--job-id', help='The job id in CloudOS to search for.', required=True) + @click.option('--apikey', help='Your Lifebit Platform API key', required=True) + @click.option('--workspace-id', help='The specific Lifebit Platform workspace id.', required=True) + @click.option('--job-id', help='The job id in Lifebit Platform to search for.', required=True) @click.option('--profile', help='Profile to use from the config file', default=None) @click.pass_context @with_profile_config(required_params=['apikey', 'workspace_id']) diff --git a/cloudos_cli/cromwell/cli.py b/cloudos_cli/cromwell/cli.py index af0f9ab4..3e8524e2 100644 --- a/cloudos_cli/cromwell/cli.py +++ b/cloudos_cli/cromwell/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS Cromwell server management.""" +"""CLI commands for Lifebit Platform Cromwell server management.""" import rich_click as click import json @@ -13,7 +13,7 @@ @click.group(cls=pass_debug_to_subcommands()) def cromwell(): - """CloudOS Cromwell server functionality.""" + """Lifebit Platform Cromwell server functionality.""" print(cromwell.__doc__ + '\n') @@ -21,18 +21,18 @@ def cromwell(): @click.version_option() @click.option('-k', '--apikey', - help='Your CloudOS API key.') + help='Your Lifebit Platform API key.') @click.option('-t', '--cromwell-token', help=('Specific Cromwell server authentication token. You can use it instead of ' + 'the apikey.')) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--verbose', help='Whether to print information messages or not.', @@ -55,7 +55,7 @@ def cromwell_status(ctx, disable_ssl_verification, ssl_cert, profile): - """Check Cromwell server status in CloudOS.""" + """Check Cromwell server status in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator if apikey is None and cromwell_token is None: @@ -78,18 +78,18 @@ def cromwell_status(ctx, @click.version_option() @click.option('-k', '--apikey', - help='Your CloudOS API key.') + help='Your Lifebit Platform API key.') @click.option('-t', '--cromwell-token', help=('Specific Cromwell server authentication token. You can use it instead of ' + 'the apikey.')) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--wait-time', help=('Max time to wait (in seconds) to Cromwell restart. ' + @@ -117,7 +117,7 @@ def cromwell_restart(ctx, disable_ssl_verification, ssl_cert, profile): - """Restart Cromwell server in CloudOS.""" + """Restart Cromwell server in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator if apikey is None and cromwell_token is None: @@ -162,18 +162,18 @@ def cromwell_restart(ctx, @click.version_option() @click.option('-k', '--apikey', - help='Your CloudOS API key.') + help='Your Lifebit Platform API key.') @click.option('-t', '--cromwell-token', help=('Specific Cromwell server authentication token. You can use it instead of ' + 'the apikey.')) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--verbose', help='Whether to print information messages or not.', @@ -196,7 +196,7 @@ def cromwell_stop(ctx, disable_ssl_verification, ssl_cert, profile): - """Stop Cromwell server in CloudOS.""" + """Stop Cromwell server in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator if apikey is None and cromwell_token is None: diff --git a/cloudos_cli/datasets/cli.py b/cloudos_cli/datasets/cli.py index 10c44a77..0fe8bdaf 100644 --- a/cloudos_cli/datasets/cli.py +++ b/cloudos_cli/datasets/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS datasets management.""" +"""CLI commands for Lifebit Platform datasets management.""" import rich_click as click import csv @@ -17,7 +17,7 @@ @click.group(cls=pass_debug_to_subcommands()) @click.pass_context def datasets(ctx): - """CloudOS datasets functionality.""" + """Lifebit Platform datasets functionality.""" update_command_context_from_click(ctx) if ctx.args and ctx.args[0] != 'ls': print(datasets.__doc__ + '\n') @@ -27,15 +27,15 @@ def datasets(ctx): @click.argument("path", required=False, nargs=1) @click.option('-k', '--apikey', - help='Your CloudOS API key.', + help='Your Lifebit Platform API key.', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--disable-ssl-verification', help=('Disable SSL certificate verification. Please, remember that this option is ' + @@ -44,7 +44,7 @@ def datasets(ctx): @click.option('--ssl-cert', help='Path to your SSL certificate file.') @click.option('--project-name', - help='The name of a CloudOS project.', + help='The name of a Lifebit Platform project.', required=True) @click.option('--profile', help='Profile to use from the config file', default=None) @click.option('--details', @@ -76,7 +76,7 @@ def list_files(ctx, details, output_format, output_basename): - """List contents of a path within a CloudOS workspace dataset.""" + """List contents of a path within a Lifebit Platform workspace dataset.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) datasets = Datasets( @@ -235,9 +235,9 @@ def list_files(ctx, @datasets.command(name="mv") @click.argument("source_path", required=True) @click.argument("destination_path", required=True) -@click.option('-k', '--apikey', required=True, help='Your CloudOS API key.') -@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The CloudOS URL.') -@click.option('--workspace-id', required=True, help='The CloudOS workspace ID.') +@click.option('-k', '--apikey', required=True, help='Your Lifebit Platform API key.') +@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The Lifebit Platform URL.') +@click.option('--workspace-id', required=True, help='The Lifebit Platform workspace ID.') @click.option('--project-name', required=True, help='The source project name.') @click.option('--destination-project-name', required=False, help='The destination project name. Defaults to the source project.') @@ -250,7 +250,7 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac project_name, destination_project_name, disable_ssl_verification, ssl_cert, profile): """ - Move a file or folder from a source path to a destination path within or across CloudOS projects. + Move a file or folder from a source path to a destination path within or across Lifebit Platform projects. SOURCE_PATH [path]: the full path to the file or folder to move. It must be a 'Data' folder path. E.g.: 'Data/folderA/file.txt'\n @@ -357,9 +357,9 @@ def move_files(ctx, source_path, destination_path, apikey, cloudos_url, workspac @datasets.command(name="rename") @click.argument("source_path", required=True) @click.argument("new_name", required=True) -@click.option('-k', '--apikey', required=True, help='Your CloudOS API key.') -@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The CloudOS URL.') -@click.option('--workspace-id', required=True, help='The CloudOS workspace ID.') +@click.option('-k', '--apikey', required=True, help='Your Lifebit Platform API key.') +@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The Lifebit Platform URL.') +@click.option('--workspace-id', required=True, help='The Lifebit Platform workspace ID.') @click.option('--project-name', required=True, help='The project name.') @click.option('--disable-ssl-verification', is_flag=True, help='Disable SSL certificate verification.') @click.option('--ssl-cert', help='Path to your SSL certificate file.') @@ -377,7 +377,7 @@ def renaming_item(ctx, ssl_cert, profile): """ - Rename a file or folder in a CloudOS project. + Rename a file or folder in a Lifebit Platform project. SOURCE_PATH [path]: the full path to the file or folder to rename. It must be a 'Data' folder path. E.g.: 'Data/folderA/old_name.txt'\n @@ -440,9 +440,9 @@ def renaming_item(ctx, @datasets.command(name="cp") @click.argument("source_path", required=True) @click.argument("destination_path", required=True) -@click.option('-k', '--apikey', required=True, help='Your CloudOS API key.') -@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The CloudOS URL.') -@click.option('--workspace-id', required=True, help='The CloudOS workspace ID.') +@click.option('-k', '--apikey', required=True, help='Your Lifebit Platform API key.') +@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The Lifebit Platform URL.') +@click.option('--workspace-id', required=True, help='The Lifebit Platform workspace ID.') @click.option('--project-name', required=True, help='The source project name.') @click.option('--destination-project-name', required=False, help='The destination project name. Defaults to the source project.') @click.option('--disable-ssl-verification', is_flag=True, help='Disable SSL certificate verification.') @@ -551,9 +551,9 @@ def copy_item_cli(ctx, @datasets.command(name="mkdir") @click.argument("new_folder_path", required=True) -@click.option('-k', '--apikey', required=True, help='Your CloudOS API key.') -@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The CloudOS URL.') -@click.option('--workspace-id', required=True, help='The CloudOS workspace ID.') +@click.option('-k', '--apikey', required=True, help='Your Lifebit Platform API key.') +@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The Lifebit Platform URL.') +@click.option('--workspace-id', required=True, help='The Lifebit Platform workspace ID.') @click.option('--project-name', required=True, help='The project name.') @click.option('--disable-ssl-verification', is_flag=True, help='Disable SSL certificate verification.') @click.option('--ssl-cert', help='Path to your SSL certificate file.') @@ -570,7 +570,7 @@ def mkdir_item(ctx, ssl_cert, profile): """ - Create a virtual folder in a CloudOS project. + Create a virtual folder in a Lifebit Platform project. NEW_FOLDER_PATH [path]: Full path to the new folder including its name. Must start with 'Data'. """ @@ -640,9 +640,9 @@ def mkdir_item(ctx, @datasets.command(name="rm") @click.argument("target_path", required=True) -@click.option('-k', '--apikey', required=True, help='Your CloudOS API key.') -@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The CloudOS URL.') -@click.option('--workspace-id', required=True, help='The CloudOS workspace ID.') +@click.option('-k', '--apikey', required=True, help='Your Lifebit Platform API key.') +@click.option('-c', '--cloudos-url', default=CLOUDOS_URL, required=True, help='The Lifebit Platform URL.') +@click.option('--workspace-id', required=True, help='The Lifebit Platform workspace ID.') @click.option('--project-name', required=True, help='The project name.') @click.option('--disable-ssl-verification', is_flag=True, help='Disable SSL certificate verification.') @click.option('--ssl-cert', help='Path to your SSL certificate file.') @@ -661,7 +661,7 @@ def rm_item(ctx, profile, force): """ - Delete a file or folder in a CloudOS project. + Delete a file or folder in a Lifebit Platform project. TARGET_PATH [path]: the full path to the file or folder to delete. Must start with 'Data'. \n E.g.: 'Data/folderA/file.txt' or 'Data/my_analysis/results/folderB' @@ -729,15 +729,15 @@ def rm_item(ctx, @datasets.command(name="link") @click.argument("path", required=True) -@click.option('-k', '--apikey', help='Your CloudOS API key', required=True) +@click.option('-k', '--apikey', help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL) @click.option('--project-name', - help='The name of a CloudOS project.', + help='The name of a Lifebit Platform project.', required=False) -@click.option('--workspace-id', help='The specific CloudOS workspace id.', required=True) -@click.option('--session-id', help='The specific CloudOS interactive session id.', required=True) +@click.option('--workspace-id', help='The specific Lifebit Platform workspace id.', required=True) +@click.option('--session-id', help='The specific Lifebit Platform interactive session id.', required=True) @click.option('--disable-ssl-verification', is_flag=True, help='Disable SSL certificate verification.') @click.option('--ssl-cert', help='Path to your SSL certificate file.') @click.option('--profile', help='Profile to use from the config file', default='default') diff --git a/cloudos_cli/datasets/datasets.py b/cloudos_cli/datasets/datasets.py index 623ed7c0..13b8218e 100644 --- a/cloudos_cli/datasets/datasets.py +++ b/cloudos_cli/datasets/datasets.py @@ -17,19 +17,19 @@ class Datasets(Cloudos): Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. workspace_id : string The specific Cloudos workspace id. project_name : string - The name of a CloudOS project. + The name of a Lifebit Platform project. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to the SSL certificate file. project_id : string - The CloudOS project id for a given project name. + The Lifebit Platform project id for a given project name. """ workspace_id: str project_name: str @@ -63,7 +63,7 @@ def fetch_project_id(self, workspace_id : string The specific Cloudos workspace id. project_name : string - The name of a CloudOS project element. + The name of a Lifebit Platform project element. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -72,7 +72,7 @@ def fetch_project_id(self, Returns ------- project_id : string - The CloudOS project id for a given project name. + The Lifebit Platform project id for a given project name. """ return self.get_project_id_from_name(workspace_id, project_name, verify=verify) @@ -83,9 +83,9 @@ def list_project_content(self): Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. workspace_id : string The specific Cloudos workspace id. project_id @@ -116,9 +116,9 @@ def list_datasets_content(self, folder_name): """Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. workspace_id : string The specific Cloudos workspace id. project_id : string @@ -126,7 +126,7 @@ def list_datasets_content(self, folder_name): folder_name : string The requested folder name """ - # Prepare api request for CloudOS to fetch dataset info + # Prepare api request for Lifebit Platform to fetch dataset info headers = { "Content-type": "application/json", "apikey": self.apikey @@ -154,9 +154,9 @@ def list_s3_folder_content(self, s3_bucket_name, s3_relative_path): """Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. workspace_id : string The specific Cloudos workspace id. project_id : string @@ -166,7 +166,7 @@ def list_s3_folder_content(self, s3_bucket_name, s3_relative_path): s3_relative_path: string The relative path in the s3 bucket """ - # Prepare api request for CloudOS to fetch dataset info + # Prepare api request for Lifebit Platform to fetch dataset info headers = { "Content-type": "application/json", "apikey": self.apikey @@ -201,9 +201,9 @@ def list_virtual_folder_content(self, folder_id): """Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. workspace_id : string The specific Cloudos workspace id. project_id : string @@ -279,7 +279,7 @@ def list_azure_container_content(self, container_name: str, storage_account_name def list_folder_content(self, path=None): """ - Wrapper to list contents of a CloudOS folder. + Wrapper to list contents of a Lifebit Platform folder. Parameters ---------- @@ -290,7 +290,7 @@ def list_folder_content(self, path=None): Returns ------- dict - JSON response from the appropriate CloudOS endpoint. + JSON response from the appropriate Lifebit Platform endpoint. """ if not path: return self.list_project_content() @@ -382,7 +382,7 @@ def list_folder_content(self, path=None): def move_files_and_folders(self, source_id: str, source_kind: str, target_id: str, target_kind: str): """ - Move a file to another dataset in CloudOS. + Move a file to another dataset in Lifebit Platform. Parameters ---------- @@ -395,7 +395,7 @@ def move_files_and_folders(self, source_id: str, source_kind: str, target_id: st Returns ------- response : requests.Response - The response object from the CloudOS API. + The response object from the Lifebit Platform API. """ url = f"{self.cloudos_url}/api/v1/dataItems/move?teamId={self.workspace_id}" headers = { @@ -420,7 +420,7 @@ def move_files_and_folders(self, source_id: str, source_kind: str, target_id: st def rename_item(self, item_id: str, new_name: str, kind: str): """ - Rename a file or folder in CloudOS. + Rename a file or folder in Lifebit Platform. Parameters ---------- @@ -434,7 +434,7 @@ def rename_item(self, item_id: str, new_name: str, kind: str): Returns ------- response : requests.Response - The response object from the CloudOS API. + The response object from the Lifebit Platform API. """ if kind not in ("File", "Folder"): raise ValueError("Invalid kind provided. Must be 'File' or 'Folder'.") @@ -458,7 +458,7 @@ def rename_item(self, item_id: str, new_name: str, kind: str): return response def copy_item(self, item, destination_id, destination_kind): - """Copy a file or folder (S3, Azure or Virtual) to a destination in CloudOS.""" + """Copy a file or folder (S3, Azure or Virtual) to a destination in Lifebit Platform.""" headers = { "accept": "application/json", "content-type": "application/json", @@ -527,7 +527,7 @@ def copy_item(self, item, destination_id, destination_kind): def create_virtual_folder(self, name: str, parent_id: str, parent_kind: str): """ - Create a new virtual folder in CloudOS under a given parent. + Create a new virtual folder in Lifebit Platform under a given parent. Parameters ---------- @@ -541,7 +541,7 @@ def create_virtual_folder(self, name: str, parent_id: str, parent_kind: str): Returns ------- response : requests.Response - The response object from the CloudOS API. + The response object from the Lifebit Platform API. """ if parent_kind not in ("Dataset", "Folder"): raise ValueError("Invalid parent_kind. Must be 'Dataset' or 'Folder'.") @@ -569,7 +569,7 @@ def create_virtual_folder(self, name: str, parent_id: str, parent_kind: str): def delete_item(self, item_id: str, kind: str): """ - Delete a file or folder in CloudOS. + Delete a file or folder in Lifebit Platform. Parameters ---------- @@ -581,7 +581,7 @@ def delete_item(self, item_id: str, kind: str): Returns ------- response : requests.Response - The response object from the CloudOS API. + The response object from the Lifebit Platform API. """ if kind not in ("File", "Folder"): raise ValueError("Invalid kind provided. Must be 'File' or 'Folder'.") diff --git a/cloudos_cli/import_wf/__init__.py b/cloudos_cli/import_wf/__init__.py index 9a15f9ac..55fe794e 100755 --- a/cloudos_cli/import_wf/__init__.py +++ b/cloudos_cli/import_wf/__init__.py @@ -1,5 +1,5 @@ """ -Functions and classes related to importing workflows into CloudOS. +Functions and classes related to importing workflows into Lifebit Platform. """ from .import_wf import WFImport, ImportWorflow diff --git a/cloudos_cli/interactive_session/cli.py b/cloudos_cli/interactive_session/cli.py index fb40bd58..7562ba0b 100644 --- a/cloudos_cli/interactive_session/cli.py +++ b/cloudos_cli/interactive_session/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS interactive session management.""" +"""CLI commands for Lifebit Platform interactive session management.""" import rich_click as click import json @@ -39,22 +39,22 @@ # Create the interactive_session group @click.group(cls=pass_debug_to_subcommands()) def interactive_session(): - """CloudOS interactive session functionality: list and manage interactive sessions.""" + """Lifebit Platform interactive session functionality: list and manage interactive sessions.""" print(interactive_session.__doc__ + '\n') @interactive_session.command('list') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--filter-status', multiple=True, @@ -122,7 +122,7 @@ def list_sessions(ctx, disable_ssl_verification, ssl_cert, profile): - """List interactive sessions for a CloudOS team.""" + """List interactive sessions for a Lifebit Platform team.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) # Validate limit parameter @@ -210,7 +210,7 @@ def list_sessions(ctx, error_str = str(e) # Check if the error is related to authentication if '401' in error_str or 'Unauthorized' in error_str: - click.secho(f'Error: Failed to retrieve interactive sessions. Please check your credentials (API key and CloudOS URL).', fg='red', err=True) + click.secho(f'Error: Failed to retrieve interactive sessions. Please check your credentials (API key and Lifebit Platform URL).', fg='red', err=True) raise SystemExit(1) # Check if the error is related to status filtering elif filter_status and ('400' in error_str or 'Invalid' in error_str): @@ -226,10 +226,10 @@ def list_sessions(ctx, error_str = str(e) # Check for DNS/connection errors if 'Failed to resolve' in error_str or 'Name or service not known' in error_str or 'nodename nor servname provided' in error_str: - click.secho(f'Error: Unable to connect to CloudOS URL. Please verify the CloudOS URL is correct.', fg='red', err=True) + click.secho(f'Error: Unable to connect to Lifebit Platform URL. Please verify the Lifebit Platform URL is correct.', fg='red', err=True) # Check for 401 Unauthorized elif '401' in error_str or 'Unauthorized' in error_str: - click.secho(f'Error: Failed to retrieve interactive sessions. Please check your credentials (API key and CloudOS URL).', fg='red', err=True) + click.secho(f'Error: Failed to retrieve interactive sessions. Please check your credentials (API key and Lifebit Platform URL).', fg='red', err=True) else: click.secho(f'Error: {str(e)}', fg='red', err=True) raise SystemExit(1) @@ -238,15 +238,15 @@ def list_sessions(ctx, @interactive_session.command('create') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=False) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=False) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=False) @click.option('--project-name', help='The project name. Will be resolved to project ID automatically.', @@ -280,10 +280,10 @@ def list_sessions(ctx, default='12h') @click.option('--mount', multiple=True, - help='Mount a data file into the session. Supports both CloudOS datasets and S3 files. 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.') + help='Mount a data file into the session. Supports both Lifebit Platform datasets and S3 files. 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.') @click.option('--link', multiple=True, - help='Link a folder into the session for read/write access. Supports S3 folders and CloudOS folders. Format: s3://bucket/prefix (e.g., s3://my-bucket/data/) or project_name/folder_path (e.g., leila-test/Data). Legacy format: mountName:bucketName:s3Prefix. Can be used multiple times.') + help='Link a folder into the session for read/write access. Supports S3 folders and Lifebit Platform folders. Format: s3://bucket/prefix (e.g., s3://my-bucket/data/) or project_name/folder_path (e.g., leila-test/Data). Legacy format: mountName:bucketName:s3Prefix. Can be used multiple times.') @click.option('--r-version', type=click.Choice(['4.5.2', '4.4.2'], case_sensitive=False), help='R version for RStudio. Options: 4.5.2 (default), 4.4.2.', @@ -409,7 +409,7 @@ def create_session(ctx, click.secho(f'Error: Invalid shutdown duration: {str(e)}', fg='red', err=True) raise SystemExit(1) - # Parse and resolve mounted data files (both CloudOS and S3) + # Parse and resolve mounted data files (both Lifebit Platform and S3) parsed_data_files = [] parsed_s3_mounts = [] # S3 folders go into FUSE mounts if mount: @@ -419,7 +419,7 @@ def create_session(ctx, if parsed['type'] == 's3': # S3 files are only supported on AWS if execution_platform != 'aws': - click.secho(f'Error: S3 mounts are only supported on AWS. Use CloudOS file explorer paths for Azure.', fg='red', err=True) + click.secho(f'Error: S3 mounts are only supported on AWS. Use Lifebit Platform file explorer paths for Azure.', fg='red', err=True) raise SystemExit(1) # S3 file: add to dataItems as S3File type if verbose: @@ -437,7 +437,7 @@ def create_session(ctx, if verbose: print(f'\t ✓ Added S3 file to mount') else: # type == 'cloudos' - # CloudOS dataset file: resolve via Datasets API + # Lifebit Platform dataset file: resolve via Datasets API data_project = parsed['project_name'] dataset_path = parsed['dataset_path'] if verbose: @@ -459,7 +459,7 @@ def create_session(ctx, click.secho(f'Error: Failed to resolve dataset files: {str(e)}', fg='red', err=True) raise SystemExit(1) - # Parse and add linked folders from --link (S3 or CloudOS) + # Parse and add linked folders from --link (S3 or Lifebit Platform) for link_path in link: try: # Block all linking on Azure platforms @@ -490,11 +490,11 @@ def create_session(ctx, print(f'\t ✓ Linked S3: {mount_name}') else: # type == 'cloudos' - # CloudOS folder: resolve via Datasets API + # Lifebit Platform folder: resolve via Datasets API folder_project = parsed['project_name'] folder_path = parsed['folder_path'] if verbose: - print(f'\tLinking CloudOS folder: {folder_project}/{folder_path}') + print(f'\tLinking Lifebit Platform folder: {folder_project}/{folder_path}') # Create Datasets API instance for this project datasets_api = Datasets( cloudos_url=cloudos_url, @@ -504,7 +504,7 @@ def create_session(ctx, verify=verify_ssl, cromwell_token=None ) - # For CloudOS folders, we create a mount item + # For Lifebit Platform folders, we create a mount item mount_name = folder_path.split('/')[-1] if folder_path else folder_project cloudos_mount_item = { "type": "S3Folder", @@ -517,7 +517,7 @@ def create_session(ctx, parsed_s3_mounts.append(cloudos_mount_item) if verbose: - print(f'\t ✓ Linked CloudOS folder: {mount_name}') + print(f'\t ✓ Linked Lifebit Platform folder: {mount_name}') except Exception as e: click.secho(f'Error: Failed to link folder: {str(e)}', fg='red', err=True) @@ -573,7 +573,7 @@ def create_session(ctx, except BadRequestException as e: error_str = str(e) if '401' in error_str or 'Unauthorized' in error_str: - click.secho(f'Error: Failed to create interactive session. Please check your credentials (API key and CloudOS URL).', fg='red', err=True) + click.secho(f'Error: Failed to create interactive session. Please check your credentials (API key and Lifebit Platform URL).', fg='red', err=True) else: click.secho(f'Error: Failed to create interactive session: {e}', fg='red', err=True) raise SystemExit(1) @@ -581,10 +581,10 @@ def create_session(ctx, error_str = str(e) # Check for DNS/connection errors if 'Failed to resolve' in error_str or 'Name or service not known' in error_str or 'nodename nor servname provided' in error_str: - click.secho(f'Error: Unable to connect to CloudOS URL. Please verify the CloudOS URL is correct.', fg='red', err=True) + click.secho(f'Error: Unable to connect to Lifebit Platform URL. Please verify the Lifebit Platform URL is correct.', fg='red', err=True) # Check for 401 Unauthorized elif '401' in error_str or 'Unauthorized' in error_str: - click.secho(f'Error: Failed to create interactive session. Please check your credentials (API key and CloudOS URL).', fg='red', err=True) + click.secho(f'Error: Failed to create interactive session. Please check your credentials (API key and Lifebit Platform URL).', fg='red', err=True) else: click.secho(f'Error: {str(e)}', fg='red', err=True) raise SystemExit(1) @@ -593,18 +593,18 @@ def create_session(ctx, @interactive_session.command('status') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=False) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=False) @click.option('--session-id', help='The session ID to retrieve status for (24-character hex string).', required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=False) @click.option('--output-format', help='Output format for session status.', @@ -786,7 +786,7 @@ def get_session_status(ctx, error_str = str(e) # Check for network errors if 'Failed to resolve' in error_str or 'Name or service not known' in error_str: - click.secho(f'Error: Unable to connect to CloudOS. Please verify the CloudOS URL is correct.', fg='red', err=True) + click.secho(f'Error: Unable to connect to Lifebit Platform. Please verify the Lifebit Platform URL is correct.', fg='red', err=True) elif '401' in error_str or 'Unauthorized' in error_str: click.secho(f'Error: Failed to retrieve session status. Please check your credentials.', fg='red', err=True) else: @@ -800,15 +800,15 @@ def get_session_status(ctx, required=True) @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=False) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=False) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=False) @click.option('--no-upload', is_flag=True, @@ -915,7 +915,7 @@ def pause_session(ctx, # Create Cloudos client and abort session cl = Cloudos(cloudos_url, apikey, None) if verbose: - print('\t...Sending abort request to CloudOS') + print('\t...Sending abort request to Lifebit Platform') # Call the abort endpoint status_code = cl.abort_interactive_session( @@ -983,7 +983,7 @@ def pause_session(ctx, error_str = str(e) # Check for network errors if 'Failed to resolve' in error_str or 'Name or service not known' in error_str: - click.secho(f'Error: Unable to connect to CloudOS. Please verify the CloudOS URL is correct.', fg='red', err=True) + click.secho(f'Error: Unable to connect to Lifebit Platform. Please verify the Lifebit Platform URL is correct.', fg='red', err=True) elif '401' in error_str or 'Unauthorized' in error_str: click.secho(f'Error: Failed to pause session. Please check your credentials.', fg='red', err=True) elif 'Session not found' in error_str: @@ -1007,15 +1007,15 @@ def pause_session(ctx, required=True) @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=False) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=False) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=False) @click.option('--instance', help='Change instance type when resuming.', @@ -1140,7 +1140,7 @@ def resume_session(ctx, } } parsed_data_files.append(s3_file_item) - else: # CloudOS dataset + else: # Lifebit Platform dataset data_project = parsed['project_name'] dataset_path = parsed['dataset_path'] if verbose: @@ -1184,11 +1184,11 @@ def resume_session(ctx, } } parsed_s3_mounts.append(s3_mount_item) - else: # CloudOS folder + else: # Lifebit Platform folder folder_project = parsed['project_name'] folder_path = parsed['folder_path'] if verbose: - print(f'\tLinking CloudOS folder: {folder_project}/{folder_path}') + print(f'\tLinking Lifebit Platform folder: {folder_project}/{folder_path}') # Create Datasets API instance for this project datasets_api = Datasets( cloudos_url=cloudos_url, @@ -1198,7 +1198,7 @@ def resume_session(ctx, verify=verify_ssl, cromwell_token=None ) - # AWS-only: Create S3Folder mount for CloudOS folders + # AWS-only: Create S3Folder mount for Lifebit Platform folders mount_name = folder_path.split('/')[-1] if folder_path else folder_project cloudos_mount_item = { "type": "S3Folder", @@ -1210,7 +1210,7 @@ def resume_session(ctx, } parsed_s3_mounts.append(cloudos_mount_item) if verbose: - print(f'\t ✓ Linked CloudOS folder: {mount_name}') + print(f'\t ✓ Linked Lifebit Platform folder: {mount_name}') except Exception as e: click.secho(f'Error: Failed to parse link path: {str(e)}', fg='red', err=True) raise SystemExit(1) @@ -1277,7 +1277,7 @@ def resume_session(ctx, click.secho(f'Error: Cannot resume session - current status is "{current_status}".', fg='red', err=True) click.secho(f'Only sessions with status "paused" can be resumed.', fg='yellow', err=True) if current_status == 'running': - click.secho(f'Tip: This session is already running. Use the CloudOS web interface to access it.', fg='yellow', err=True) + click.secho(f'Tip: This session is already running. Use the Lifebit Platform web interface to access it.', fg='yellow', err=True) elif current_status == 'terminated': click.secho(f'Tip: Terminated sessions cannot be resumed. Please create a new session instead.', fg='yellow', err=True) else: @@ -1298,7 +1298,7 @@ def resume_session(ctx, error_str = str(e) # Check for network errors if 'Failed to resolve' in error_str or 'Name or service not known' in error_str: - click.secho(f'Error: Unable to connect to CloudOS. Please verify the CloudOS URL is correct.', fg='red', err=True) + click.secho(f'Error: Unable to connect to Lifebit Platform. Please verify the Lifebit Platform URL is correct.', fg='red', err=True) elif '401' in error_str or 'Unauthorized' in error_str: click.secho(f'Error: Failed to resume session. Please check your credentials.', fg='red', err=True) else: diff --git a/cloudos_cli/interactive_session/interactive_session.py b/cloudos_cli/interactive_session/interactive_session.py index 29c1a8b6..9353a74f 100644 --- a/cloudos_cli/interactive_session/interactive_session.py +++ b/cloudos_cli/interactive_session/interactive_session.py @@ -679,16 +679,16 @@ def parse_watch_timeout_duration(duration_str): return value * 86400 def parse_data_file(data_file_str): - """Parse data file format: either S3 or CloudOS dataset path. + """Parse data file format: either S3 or Lifebit Platform dataset path. - Supports mounting both S3 files and CloudOS dataset files into the session. + Supports mounting both S3 files and Lifebit Platform dataset files into the session. Parameters ---------- data_file_str : str Format: - S3 file: s3://bucket_name/path/to/file.txt - - CloudOS dataset: project_name/dataset_path or project_name > dataset_path + - Lifebit Platform dataset: project_name/dataset_path or project_name > dataset_path Examples: - s3://lifebit-featured-datasets/pipelines/phewas/data.csv @@ -700,7 +700,7 @@ def parse_data_file(data_file_str): Parsed data item. For S3: {"type": "s3", "s3_bucket": "...", "s3_prefix": "..."} - For CloudOS dataset: + For Lifebit Platform dataset: {"type": "cloudos", "project_name": "...", "dataset_path": "..."} Raises @@ -722,7 +722,7 @@ def parse_data_file(data_file_str): "s3_bucket": bucket, "s3_prefix": prefix } - # Otherwise, parse as CloudOS dataset path + # Otherwise, parse as Lifebit Platform dataset path # Determine which separator to use: > takes precedence over / separator = None if '>' in data_file_str: @@ -733,7 +733,7 @@ def parse_data_file(data_file_str): raise ValueError( f"Invalid data file format: {data_file_str}. Expected one of:\n" f" - S3 file: s3://bucket/path/file.txt\n" - f" - CloudOS dataset: project_name/dataset_path or project_name > dataset_path" + f" - Lifebit Platform dataset: project_name/dataset_path or project_name > dataset_path" ) # Split only on the first separator to handle nested paths parts = data_file_str.split(separator, 1) @@ -867,16 +867,16 @@ def resolve_data_file_id(datasets_api, dataset_path: str) -> dict: def parse_link_path(link_path_str): - """Parse link path format: supports S3, CloudOS, or legacy colon format. + """Parse link path format: supports S3, Lifebit Platform, or legacy colon format. - Links an S3 folder or CloudOS folder to the session for read/write access. + Links an S3 folder or Lifebit Platform folder to the session for read/write access. Parameters ---------- link_path_str : str Format (one of): - S3 path: s3://bucketName/s3Prefix (e.g., s3://my-bucket/data/) - - CloudOS folder: project/folder_path (e.g., leila-test/Data) + - Lifebit Platform folder: project/folder_path (e.g., leila-test/Data) - Legacy format (deprecated): mountName:bucketName:s3Prefix Returns @@ -884,14 +884,14 @@ def parse_link_path(link_path_str): dict Tuple of (type, data) where type is 's3' or 'cloudos' and data contains: For S3: {"s3_bucket": "...", "s3_prefix": "..."} - For CloudOS: {"project_name": "...", "folder_path": "..."} + For Lifebit Platform: {"project_name": "...", "folder_path": "..."} """ # Check for Azure blob storage paths and provide helpful error if link_path_str.startswith('az://') or link_path_str.startswith('https://') and '.blob.core.windows.net' in link_path_str: raise ValueError( f"Azure blob storage paths are not supported for linking. " f"Folder linking is not supported on Azure execution platforms. " - f"Please use CloudOS file explorer to access your data directly." + f"Please use Lifebit Platform file explorer to access your data directly." ) # Check for S3 path if link_path_str.startswith('s3://'): @@ -926,7 +926,7 @@ def parse_link_path(link_path_str): "s3_bucket": bucket, "s3_prefix": prefix } - # Otherwise, parse as CloudOS folder path + # Otherwise, parse as Lifebit Platform folder path # Format: project_name/folder_path or project_name > folder_path separator = None if '>' in link_path_str: @@ -937,7 +937,7 @@ def parse_link_path(link_path_str): raise ValueError( f"Invalid link path format: {link_path_str}. Expected one of:\n" f" - S3 path: s3://bucket/prefix/\n" - f" - CloudOS folder: project/folder/path\n" + f" - Lifebit Platform folder: project/folder/path\n" f" - Legacy format (deprecated): mountName:bucketName:prefix" ) parts = link_path_str.split(separator, 1) @@ -995,7 +995,7 @@ def build_session_payload( shutdown_at : str ISO8601 datetime for auto-shutdown (optional) data_files : list - List of data file dicts. For AWS: CloudOS or S3. For Azure: CloudOS only. + List of data file dicts. For AWS: Lifebit Platform or S3. For Azure: Lifebit Platform only. s3_mounts : list List of S3 mount dicts (AWS only, ignored for Azure) r_version : str @@ -1238,7 +1238,7 @@ def format_session_creation_table(session_data, instance_type=None, storage_size mounted_files = [] for df in data_files: if isinstance(df, dict): - # Handle CloudOS dataset files + # Handle Lifebit Platform dataset files if df.get('kind') == 'File': name = df.get('name', 'Unknown') mounted_files.append(name) @@ -1258,7 +1258,7 @@ def format_session_creation_table(session_data, instance_type=None, storage_size data = s3.get('data', {}) bucket = data.get('s3BucketName', '') prefix = data.get('s3Prefix', '') - # For CloudOS mounts, show project/path; for S3, show bucket/path + # For Lifebit Platform mounts, show project/path; for S3, show bucket/path if prefix and bucket: linked_s3.append(f"s3://{bucket}/{prefix}") elif bucket: @@ -1391,7 +1391,7 @@ def __init__(self, cloudos_url: str, apikey: str, verify_ssl: bool = True): Parameters ---------- cloudos_url : str - Base CloudOS platform URL + Base Lifebit Platform URL apikey : str API key for authentication verify_ssl : bool @@ -1477,7 +1477,7 @@ def get_session_status(self, session_id: str, team_id: str) -> dict: except requests.exceptions.Timeout: raise RuntimeError(f"API request timeout after {self.REQUEST_TIMEOUT} seconds") except requests.exceptions.ConnectionError as e: - raise RuntimeError(f"Failed to connect to CloudOS: {str(e)}") + raise RuntimeError(f"Failed to connect to Lifebit Platform: {str(e)}") class OutputFormatter: @@ -1739,7 +1739,7 @@ def get_interactive_session_status(cloudos_url: str, apikey: str, session_id: st Parameters ---------- cloudos_url : str - CloudOS platform URL + Lifebit Platform URL apikey : str API key for authentication session_id : str @@ -1782,7 +1782,7 @@ def format_session_status_table(session_data: dict, cloudos_url: str = None) -> session_data : dict Transformed session data (from transform_session_response) cloudos_url : str, optional - CloudOS URL for creating links + Lifebit Platform URL for creating links """ OutputFormatter.format_stdout(session_data, cloudos_url or '') @@ -1860,7 +1860,7 @@ def poll_session_termination(cloudos_url: str, apikey: str, session_id: str, tea Parameters ---------- cloudos_url : str - CloudOS API URL + Lifebit Platform API URL apikey : str API key for authentication session_id : str @@ -1924,7 +1924,7 @@ def fetch_interactive_session_page(cl, workspace_id, page_num, limit, filter_sta Parameters ---------- cl : Cloudos - CloudOS API client instance + Lifebit Platform API client instance workspace_id : str Workspace ID page_num : int diff --git a/cloudos_cli/jobs/cli.py b/cloudos_cli/jobs/cli.py index 838982c6..5ebda4e0 100644 --- a/cloudos_cli/jobs/cli.py +++ b/cloudos_cli/jobs/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS job management.""" +"""CLI commands for Lifebit Platform job management.""" import rich_click as click import cloudos_cli.jobs.job as jb @@ -35,28 +35,28 @@ # Create the job group @click.group(cls=pass_debug_to_subcommands()) def job(): - """CloudOS job functionality: run, clone, resume, check and abort jobs in CloudOS.""" + """Lifebit Platform job functionality: run, clone, resume, check and abort jobs in Lifebit Platform.""" print(job.__doc__ + '\n') @job.command('run', cls=click.RichCommand) @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--project-name', - help='The name of a CloudOS project.', + help='The name of a Lifebit Platform project.', required=True) @click.option('--workflow-name', - help='The name of a CloudOS workflow or pipeline.', + help='The name of a Lifebit Platform workflow or pipeline.', required=True) @click.option('--last', help=('When the workflows are duplicated, use the latest imported workflow (by date).'), @@ -82,7 +82,7 @@ def job(): help=('A comma separated string indicating the nextflow profile/s ' + 'to use with your job.')) @click.option('--nextflow-version', - help=('Nextflow version to use when executing the workflow in CloudOS. ' + + help=('Nextflow version to use when executing the workflow in Lifebit Platform. ' + 'Defaults to 22.10.8 for Platform Workflows or 24.04.4 for user-imported Workflows.'), type=click.Choice(['22.10.8', '24.04.4', '25.04.8', '25.10.4', '22.11.1-edge', 'latest']), default=None) @@ -139,7 +139,7 @@ def job(): help='Name of the repository platform of the workflow. Default=github.', default='github') @click.option('--execution-platform', - help='Name of the execution platform implemented in your CloudOS. Default=aws.', + help='Name of the execution platform implemented in your Lifebit Platform. Default=aws.', type=click.Choice(['aws', 'azure', 'hpc']), default='aws') @click.option('--hpc-id', @@ -169,7 +169,7 @@ def job(): is_flag=True) @click.option('--use-private-docker-repository', help=('Allows to use private docker repository for running jobs. The Docker user ' + - 'account has to be already linked to CloudOS.'), + 'account has to be already linked to Lifebit Platform.'), is_flag=True) @click.option('--verbose', help='Whether to print information messages or not.', @@ -230,7 +230,7 @@ def run(ctx, disable_ssl_verification, ssl_cert, profile): - """Run a CloudOS workflow.""" + """Run a Lifebit Platform workflow.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) if do_not_save_logs: save_logs = False @@ -272,7 +272,7 @@ def run(ctx, 'Please, take into consideration the following:\n' + '\t- It significantly reduces runtime and compute costs but may increase network costs.\n' + '\t- Requires extra memory. Adjust process memory or optimise resource usage if necessary.\n' + - '\t- This is still a CloudOS BETA feature.\n') + '\t- This is still a Lifebit Platform BETA feature.\n') else: use_mountpoints = False if verbose: @@ -333,7 +333,7 @@ def run(ctx, if verbose: print('\tThe following Job object was created:') print('\t' + str(j)) - print('\t...Sending job to CloudOS\n') + print('\t...Sending job to Lifebit Platform\n') if is_module: if job_queue is not None: print(f'Ignoring job queue "{job_queue}" for ' + @@ -342,7 +342,7 @@ def run(ctx, job_queue_id = None if execution_platform == 'azure': print(f'The selected workflow \'{workflow_name}\' ' + - 'is a CloudOS module. For these workflows, worker nodes ' + + 'is a Lifebit Platform module. For these workflows, worker nodes ' + 'are managed internally. For this reason, the options ' + 'azure-worker-instance-type, azure-worker-instance-disk and ' + 'azure-worker-instance-spot are not taking effect.') @@ -353,7 +353,7 @@ def run(ctx, job_queue=job_queue) if use_private_docker_repository: if is_module: - print(f'Workflow "{workflow_name}" is a CloudOS module. ' + + print(f'Workflow "{workflow_name}" is a Lifebit Platform module. ' + 'Option --use-private-docker-repository will be ignored.') docker_login = False else: @@ -361,7 +361,7 @@ def run(ctx, if len(me) == 0: raise Exception('User private Docker repository has been selected but your user ' + 'credentials have not been configured yet. Please, link your ' + - 'Docker account to CloudOS before using ' + + 'Docker account to Lifebit Platform before using ' + '--use-private-docker-repository option.') print('Use private Docker repository has been selected. A custom job ' + 'queue to support private Docker containers will be created for ' + @@ -434,18 +434,18 @@ def run(ctx, @job.command('status') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to search for.', + help='The job id in Lifebit Platform to search for.', required=True) @click.option('--verbose', help='Whether to print information messages or not.', @@ -468,7 +468,7 @@ def job_status(ctx, disable_ssl_verification, ssl_cert, profile): - """Get the status of a CloudOS job.""" + """Get the status of a Lifebit Platform job.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator print('Executing status...') @@ -496,30 +496,30 @@ def job_status(ctx, @job.command('workdir') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to search for.', + help='The job id in Lifebit Platform to search for.', required=True) @click.option('--link', help='Link the working directory to an interactive session.', is_flag=True) @click.option('--delete', - help='Delete the results directory of a CloudOS job.', + help='Delete the results directory of a Lifebit Platform job.', is_flag=True) @click.option('-y', '--yes', help='Skip confirmation prompt when deleting results.', is_flag=True) @click.option('--session-id', - help='The specific CloudOS interactive session id. Required when using --link flag.', + help='The specific Lifebit Platform interactive session id. Required when using --link flag.', required=False) @click.option('--status', help='Check the deletion status of the working directory.', @@ -564,7 +564,7 @@ def job_workdir(ctx, console.print('[bold cyan]Checking deletion status of job working directory...[/bold cyan]') console.print('\t[dim]...Preparing objects[/dim]') console.print('\t[bold]Using the following parameters:[/bold]') - console.print(f'\t\t[cyan]CloudOS url:[/cyan] {cloudos_url}') + console.print(f'\t\t[cyan]Lifebit Platform url:[/cyan] {cloudos_url}') console.print(f'\t\t[cyan]Workspace ID:[/cyan] {workspace_id}') console.print(f'\t\t[cyan]Job ID:[/cyan] {job_id}') @@ -643,7 +643,7 @@ def job_workdir(ctx, if verbose: print('\t...Preparing objects') print('\tUsing the following parameters:') - print(f'\t\tCloudOS url: {cloudos_url}') + print(f'\t\tLifebit Platform url: {cloudos_url}') print(f'\t\tWorkspace ID: {workspace_id}') print(f'\t\tJob ID: {job_id}') if link: @@ -716,24 +716,24 @@ def job_workdir(ctx, @job.command('logs') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to search for.', + help='The job id in Lifebit Platform to search for.', required=True) @click.option('--link', help='Link the logs directories to an interactive session.', is_flag=True) @click.option('--session-id', - help='The specific CloudOS interactive session id. Required when using --link flag.', + help='The specific Lifebit Platform interactive session id. Required when using --link flag.', required=False) @click.option('--verbose', help='Whether to print information messages or not.', @@ -771,7 +771,7 @@ def job_logs(ctx, if verbose: print('\t...Preparing objects') print('\tUsing the following parameters:') - print(f'\t\tCloudOS url: {cloudos_url}') + print(f'\t\tLifebit Platform url: {cloudos_url}') print(f'\t\tWorkspace ID: {workspace_id}') print(f'\t\tJob ID: {job_id}') if link: @@ -824,30 +824,30 @@ def job_logs(ctx, @job.command('results') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to search for.', + help='The job id in Lifebit Platform to search for.', required=True) @click.option('--link', help='Link the results directories to an interactive session.', is_flag=True) @click.option('--delete', - help='Delete the results directory of a CloudOS job.', + help='Delete the results directory of a Lifebit Platform job.', is_flag=True) @click.option('-y', '--yes', help='Skip confirmation prompt when deleting results.', is_flag=True) @click.option('--session-id', - help='The specific CloudOS interactive session id. Required when using --link flag.', + help='The specific Lifebit Platform interactive session id. Required when using --link flag.', required=False) @click.option('--status', help='Check the deletion status of the job results.', @@ -892,7 +892,7 @@ def job_results(ctx, console.print('[bold cyan]Checking deletion status of job results...[/bold cyan]') console.print('\t[dim]...Preparing objects[/dim]') console.print('\t[bold]Using the following parameters:[/bold]') - console.print(f'\t\t[cyan]CloudOS url:[/cyan] {cloudos_url}') + console.print(f'\t\t[cyan]Lifebit Platform url:[/cyan] {cloudos_url}') console.print(f'\t\t[cyan]Workspace ID:[/cyan] {workspace_id}') console.print(f'\t\t[cyan]Job ID:[/cyan] {job_id}') @@ -971,7 +971,7 @@ def job_results(ctx, if verbose: print('\t...Preparing objects') print('\tUsing the following parameters:') - print(f'\t\tCloudOS url: {cloudos_url}') + print(f'\t\tLifebit Platform url: {cloudos_url}') print(f'\t\tWorkspace ID: {workspace_id}') print(f'\t\tJob ID: {job_id}') if link: @@ -1022,7 +1022,7 @@ def job_results(ctx, print('\nDeletion cancelled.') return if verbose: - print('\nDeleting result directories from CloudOS...') + print('\nDeleting result directories from Lifebit Platform...') # Proceed with deletion job = jb.Job(cloudos_url, apikey, None, workspace_id, None, None, workflow_id=1234, project_id="None", mainfile=None, importsfile=None, verify=verify_ssl) @@ -1040,18 +1040,18 @@ def job_results(ctx, @job.command('details') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to search for.', + help='The job id in Lifebit Platform to search for.', required=True) @click.option('--output-format', help=('The desired display for the output, either directly in standard output or saved as file. ' + @@ -1090,7 +1090,7 @@ def job_details(ctx, disable_ssl_verification, ssl_cert, profile): - """Retrieve job details in CloudOS.""" + """Retrieve job details in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator if ctx.get_parameter_source('output_basename') == click.core.ParameterSource.DEFAULT: @@ -1122,15 +1122,15 @@ def job_details(ctx, @job.command('list') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--output-basename', help=('Output file base name to save jobs list. ' + @@ -1225,7 +1225,7 @@ def list_jobs(ctx, disable_ssl_verification, ssl_cert, profile): - """Collect and display workspace jobs from a CloudOS workspace.""" + """Collect and display workspace jobs from a Lifebit Platform workspace.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -1358,15 +1358,15 @@ def list_jobs(ctx, @job.command('abort') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-ids', help=('One or more job ids to abort. If more than ' + @@ -1398,7 +1398,7 @@ def abort_jobs(ctx, ssl_cert, profile, force): - """Abort all specified jobs from a CloudOS workspace.""" + """Abort all specified jobs from a Lifebit Platform workspace.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -1453,18 +1453,18 @@ def abort_jobs(ctx, @job.command('cost') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to get costs for.', + help='The job id in Lifebit Platform to get costs for.', required=True) @click.option('--output-format', help='The desired file format (file extension) for the output. For json option --all-fields will be automatically set to True. Default=csv.', @@ -1492,7 +1492,7 @@ def job_cost(ctx, disable_ssl_verification, ssl_cert, profile): - """Retrieve job cost information in CloudOS.""" + """Retrieve job cost information in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator print('Retrieving cost information...') @@ -1509,18 +1509,18 @@ def job_cost(ctx, @job.command('related') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-id', - help='The job id in CloudOS to get costs for.', + help='The job id in Lifebit Platform to get costs for.', required=True) @click.option('--output-format', help='The desired output format. Default=stdout.', @@ -1544,7 +1544,7 @@ def related(ctx, disable_ssl_verification, ssl_cert, profile): - """Retrieve related job analyses in CloudOS.""" + """Retrieve related job analyses in Lifebit Platform.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) related_analyses(cloudos_url, apikey, job_id, workspace_id, output_format, verify_ssl) @@ -1552,15 +1552,15 @@ def related(ctx, @click.command() @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--job-ids', help=('One or more job ids to archive/unarchive. If more than ' + @@ -1588,7 +1588,7 @@ def archive_unarchive_jobs(ctx, disable_ssl_verification, ssl_cert, profile): - """Archive or unarchive specified jobs in a CloudOS workspace.""" + """Archive or unarchive specified jobs in a Lifebit Platform workspace.""" # Determine operation based on the command name used target_archived_state = ctx.info_name == "archive" action = "archive" if target_archived_state else "unarchive" @@ -1673,18 +1673,18 @@ def archive_unarchive_jobs(ctx, @click.command(help='Clone or resume a job with modified parameters') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--project-name', - help='The name of a CloudOS project.') + help='The name of a Lifebit Platform project.') @click.option('-p', '--parameter', multiple=True, @@ -1696,7 +1696,7 @@ def archive_unarchive_jobs(ctx, help=('A comma separated string indicating the nextflow profile/s ' + 'to use with your job.')) @click.option('--nextflow-version', - help=('Nextflow version to use when executing the workflow in CloudOS.'), + help=('Nextflow version to use when executing the workflow in Lifebit Platform.'), type=click.Choice(['22.10.8', '24.04.4', '25.04.8', '25.10.4', '22.11.1-edge', 'latest'])) @click.option('--git-branch', help=('The branch to run for the selected pipeline. ' + @@ -1721,7 +1721,7 @@ def archive_unarchive_jobs(ctx, help='Add a cost limit to your job. Default=30.0 (For no cost limit please use -1).', type=float) @click.option('--job-id', - help='The CloudOS job id of the job to be cloned.', + help='The Lifebit Platform job id of the job to be cloned.', required=True) @click.option('--accelerate-file-staging', help='Enables AWS S3 mountpoint for quicker file staging.', @@ -1872,12 +1872,12 @@ def clone_resume(ctx, # Register archive_unarchive_jobs with both command names using aliases (same pattern as clone/resume) -archive_unarchive_jobs.help = 'Archive specified jobs in a CloudOS workspace.' +archive_unarchive_jobs.help = 'Archive specified jobs in a Lifebit Platform workspace.' job.add_command(archive_unarchive_jobs, "archive") # Create a copy with different help text for unarchive archive_unarchive_jobs_copy = copy.deepcopy(archive_unarchive_jobs) -archive_unarchive_jobs_copy.help = 'Unarchive specified jobs in a CloudOS workspace.' +archive_unarchive_jobs_copy.help = 'Unarchive specified jobs in a Lifebit Platform workspace.' job.add_command(archive_unarchive_jobs_copy, "unarchive") diff --git a/cloudos_cli/jobs/job.py b/cloudos_cli/jobs/job.py index 05d77118..58b434a4 100644 --- a/cloudos_cli/jobs/job.py +++ b/cloudos_cli/jobs/job.py @@ -25,17 +25,17 @@ class Job(Cloudos): Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. cromwell_token : string Cromwell server token. workspace_id : string The specific Cloudos workspace id. project_name : string - The name of a CloudOS project. + The name of a Lifebit Platform project. workflow_name : string - The name of a CloudOS workflow or pipeline. + The name of a Lifebit Platform workflow or pipeline. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -49,9 +49,9 @@ class Job(Cloudos): repository_platform : string The name of the repository platform of the workflow. project_id : string - The CloudOS project id for a given project name. + The Lifebit Platform project id for a given project name. workflow_id : string - The CloudOS workflow id for a given workflow_name. + The Lifebit Platform workflow id for a given workflow_name. """ workspace_id: str project_name: str @@ -120,15 +120,15 @@ def fetch_cloudos_id(self, Parameters ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. resource : string The resource you want to fetch from. E.g.: projects. workspace_id : string The specific Cloudos workspace id. name : string - The name of a CloudOS resource element. + The name of a Lifebit Platform resource element. mainfile : string The name of the mainFile used by the workflow. Only used when resource == 'workflows'. Required for WDL pipelines as different mainFiles could be loaded for a single @@ -146,7 +146,7 @@ def fetch_cloudos_id(self, Returns ------- project_id : string - The CloudOS project id for a given project name. + The Lifebit Platform project id for a given project name. """ allowed_resources = ['projects', 'workflows'] if resource not in allowed_resources: @@ -358,9 +358,9 @@ def convert_nextflow_to_json(self, The branch of the pipeline to use. If not specified, the last commit of the default branch will be used. project_id : string - The CloudOS project id for a given project name. + The Lifebit Platform project id for a given project name. workflow_id : string - The CloudOS workflow id for a given workflow_name. + The Lifebit Platform workflow id for a given workflow_name. job_name : string. The name to assign to the job. resumable: bool @@ -374,15 +374,15 @@ def convert_nextflow_to_json(self, nextflow_profile: string A comma separated string with the profiles to be used. nextflow_version: string - Nextflow version to use when executing the workflow in CloudOS. + Nextflow version to use when executing the workflow in Lifebit Platform. instance_type : string Name of the instance type to be used for the job master node, for example for AWS EC2 c5.xlarge instance_disk : int The disk space of the master node instance, in GB. execution_platform : string ['aws'|'azure'|'hpc'] - The execution platform implemented in your CloudOS. + The execution platform implemented in your Lifebit Platform. hpc_id : string - The ID of your HPC in CloudOS. + The ID of your HPC in Lifebit Platform. workflow_type : str The type of workflow to run. It could be 'nextflow', 'wdl' or 'docker'. cromwell_id : str @@ -606,7 +606,7 @@ def send_job(self, command=None, cpus=1, memory=4): - """Send a job to CloudOS. + """Send a job to Lifebit Platform. Parameters ---------- @@ -650,15 +650,15 @@ def send_job(self, nextflow_profile: string A comma separated string with the profiles to be used. nextflow_version: string - Nextflow version to use when executing the workflow in CloudOS. + Nextflow version to use when executing the workflow in Lifebit Platform. instance_type : string Name of the instance type to be used for the job master node, for example for AWS EC2 c5.xlarge instance_disk : int The disk space of the master node instance, in GB. execution_platform : string ['aws'|'azure'|'hpc'] - The execution platform implemented in your CloudOS. + The execution platform implemented in your Lifebit Platform. hpc_id : string - The ID of your HPC in CloudOS. + The ID of your HPC in Lifebit Platform. workflow_type : str The type of workflow to run. It could be 'nextflow', 'wdl' or 'docker'. cromwell_id : str @@ -691,14 +691,14 @@ def send_job(self, Returns ------- j_id : string - The CloudOS job id of the job just launched. + The Lifebit Platform job id of the job just launched. """ apikey = self.apikey cloudos_url = self.cloudos_url workspace_id = self.workspace_id workflow_id = self.workflow_id project_id = self.project_id - # Prepare api request for CloudOS to run a job + # Prepare api request for Lifebit Platform to run a job headers = { "Content-type": "application/json", "apikey": apikey @@ -744,7 +744,7 @@ def send_job(self, if r.status_code >= 400: raise BadRequestException(r) j_id = json.loads(r.content)["jobId"] - print('\tJob successfully launched to CloudOS, please check the ' + + print('\tJob successfully launched to Lifebit Platform, please check the ' + f'following link: {cloudos_url}/app/advanced-analytics/analyses/{j_id}') return j_id @@ -1022,7 +1022,7 @@ def get_job_request_payload(self, job_id, verify=True): Parameters ---------- job_id : str - The CloudOS job ID to get the payload for. + The Lifebit Platform job ID to get the payload for. verify : [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1086,7 +1086,7 @@ def get_field_from_jobs_endpoint(self, job_id, field=None, verify=True): Parameters ---------- job_id : str - The CloudOS job ID to get the resume work directory for. + The Lifebit Platform job ID to get the resume work directory for. verify : [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -1133,7 +1133,7 @@ def clone_or_resume_job(self, Parameters ---------- source_job_id : str - The CloudOS job ID to clone/resume from. + The Lifebit Platform job ID to clone/resume from. queue_name : str, optional Name of the job queue to use. cost_limit : float, optional @@ -1172,7 +1172,7 @@ def clone_or_resume_job(self, Returns ------- str - The CloudOS job ID of the cloned/resumed job. + The Lifebit Platform job ID of the cloned/resumed job. """ # Get the original job payload @@ -1372,7 +1372,7 @@ def clone_or_resume_job(self, raise BadRequestException(r) j_id = json.loads(r.content)["jobId"] - print(f'\tJob successfully {mode}d and launched to CloudOS, please check the ' + + print(f'\tJob successfully {mode}d and launched to Lifebit Platform, please check the ' + f"following link: {self.cloudos_url}/app/advanced-analytics/analyses/{j_id}\n") return j_id @@ -1405,7 +1405,7 @@ def get_job_relatedness(self, workspace_id, workdir_folder_id, limit=100, verify Parameters ---------- workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. workdir_folder_id : str The working directory folder ID to filter jobs by. limit : int @@ -1510,7 +1510,7 @@ def get_parent_job(self, workspace_id, folder_id, verify=True): Parameters ---------- workspace_id : str - The CloudOS workspace ID. + The Lifebit Platform workspace ID. folder_id : str The ID of the folder whose parent job is to be retrieved. verify : [bool | str], optional @@ -1564,7 +1564,7 @@ def delete_job_results(self, job_id, mode, verify=True): Parameters ---------- job_id : str - The CloudOS job ID whose results folder is to be deleted. + The Lifebit Platform job ID whose results folder is to be deleted. mode : str The mode to use for deletion (e.g., "analysisResults" or "workDirectory"). verify : [bool|string] @@ -1636,7 +1636,7 @@ def get_branches(self, repository_identifier, owner, workflow_owner_id, owner : str The owner of the repository (e.g., 'lifebit-ai'). workflow_owner_id : str - The workflow owner ID in CloudOS. + The workflow owner ID in Lifebit Platform. strategy : str, optional The repository strategy/platform (default is 'github'). branch_name : str, optional @@ -1714,9 +1714,9 @@ def fetch_job_page(cl, workspace_id, page_num, page_size, last_n_jobs, archived, Parameters ---------- cl : Cloudos - CloudOS API client instance + Lifebit Platform API client instance workspace_id : str - The CloudOS workspace ID + The Lifebit Platform workspace ID page_num : int Page number to fetch (1-indexed) page_size : int @@ -1778,9 +1778,9 @@ def create_api_pagination_callback(cl, workspace_id, page_size, archived, verify Parameters ---------- cl : Cloudos - CloudOS API client instance + Lifebit Platform API client instance workspace_id : str - The CloudOS workspace ID + The Lifebit Platform workspace ID page_size : int Number of jobs per page archived : bool diff --git a/cloudos_cli/link/cli.py b/cloudos_cli/link/cli.py index 4946e1c9..5cd70ee6 100644 --- a/cloudos_cli/link/cli.py +++ b/cloudos_cli/link/cli.py @@ -10,24 +10,24 @@ @click.argument('path', required=False) @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--session-id', - help='The specific CloudOS interactive session id.', + help='The specific Lifebit Platform interactive session id.', required=True) @click.option('--job-id', - help='The job id in CloudOS. When provided, links results, workdir and logs by default.', + help='The job id in Lifebit Platform. When provided, links results, workdir and logs by default.', required=False) @click.option('--project-name', - help='The name of a CloudOS project. Required for File Explorer paths.', + help='The name of a Lifebit Platform project. Required for File Explorer paths.', required=False) @click.option('--results', help='Link only results folder (only works with --job-id).', @@ -94,7 +94,7 @@ def link(ctx, cloudos link s3://bucket/folder --session-id abc123 """ - print('CloudOS link functionality: link s3 folders to interactive analysis sessions.\n') + print('Lifebit Platform link functionality: link s3 folders to interactive analysis sessions.\n') verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -117,7 +117,7 @@ def link(ctx, if verbose: print('Using the following parameters:') - print(f'\tCloudOS url: {cloudos_url}') + print(f'\tLifebit Platform url: {cloudos_url}') print(f'\tWorkspace ID: {workspace_id}') print(f'\tSession ID: {session_id}') if job_id: diff --git a/cloudos_cli/link/link.py b/cloudos_cli/link/link.py index 1239a107..9708a189 100644 --- a/cloudos_cli/link/link.py +++ b/cloudos_cli/link/link.py @@ -22,9 +22,9 @@ class Link(Cloudos): Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. workspace_id : string The specific Cloudos workspace id. verify: [bool|string] diff --git a/cloudos_cli/procurement/cli.py b/cloudos_cli/procurement/cli.py index f6635632..8a82f19f 100644 --- a/cloudos_cli/procurement/cli.py +++ b/cloudos_cli/procurement/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS procurement management.""" +"""CLI commands for Lifebit Platform procurement management.""" import rich_click as click from cloudos_cli.procurement.images import Images @@ -9,26 +9,26 @@ @click.group() def procurement(): - """CloudOS procurement functionality.""" + """Lifebit Platform procurement functionality.""" print(procurement.__doc__ + '\n') @procurement.group() def images(): - """CloudOS procurement images functionality.""" + """Lifebit Platform procurement images functionality.""" @images.command(name="ls") @click.option('-k', '--apikey', - help='Your CloudOS API key.', + help='Your Lifebit Platform API key.', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) -@click.option('--procurement-id', help='The specific CloudOS procurement id.', required=True) +@click.option('--procurement-id', help='The specific Lifebit Platform procurement id.', required=True) @click.option('--page', help='The response page. Defaults to 1.', required=False, default=1) @click.option('--limit', help='The page size limit. Defaults to 10', required=False, default=10) @click.option('--disable-ssl-verification', @@ -74,16 +74,16 @@ def list_images(ctx, @images.command(name="set") @click.option('-k', '--apikey', - help='Your CloudOS API key.', + help='Your Lifebit Platform API key.', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) -@click.option('--procurement-id', help='The specific CloudOS procurement id.', required=True) +@click.option('--procurement-id', help='The specific Lifebit Platform procurement id.', required=True) @click.option('--organisation-id', help='The Organisation Id where the change is going to be applied.', required=True) -@click.option('--image-type', help='The CloudOS resource image type.', required=True, +@click.option('--image-type', help='The Lifebit Platform resource image type.', required=True, type=click.Choice([ 'RegularInteractiveSessions', 'SparkInteractiveSessions', @@ -150,16 +150,16 @@ def set_organisation_image(ctx, @images.command(name="reset") @click.option('-k', '--apikey', - help='Your CloudOS API key.', + help='Your Lifebit Platform API key.', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) -@click.option('--procurement-id', help='The specific CloudOS procurement id.', required=True) +@click.option('--procurement-id', help='The specific Lifebit Platform procurement id.', required=True) @click.option('--organisation-id', help='The Organisation Id where the change is going to be applied.', required=True) -@click.option('--image-type', help='The CloudOS resource image type.', required=True, +@click.option('--image-type', help='The Lifebit Platform resource image type.', required=True, type=click.Choice([ 'RegularInteractiveSessions', 'SparkInteractiveSessions', @@ -189,7 +189,7 @@ def reset_organisation_image(ctx, disable_ssl_verification, ssl_cert, profile): - """Reset image associated with an organisations of a given procurement to CloudOS defaults.""" + """Reset image associated with an organisations of a given procurement to Lifebit Platform defaults.""" verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) procurement_images = Images( diff --git a/cloudos_cli/procurement/images.py b/cloudos_cli/procurement/images.py index 40dedc4b..8c96e435 100644 --- a/cloudos_cli/procurement/images.py +++ b/cloudos_cli/procurement/images.py @@ -16,9 +16,9 @@ class Images(Cloudos): Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. verify: [bool|string] Whether to use SSL verification or not. Alternatively, if a string is passed, it will be interpreted as the path to @@ -42,9 +42,9 @@ def list_procurement_images(self): Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. procurement_id : string The specific Cloudos procurement id. page @@ -81,9 +81,9 @@ def set_procurement_organisation_image(self, organisation_id, image_type, provid Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. procurement_id : string The specific Cloudos procurement id. organisationId @@ -138,9 +138,9 @@ def reset_procurement_organisation_image(self, organisation_id, image_type, prov Uses ---------- apikey : string - Your CloudOS API key + Your Lifebit Platform API key cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. procurement_id : string The specific Cloudos procurement id. organisationId diff --git a/cloudos_cli/projects/cli.py b/cloudos_cli/projects/cli.py index 8584fb77..97ac4752 100644 --- a/cloudos_cli/projects/cli.py +++ b/cloudos_cli/projects/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS project management.""" +"""CLI commands for Lifebit Platform project management.""" import rich_click as click import json @@ -12,22 +12,22 @@ @click.group(cls=pass_debug_to_subcommands()) def project(): - """CloudOS project functionality.""" + """Lifebit Platform project functionality.""" print(project.__doc__ + '\n') @project.command('list') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--output-basename', help=('Output file base name to save project list. ' + @@ -75,7 +75,7 @@ def list_projects(ctx, disable_ssl_verification, ssl_cert, profile): - """Collect and display all projects from a CloudOS workspace.""" + """Collect and display all projects from a Lifebit Platform workspace.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -130,15 +130,15 @@ def list_projects(ctx, @project.command('create') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--new-project', help='The name for the new project.', @@ -164,7 +164,7 @@ def create_project(ctx, disable_ssl_verification, ssl_cert, profile): - """Create a new project in CloudOS.""" + """Create a new project in Lifebit Platform.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator # verify ssl configuration @@ -172,7 +172,7 @@ def create_project(ctx, # Print basic output if verbose: - print(f'\tUsing CloudOS URL: {cloudos_url}') + print(f'\tUsing Lifebit Platform URL: {cloudos_url}') print(f'\tUsing workspace: {workspace_id}') print(f'\tProject name: {new_project}') diff --git a/cloudos_cli/queue/cli.py b/cloudos_cli/queue/cli.py index 99f0052f..1bf9f1f6 100644 --- a/cloudos_cli/queue/cli.py +++ b/cloudos_cli/queue/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS job queue management.""" +"""CLI commands for Lifebit Platform job queue management.""" import rich_click as click import json @@ -12,22 +12,22 @@ # Create the queue group @click.group(cls=pass_debug_to_subcommands()) def queue(): - """CloudOS job queue functionality.""" + """Lifebit Platform job queue functionality.""" print(queue.__doc__ + '\n') @queue.command('list') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--output-basename', help=('Output file base name to save job queue list. ' + @@ -70,7 +70,7 @@ def list_queues(ctx, disable_ssl_verification, ssl_cert, profile): - """Collect and display all available job queues from a CloudOS workspace.""" + """Collect and display all available job queues from a Lifebit Platform workspace.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -78,7 +78,7 @@ def list_queues(ctx, j_queue = Queue(cloudos_url, apikey, None, workspace_id, verify=verify_ssl) my_queues = j_queue.get_job_queues(exclude_system_queues=exclude_system_queues) if len(my_queues) == 0: - raise ValueError('No AWS batch queues found. Please, make sure that your CloudOS supports AWS batch queues') + raise ValueError('No AWS batch queues found. Please, make sure that your Lifebit Platform supports AWS batch queues') if output_format == 'stdout': create_queue_list_table(my_queues, cloudos_url) elif output_format == 'csv': diff --git a/cloudos_cli/queue/queue.py b/cloudos_cli/queue/queue.py index ead5ddca..3ecffe51 100644 --- a/cloudos_cli/queue/queue.py +++ b/cloudos_cli/queue/queue.py @@ -18,9 +18,9 @@ class Queue(Cloudos): Parameters ---------- cloudos_url : string - The CloudOS service url. + The Lifebit Platform service url. apikey : string - Your CloudOS API key. + Your Lifebit Platform API key. cromwell_token : string Cromwell server token. workspace_id : string @@ -34,7 +34,7 @@ class Queue(Cloudos): verify: Union[bool, str] = True def get_job_queues(self, exclude_system_queues=False): - """Get all the job queues from a CloudOS workspace. + """Get all the job queues from a Lifebit Platform workspace. Parameters ---------- @@ -61,7 +61,7 @@ def get_job_queues(self, exclude_system_queues=False): return queues def get_system_job_queues(self): - """Get all the system job queues from CloudOS. + """Get all the system job queues from Lifebit Platform. Returns ------- @@ -110,10 +110,10 @@ def process_queue_list(r, all_fields=False): return df def fetch_job_queue_id(self, workflow_type, batch=True, job_queue=None): - """Fetches CloudOS ID for a given job queue. + """Fetches Lifebit Platform ID for a given job queue. This method will try to find the - corresponding CloudOS ID for the job_queue in a given workspace. If + corresponding Lifebit Platform ID for the job_queue in a given workspace. If job_queue=None, this method will select the available default queue in the workspace, or the newest "ready" job queue if no default queues are available. @@ -130,7 +130,7 @@ def fetch_job_queue_id(self, workflow_type, batch=True, job_queue=None): Returns ------- job_queue_id : str or None - The CloudOS ID for the selected job queue, or None if batch=False. + The Lifebit Platform ID for the selected job queue, or None if batch=False. """ if not batch: return None @@ -144,12 +144,12 @@ def fetch_job_queue_id(self, workflow_type, batch=True, job_queue=None): q['executor'] == workflow_type] if len(available_queues) == 0: raise Exception(f'There are no available job queues for {workflow_type} ' + - 'workflows. Consider creating one using CloudOS UI.') + 'workflows. Consider creating one using Lifebit Platform UI.') default_queue = [q for q in available_queues if q.get('isDefault', False)] if len(default_queue) > 0: default_queue_id = default_queue[0]['id'] default_queue_name = default_queue[0]['label'] - queue_as_default = 'CloudOS default' + queue_as_default = 'Lifebit Platform default' else: default_queue_id = available_queues[-1]['id'] default_queue_name = available_queues[-1]['label'] diff --git a/cloudos_cli/utils/array_job.py b/cloudos_cli/utils/array_job.py index 259fe550..39057121 100644 --- a/cloudos_cli/utils/array_job.py +++ b/cloudos_cli/utils/array_job.py @@ -102,7 +102,7 @@ def classify_pattern(s): def generate_datasets_for_project(cloudos_url, apikey, workspace_id, project_name, verify_ssl): """ - Generate datasets for a specified project in a CloudOS workspace. + Generate datasets for a specified project in a Lifebit Platform workspace. This function initializes a `Datasets` object for the given project and handles potential errors such as missing project elements or unauthorized API calls. @@ -110,7 +110,7 @@ def generate_datasets_for_project(cloudos_url, apikey, workspace_id, project_nam Parameters ---------- cloudos_url : str - The URL of the CloudOS instance. + The URL of the Lifebit Platform instance. apikey : str The API key for authentication. workspace_id : str @@ -159,14 +159,14 @@ def generate_datasets_for_project(cloudos_url, apikey, workspace_id, project_nam return ds def get_file_or_folder_id(cloudos_url, apikey, workspace_id, project_name, verify_ssl, command_dir, command_name, is_file=True): - """Retrieve the ID of a specific file or folder within a CloudOS workspace. + """Retrieve the ID of a specific file or folder within a Lifebit Platform workspace. Parameters ---------- cloudos_url : str - The base URL of the CloudOS API. + The base URL of the Lifebit Platform API. apikey : str - The API key for authenticating requests to the CloudOS API. + The API key for authenticating requests to the Lifebit Platform API. workspace_id : str The ID of the workspace containing the project. project_name : str diff --git a/cloudos_cli/utils/details.py b/cloudos_cli/utils/details.py index 53d2761d..f55c3e2d 100644 --- a/cloudos_cli/utils/details.py +++ b/cloudos_cli/utils/details.py @@ -93,14 +93,14 @@ def create_job_details(j_details_h, job_id, output_format, output_basename, para """ Creates formatted job details output from job data in multiple formats. - This function processes job details from the CloudOS API response and outputs + This function processes job details from the Lifebit Platform API response and outputs the information in a user-specified format (stdout table, JSON, or CSV). It also optionally creates configuration files with job parameters. Parameters ---------- j_details_h : dict - A dictionary containing job details from the CloudOS API. Expected keys include: + A dictionary containing job details from the Lifebit Platform API. Expected keys include: - 'jobType': The type of job executor (e.g., 'nextflowAWS', 'dockerAWS'). - 'parameters': List of parameter dictionaries for the job. - 'status': Current status of the job. @@ -130,7 +130,7 @@ def create_job_details(j_details_h, job_id, output_format, output_basename, para If True and parameters exist, creates a '.config' file with Nextflow-style parameter formatting. cloudos_url : str, optional - The base URL of the CloudOS instance. Defaults to "https://cloudos.lifebit.ai". + The base URL of the Lifebit Platform instance. Defaults to "https://cloudos.lifebit.ai". Returns ------- @@ -355,9 +355,9 @@ def _build_job_row_values(job, cloudos_url, terminal_width, columns_to_show): Parameters ---------- job : dict - Job dictionary from CloudOS API + Job dictionary from Lifebit Platform API cloudos_url : str - CloudOS service URL for generating job links + Lifebit Platform service URL for generating job links terminal_width : int Current terminal width for responsive formatting columns_to_show : list @@ -523,9 +523,9 @@ def _build_job_table(jobs, cloudos_url, terminal_width, columns_to_show, column_ Parameters ---------- jobs : list - List of job dictionaries from CloudOS API + List of job dictionaries from Lifebit Platform API cloudos_url : str - CloudOS service URL for generating job links + Lifebit Platform service URL for generating job links terminal_width : int Current terminal width for responsive formatting columns_to_show : list @@ -816,7 +816,7 @@ def create_workflow_list_table(workflows, cloudos_url="https://cloudos.lifebit.a workflows : list A list of dicts, each corresponding to a workflow. cloudos_url : str - The CloudOS URL for creating hyperlinks. + The Lifebit Platform URL for creating hyperlinks. page_size : int Number of workflows to display per page. Default is 10. """ @@ -963,7 +963,7 @@ def create_queue_list_table(queues, cloudos_url="https://cloudos.lifebit.ai"): queues : list A list of dicts, each corresponding to a job queue. cloudos_url : str - The CloudOS URL for context (currently not used for hyperlinks). + The Lifebit Platform URL for context (currently not used for hyperlinks). Returns ------- @@ -1032,7 +1032,7 @@ def create_project_list_table(projects, cloudos_url="https://cloudos.lifebit.ai" projects : list A list of dicts, each corresponding to a project. cloudos_url : str - The CloudOS URL for creating hyperlinks. + The Lifebit Platform URL for creating hyperlinks. page_size : int Number of projects to display per page. Default is 10. """ diff --git a/cloudos_cli/utils/nextflow_version.py b/cloudos_cli/utils/nextflow_version.py index 30e677d2..254beee4 100644 --- a/cloudos_cli/utils/nextflow_version.py +++ b/cloudos_cli/utils/nextflow_version.py @@ -72,7 +72,7 @@ def resolve_nextflow_version( nextflow_version = HPC_NEXTFLOW_LATEST print('You have specified Nextflow version \'latest\' for execution platform ' + f'\'{execution_platform}\'. The workflow will use the ' + - f'latest version available on CloudOS: {nextflow_version}.') + f'latest version available on Lifebit Platform: {nextflow_version}.') # Step 3: Force correct version for Platform workflows if is_module: @@ -80,14 +80,14 @@ def resolve_nextflow_version( if nextflow_version != AZURE_NEXTFLOW_LATEST: workflow_msg = f' \'{workflow_name}\'' if workflow_name else '' print(f'The selected workflow{workflow_msg} ' + - 'is a CloudOS Platform Workflow on Azure. Platform Workflows on Azure only work with ' + + 'is a Lifebit Platform Workflow on Azure. Platform Workflows on Azure only work with ' + f'Nextflow version {AZURE_NEXTFLOW_LATEST}. Switching to use {AZURE_NEXTFLOW_LATEST}') nextflow_version = AZURE_NEXTFLOW_LATEST else: if nextflow_version != PLATFORM_WORKFLOW_NEXTFLOW_VERSION: workflow_msg = f' \'{workflow_name}\'' if workflow_name else '' print(f'The selected workflow{workflow_msg} ' + - 'is a CloudOS Platform Workflow. Platform Workflows only work with ' + + 'is a Lifebit Platform Workflow. Platform Workflows only work with ' + f'Nextflow version {PLATFORM_WORKFLOW_NEXTFLOW_VERSION}. Switching to use {PLATFORM_WORKFLOW_NEXTFLOW_VERSION}') nextflow_version = PLATFORM_WORKFLOW_NEXTFLOW_VERSION diff --git a/cloudos_cli/workflows/cli.py b/cloudos_cli/workflows/cli.py index 7fefd2dc..cb31d606 100644 --- a/cloudos_cli/workflows/cli.py +++ b/cloudos_cli/workflows/cli.py @@ -1,4 +1,4 @@ -"""CLI commands for CloudOS workflow management.""" +"""CLI commands for Lifebit Platform workflow management.""" import rich_click as click import json @@ -13,22 +13,22 @@ # Create the workflow group @click.group(cls=pass_debug_to_subcommands()) def workflow(): - """CloudOS workflow functionality: list and import workflows.""" + """Lifebit Platform workflow functionality: list and import workflows.""" print(workflow.__doc__ + '\n') @workflow.command('list') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=(f'The CloudOS url you are trying to access to. Default={CLOUDOS_URL}.'), + help=(f'The Lifebit Platform url you are trying to access to. Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--output-basename', help=('Output file base name to save workflow list. ' + @@ -71,7 +71,7 @@ def list_workflows(ctx, disable_ssl_verification, ssl_cert, profile): - """Collect and display workflows from a CloudOS workspace.""" + """Collect and display workflows from a Lifebit Platform workspace.""" # apikey, cloudos_url, and workspace_id are now automatically resolved by the decorator verify_ssl = ssl_selector(disable_ssl_verification, ssl_cert) @@ -109,21 +109,21 @@ def list_workflows(ctx, @workflow.command('import') @click.option('-k', '--apikey', - help='Your CloudOS API key', + help='Your Lifebit Platform API key', required=True) @click.option('-c', '--cloudos-url', - help=('The CloudOS url you are trying to access to. ' + + help=('The Lifebit Platform url you are trying to access to. ' + f'Default={CLOUDOS_URL}.'), default=CLOUDOS_URL, required=True) @click.option('--workspace-id', - help='The specific CloudOS workspace id.', + help='The specific Lifebit Platform workspace id.', required=True) @click.option('--repository-platform', type=click.Choice(["github", "gitlab", "bitbucketServer"]), help='Name of the repository platform of the workflow. Default=github.', default='github') -@click.option("--workflow-name", help="The name that the workflow will have in CloudOS.", required=True) +@click.option("--workflow-name", help="The name that the workflow will have in Lifebit Platform.", required=True) @click.option("-w", "--workflow-url", help="URL of the workflow repository.", required=True) @click.option("-d", "--workflow-docs-link", help="URL to the documentation of the workflow.", default='') @click.option("--cost-limit", help="Cost limit for the workflow. Default: $30 USD.", default=30) diff --git a/docs/utils/delete_project_jobs.md b/docs/utils/delete_project_jobs.md index 04556ce9..900b686d 100644 --- a/docs/utils/delete_project_jobs.md +++ b/docs/utils/delete_project_jobs.md @@ -1,6 +1,6 @@ # Delete Project Jobs Script -A bash utility script for bulk deletion of job results and/or working directories for all jobs within a CloudOS project. +A bash utility script for bulk deletion of job results and/or working directories for all jobs within Lifebit Platform project. ## Overview @@ -308,7 +308,7 @@ If a deletion fails (e.g., resource already deleted, no permissions), the script **Solutions**: - Verify the project name is correct (case-sensitive) - Remove status filter to see all jobs -- Check if jobs exist using CloudOS web interface +- Check if jobs exist using the Lifebit Platform web interface ### Permission Errors diff --git a/setup.py b/setup.py index 98e5168d..d6176d56 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,7 @@ version=__version__, author="David Piñeyro", author_email="david.pineyro@lifebit.ai", - description="Python package for interacting with CloudOS", + description="Python package for interacting with the Lifebit Platform", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/lifebit-ai/cloudos-cli", diff --git a/tests/test_bash/test_jobs.py b/tests/test_bash/test_jobs.py index 4f0a2566..f8afc51d 100644 --- a/tests/test_bash/test_jobs.py +++ b/tests/test_bash/test_jobs.py @@ -103,4 +103,4 @@ def test_send_bash_job(): result_string = output.getvalue().rstrip() assert isinstance(job_json, str) - assert "Job successfully launched to CloudOS, please check the following link:" in result_string + assert "Job successfully launched to Lifebit Platform, please check the following link:" in result_string diff --git a/tests/test_bash/test_send_bash_array_job.py b/tests/test_bash/test_send_bash_array_job.py index 0de6570a..d9697877 100644 --- a/tests/test_bash/test_send_bash_array_job.py +++ b/tests/test_bash/test_send_bash_array_job.py @@ -114,4 +114,4 @@ def test_send_bash_array_job(): result_string = output.getvalue().rstrip() assert isinstance(job_json, str) - assert "Job successfully launched to CloudOS, please check the following link:" in result_string + assert "Job successfully launched to Lifebit Platform, please check the following link:" in result_string diff --git a/tests/test_bash/test_send_bash_array_job_multi_project.py b/tests/test_bash/test_send_bash_array_job_multi_project.py index f2696eb2..aafac639 100644 --- a/tests/test_bash/test_send_bash_array_job_multi_project.py +++ b/tests/test_bash/test_send_bash_array_job_multi_project.py @@ -113,4 +113,4 @@ def test_send_bash_array_job(): result_string = output.getvalue().rstrip() assert isinstance(job_json, str) - assert "Job successfully launched to CloudOS, please check the following link:" in result_string + assert "Job successfully launched to Lifebit Platform, please check the following link:" in result_string diff --git a/tests/test_cli_project_create.py b/tests/test_cli_project_create.py index 0f384daa..7cd1ac88 100644 --- a/tests/test_cli_project_create.py +++ b/tests/test_cli_project_create.py @@ -16,7 +16,7 @@ def test_project_create_command_exists(): assert result.exit_code == 0 # Check that the help text contains expected options - assert 'Create a new project in CloudOS' in result.output + assert 'Create a new project in Lifebit Platform' in result.output assert '--new-project' in result.output assert '--workspace-id' in result.output assert '--apikey' in result.output @@ -34,7 +34,7 @@ def test_project_create_command_structure(): # Command should exist and show help properly assert result.exit_code == 0 - assert 'Create a new project in CloudOS' in result.output + assert 'Create a new project in Lifebit Platform' in result.output assert '--new-project' in result.output assert 'required' in result.output # Required arguments should be marked as such @@ -50,4 +50,4 @@ def test_project_group_contains_create_command(): assert result.exit_code == 0 assert 'create' in result.output - assert 'Create a new project in CloudOS' in result.output + assert 'Create a new project in Lifebit Platform' in result.output diff --git a/tests/test_clos/test_cli_archive_command.py b/tests/test_clos/test_cli_archive_command.py index 5257f03a..50e2a114 100644 --- a/tests/test_clos/test_cli_archive_command.py +++ b/tests/test_clos/test_cli_archive_command.py @@ -12,7 +12,7 @@ def test_job_archive_command_exists(): result = runner.invoke(run_cloudos_cli, ['job', '--help']) assert result.exit_code == 0 assert 'archive' in result.output - assert 'Archive specified jobs in a CloudOS workspace.' in result.output + assert 'Archive specified jobs in a Lifebit Platform workspace.' in result.output def test_job_archive_help(): @@ -20,7 +20,7 @@ def test_job_archive_help(): runner = CliRunner() result = runner.invoke(run_cloudos_cli, ['job', 'archive', '--help']) assert result.exit_code == 0 - assert 'Archive specified jobs in a CloudOS workspace.' in result.output + assert 'Archive specified jobs in a Lifebit Platform workspace.' in result.output assert '--job-ids' in result.output assert '--workspace-id' in result.output assert '--apikey' in result.output diff --git a/tests/test_clos/test_cli_project_list.py b/tests/test_clos/test_cli_project_list.py index deab6d2f..7ed8b5c3 100644 --- a/tests/test_clos/test_cli_project_list.py +++ b/tests/test_clos/test_cli_project_list.py @@ -27,7 +27,7 @@ def test_project_list_command_exists(): result = runner.invoke(run_cloudos_cli, ['project', '--help']) assert result.exit_code == 0 assert 'list' in result.output - assert 'Collect and display all projects from a CloudOS workspace.' in result.output + assert 'Collect and display all projects from a Lifebit Platform workspace.' in result.output def test_project_list_help(): diff --git a/tests/test_clos/test_cli_unarchive_command.py b/tests/test_clos/test_cli_unarchive_command.py index 83dcc1bf..468287fe 100644 --- a/tests/test_clos/test_cli_unarchive_command.py +++ b/tests/test_clos/test_cli_unarchive_command.py @@ -12,7 +12,7 @@ def test_job_unarchive_command_exists(): result = runner.invoke(run_cloudos_cli, ['job', '--help']) assert result.exit_code == 0 assert 'unarchive' in result.output - assert 'Unarchive specified jobs in a CloudOS workspace.' in result.output + assert 'Unarchive specified jobs in a Lifebit Platform workspace.' in result.output def test_job_unarchive_help(): @@ -20,7 +20,7 @@ def test_job_unarchive_help(): runner = CliRunner() result = runner.invoke(run_cloudos_cli, ['job', 'unarchive', '--help']) assert result.exit_code == 0 - assert 'Unarchive specified jobs in a CloudOS workspace.' in result.output + assert 'Unarchive specified jobs in a Lifebit Platform workspace.' in result.output assert '--job-ids' in result.output assert '--workspace-id' in result.output assert '--apikey' in result.output diff --git a/tests/test_clos/test_cli_workflow_list.py b/tests/test_clos/test_cli_workflow_list.py index 76bb8a77..76f4e821 100644 --- a/tests/test_clos/test_cli_workflow_list.py +++ b/tests/test_clos/test_cli_workflow_list.py @@ -27,7 +27,7 @@ def test_workflow_list_command_exists(): result = runner.invoke(run_cloudos_cli, ['workflow', '--help']) assert result.exit_code == 0 assert 'list' in result.output - assert 'Collect and display workflows from a CloudOS workspace' in result.output + assert 'Collect and display workflows from a Lifebit Platform workspace' in result.output def test_workflow_list_help(): diff --git a/tests/test_interactive_session/test_create_session.py b/tests/test_interactive_session/test_create_session.py index ac3bf42f..470c066f 100644 --- a/tests/test_interactive_session/test_create_session.py +++ b/tests/test_interactive_session/test_create_session.py @@ -390,7 +390,7 @@ def test_parse_data_file_format(self): """Test parsing data file format.""" from cloudos_cli.interactive_session.interactive_session import parse_data_file - # Test CloudOS dataset with / separator: project_name/dataset_path + # Test Lifebit Platform dataset with / separator: project_name/dataset_path result = parse_data_file('leila-test/Data/mydata.csv') assert isinstance(result, dict) assert result['type'] == 'cloudos' @@ -399,13 +399,13 @@ def test_parse_data_file_format(self): assert result['project_name'] == 'leila-test' assert result['dataset_path'] == 'Data/mydata.csv' - # Test CloudOS dataset with > separator + # Test Lifebit Platform dataset with > separator result2 = parse_data_file('leila-test > Data/mydata.csv') assert result2['type'] == 'cloudos' assert result2['project_name'] == 'leila-test' assert result2['dataset_path'] == 'Data/mydata.csv' - # Test CloudOS dataset with nested paths + # Test Lifebit Platform dataset with nested paths result3 = parse_data_file('my-project/folder/subfolder/file.txt') assert result3['type'] == 'cloudos' assert result3['project_name'] == 'my-project' diff --git a/tests/test_jobs/test_clone_job.py b/tests/test_jobs/test_clone_job.py index dc6d5ea8..cb9886c1 100644 --- a/tests/test_jobs/test_clone_job.py +++ b/tests/test_jobs/test_clone_job.py @@ -9,7 +9,7 @@ - Error handling for API failures - Direct testing of get_job_request_payload method -The tests use mocked API responses to simulate CloudOS server interactions without +The tests use mocked API responses to simulate Lifebit Platform server interactions without requiring actual server connections. """ import json diff --git a/tests/test_jobs/test_resume_job.py b/tests/test_jobs/test_resume_job.py index 80759ed6..2b397c5c 100644 --- a/tests/test_jobs/test_resume_job.py +++ b/tests/test_jobs/test_resume_job.py @@ -9,7 +9,7 @@ - Error handling for API failures - Direct testing of get_field_from_jobs_endpoint method -The tests use mocked API responses to simulate CloudOS server interactions without +The tests use mocked API responses to simulate Lifebit Platform server interactions without requiring actual server connections. The main difference from clone tests is that resume calls the additional get_field_from_jobs_endpoint() method which hits the 'api/v1/jobs' endpoint. """ diff --git a/tests/test_jobs/test_send_job.py b/tests/test_jobs/test_send_job.py index dd6e1ca3..33f95e00 100644 --- a/tests/test_jobs/test_send_job.py +++ b/tests/test_jobs/test_send_job.py @@ -88,4 +88,4 @@ def test_send_job(): result_string = output.getvalue().rstrip() assert isinstance(job_json, str) - assert "Job successfully launched to CloudOS, please check the following link:" in result_string + assert "Job successfully launched to Lifebit Platform, please check the following link:" in result_string diff --git a/tests/test_queue/test_cli_queue_list.py b/tests/test_queue/test_cli_queue_list.py index 64bd0461..f0314421 100644 --- a/tests/test_queue/test_cli_queue_list.py +++ b/tests/test_queue/test_cli_queue_list.py @@ -31,7 +31,8 @@ def test_queue_list_command_exists(): result = runner.invoke(run_cloudos_cli, ['queue', '--help']) assert result.exit_code == 0 assert 'list' in result.output - assert 'Collect and display all available job queues from a CloudOS workspace' in result.output + assert 'Collect and display all available job queues' in result.output + assert 'Lifebit Platform' in result.output def test_queue_list_help(): diff --git a/utils/delete_project_jobs.sh b/utils/delete_project_jobs.sh index 3b3355ca..e8c7c5f4 100755 --- a/utils/delete_project_jobs.sh +++ b/utils/delete_project_jobs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Script to delete results and/or working directories for all jobs in a CloudOS project +# Script to delete results and/or working directories for all jobs in a Lifebit Platform project # Usage: ./delete_project_jobs.sh --profile --project-name [--results] [--workdir] [--both] set -e