Convert IPython Jupyter Notebooks to CWL tool
Project description
IPython2CWL
IPython2CWL is a tool for converting IPython Jupyter Notebooks to CWL (Common Workflow Language) Command Line Tools by simply providing typing annotation.
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, the same tool used by mybinder. Now, by writing Jupyter Notebook and publish 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 cwlbuild
Docs
https://ipython2cwl.readthedocs.io/
Demo
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ipython2cwl-0.0.3.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file ipython2cwl-0.0.3.tar.gz
.
File metadata
- Download URL: ipython2cwl-0.0.3.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e77f5c0ffd8b6b5247d3c98547f9a1c97546114dedc488644790fd4582bb2f41 |
|
MD5 | c0eac98ce6f0da51483876fb07a6710e |
|
BLAKE2b-256 | c37dadc30b32be268f1dcc46939f7106b77de0dc944123b2535790371c871d14 |
File details
Details for the file ipython2cwl-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: ipython2cwl-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b64c1e7787866bb7d0d91c2e63eac11e604e2f83c500809dbc9402f6bce9762 |
|
MD5 | 923ae09ef878446195a9cdd60d263611 |
|
BLAKE2b-256 | f5d7308af03c0c9855aa47485262596b3a75a6850791f75dc64eda7023fb7c32 |