common-workflow-language/pypi2cwl

Name: pypi2cwl

Owner: Common Workflow Language

Description: null

Created: 2016-07-22 11:12:34.0

Updated: 2016-07-23 20:36:57.0

Pushed: 2016-07-23 20:36:56.0

Homepage: null

Size: 4

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

pypi2cwl forms CWL tool descriptions from PyPi packages using argparse2cwl. It installs the package if it hasn't been installed before, downloads the source code to a new directory, parses command-line scripts from package's setup.py and runs argparse2cwl against those scripts.

Installing
$ pip install pypi2cwl
Usage
$ pypi2cwl <package_name> [options]

Options (some of them are inherited from argparse2cwl):

Troubleshooting

Sometimes setup() function cannot be parsed directly from package's setup.py. If pypi2cwl has exited with warning could not import setup function and a path to setup.py file, follow the path provided in the message, edit setup.py so setup function is available in the main body of the program and is executed during importing setup.py, and run pypi2cwl again with --no-clean option. The edits don't affect the program's behavior, because only the downloaded copy of the package is edited.

Limitations

pypi2cwl cannot process packages where:

a) tools are not defined as command-line scripts in setup.py

b) argument parsers other than argparse (for instance, sys.argv) are used.


In these cases you should manually generate tool descriptions using argparse2cwl.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.