|
1 | 1 | # cwl-utils
|
2 | 2 |
|
3 |
| -A collection of scripts to demonstrate the use of the [new Python classes for loading and parsing CWL v1.0 documents](https://github.com/common-workflow-language/cwl-utils/blob/master/cwl_utils/parser_v1_0.py). |
4 |
| - |
5 |
| - |
6 |
| -`cwl_utils/parser_v1_0.py` was created via |
7 |
| -`schema-salad-tool --codegen python https://github.com/common-workflow-language/common-workflow-language/raw/master/v1.0/CommonWorkflowLanguage.yml` |
| 3 | +A collection of scripts to demonstrate the use of the new Python classes for |
| 4 | +loading and parsing [CWL v1.0 ](https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_0.py), |
| 5 | + [CWL v1.1](https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_1.py), |
| 6 | +and [CWL v1.2](https://github.com/common-workflow-language/cwl-utils/blob/main/cwl_utils/parser/v1_2.py) |
| 7 | +documents. |
8 | 8 |
|
9 | 9 | ## Install
|
10 | 10 |
|
11 |
| -Requires Python 3.6.x or Python 3.7 |
| 11 | +Requires Python 3.6+ |
12 | 12 |
|
13 | 13 | ``` bash
|
14 |
| -git clone https://github.com/common-workflow-language/cwl-utils.git |
15 |
| -virtualenv -p python3.6 venv3.6 |
| 14 | +virtualenv -p python3.6 venv3.6 # Python 3.7, 3.8, or 3.9 would also work |
16 | 15 | source venv3.6/bin/activate
|
17 | 16 | pip install cwl-utils
|
18 | 17 | ```
|
| 18 | +or install the latest development version of `cwl-utils` |
| 19 | + |
| 20 | +``` bash |
| 21 | +git clone https://github.com/common-workflow-language/cwl-utils.git |
| 22 | +cd cwl-utils |
| 23 | +virtualenv -p python3.6 venv3.6 # Python 3.7, 3.8, or 3.9 would also work |
| 24 | +source venv3.6/bin/activate |
| 25 | +pip install . |
| 26 | +``` |
19 | 27 |
|
20 | 28 | ## Usage
|
21 | 29 |
|
22 |
| -### Pull the image with Docker |
| 30 | +### Pull the all referenced software container images |
23 | 31 |
|
24 |
| -This is the default behaviour: |
| 32 | +`docker_extract.py` is useful to cache or pre-pull all software container images |
| 33 | +referenced in a CWL CommandLineTool or CWL Workflow (including all referenced |
| 34 | +CommandLineTools and sub-Workflows and so on). |
| 35 | + |
| 36 | +The default behaviour is to use the Docker engine to download and save the software |
| 37 | +container images in Docker format. |
25 | 38 |
|
26 | 39 | ```bash
|
27 | 40 | python docker_extract.py DIRECTORY path_to_my_workflow.cwl
|
28 | 41 | ```
|
29 | 42 |
|
30 |
| -### Pull the image with Singularity |
| 43 | +Or you can use the Singularity software container engine to download and save the |
| 44 | +software container images and convert them to the Singularity format at the same |
| 45 | +time. |
31 | 46 |
|
32 | 47 | ```bash
|
33 | 48 | python docker_extract.py --singularity DIRECTORY path_to_my_workflow.cwl
|
34 | 49 | ```
|
35 | 50 |
|
36 |
| -## Regenerate |
| 51 | +## Development |
37 | 52 |
|
38 |
| -To regenerate install `schema_salad` package and run: |
| 53 | +### Regenerate parsers |
| 54 | + |
| 55 | +To regenerate install the `schema_salad` package and run: |
| 56 | + |
| 57 | +`cwl_utils/parser_v1_0.py` was created via |
| 58 | +`schema-salad-tool --codegen python https://github.com/common-workflow-language/common-workflow-language/raw/main/v1.0/CommonWorkflowLanguage.yml` |
| 59 | + |
| 60 | +`cwl_utils/parser_v1_1.py` was created via |
| 61 | +`schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.1/raw/main/CommonWorkflowLanguage.yml` |
| 62 | + |
| 63 | +`cwl_utils/parser_v1_2.py` was created via |
| 64 | +`schema-salad-tool --codegen python https://github.com/common-workflow-language/cwl-v1.2/raw/main/CommonWorkflowLanguage.yml` |
39 | 65 |
|
40 |
| -``` |
41 |
| -schema-salad-tool --codegen python \ |
42 |
| - https://raw.githubusercontent.com/common-workflow-language/common-workflow-language/master/v1.0/CommonWorkflowLanguage.yml |
43 |
| -``` |
44 | 66 |
|
45 |
| -## Release |
| 67 | +### Release |
46 | 68 |
|
47 |
| -To release CWLUtils, bump the version in `cwl_utils/__meta__.py`, and tag that commit with the new version. TravisCI should release that tag. |
| 69 | +To release CWLUtils, bump the version in `cwl_utils/__meta__.py`, and tag that |
| 70 | +commit with the new version. TravisCI should release that tag. |
0 commit comments