A tool wrapper to translate Geoweaver AI workflows into Common Workflow Language (CWL)
Project description
geoweaver_cwl
geoweaver_cwl is a python tool wrapper for translating Geoweaver AI - workflows into Common Workflow Language (CWL). CWL is an open standard for describing how to run command-line tools and connect them to create workflows. Tools and workflows described using CWL are portable across a variety of platforms that support the CWL standards. Researchers who are using Geoweaver can use it to translate their workflows and get the formatted CWL files for the existing workflows.
The code is written in Python 3.
Installation
For installation use the following command:
pip install geoweaver_cwl
Example Usage
Import the package
from geoweaver_cwl import translator as tr
The json file will be converted to CWL format using generate_cwl function. It will also create a subdirectory called elementary_cwl_files, which will translate all the python files used in the workflow to CWL.
tr.generate_cwl('workflow.json')
The output should look like this and you should be able to see a workflow.cwl file and elementary_cwl_files in the folder:
Output file: workflow.cwl
Writing header...
Writing steps...
CWL file written to workflow.cwl
The generate_yml function produces a YML file, which you should see in the exiting directory. *Note: specify the name you want to give to your yml file in the function; in our example, we've called it "input."
tr.generate_yml('input.yml')
The output should look like this and you should be able to see a YML file in the folder:
Writing YML file...
YML file created ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for geoweaver_cwl-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2387e865b40b2353386a5ce469755975481bfd495af671c1c403d35086433b6d |
|
MD5 | a1328060397bec1ca7f6bac1cc37d91f |
|
BLAKE2b-256 | 0e5ffc7705539ab1d8445d070e66dd24ac5087b3e8526732bee9befe4d1836d1 |