Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Amstutz committed Jul 16, 2019
1 parent 1179f83 commit a334205
Show file tree
Hide file tree
Showing 5 changed files with 10,089 additions and 34 deletions.
51 changes: 34 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,37 @@ Design principals:

# Quickstart using Docker

Build a self-contained script (no imports)
Requires a [CWL implementation](https://www.commonwl.org/#Implementations).

Pulls the `commonworkflowlanguage/cwlex` Docker image.

Convert a self-contained (no imports) cwlex script to CWL:

```
cwl-runner cwlex.cwl --inp myscript.cwlex
$ cwl-runner cwlex.cwl --inp myscript.cwlex
```

Build script with imports:
Convert a cwlex script with imports to CWL:

```
cwl-runner cwlex.cwl --inpdir . --inpfile myscript.cwlex
$ cwl-runner cwlex.cwl --inpdir . --inpfile myscript.cwlex
```

# Installing
The resulting script can be run with any [CWL implementation](https://www.commonwl.org/#Implementations):

```
npm install cwl-ex
$ cwl-runner myscript.cwl
```

# Usage
# Installing & Usage

Easy install from npm. Requires node.js.

```
$ npm install cwl-ex
```

Installs executable entry point `cwlex` in the npm `bin` directory.

```
$ cwlex myscript.cwlex > myscript.cwl
Expand Down Expand Up @@ -242,18 +254,12 @@ def workflow main(v1="hello", v2="world") {

# Developing

Generate the parser (requires antlr4):
Regenerate the parser (requires antlr4):

```
$ cd src && cwl-runner antlr.cwl
```

Run local code in Docker
```
cwl-runner cwlex.cwl --inp src/cwlex-dev.cwlex
cwl-runner cwlex-dev.cwl --inp myscript.cwlex
```

Run tests:

```
Expand All @@ -267,8 +273,19 @@ Install dependencies (requires node.js and npm):
$ npm install
```

Generate Docker image
Build npm package:

```
$ npm pack
```

Install local npm package into a Docker image.
```
$ docker build -f cwlex.Dockerfile -t commonworkflowlanguage/cwlex .
```

Update README.md
```
npm pack
docker build -f cwlex.Dockerfile .
$ cwl-runner cwlex.cwl --inp makereadme.cwlex
$ cwl-runner makereadme.cwl
```
51 changes: 34 additions & 17 deletions README.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,37 @@ Design principals:

# Quickstart using Docker

Build a self-contained script (no imports)
Requires a [CWL implementation](https://www.commonwl.org/#Implementations).

Pulls the `commonworkflowlanguage/cwlex` Docker image.

Convert a self-contained (no imports) cwlex script to CWL:

```
cwl-runner cwlex.cwl --inp myscript.cwlex
$ cwl-runner cwlex.cwl --inp myscript.cwlex
```

Build script with imports:
Convert a cwlex script with imports to CWL:

```
cwl-runner cwlex.cwl --inpdir . --inpfile myscript.cwlex
$ cwl-runner cwlex.cwl --inpdir . --inpfile myscript.cwlex
```

# Installing
The resulting script can be run with any [CWL implementation](https://www.commonwl.org/#Implementations):

```
npm install cwl-ex
$ cwl-runner myscript.cwl
```

# Usage
# Installing & Usage

Easy install from npm. Requires node.js.

```
$ npm install cwl-ex
```

Installs executable entry point `cwlex` in the npm `bin` directory.

```
$ cwlex myscript.cwlex > myscript.cwl
Expand Down Expand Up @@ -166,18 +178,12 @@ $include: ex14.cwlex

# Developing

Generate the parser (requires antlr4):
Regenerate the parser (requires antlr4):

```
$ cd src && cwl-runner antlr.cwl
```

Run local code in Docker
```
cwl-runner cwlex.cwl --inp src/cwlex-dev.cwlex
cwl-runner cwlex-dev.cwl --inp myscript.cwlex
```

Run tests:

```
Expand All @@ -191,8 +197,19 @@ Install dependencies (requires node.js and npm):
$ npm install
```

Generate Docker image
Build npm package:

```
$ npm pack
```

Install local npm package into a Docker image.
```
$ docker build -f cwlex.Dockerfile -t commonworkflowlanguage/cwlex .
```

Update README.md
```
npm pack
docker build -f cwlex.Dockerfile .
$ cwl-runner cwlex.cwl --inp makereadme.cwlex
$ cwl-runner makereadme.cwl
```
Loading

0 comments on commit a334205

Please sign in to comment.