https://github.com/common-workflow-lab/ipython2cwl
IPython2CWL is a tool for converting IPython Jupyter Notebooks to CWL Command Line Tools by simply providing typing annotation.
https://github.com/common-workflow-lab/ipython2cwl
common-workflow-language cwl docker jupyter jupyter-notebook
Last synced: about 1 month ago
JSON representation
IPython2CWL is a tool for converting IPython Jupyter Notebooks to CWL Command Line Tools by simply providing typing annotation.
- Host: GitHub
- URL: https://github.com/common-workflow-lab/ipython2cwl
- Owner: common-workflow-lab
- License: apache-2.0
- Created: 2020-06-16T19:27:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-10-06T07:45:06.000Z (5 months ago)
- Last Synced: 2025-10-06T09:38:35.272Z (5 months ago)
- Topics: common-workflow-language, cwl, docker, jupyter, jupyter-notebook
- Language: Python
- Homepage: https://ipython2cwl.readthedocs.io/
- Size: 335 KB
- Stars: 17
- Watchers: 5
- Forks: 6
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IPython2CWL
[](https://app.codacy.com/manual/giannisdoukas/ipython2cwl?utm_source=github.com&utm_medium=referral&utm_content=giannisdoukas/ipython2cwl&utm_campaign=Badge_Grade_Dashboard)
[](https://travis-ci.com/giannisdoukas/ipython2cwl)
[](https://coveralls.io/github/giannisdoukas/ipython2cwl?branch=master)
[](https://ipython2cwl.readthedocs.io/en/latest/?badge=latest)
[](https://pepy.tech/project/ipython2cwl/month)
[](https://gitter.im/ipython2cwl/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
IPython2CWL is a tool for converting [IPython](https://ipython.org/) Jupyter Notebooks to
[CWL (Common Workflow Language)](https://www.commonwl.org/) Command Line Tools by simply providing typing annotation.
```python
from ipython2cwl.iotypes import CWLFilePathInput, CWLFilePathOutput
import csv
input_filename: 'CWLFilePathInput' = 'data.csv'
with open(input_filename) as f:
csv_reader = csv.reader(f)
data = [line for line in csv_reader]
number_of_lines = len(data)
result_file: 'CWLFilePathOutput' = 'number_of_lines.txt'
with open(result_file, 'w') as f:
f.write(str(number_of_lines))
```
IPython2CWL is based on [repo2docker](https://github.com/jupyter/repo2docker), the same tool
used by [mybinder](https://mybinder.org/). Now, by writing Jupyter Notebook and publishing them, including repo2docker
configuration, the community can not only execute the notebooks remotely but also to use them as steps in scientific
workflows.
## Install
```
pip install ipython2cwl
```
### Example
```
jupyter repo2cwl https://github.com/giannisdoukas/cwl-annotated-jupyter-notebook.git -o .
```
### Docs
[https://ipython2cwl.readthedocs.io/](https://ipython2cwl.readthedocs.io/en/latest/)
### Demo
[https://github.com/giannisdoukas/ipython2cwl-demo](https://github.com/giannisdoukas/ipython2cwl-demo)