cloudos-cli 2.87.1__tar.gz → 2.88.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/PKG-INFO +26 -2
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/README.md +25 -1
- cloudos_cli-2.88.1/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/constants.py +6 -2
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/interactive_session/cli.py +4 -2
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/interactive_session/interactive_session.py +6 -1
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/jobs/cli.py +18 -45
- cloudos_cli-2.88.1/cloudos_cli/utils/nextflow_version.py +128 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/PKG-INFO +26 -2
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/SOURCES.txt +2 -0
- cloudos_cli-2.88.1/tests/test_nextflow_version.py +177 -0
- cloudos_cli-2.87.1/cloudos_cli/_version.py +0 -1
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/LICENSE +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/__main__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/bash/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/bash/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/clos.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/configure/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/configure/configure.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/cost/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/cost/cost.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/cromwell/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/cromwell/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/datasets/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/datasets/datasets.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/interactive_session/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/jobs/job.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/link/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/link/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/link/link.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/logging/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/logging/logger.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/procurement/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/procurement/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/procurement/images.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/projects/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/projects/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/queue/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/related_analyses/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/related_analyses/related_analyses.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/array_job.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/cli_helpers.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/last_wf.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/workflows/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/workflows/cli.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/setup.cfg +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/setup.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/functions_for_pytest.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_cli_project_create.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_cost/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_cost/test_job_cost.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_error_messages.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_interactive_session/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_interactive_session/test_create_session.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_interactive_session/test_list_sessions.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_logging/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_logging/test_logger.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_related_analyses/__init__.py +0 -0
- {cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_related_analyses/test_related_analyses.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudos_cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.88.1
|
|
4
4
|
Summary: Python package for interacting with CloudOS
|
|
5
5
|
Home-page: https://github.com/lifebit-ai/cloudos-cli
|
|
6
6
|
Author: David Piñeyro
|
|
@@ -687,6 +687,29 @@ When there are duplicate `--workflow-name` in the platform, you can add the `--l
|
|
|
687
687
|
|
|
688
688
|
_For example, the pipeline `lifebit-process` was imported on May 23 2025 and again on May 30 2025; with the `--last` flag, it will use the import of May 30, 2025._
|
|
689
689
|
|
|
690
|
+
**Nextflow Version Support**
|
|
691
|
+
|
|
692
|
+
CloudOS CLI supports multiple Nextflow versions, with intelligent defaults based on your workflow type and execution platform.
|
|
693
|
+
|
|
694
|
+
**Default Version Behavior:**
|
|
695
|
+
|
|
696
|
+
The default Nextflow version is automatically selected based on your workflow type and execution platform:
|
|
697
|
+
|
|
698
|
+
- **Azure Platform**: Always uses `22.11.1-edge` regardless of workflow type
|
|
699
|
+
- **Platform Workflows** (AWS/HPC): Uses `22.10.8` (Lifebit provided workflows and modules)
|
|
700
|
+
- **User-Imported Workflows** (AWS/HPC): AWS uses `24.04.4`; HPC uses `22.10.8`
|
|
701
|
+
|
|
702
|
+
**Specifying a Custom Version:**
|
|
703
|
+
|
|
704
|
+
You can override the default by using the `--nextflow-version` parameter:
|
|
705
|
+
|
|
706
|
+
```bash
|
|
707
|
+
cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos_cli/examples/rnatoy.config --nextflow-version 25.04.8 --resumable
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
> [!NOTE]
|
|
711
|
+
> **Azure Platform Behavior**: If you specify a Nextflow version not supported by Azure (anything other than 22.11.1-edge), CloudOS CLI will display a warning and automatically use 22.11.1-edge instead. Your job will proceed without error.
|
|
712
|
+
|
|
690
713
|
**AWS Executor Support**
|
|
691
714
|
|
|
692
715
|
CloudOS supports [AWS batch](https://www.nextflow.io/docs/latest/executor.html?highlight=executors#aws-batch) executor by default.
|
|
@@ -705,6 +728,7 @@ cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos
|
|
|
705
728
|
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:
|
|
706
729
|
|
|
707
730
|
- When sending jobs to CloudOS using `cloudos job run` command, please use the option `--execution-platform azure`
|
|
731
|
+
- 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
|
|
708
732
|
- Due to the lack of AWS batch queues in Azure, `cloudos queue list` command is not working
|
|
709
733
|
|
|
710
734
|
Other than that, `cloudos-cli` will work very similarly. For instance, this is a typical send job command:
|
|
@@ -2154,7 +2178,7 @@ cloudos interactive-session create \
|
|
|
2154
2178
|
- `--spot`: Use spot instances (AWS only, cost-saving)
|
|
2155
2179
|
- `--shared`: Make session accessible to workspace members
|
|
2156
2180
|
- `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
|
|
2157
|
-
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
|
|
2181
|
+
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`)
|
|
2158
2182
|
|
|
2159
2183
|
**Data & Storage Management:**
|
|
2160
2184
|
- `--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.
|
|
@@ -652,6 +652,29 @@ When there are duplicate `--workflow-name` in the platform, you can add the `--l
|
|
|
652
652
|
|
|
653
653
|
_For example, the pipeline `lifebit-process` was imported on May 23 2025 and again on May 30 2025; with the `--last` flag, it will use the import of May 30, 2025._
|
|
654
654
|
|
|
655
|
+
**Nextflow Version Support**
|
|
656
|
+
|
|
657
|
+
CloudOS CLI supports multiple Nextflow versions, with intelligent defaults based on your workflow type and execution platform.
|
|
658
|
+
|
|
659
|
+
**Default Version Behavior:**
|
|
660
|
+
|
|
661
|
+
The default Nextflow version is automatically selected based on your workflow type and execution platform:
|
|
662
|
+
|
|
663
|
+
- **Azure Platform**: Always uses `22.11.1-edge` regardless of workflow type
|
|
664
|
+
- **Platform Workflows** (AWS/HPC): Uses `22.10.8` (Lifebit provided workflows and modules)
|
|
665
|
+
- **User-Imported Workflows** (AWS/HPC): AWS uses `24.04.4`; HPC uses `22.10.8`
|
|
666
|
+
|
|
667
|
+
**Specifying a Custom Version:**
|
|
668
|
+
|
|
669
|
+
You can override the default by using the `--nextflow-version` parameter:
|
|
670
|
+
|
|
671
|
+
```bash
|
|
672
|
+
cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos_cli/examples/rnatoy.config --nextflow-version 25.04.8 --resumable
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
> [!NOTE]
|
|
676
|
+
> **Azure Platform Behavior**: If you specify a Nextflow version not supported by Azure (anything other than 22.11.1-edge), CloudOS CLI will display a warning and automatically use 22.11.1-edge instead. Your job will proceed without error.
|
|
677
|
+
|
|
655
678
|
**AWS Executor Support**
|
|
656
679
|
|
|
657
680
|
CloudOS supports [AWS batch](https://www.nextflow.io/docs/latest/executor.html?highlight=executors#aws-batch) executor by default.
|
|
@@ -670,6 +693,7 @@ cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos
|
|
|
670
693
|
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:
|
|
671
694
|
|
|
672
695
|
- When sending jobs to CloudOS using `cloudos job run` command, please use the option `--execution-platform azure`
|
|
696
|
+
- 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
|
|
673
697
|
- Due to the lack of AWS batch queues in Azure, `cloudos queue list` command is not working
|
|
674
698
|
|
|
675
699
|
Other than that, `cloudos-cli` will work very similarly. For instance, this is a typical send job command:
|
|
@@ -2119,7 +2143,7 @@ cloudos interactive-session create \
|
|
|
2119
2143
|
- `--spot`: Use spot instances (AWS only, cost-saving)
|
|
2120
2144
|
- `--shared`: Make session accessible to workspace members
|
|
2121
2145
|
- `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
|
|
2122
|
-
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
|
|
2146
|
+
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`)
|
|
2123
2147
|
|
|
2124
2148
|
**Data & Storage Management:**
|
|
2125
2149
|
- `--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.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '2.88.1'
|
|
@@ -6,13 +6,17 @@ JOB_FAILED = 'failed'
|
|
|
6
6
|
JOB_ABORTED = 'aborted'
|
|
7
7
|
|
|
8
8
|
# Nextflow version constants
|
|
9
|
-
AWS_NEXTFLOW_VERSIONS = ['22.10.8', '24.04.4']
|
|
9
|
+
AWS_NEXTFLOW_VERSIONS = ['22.10.8', '24.04.4', '25.04.8', '25.10.4']
|
|
10
10
|
AZURE_NEXTFLOW_VERSIONS = ['22.11.1-edge']
|
|
11
11
|
HPC_NEXTFLOW_VERSIONS = ['22.10.8']
|
|
12
|
-
AWS_NEXTFLOW_LATEST = '
|
|
12
|
+
AWS_NEXTFLOW_LATEST = '25.10.4'
|
|
13
13
|
AZURE_NEXTFLOW_LATEST = '22.11.1-edge'
|
|
14
14
|
HPC_NEXTFLOW_LATEST = '22.10.8'
|
|
15
15
|
|
|
16
|
+
# Nextflow version defaults by workflow type
|
|
17
|
+
PLATFORM_WORKFLOW_NEXTFLOW_VERSION = '22.10.8' # For Lifebit Platform workflows (modules)
|
|
18
|
+
USER_WORKFLOW_NEXTFLOW_VERSION = '24.04.4' # For user-imported workflows
|
|
19
|
+
|
|
16
20
|
# Job abort states
|
|
17
21
|
ABORT_JOB_STATES = ['running', 'initializing']
|
|
18
22
|
|
|
@@ -276,7 +276,8 @@ def list_sessions(ctx,
|
|
|
276
276
|
help='Cost limit in USD. Default=-1 (unlimited).',
|
|
277
277
|
default=-1)
|
|
278
278
|
@click.option('--shutdown-in',
|
|
279
|
-
help='Auto-shutdown duration (e.g., 8h, 2d).'
|
|
279
|
+
help='Auto-shutdown duration (e.g., 8h, 2d). Default=12h.',
|
|
280
|
+
default='12h')
|
|
280
281
|
@click.option('--mount',
|
|
281
282
|
multiple=True,
|
|
282
283
|
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.')
|
|
@@ -561,7 +562,8 @@ def create_session(ctx,
|
|
|
561
562
|
spark_core=spark_core,
|
|
562
563
|
spark_workers=spark_workers,
|
|
563
564
|
data_files=parsed_data_files,
|
|
564
|
-
s3_mounts=parsed_s3_mounts
|
|
565
|
+
s3_mounts=parsed_s3_mounts,
|
|
566
|
+
shutdown_in=shutdown_in
|
|
565
567
|
)
|
|
566
568
|
# Output session link in greppable format for CI/automation
|
|
567
569
|
click.echo(f"Session link: {cloudos_url}/app/data-science/interactive-analysis/view/{session_id}")
|
{cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/cloudos_cli/interactive_session/interactive_session.py
RENAMED
|
@@ -1162,7 +1162,7 @@ def build_resume_payload(
|
|
|
1162
1162
|
def format_session_creation_table(session_data, instance_type=None, storage_size=None,
|
|
1163
1163
|
backend_type=None, r_version=None,
|
|
1164
1164
|
spark_master=None, spark_core=None, spark_workers=None,
|
|
1165
|
-
data_files=None, s3_mounts=None):
|
|
1165
|
+
data_files=None, s3_mounts=None, shutdown_in=None):
|
|
1166
1166
|
"""Display session creation result in table format.
|
|
1167
1167
|
|
|
1168
1168
|
Parameters
|
|
@@ -1187,6 +1187,8 @@ def format_session_creation_table(session_data, instance_type=None, storage_size
|
|
|
1187
1187
|
List of parsed data file objects to display
|
|
1188
1188
|
s3_mounts : list, optional
|
|
1189
1189
|
List of parsed S3 mount objects to display
|
|
1190
|
+
shutdown_in : str, optional
|
|
1191
|
+
Shutdown duration value (e.g., '12h', '2d') that was requested
|
|
1190
1192
|
|
|
1191
1193
|
Returns
|
|
1192
1194
|
-------
|
|
@@ -1214,6 +1216,9 @@ def format_session_creation_table(session_data, instance_type=None, storage_size
|
|
|
1214
1216
|
session_data.get('interactiveSessionConfiguration', {}).get('storageSizeInGb')
|
|
1215
1217
|
storage_display = f"{response_storage} GB" if response_storage else (f"{storage_size} GB" if storage_size else "N/A")
|
|
1216
1218
|
table.add_row("Storage", storage_display)
|
|
1219
|
+
# Display shutdown duration
|
|
1220
|
+
if shutdown_in:
|
|
1221
|
+
table.add_row("Auto-Shutdown", shutdown_in)
|
|
1217
1222
|
# Add backend-specific information
|
|
1218
1223
|
if backend_type == 'rstudio' and r_version:
|
|
1219
1224
|
table.add_row("R Version", r_version)
|
|
@@ -11,6 +11,7 @@ from cloudos_cli.clos import Cloudos
|
|
|
11
11
|
from cloudos_cli.utils.errors import BadRequestException
|
|
12
12
|
from cloudos_cli.utils.resources import ssl_selector
|
|
13
13
|
from cloudos_cli.utils.details import create_job_details, create_job_list_table
|
|
14
|
+
from cloudos_cli.utils.nextflow_version import resolve_nextflow_version
|
|
14
15
|
from cloudos_cli.cost.cost import CostViewer
|
|
15
16
|
from cloudos_cli.related_analyses.related_analyses import related_analyses
|
|
16
17
|
from cloudos_cli.configure.configure import with_profile_config, CLOUDOS_URL
|
|
@@ -18,12 +19,6 @@ from cloudos_cli.link import Link
|
|
|
18
19
|
from cloudos_cli.constants import (
|
|
19
20
|
JOB_COMPLETED,
|
|
20
21
|
REQUEST_INTERVAL_CROMWELL,
|
|
21
|
-
AWS_NEXTFLOW_VERSIONS,
|
|
22
|
-
AZURE_NEXTFLOW_VERSIONS,
|
|
23
|
-
HPC_NEXTFLOW_VERSIONS,
|
|
24
|
-
AWS_NEXTFLOW_LATEST,
|
|
25
|
-
AZURE_NEXTFLOW_LATEST,
|
|
26
|
-
HPC_NEXTFLOW_LATEST,
|
|
27
22
|
ABORT_JOB_STATES
|
|
28
23
|
)
|
|
29
24
|
import json
|
|
@@ -88,9 +83,9 @@ def job():
|
|
|
88
83
|
'to use with your job.'))
|
|
89
84
|
@click.option('--nextflow-version',
|
|
90
85
|
help=('Nextflow version to use when executing the workflow in CloudOS. ' +
|
|
91
|
-
'
|
|
92
|
-
type=click.Choice(['22.10.8', '24.04.4', '22.11.1-edge', 'latest']),
|
|
93
|
-
default=
|
|
86
|
+
'Defaults to 22.10.8 for Platform Workflows or 24.04.4 for user-imported Workflows.'),
|
|
87
|
+
type=click.Choice(['22.10.8', '24.04.4', '25.04.8', '25.10.4', '22.11.1-edge', 'latest']),
|
|
88
|
+
default=None)
|
|
94
89
|
@click.option('--git-commit',
|
|
95
90
|
help=('The git commit hash to run for ' +
|
|
96
91
|
'the selected pipeline. ' +
|
|
@@ -298,6 +293,16 @@ def run(ctx,
|
|
|
298
293
|
cl = Cloudos(cloudos_url, apikey, cromwell_token)
|
|
299
294
|
workflow_type = cl.detect_workflow(workflow_name, workspace_id, verify_ssl, last)
|
|
300
295
|
is_module = cl.is_module(workflow_name, workspace_id, verify_ssl, last)
|
|
296
|
+
|
|
297
|
+
# Resolve and validate Nextflow version
|
|
298
|
+
nextflow_version = resolve_nextflow_version(
|
|
299
|
+
nextflow_version=nextflow_version,
|
|
300
|
+
execution_platform=execution_platform,
|
|
301
|
+
is_module=is_module,
|
|
302
|
+
workflow_name=workflow_name,
|
|
303
|
+
verbose=verbose
|
|
304
|
+
)
|
|
305
|
+
|
|
301
306
|
if execution_platform == 'hpc' and workflow_type == 'wdl':
|
|
302
307
|
raise ValueError(f'The workflow {workflow_name} is a WDL workflow. ' +
|
|
303
308
|
'WDL is not supported on HPC execution platform.')
|
|
@@ -348,13 +353,8 @@ def run(ctx,
|
|
|
348
353
|
f'Platform Workflow "{workflow_name}". Platform Workflows ' +
|
|
349
354
|
'use their own predetermined queues.')
|
|
350
355
|
job_queue_id = None
|
|
351
|
-
if nextflow_version != '22.10.8':
|
|
352
|
-
print(f'The selected worflow \'{workflow_name}\' ' +
|
|
353
|
-
'is a CloudOS module. CloudOS modules only work with ' +
|
|
354
|
-
'Nextflow version 22.10.8. Switching to use 22.10.8')
|
|
355
|
-
nextflow_version = '22.10.8'
|
|
356
356
|
if execution_platform == 'azure':
|
|
357
|
-
print(f'The selected
|
|
357
|
+
print(f'The selected workflow \'{workflow_name}\' ' +
|
|
358
358
|
'is a CloudOS module. For these workflows, worker nodes ' +
|
|
359
359
|
'are managed internally. For this reason, the options ' +
|
|
360
360
|
'azure-worker-instance-type, azure-worker-instance-disk and ' +
|
|
@@ -382,33 +382,7 @@ def run(ctx,
|
|
|
382
382
|
docker_login = True
|
|
383
383
|
else:
|
|
384
384
|
docker_login = False
|
|
385
|
-
|
|
386
|
-
if execution_platform == 'aws':
|
|
387
|
-
nextflow_version = AWS_NEXTFLOW_LATEST
|
|
388
|
-
elif execution_platform == 'azure':
|
|
389
|
-
nextflow_version = AZURE_NEXTFLOW_LATEST
|
|
390
|
-
else:
|
|
391
|
-
nextflow_version = HPC_NEXTFLOW_LATEST
|
|
392
|
-
print('You have specified Nextflow version \'latest\' for execution platform ' +
|
|
393
|
-
f'\'{execution_platform}\'. The workflow will use the ' +
|
|
394
|
-
f'latest version available on CloudOS: {nextflow_version}.')
|
|
395
|
-
if execution_platform == 'aws':
|
|
396
|
-
if nextflow_version not in AWS_NEXTFLOW_VERSIONS:
|
|
397
|
-
print('For execution platform \'aws\', the workflow will use the default ' +
|
|
398
|
-
'\'22.10.8\' version on CloudOS.')
|
|
399
|
-
nextflow_version = '22.10.8'
|
|
400
|
-
if execution_platform == 'azure':
|
|
401
|
-
if nextflow_version not in AZURE_NEXTFLOW_VERSIONS:
|
|
402
|
-
print('For execution platform \'azure\', the workflow will use the \'22.11.1-edge\' ' +
|
|
403
|
-
'version on CloudOS.')
|
|
404
|
-
nextflow_version = '22.11.1-edge'
|
|
405
|
-
if execution_platform == 'hpc':
|
|
406
|
-
if nextflow_version not in HPC_NEXTFLOW_VERSIONS:
|
|
407
|
-
print('For execution platform \'hpc\', the workflow will use the \'22.10.8\' version on CloudOS.')
|
|
408
|
-
nextflow_version = '22.10.8'
|
|
409
|
-
if nextflow_version != '22.10.8' and nextflow_version != '22.11.1-edge':
|
|
410
|
-
click.secho(f'You have specified Nextflow version {nextflow_version}. This version requires the pipeline ' +
|
|
411
|
-
'to be written in DSL2 and does not support DSL1.', fg='yellow', bold=True)
|
|
385
|
+
|
|
412
386
|
print('\nExecuting run...')
|
|
413
387
|
if workflow_type == 'nextflow':
|
|
414
388
|
print(f'\tNextflow version: {nextflow_version}')
|
|
@@ -1737,9 +1711,8 @@ def archive_unarchive_jobs(ctx,
|
|
|
1737
1711
|
help=('A comma separated string indicating the nextflow profile/s ' +
|
|
1738
1712
|
'to use with your job.'))
|
|
1739
1713
|
@click.option('--nextflow-version',
|
|
1740
|
-
help=('Nextflow version to use when executing the workflow in CloudOS.
|
|
1741
|
-
|
|
1742
|
-
type=click.Choice(['22.10.8', '24.04.4', '22.11.1-edge', 'latest']))
|
|
1714
|
+
help=('Nextflow version to use when executing the workflow in CloudOS.'),
|
|
1715
|
+
type=click.Choice(['22.10.8', '24.04.4', '25.04.8', '25.10.4', '22.11.1-edge', 'latest']))
|
|
1743
1716
|
@click.option('--git-branch',
|
|
1744
1717
|
help=('The branch to run for the selected pipeline. ' +
|
|
1745
1718
|
'If not specified it defaults to the last commit ' +
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""Nextflow version resolution and validation utilities."""
|
|
2
|
+
|
|
3
|
+
import rich_click as click
|
|
4
|
+
from cloudos_cli.constants import (
|
|
5
|
+
AWS_NEXTFLOW_VERSIONS,
|
|
6
|
+
AZURE_NEXTFLOW_VERSIONS,
|
|
7
|
+
HPC_NEXTFLOW_VERSIONS,
|
|
8
|
+
AWS_NEXTFLOW_LATEST,
|
|
9
|
+
AZURE_NEXTFLOW_LATEST,
|
|
10
|
+
HPC_NEXTFLOW_LATEST,
|
|
11
|
+
PLATFORM_WORKFLOW_NEXTFLOW_VERSION,
|
|
12
|
+
USER_WORKFLOW_NEXTFLOW_VERSION
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def resolve_nextflow_version(
|
|
17
|
+
nextflow_version,
|
|
18
|
+
execution_platform,
|
|
19
|
+
is_module,
|
|
20
|
+
workflow_name=None,
|
|
21
|
+
verbose=False
|
|
22
|
+
):
|
|
23
|
+
"""
|
|
24
|
+
Resolve and validate the Nextflow version for a job submission.
|
|
25
|
+
|
|
26
|
+
This function handles:
|
|
27
|
+
- Dynamic defaults based on execution platform and workflow type
|
|
28
|
+
- 'latest' version resolution
|
|
29
|
+
- Platform workflow version forcing
|
|
30
|
+
- Platform-specific version validation with appropriate warnings/errors
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
nextflow_version (str or None): The requested Nextflow version, or None for default
|
|
34
|
+
execution_platform (str): The execution platform ('aws', 'azure', or 'hpc')
|
|
35
|
+
is_module (bool): Whether the workflow is a Platform workflow (module)
|
|
36
|
+
workflow_name (str, optional): The workflow name for informative messages
|
|
37
|
+
verbose (bool, optional): Whether to print verbose messages
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
str: The resolved and validated Nextflow version
|
|
41
|
+
|
|
42
|
+
Raises:
|
|
43
|
+
click.BadParameter: If an unsupported version is specified for AWS or HPC platforms
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
# Step 1: Set dynamic default if no version specified
|
|
47
|
+
if nextflow_version is None:
|
|
48
|
+
if execution_platform == 'azure':
|
|
49
|
+
nextflow_version = AZURE_NEXTFLOW_LATEST # Azure has fixed Nextflow version
|
|
50
|
+
if verbose:
|
|
51
|
+
print(f'\t...Using default Nextflow version {AZURE_NEXTFLOW_LATEST} for Azure')
|
|
52
|
+
elif execution_platform == 'hpc':
|
|
53
|
+
nextflow_version = HPC_NEXTFLOW_LATEST # HPC has fixed Nextflow version
|
|
54
|
+
if verbose:
|
|
55
|
+
print(f'\t...Using default Nextflow version {HPC_NEXTFLOW_LATEST} for HPC')
|
|
56
|
+
elif is_module:
|
|
57
|
+
nextflow_version = PLATFORM_WORKFLOW_NEXTFLOW_VERSION # Lifebit Platform workflows (AWS)
|
|
58
|
+
if verbose:
|
|
59
|
+
print(f'\t...Using default Nextflow version {PLATFORM_WORKFLOW_NEXTFLOW_VERSION} for Platform Workflow')
|
|
60
|
+
else:
|
|
61
|
+
nextflow_version = USER_WORKFLOW_NEXTFLOW_VERSION # User-imported workflows (AWS only)
|
|
62
|
+
if verbose:
|
|
63
|
+
print(f'\t...Using default Nextflow version {USER_WORKFLOW_NEXTFLOW_VERSION} for user-imported workflow')
|
|
64
|
+
|
|
65
|
+
# Step 2: Resolve 'latest' to actual version
|
|
66
|
+
if nextflow_version == 'latest':
|
|
67
|
+
if execution_platform == 'aws':
|
|
68
|
+
nextflow_version = AWS_NEXTFLOW_LATEST
|
|
69
|
+
elif execution_platform == 'azure':
|
|
70
|
+
nextflow_version = AZURE_NEXTFLOW_LATEST
|
|
71
|
+
else:
|
|
72
|
+
nextflow_version = HPC_NEXTFLOW_LATEST
|
|
73
|
+
print('You have specified Nextflow version \'latest\' for execution platform ' +
|
|
74
|
+
f'\'{execution_platform}\'. The workflow will use the ' +
|
|
75
|
+
f'latest version available on CloudOS: {nextflow_version}.')
|
|
76
|
+
|
|
77
|
+
# Step 3: Force correct version for Platform workflows
|
|
78
|
+
if is_module:
|
|
79
|
+
if execution_platform == 'azure':
|
|
80
|
+
if nextflow_version != AZURE_NEXTFLOW_LATEST:
|
|
81
|
+
workflow_msg = f' \'{workflow_name}\'' if workflow_name else ''
|
|
82
|
+
print(f'The selected workflow{workflow_msg} ' +
|
|
83
|
+
'is a CloudOS Platform Workflow on Azure. Platform Workflows on Azure only work with ' +
|
|
84
|
+
f'Nextflow version {AZURE_NEXTFLOW_LATEST}. Switching to use {AZURE_NEXTFLOW_LATEST}')
|
|
85
|
+
nextflow_version = AZURE_NEXTFLOW_LATEST
|
|
86
|
+
else:
|
|
87
|
+
if nextflow_version != PLATFORM_WORKFLOW_NEXTFLOW_VERSION:
|
|
88
|
+
workflow_msg = f' \'{workflow_name}\'' if workflow_name else ''
|
|
89
|
+
print(f'The selected workflow{workflow_msg} ' +
|
|
90
|
+
'is a CloudOS Platform Workflow. Platform Workflows only work with ' +
|
|
91
|
+
f'Nextflow version {PLATFORM_WORKFLOW_NEXTFLOW_VERSION}. Switching to use {PLATFORM_WORKFLOW_NEXTFLOW_VERSION}')
|
|
92
|
+
nextflow_version = PLATFORM_WORKFLOW_NEXTFLOW_VERSION
|
|
93
|
+
|
|
94
|
+
# Step 4: Validate version for execution platform
|
|
95
|
+
if execution_platform == 'aws':
|
|
96
|
+
if nextflow_version not in AWS_NEXTFLOW_VERSIONS:
|
|
97
|
+
available_versions = ', '.join(AWS_NEXTFLOW_VERSIONS)
|
|
98
|
+
raise click.BadParameter(
|
|
99
|
+
f'Unsupported Nextflow version \'{nextflow_version}\' for AWS execution platform. '
|
|
100
|
+
f'Supported versions are: {available_versions}.'
|
|
101
|
+
)
|
|
102
|
+
elif execution_platform == 'azure':
|
|
103
|
+
if nextflow_version not in AZURE_NEXTFLOW_VERSIONS:
|
|
104
|
+
available_versions = ', '.join(AZURE_NEXTFLOW_VERSIONS)
|
|
105
|
+
click.secho(
|
|
106
|
+
f'Warning: Nextflow version \'{nextflow_version}\' is not supported for Azure execution platform. '
|
|
107
|
+
f'Azure only supports: {available_versions}. Switching to use {AZURE_NEXTFLOW_LATEST}.',
|
|
108
|
+
fg='yellow', bold=True
|
|
109
|
+
)
|
|
110
|
+
nextflow_version = AZURE_NEXTFLOW_LATEST
|
|
111
|
+
elif execution_platform == 'hpc':
|
|
112
|
+
if nextflow_version not in HPC_NEXTFLOW_VERSIONS:
|
|
113
|
+
available_versions = ', '.join(HPC_NEXTFLOW_VERSIONS)
|
|
114
|
+
raise click.BadParameter(
|
|
115
|
+
f'Unsupported Nextflow version \'{nextflow_version}\' for HPC execution platform. '
|
|
116
|
+
f'HPC only supports: {available_versions}.'
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
# Step 5: Warn about DSL2 requirement for newer versions
|
|
120
|
+
legacy_versions = [PLATFORM_WORKFLOW_NEXTFLOW_VERSION, AZURE_NEXTFLOW_LATEST]
|
|
121
|
+
if nextflow_version not in legacy_versions:
|
|
122
|
+
click.secho(
|
|
123
|
+
f'The Nextflow version being used is: {nextflow_version}. This version requires the pipeline ' +
|
|
124
|
+
'to be written in DSL2 and does not support DSL1.',
|
|
125
|
+
fg='yellow', bold=True
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
return nextflow_version
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudos_cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.88.1
|
|
4
4
|
Summary: Python package for interacting with CloudOS
|
|
5
5
|
Home-page: https://github.com/lifebit-ai/cloudos-cli
|
|
6
6
|
Author: David Piñeyro
|
|
@@ -687,6 +687,29 @@ When there are duplicate `--workflow-name` in the platform, you can add the `--l
|
|
|
687
687
|
|
|
688
688
|
_For example, the pipeline `lifebit-process` was imported on May 23 2025 and again on May 30 2025; with the `--last` flag, it will use the import of May 30, 2025._
|
|
689
689
|
|
|
690
|
+
**Nextflow Version Support**
|
|
691
|
+
|
|
692
|
+
CloudOS CLI supports multiple Nextflow versions, with intelligent defaults based on your workflow type and execution platform.
|
|
693
|
+
|
|
694
|
+
**Default Version Behavior:**
|
|
695
|
+
|
|
696
|
+
The default Nextflow version is automatically selected based on your workflow type and execution platform:
|
|
697
|
+
|
|
698
|
+
- **Azure Platform**: Always uses `22.11.1-edge` regardless of workflow type
|
|
699
|
+
- **Platform Workflows** (AWS/HPC): Uses `22.10.8` (Lifebit provided workflows and modules)
|
|
700
|
+
- **User-Imported Workflows** (AWS/HPC): AWS uses `24.04.4`; HPC uses `22.10.8`
|
|
701
|
+
|
|
702
|
+
**Specifying a Custom Version:**
|
|
703
|
+
|
|
704
|
+
You can override the default by using the `--nextflow-version` parameter:
|
|
705
|
+
|
|
706
|
+
```bash
|
|
707
|
+
cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos_cli/examples/rnatoy.config --nextflow-version 25.04.8 --resumable
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
> [!NOTE]
|
|
711
|
+
> **Azure Platform Behavior**: If you specify a Nextflow version not supported by Azure (anything other than 22.11.1-edge), CloudOS CLI will display a warning and automatically use 22.11.1-edge instead. Your job will proceed without error.
|
|
712
|
+
|
|
690
713
|
**AWS Executor Support**
|
|
691
714
|
|
|
692
715
|
CloudOS supports [AWS batch](https://www.nextflow.io/docs/latest/executor.html?highlight=executors#aws-batch) executor by default.
|
|
@@ -705,6 +728,7 @@ cloudos job run --profile my_profile --workflow-name rnatoy --job-config cloudos
|
|
|
705
728
|
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:
|
|
706
729
|
|
|
707
730
|
- When sending jobs to CloudOS using `cloudos job run` command, please use the option `--execution-platform azure`
|
|
731
|
+
- 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
|
|
708
732
|
- Due to the lack of AWS batch queues in Azure, `cloudos queue list` command is not working
|
|
709
733
|
|
|
710
734
|
Other than that, `cloudos-cli` will work very similarly. For instance, this is a typical send job command:
|
|
@@ -2154,7 +2178,7 @@ cloudos interactive-session create \
|
|
|
2154
2178
|
- `--spot`: Use spot instances (AWS only, cost-saving)
|
|
2155
2179
|
- `--shared`: Make session accessible to workspace members
|
|
2156
2180
|
- `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
|
|
2157
|
-
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
|
|
2181
|
+
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`, default: `12h`)
|
|
2158
2182
|
|
|
2159
2183
|
**Data & Storage Management:**
|
|
2160
2184
|
- `--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.
|
|
@@ -54,6 +54,7 @@ cloudos_cli/utils/cloud.py
|
|
|
54
54
|
cloudos_cli/utils/details.py
|
|
55
55
|
cloudos_cli/utils/errors.py
|
|
56
56
|
cloudos_cli/utils/last_wf.py
|
|
57
|
+
cloudos_cli/utils/nextflow_version.py
|
|
57
58
|
cloudos_cli/utils/requests.py
|
|
58
59
|
cloudos_cli/utils/resources.py
|
|
59
60
|
cloudos_cli/workflows/__init__.py
|
|
@@ -62,6 +63,7 @@ tests/__init__.py
|
|
|
62
63
|
tests/functions_for_pytest.py
|
|
63
64
|
tests/test_cli_project_create.py
|
|
64
65
|
tests/test_error_messages.py
|
|
66
|
+
tests/test_nextflow_version.py
|
|
65
67
|
tests/test_cost/__init__.py
|
|
66
68
|
tests/test_cost/test_job_cost.py
|
|
67
69
|
tests/test_interactive_session/__init__.py
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""Tests for Nextflow version resolution utilities."""
|
|
2
|
+
|
|
3
|
+
import pytest
|
|
4
|
+
import rich_click as click
|
|
5
|
+
from unittest.mock import patch
|
|
6
|
+
from cloudos_cli.utils.nextflow_version import resolve_nextflow_version
|
|
7
|
+
from cloudos_cli.constants import (
|
|
8
|
+
AWS_NEXTFLOW_LATEST,
|
|
9
|
+
AZURE_NEXTFLOW_LATEST,
|
|
10
|
+
HPC_NEXTFLOW_LATEST,
|
|
11
|
+
PLATFORM_WORKFLOW_NEXTFLOW_VERSION,
|
|
12
|
+
USER_WORKFLOW_NEXTFLOW_VERSION,
|
|
13
|
+
AWS_NEXTFLOW_VERSIONS
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TestResolveNextflowVersion:
|
|
18
|
+
"""Test cases for resolve_nextflow_version function."""
|
|
19
|
+
|
|
20
|
+
def test_default_azure_version(self):
|
|
21
|
+
"""Test that Azure always defaults to AZURE_NEXTFLOW_LATEST."""
|
|
22
|
+
result = resolve_nextflow_version(
|
|
23
|
+
nextflow_version=None,
|
|
24
|
+
execution_platform='azure',
|
|
25
|
+
is_module=False
|
|
26
|
+
)
|
|
27
|
+
assert result == AZURE_NEXTFLOW_LATEST
|
|
28
|
+
|
|
29
|
+
def test_default_hpc_version(self):
|
|
30
|
+
"""Test that HPC always defaults to HPC_NEXTFLOW_LATEST."""
|
|
31
|
+
result = resolve_nextflow_version(
|
|
32
|
+
nextflow_version=None,
|
|
33
|
+
execution_platform='hpc',
|
|
34
|
+
is_module=False
|
|
35
|
+
)
|
|
36
|
+
assert result == HPC_NEXTFLOW_LATEST
|
|
37
|
+
|
|
38
|
+
def test_default_aws_platform_workflow(self):
|
|
39
|
+
"""Test that AWS Platform workflows default to PLATFORM_WORKFLOW_NEXTFLOW_VERSION."""
|
|
40
|
+
result = resolve_nextflow_version(
|
|
41
|
+
nextflow_version=None,
|
|
42
|
+
execution_platform='aws',
|
|
43
|
+
is_module=True
|
|
44
|
+
)
|
|
45
|
+
assert result == PLATFORM_WORKFLOW_NEXTFLOW_VERSION
|
|
46
|
+
|
|
47
|
+
def test_default_aws_user_workflow(self):
|
|
48
|
+
"""Test that AWS user-imported workflows default to USER_WORKFLOW_NEXTFLOW_VERSION."""
|
|
49
|
+
result = resolve_nextflow_version(
|
|
50
|
+
nextflow_version=None,
|
|
51
|
+
execution_platform='aws',
|
|
52
|
+
is_module=False
|
|
53
|
+
)
|
|
54
|
+
assert result == USER_WORKFLOW_NEXTFLOW_VERSION
|
|
55
|
+
|
|
56
|
+
def test_latest_resolution_aws(self):
|
|
57
|
+
"""Test that 'latest' resolves to AWS_NEXTFLOW_LATEST."""
|
|
58
|
+
result = resolve_nextflow_version(
|
|
59
|
+
nextflow_version='latest',
|
|
60
|
+
execution_platform='aws',
|
|
61
|
+
is_module=False
|
|
62
|
+
)
|
|
63
|
+
assert result == AWS_NEXTFLOW_LATEST
|
|
64
|
+
|
|
65
|
+
def test_latest_resolution_azure(self):
|
|
66
|
+
"""Test that 'latest' resolves to AZURE_NEXTFLOW_LATEST."""
|
|
67
|
+
result = resolve_nextflow_version(
|
|
68
|
+
nextflow_version='latest',
|
|
69
|
+
execution_platform='azure',
|
|
70
|
+
is_module=False
|
|
71
|
+
)
|
|
72
|
+
assert result == AZURE_NEXTFLOW_LATEST
|
|
73
|
+
|
|
74
|
+
def test_latest_resolution_hpc(self):
|
|
75
|
+
"""Test that 'latest' resolves to HPC_NEXTFLOW_LATEST."""
|
|
76
|
+
result = resolve_nextflow_version(
|
|
77
|
+
nextflow_version='latest',
|
|
78
|
+
execution_platform='hpc',
|
|
79
|
+
is_module=False
|
|
80
|
+
)
|
|
81
|
+
assert result == HPC_NEXTFLOW_LATEST
|
|
82
|
+
|
|
83
|
+
def test_platform_workflow_forces_azure_version(self):
|
|
84
|
+
"""Test that Platform workflows on Azure are forced to AZURE_NEXTFLOW_LATEST."""
|
|
85
|
+
result = resolve_nextflow_version(
|
|
86
|
+
nextflow_version='24.04.4', # User tries different version
|
|
87
|
+
execution_platform='azure',
|
|
88
|
+
is_module=True,
|
|
89
|
+
workflow_name='test-workflow'
|
|
90
|
+
)
|
|
91
|
+
assert result == AZURE_NEXTFLOW_LATEST
|
|
92
|
+
|
|
93
|
+
def test_platform_workflow_forces_aws_version(self):
|
|
94
|
+
"""Test that Platform workflows on AWS are forced to PLATFORM_WORKFLOW_NEXTFLOW_VERSION."""
|
|
95
|
+
result = resolve_nextflow_version(
|
|
96
|
+
nextflow_version='24.04.4', # User tries different version
|
|
97
|
+
execution_platform='aws',
|
|
98
|
+
is_module=True,
|
|
99
|
+
workflow_name='test-workflow'
|
|
100
|
+
)
|
|
101
|
+
assert result == PLATFORM_WORKFLOW_NEXTFLOW_VERSION
|
|
102
|
+
|
|
103
|
+
def test_valid_aws_version_accepted(self):
|
|
104
|
+
"""Test that valid AWS versions are accepted."""
|
|
105
|
+
for version in AWS_NEXTFLOW_VERSIONS:
|
|
106
|
+
result = resolve_nextflow_version(
|
|
107
|
+
nextflow_version=version,
|
|
108
|
+
execution_platform='aws',
|
|
109
|
+
is_module=False
|
|
110
|
+
)
|
|
111
|
+
assert result == version
|
|
112
|
+
|
|
113
|
+
def test_invalid_aws_version_raises_error(self):
|
|
114
|
+
"""Test that invalid AWS version raises BadParameter."""
|
|
115
|
+
with pytest.raises(click.BadParameter, match='Unsupported Nextflow version'):
|
|
116
|
+
resolve_nextflow_version(
|
|
117
|
+
nextflow_version='99.99.99',
|
|
118
|
+
execution_platform='aws',
|
|
119
|
+
is_module=False
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
def test_invalid_hpc_version_raises_error(self):
|
|
123
|
+
"""Test that invalid HPC version raises BadParameter."""
|
|
124
|
+
with pytest.raises(click.BadParameter, match='Unsupported Nextflow version'):
|
|
125
|
+
resolve_nextflow_version(
|
|
126
|
+
nextflow_version='24.04.4', # Not supported on HPC
|
|
127
|
+
execution_platform='hpc',
|
|
128
|
+
is_module=False
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
def test_azure_invalid_version_auto_corrects(self):
|
|
132
|
+
"""Test that Azure auto-corrects invalid versions with warning."""
|
|
133
|
+
with patch('cloudos_cli.utils.nextflow_version.click.secho') as mock_secho:
|
|
134
|
+
result = resolve_nextflow_version(
|
|
135
|
+
nextflow_version='24.04.4', # Not supported on Azure
|
|
136
|
+
execution_platform='azure',
|
|
137
|
+
is_module=False
|
|
138
|
+
)
|
|
139
|
+
assert result == AZURE_NEXTFLOW_LATEST
|
|
140
|
+
# Verify warning was displayed
|
|
141
|
+
mock_secho.assert_called_once()
|
|
142
|
+
assert 'Warning' in mock_secho.call_args[0][0]
|
|
143
|
+
|
|
144
|
+
def test_verbose_output(self, capsys):
|
|
145
|
+
"""Test that verbose flag produces output."""
|
|
146
|
+
resolve_nextflow_version(
|
|
147
|
+
nextflow_version=None,
|
|
148
|
+
execution_platform='aws',
|
|
149
|
+
is_module=True,
|
|
150
|
+
verbose=True
|
|
151
|
+
)
|
|
152
|
+
captured = capsys.readouterr()
|
|
153
|
+
assert 'Using default Nextflow version' in captured.out
|
|
154
|
+
|
|
155
|
+
def test_dsl2_warning_for_new_versions(self):
|
|
156
|
+
"""Test that DSL2 warning is displayed for newer versions."""
|
|
157
|
+
with patch('cloudos_cli.utils.nextflow_version.click.secho') as mock_secho:
|
|
158
|
+
resolve_nextflow_version(
|
|
159
|
+
nextflow_version=USER_WORKFLOW_NEXTFLOW_VERSION,
|
|
160
|
+
execution_platform='aws',
|
|
161
|
+
is_module=False
|
|
162
|
+
)
|
|
163
|
+
# Should have warning about DSL2
|
|
164
|
+
mock_secho.assert_called_once()
|
|
165
|
+
assert 'DSL2' in mock_secho.call_args[0][0]
|
|
166
|
+
|
|
167
|
+
def test_no_dsl2_warning_for_legacy_versions(self):
|
|
168
|
+
"""Test that no DSL2 warning for legacy versions."""
|
|
169
|
+
with patch('cloudos_cli.utils.nextflow_version.click.secho') as mock_secho:
|
|
170
|
+
resolve_nextflow_version(
|
|
171
|
+
nextflow_version=PLATFORM_WORKFLOW_NEXTFLOW_VERSION,
|
|
172
|
+
execution_platform='aws',
|
|
173
|
+
is_module=False
|
|
174
|
+
)
|
|
175
|
+
# Should not have any warnings
|
|
176
|
+
mock_secho.assert_not_called()
|
|
177
|
+
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '2.87.1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_interactive_session/test_create_session.py
RENAMED
|
File without changes
|
{cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_interactive_session/test_list_sessions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cloudos_cli-2.87.1 → cloudos_cli-2.88.1}/tests/test_related_analyses/test_related_analyses.py
RENAMED
|
File without changes
|