cloudos-cli 2.32.1__tar.gz → 2.34.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/PKG-INFO +123 -1
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/README.md +122 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/__main__.py +498 -5
- cloudos_cli-2.34.0/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/datasets/datasets.py +45 -1
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/jobs/job.py +206 -2
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/PKG-INFO +123 -1
- cloudos_cli-2.32.1/cloudos_cli/_version.py +0 -1
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/LICENSE +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/clos.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/configure/configure.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/setup.cfg +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/setup.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/tests/__init__.py +0 -0
- {cloudos_cli-2.32.1 → cloudos_cli-2.34.0}/tests/functions_for_pytest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudos_cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.34.0
|
|
4
4
|
Summary: Python package for interacting with CloudOS
|
|
5
5
|
Home-page: https://github.com/lifebit-ai/cloudos-cli
|
|
6
6
|
Author: David Piñeyro
|
|
@@ -420,6 +420,98 @@ command.
|
|
|
420
420
|
Other options like `--wait-completion` are also available and work in the same way as for the `cloudos job run` command.
|
|
421
421
|
Check `cloudos bash job --help` for more details.
|
|
422
422
|
|
|
423
|
+
#### Send a bash array-job to CloudOS (parallel sample processing)
|
|
424
|
+
|
|
425
|
+
When running a bash array job, the following options are available to customize the behavior:
|
|
426
|
+
|
|
427
|
+
##### Array File
|
|
428
|
+
- **`--array-file`**: Specifies the path to a file containing a set of columns useful in running the bash job. This option is **required** when using the command `bash array-job`.
|
|
429
|
+
|
|
430
|
+
##### Separator
|
|
431
|
+
- **`--separator`**: Defines the separator to use in the array file. Supported separators include:
|
|
432
|
+
- `,` (comma)
|
|
433
|
+
- `;` (semicolon)
|
|
434
|
+
- `tab`
|
|
435
|
+
- `space`
|
|
436
|
+
- `|` (pipe)
|
|
437
|
+
This option is **required** when using the command `bash array-job`.
|
|
438
|
+
|
|
439
|
+
##### List Columns
|
|
440
|
+
- **`--list-columns`**: Lists the columns available in the array file. This is useful for inspecting the structure of the file. This flag disables sending the job, it just prints the column list, one per line:
|
|
441
|
+
|
|
442
|
+
```console
|
|
443
|
+
Columns:
|
|
444
|
+
- column1
|
|
445
|
+
- column2
|
|
446
|
+
- column3
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
##### Array File Project
|
|
450
|
+
- **`--array-file-project`**: Specifies the name of the project in which the array file is placed, if it is different from the project specified by `--project-name`.
|
|
451
|
+
|
|
452
|
+
##### Disable Column Check
|
|
453
|
+
- **`--disable-column-check`**: Disables the validation of columns in the array file. This implies that each `--array-parameter` value is not checked against the header of the `--array-file`. For example, `--array-parameter --bar=foo`, without `--disable-column-check`, expects the array file to have column 'foo' inside the file header. If the column is not present, the CLI will throw an error. When `--disable-column-check` flag is added, the column check is not performed and the bash array job is sent to the platform.
|
|
454
|
+
|
|
455
|
+
> [!NOTE]
|
|
456
|
+
> Adding `--disable-column-check` will make the CLI command run without errors, but the errors might appear when checking the job in the platform, if the columns in the array file do not exists, as depicted with `--array-parameter`.
|
|
457
|
+
|
|
458
|
+
##### Array Parameter
|
|
459
|
+
- **`-a` / `--array-parameter`**: Allows specifying the column name present in the header of the array file. Each parameter should be in the format `arary_parameter_name=array_file_column`. For example:
|
|
460
|
+
- `-a --test=value` or
|
|
461
|
+
- `--array-parameter -test=value`
|
|
462
|
+
specify a column named 'value' in the array file header. Adding array parameters not present in the header will cause an error. This option can be used multiple times to include as many array parameters as needed. This type of parameter is similar to `-p, --parameter`, both parameters can be interpolated in the bash array job command (either with `--command` or `--custom-script-path`), but this parameter can only be used to name the column present in the header of the array file.
|
|
463
|
+
|
|
464
|
+
For example, the array file has the following header:
|
|
465
|
+
|
|
466
|
+
```console
|
|
467
|
+
id,bgen,csv
|
|
468
|
+
1,s3://data/adipose.bgen,s3://data/adipose.csv
|
|
469
|
+
2,s3://data/blood.bgen,s3://data/blood.csv
|
|
470
|
+
3,s3://data/brain.bgen,s3://data/brain.csv
|
|
471
|
+
...
|
|
472
|
+
```
|
|
473
|
+
and in the command there is need to go over the `bgen` column, this can be specified as `--array-parameter file=bgen`, refering to the column in the header.
|
|
474
|
+
|
|
475
|
+
##### Custom Script Path
|
|
476
|
+
- **`--custom-script-path`**: Specifies the path to a custom script to run in the bash array job instead of a command. When adding this command, parameter `--command` is ignored. To ensure the script runs successfully, you must either:
|
|
477
|
+
|
|
478
|
+
1. Use a Shebang Line at the Top of the Script
|
|
479
|
+
|
|
480
|
+
The shebang (#!) tells the system which interpreter to use to run the script. The path should match absolute path to python or other interpreter installed inside the docker container.
|
|
481
|
+
|
|
482
|
+
Examples:
|
|
483
|
+
`#!/usr/bin/python3` –-> for Python scripts
|
|
484
|
+
`#!/usr/bin/Rscript` –-> for R scripts
|
|
485
|
+
`#!/bin/bash` –-> for Bash scripts
|
|
486
|
+
|
|
487
|
+
Example Python Script:
|
|
488
|
+
|
|
489
|
+
```python
|
|
490
|
+
#!/usr/bin/python3
|
|
491
|
+
print("Hello world")
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
2. Or use an interpreter command in the executable field
|
|
495
|
+
|
|
496
|
+
If your script doesn’t have a shebang line, you can execute it by explicitly specifying the interpreter in the executable command:
|
|
497
|
+
|
|
498
|
+
```console
|
|
499
|
+
python my_script.py
|
|
500
|
+
Rscript my_script.R
|
|
501
|
+
bash my_script.sh
|
|
502
|
+
```
|
|
503
|
+
This assumes the interpreter is available on the container’s $PATH. If not, you can use the full absolute path instead:
|
|
504
|
+
|
|
505
|
+
```console
|
|
506
|
+
/usr/bin/python3 my_script.py
|
|
507
|
+
/usr/local/bin/Rscript my_script.R
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
##### Custom Script Project
|
|
511
|
+
- **`--custom-script-project`**: Specifies the name of the project in which the custom script is placed, if it is different from the project specified by `--project-name`.
|
|
512
|
+
|
|
513
|
+
These options provide flexibility for configuring and running bash array jobs, allowing to tailor the execution for specific requirements.
|
|
514
|
+
|
|
423
515
|
#### Get path to logs of job from CloudOS
|
|
424
516
|
|
|
425
517
|
Get the path to "Nextflow logs", "Nextflow standard output", and "trace" files. It can be used only on your user's jobs, with any status.
|
|
@@ -922,6 +1014,36 @@ Please, note that in the above example a preconfigured profile has been used. If
|
|
|
922
1014
|
--project-name $PROJEC_NAME
|
|
923
1015
|
```
|
|
924
1016
|
|
|
1017
|
+
#### Copying files and folders
|
|
1018
|
+
|
|
1019
|
+
Files and folders can be copied **from** anywhere in the project **to** `Data` or any of its subfolders programmatically (i.e `Data`, `Data/folder/file.txt`).
|
|
1020
|
+
|
|
1021
|
+
1. The copy can happen **within the same project** running the following command:
|
|
1022
|
+
```
|
|
1023
|
+
cloudos datasets cp <souce_path> <destination_path> --profile <profile name>
|
|
1024
|
+
```
|
|
1025
|
+
where the source project as well as the destination one is the one defined in the profile.
|
|
1026
|
+
|
|
1027
|
+
2. The move can also happen **across different projects** within the same workspace by running the following command
|
|
1028
|
+
```
|
|
1029
|
+
cloudos datasets cp <source_path> <destiantion_path> --profile <profile_name> --destination-project-name <project_name>
|
|
1030
|
+
```
|
|
1031
|
+
In this case, only the source project is the one specified in the profile.
|
|
1032
|
+
|
|
1033
|
+
Any of the `source_path` must be a full path; any `destination_path` must be a path starting with `Data` and finishing with the folder where to move the file/folder. An example of such command is:
|
|
1034
|
+
|
|
1035
|
+
```
|
|
1036
|
+
cloudos datasets cp AnalysesResults/my_analysis/results/my_plot.png Data/plots
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
Please, note that in the above example a preconfigured profile has been used. If no profile is provided and there is no default profile, the user will need to also provide the following flags
|
|
1040
|
+
```bash
|
|
1041
|
+
--cloudos-url $CLOUDOS \
|
|
1042
|
+
--apikey $MY_API_KEY \
|
|
1043
|
+
--workspace-id $WORKSPACE_ID \
|
|
1044
|
+
--project-name $PROJEC_NAME
|
|
1045
|
+
```
|
|
1046
|
+
|
|
925
1047
|
### WDL pipeline support
|
|
926
1048
|
|
|
927
1049
|
#### Cromwell server managing
|
|
@@ -385,6 +385,98 @@ command.
|
|
|
385
385
|
Other options like `--wait-completion` are also available and work in the same way as for the `cloudos job run` command.
|
|
386
386
|
Check `cloudos bash job --help` for more details.
|
|
387
387
|
|
|
388
|
+
#### Send a bash array-job to CloudOS (parallel sample processing)
|
|
389
|
+
|
|
390
|
+
When running a bash array job, the following options are available to customize the behavior:
|
|
391
|
+
|
|
392
|
+
##### Array File
|
|
393
|
+
- **`--array-file`**: Specifies the path to a file containing a set of columns useful in running the bash job. This option is **required** when using the command `bash array-job`.
|
|
394
|
+
|
|
395
|
+
##### Separator
|
|
396
|
+
- **`--separator`**: Defines the separator to use in the array file. Supported separators include:
|
|
397
|
+
- `,` (comma)
|
|
398
|
+
- `;` (semicolon)
|
|
399
|
+
- `tab`
|
|
400
|
+
- `space`
|
|
401
|
+
- `|` (pipe)
|
|
402
|
+
This option is **required** when using the command `bash array-job`.
|
|
403
|
+
|
|
404
|
+
##### List Columns
|
|
405
|
+
- **`--list-columns`**: Lists the columns available in the array file. This is useful for inspecting the structure of the file. This flag disables sending the job, it just prints the column list, one per line:
|
|
406
|
+
|
|
407
|
+
```console
|
|
408
|
+
Columns:
|
|
409
|
+
- column1
|
|
410
|
+
- column2
|
|
411
|
+
- column3
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
##### Array File Project
|
|
415
|
+
- **`--array-file-project`**: Specifies the name of the project in which the array file is placed, if it is different from the project specified by `--project-name`.
|
|
416
|
+
|
|
417
|
+
##### Disable Column Check
|
|
418
|
+
- **`--disable-column-check`**: Disables the validation of columns in the array file. This implies that each `--array-parameter` value is not checked against the header of the `--array-file`. For example, `--array-parameter --bar=foo`, without `--disable-column-check`, expects the array file to have column 'foo' inside the file header. If the column is not present, the CLI will throw an error. When `--disable-column-check` flag is added, the column check is not performed and the bash array job is sent to the platform.
|
|
419
|
+
|
|
420
|
+
> [!NOTE]
|
|
421
|
+
> Adding `--disable-column-check` will make the CLI command run without errors, but the errors might appear when checking the job in the platform, if the columns in the array file do not exists, as depicted with `--array-parameter`.
|
|
422
|
+
|
|
423
|
+
##### Array Parameter
|
|
424
|
+
- **`-a` / `--array-parameter`**: Allows specifying the column name present in the header of the array file. Each parameter should be in the format `arary_parameter_name=array_file_column`. For example:
|
|
425
|
+
- `-a --test=value` or
|
|
426
|
+
- `--array-parameter -test=value`
|
|
427
|
+
specify a column named 'value' in the array file header. Adding array parameters not present in the header will cause an error. This option can be used multiple times to include as many array parameters as needed. This type of parameter is similar to `-p, --parameter`, both parameters can be interpolated in the bash array job command (either with `--command` or `--custom-script-path`), but this parameter can only be used to name the column present in the header of the array file.
|
|
428
|
+
|
|
429
|
+
For example, the array file has the following header:
|
|
430
|
+
|
|
431
|
+
```console
|
|
432
|
+
id,bgen,csv
|
|
433
|
+
1,s3://data/adipose.bgen,s3://data/adipose.csv
|
|
434
|
+
2,s3://data/blood.bgen,s3://data/blood.csv
|
|
435
|
+
3,s3://data/brain.bgen,s3://data/brain.csv
|
|
436
|
+
...
|
|
437
|
+
```
|
|
438
|
+
and in the command there is need to go over the `bgen` column, this can be specified as `--array-parameter file=bgen`, refering to the column in the header.
|
|
439
|
+
|
|
440
|
+
##### Custom Script Path
|
|
441
|
+
- **`--custom-script-path`**: Specifies the path to a custom script to run in the bash array job instead of a command. When adding this command, parameter `--command` is ignored. To ensure the script runs successfully, you must either:
|
|
442
|
+
|
|
443
|
+
1. Use a Shebang Line at the Top of the Script
|
|
444
|
+
|
|
445
|
+
The shebang (#!) tells the system which interpreter to use to run the script. The path should match absolute path to python or other interpreter installed inside the docker container.
|
|
446
|
+
|
|
447
|
+
Examples:
|
|
448
|
+
`#!/usr/bin/python3` –-> for Python scripts
|
|
449
|
+
`#!/usr/bin/Rscript` –-> for R scripts
|
|
450
|
+
`#!/bin/bash` –-> for Bash scripts
|
|
451
|
+
|
|
452
|
+
Example Python Script:
|
|
453
|
+
|
|
454
|
+
```python
|
|
455
|
+
#!/usr/bin/python3
|
|
456
|
+
print("Hello world")
|
|
457
|
+
```
|
|
458
|
+
|
|
459
|
+
2. Or use an interpreter command in the executable field
|
|
460
|
+
|
|
461
|
+
If your script doesn’t have a shebang line, you can execute it by explicitly specifying the interpreter in the executable command:
|
|
462
|
+
|
|
463
|
+
```console
|
|
464
|
+
python my_script.py
|
|
465
|
+
Rscript my_script.R
|
|
466
|
+
bash my_script.sh
|
|
467
|
+
```
|
|
468
|
+
This assumes the interpreter is available on the container’s $PATH. If not, you can use the full absolute path instead:
|
|
469
|
+
|
|
470
|
+
```console
|
|
471
|
+
/usr/bin/python3 my_script.py
|
|
472
|
+
/usr/local/bin/Rscript my_script.R
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
##### Custom Script Project
|
|
476
|
+
- **`--custom-script-project`**: Specifies the name of the project in which the custom script is placed, if it is different from the project specified by `--project-name`.
|
|
477
|
+
|
|
478
|
+
These options provide flexibility for configuring and running bash array jobs, allowing to tailor the execution for specific requirements.
|
|
479
|
+
|
|
388
480
|
#### Get path to logs of job from CloudOS
|
|
389
481
|
|
|
390
482
|
Get the path to "Nextflow logs", "Nextflow standard output", and "trace" files. It can be used only on your user's jobs, with any status.
|
|
@@ -887,6 +979,36 @@ Please, note that in the above example a preconfigured profile has been used. If
|
|
|
887
979
|
--project-name $PROJEC_NAME
|
|
888
980
|
```
|
|
889
981
|
|
|
982
|
+
#### Copying files and folders
|
|
983
|
+
|
|
984
|
+
Files and folders can be copied **from** anywhere in the project **to** `Data` or any of its subfolders programmatically (i.e `Data`, `Data/folder/file.txt`).
|
|
985
|
+
|
|
986
|
+
1. The copy can happen **within the same project** running the following command:
|
|
987
|
+
```
|
|
988
|
+
cloudos datasets cp <souce_path> <destination_path> --profile <profile name>
|
|
989
|
+
```
|
|
990
|
+
where the source project as well as the destination one is the one defined in the profile.
|
|
991
|
+
|
|
992
|
+
2. The move can also happen **across different projects** within the same workspace by running the following command
|
|
993
|
+
```
|
|
994
|
+
cloudos datasets cp <source_path> <destiantion_path> --profile <profile_name> --destination-project-name <project_name>
|
|
995
|
+
```
|
|
996
|
+
In this case, only the source project is the one specified in the profile.
|
|
997
|
+
|
|
998
|
+
Any of the `source_path` must be a full path; any `destination_path` must be a path starting with `Data` and finishing with the folder where to move the file/folder. An example of such command is:
|
|
999
|
+
|
|
1000
|
+
```
|
|
1001
|
+
cloudos datasets cp AnalysesResults/my_analysis/results/my_plot.png Data/plots
|
|
1002
|
+
```
|
|
1003
|
+
|
|
1004
|
+
Please, note that in the above example a preconfigured profile has been used. If no profile is provided and there is no default profile, the user will need to also provide the following flags
|
|
1005
|
+
```bash
|
|
1006
|
+
--cloudos-url $CLOUDOS \
|
|
1007
|
+
--apikey $MY_API_KEY \
|
|
1008
|
+
--workspace-id $WORKSPACE_ID \
|
|
1009
|
+
--project-name $PROJEC_NAME
|
|
1010
|
+
```
|
|
1011
|
+
|
|
890
1012
|
### WDL pipeline support
|
|
891
1013
|
|
|
892
1014
|
#### Cromwell server managing
|