Skip to content

Commit 294b815

Browse files
committed
add text in readme
1 parent 716cc4d commit 294b815

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,24 @@
44
[![Coverage Status](https://coveralls.io/repos/github/giannisdoukas/ipython2cwl/badge.svg?branch=dev)](https://coveralls.io/github/giannisdoukas/ipython2cwl?branch=dev)
55
[![Documentation Status](https://readthedocs.org/projects/ipython2cwl/badge/?version=latest)](https://ipython2cwl.readthedocs.io/en/latest/?badge=latest)
66

7+
IPython2CWL is a tool for converting [IPython](https://ipython.org/) Jupyter Notebooks to
8+
[CWL](https://www.commonwl.org/) Command Line Tools by simply providing typing annotation.
9+
10+
11+
```python
12+
from ipython2cwl.iotypes import CWLFilePathInput, CWLFilePathOutput
13+
import csv
14+
input_filename: 'CWLFilePathInput' = 'data.csv'
15+
with open(input_filename) as f:
16+
csv_reader = csv.reader(f)
17+
data = [line for line in csv_reader]
18+
number_of_lines = len(data)
19+
result_file: 'CWLFilePathOutput' = 'number_of_lines.txt'
20+
with open(result_file, 'w') as f:
21+
f.write(str(number_of_lines))
22+
```
23+
24+
IPython2CWL is based on [repo2docker](https://github.com/jupyter/repo2docker), the same tool
25+
used by [mybinder](https://mybinder.org/). Now, by writing Jupyter Notebook and publish them, including repo2docker
26+
configuration, the community can not only execute the notebooks remotely but also to use them as steps in scientific
27+
workflows.

0 commit comments

Comments
 (0)