Skip to main content

IPython2CWL

Codacy Badge Build Status Coverage Status Documentation Status Downloads Join the chat at https://gitter.im/ipython2cwl/community

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 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/

Demo

https://github.com/giannisdoukas/ipython2cwl-demo

Release files for ipython2cwlmosorio 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ipython2cwlmosorio 0.0.5
File Size Uploaded
ipython2cwlmosorio-0.0.5.tar.gz 12.1 kB Details

Release files / ipython2cwlmosorio-0.0.5.tar.gz

Download URL ipython2cwlmosorio-0.0.5.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
29e94e647f0f179e7743b6c3e9ffb43cd3e8303480f8dc916d59788d4fee8d6f
BLAKE2b-256 checksum
How to use checksums
a4d27529bd63a131d3542e3838832ccd6b2df1aa846dc416b2bc779647d42158
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page