File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 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.
You can’t perform that action at this time.
0 commit comments