Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Package to extend Airflow functionality with CWL v1.0 support

License

Notifications You must be signed in to change notification settings

datirium/cwl-airflow-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cwl-airflow-parser

About

Extends Apache-Airflow with CWL v1.0 support.

Installation

pip3.6 install -U cwl-airflow-parser

Requirements

Package has been tested on Ubuntu 16.04.3 and Mac OS X Sierra/ High Sierra. Make sure your system satisfies the following criteria:

Usage

from cwl_airflow_parser import CWLDAG, CWLJobDispatcher, CWLJobGatherer
from datetime import timedelta

def cwl_workflow(workflow_file):
    dag = CWLDAG(default_args={
        'owner': 'airflow',
        'email': ['[email protected]'],
        'email_on_failure': False,
        'email_on_retry': False,
        'retries': 20,
        'retry_exponential_backoff': True,
        'retry_delay': timedelta(minutes=30),
        'max_retry_delay': timedelta(minutes=60 * 4)
    },
        cwl_workflow=workflow_file)
    dag.create()
    dag.add(CWLJobDispatcher(dag=dag), to='top')
    dag.add(CWLJobGatherer(dag=dag), to='bottom')

    return dag
 
cwl_workflow("/path/to/my/workflow.cwl")