Skip to content

Commit

Permalink
Merge pull request #522 from nfdi4plants/cwl
Browse files Browse the repository at this point in the history
reorder cwl articles
  • Loading branch information
Brilator authored Nov 13, 2024
2 parents 2fb4e8a + 624fd72 commit d1a35a8
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 49 deletions.
2 changes: 2 additions & 0 deletions src/content/docs/cwl/cwl-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "CWL Examples"
lastUpdated: 2024-02-05
authors:
- caro-ott
sidebar:
order: 4
---

# CWL Examples
Expand Down
4 changes: 3 additions & 1 deletion src/content/docs/cwl/cwl-introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ title: "CWL Introduction"
lastUpdated: 2024-01-18
authors:
- caro-ott
sidebar:
order: 1
---

# What is CWL?

CWL is short for Common Workflow Language.
CWL is short for **Common Workflow Language**.
It is an open standard for describing how to run command line tools and connect them to create
workflows, which can then be incorporated in other workflows if needed (nested workflows).
Descriptions in CWL are portable across a variety of platforms that support the CWL
Expand Down
2 changes: 2 additions & 0 deletions src/content/docs/cwl/cwl-metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "CWL Metadata"
lastUpdated: 2024-02-05
authors:
- caro-ott
sidebar:
order: 3
---

# CWL Metadata
Expand Down
48 changes: 0 additions & 48 deletions src/content/docs/cwl/cwl-runner-installation.md

This file was deleted.

78 changes: 78 additions & 0 deletions src/content/docs/cwl/cwl-runner-installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
title: "CWL Runner Installation"
lastUpdated: 2024-01-18
authors:
- caro-ott
sidebar:
order: 2
---

The recommended CWL runner is [cwltool](https://github.com/common-workflow-language/cwltool), the reference implementation for the CWL standards.

import { Steps } from '@astrojs/starlight/components';
import { Tabs, TabItem } from '@astrojs/starlight/components';


<Tabs syncKey="os">
<TabItem label="Windows" icon='seti:windows'>

The installation on Windows can be done following the guide [here](https://cwltool.readthedocs.io/en/latest/#ms-windows-users).

<Steps>

1. Install Windows Subsystem for Linux from the Microsoft Store

![WSL](@images/guides/cwl/wsl.png)

2. Install Debian from the Microsoft Store

![Debian](@images/guides/cwl/debian.png)

3. Set Debian as your default WSL 2 distro: `wsl --set-default debian`
4. Install [Docker Desktop for Windows](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe)
- Start Docker Desktop and Navigate to Settings
- Select "Use WSL 2 based engine" in the general tab and apply
![Docker WSL2](@images/guides/cwl/docker-wsl2.png)
- Select "Enable Integration with my default distro" in the resources tab under WSL Integration
![Docker WSL Integration](@images/guides/cwl/docker-wsl-integration.png)
5. Start WSL
6. Follow the Instructions for Linux (Debian/Ubuntu)

</Steps>
</TabItem>

{/* <TabItem label="Macos" icon="apple">
<Steps>
</Steps>
</TabItem> */}

<TabItem label="Linux" icon='linux'>

For installation on Linux (Debian/Ubuntu):

<Steps>

1. Run `sudo apt-get update`
2. Install Python 3 if it is not already preinstalled `sudo apt install python3`
3. Install python virtual environment `sudo apt install python3.[your version here]-venv`
4. Create a virtual environment `python3 -m venv env` (named env here, name can vary)
5. Activate the virtual environment `source env/bin/activate`
6. Install `cwltool` with pip `pip install cwltool`

</Steps>

</TabItem>

</Tabs>


## cwltool usage

- If you are on Windows, start the WSL
- Activate the virtual environment `source env/bin/activate`
- Navigate to the results destination directory
- Run `cwltool` by specifying the CWL `Workflow` or `CommandLineTool` description file path and the (optional) inputs file path (you can use relative or full paths):

```bash
cwltool path/to/cwlfile.cwl path/to/jobfile.yml
```
2 changes: 2 additions & 0 deletions src/content/docs/cwl/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: Computational Workflows
lastUpdated: 2023-02-05
authors:
- kevin-frey
sidebar:
order: 0
---
import { CardGrid } from '@astrojs/starlight/components';
import { LinkCard } from '@astrojs/starlight/components';
Expand Down

0 comments on commit d1a35a8

Please sign in to comment.