Skip to content

Commit

Permalink
adds scope
Browse files Browse the repository at this point in the history
  • Loading branch information
fabricebrito committed Nov 1, 2023
1 parent f587d6a commit b0d88ed
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/cwl-cli/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ When developers package and EO, they are in fact packaging their own software, w
To achieve this, developers follow the steps described below.

* Prepare one or more container images containing the execution dependencies of the software.
* **Prepare the CWL CommandLineTool document(s) wrapping the command line tool available container(s).**
* **Prepare the CWL CommandLineTool document(s) wrapping the command line tool available in container(s).**
* Prepare the CWL Workflow orchestrating CWL CommandLineTool document(s) wrapping the command line tool available container(s).
* Test the application package in one or more execution scenarios.

Expand Down
55 changes: 52 additions & 3 deletions docs/cwl-workflow/exec-cloud-native.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,55 @@
### Goal

```bash linenums="1" hl_lines="8-71"
Run the `app-water-body-cloud-native.1.0.0.cwl` Application Package using `cwltool`.

### Step 1 - Configure the workspace

The results produced will be available in the local folder `/workspace/runs`

```bash linenums="1" hl_lines="2-4" title="terminal"
--8<--
scripts/setup.sh
--8<--
```

### Step 2 - Download the released Application package

```bash linenums="1" hl_lines="8-71" title="scripts/download-app-water-body-cloud-native.sh"
--8<--
scripts/download-app-water-body-cloud-native.sh
--8<--
```

```
sh ${WORKSPACE}/scripts/download-app-water-body-cloud-native.sh
```

### Step 3 - Execute the Application Package

```bash linenums="1" hl_lines="6" title="scripts/exec-app-water-body-cloud-native.sh"
--8<--
scripts/cwl-workflow-cloud-native.sh
scripts/exec-app-water-body-cloud-native.sh
--8<--
```
```

```
sh ${WORKSPACE}/scripts/exec-app-water-body-cloud-native.sh
```

### Expected outcome

The folder `/workspace/runs` contains:

``` hl_lines="3"
(base) jovyan@coder-fbrito:~/runs$ tree .
.
└── p371fwrs
├── S2B_10TFK_20210713_0_L2A
│ ├── S2B_10TFK_20210713_0_L2A.json
│ └── otsu.tif
└── catalog.json
2 directories, 7 files
```

Line #6 shows the folder created by the execution.
2 changes: 1 addition & 1 deletion docs/cwl-workflow/scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ When developers package and EO, they are in fact packaging their own software, w
To achieve this, developers follow the steps described below.

* Prepare one or more container images containing the execution dependencies of the software.
* Prepare the CWL CommandLineTool document(s) wrapping the command line tool available container(s).
* Prepare the CWL CommandLineTool document(s) wrapping the command line tool available in container(s).
* **Prepare the CWL Workflow orchestrating CWL CommandLineTool document(s) wrapping the command line tool available container(s).**
* Test the application package in one or more execution scenarios.

Expand Down
12 changes: 12 additions & 0 deletions docs/exec/scope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
When developers package and EO, they are in fact packaging their own software, written in a specific programming language, as a containerized application (or a set of containerized applications), to be described as an EO Application Package using the Common Workflow Language as described in the OGC proposed best practices.

To achieve this, developers follow the steps described below.

* Prepare one or more container images containing the execution dependencies of the software.
* Prepare the CWL CommandLineTool document(s) wrapping the command line tool available in container(s).
* Prepare the CWL Workflow orchestrating CWL CommandLineTool document(s) wrapping the command line tool available container(s).
* **Test the application package in one or more execution scenarios**.

This page covers the step:

**Test the application package in one or more execution scenarios**
2 changes: 1 addition & 1 deletion scripts/cwl-workflow-cloud-native.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cwltool \
--podman \
--outdir /workspace/runs \
${WORKSPACE}/cwl-workflow/app-water-body-cloud-native.cwl \
/workspace/runs/app-water-body-cloud-native.${version}.cwl \
--item "https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a-cogs/items/S2B_10TFK_20210713_0_L2A" \
--aoi="-121.399,39.834,-120.74,40.472" \
--epsg "EPSG:4326"
5 changes: 5 additions & 0 deletions scripts/download-app-water-body-cloud-native.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version="1.0.0"

wget \
-O /workspace/runs/app-water-body-cloud-native.${version}.cwl \
https://github.com/Terradue/app-package-training-bids23/releases/download/${version}/app-water-body-cloud-native.${version}.cwl
3 changes: 0 additions & 3 deletions scripts/download-cwl.sh

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/exec-app-water-body-cloud-native.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version="1.0.0"

cwltool \
--podman \
--outdir /workspace/runs \
${WORKSPACE}/cwl-workflow/app-water-body-cloud-native.cwl \
--item "https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a-cogs/items/S2B_10TFK_20210713_0_L2A" \
--aoi="-121.399,39.834,-120.74,40.472" \
--epsg "EPSG:4326"

0 comments on commit b0d88ed

Please sign in to comment.