Skip to content

Commit

Permalink
Update to the latest cwltool 1.0.20190621234233
Browse files Browse the repository at this point in the history
Should support CWL v1.1 (not tested)
  • Loading branch information
michael-kotliar committed Jul 1, 2019
1 parent 29c6602 commit 85fc877
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# **CWL-Airflow**

Python package to extend **[Apache-Airflow 1.10.3](https://github.com/apache/incubator-airflow)**
functionality with **[CWL v1.0](http://www.commonwl.org/v1.0/)** support.
functionality with **[CWL v1.1](https://www.commonwl.org/v1.1/)** support.


## **Cite as**
Expand Down
30 changes: 5 additions & 25 deletions cwl_airflow/cwlutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
from cwltool.context import LoadingContext
from airflow.configuration import conf
from airflow.exceptions import AirflowConfigException
from cwltool.load_tool import (FetcherConstructorType, resolve_tool_uri,
fetch_document, make_tool, validate_document)
from cwltool.load_tool import (fetch_document, make_tool, resolve_and_validate_document)
from cwltool.resolver import tool_resolver
from cwltool.workflow import default_make_tool

Expand All @@ -31,29 +30,10 @@ def shortname(n):
return n.split("#")[-1]


def load_tool(argsworkflow, # type: Union[Text, Dict[Text, Any]]
loadingContext # type: LoadingContext
): # type: (...) -> Process

document_loader, workflowobj, uri = fetch_document(
argsworkflow,
resolver=loadingContext.resolver,
fetcher_constructor=loadingContext.fetcher_constructor)

document_loader, avsc_names, _, metadata, uri = validate_document(
document_loader, workflowobj, uri,
enable_dev=loadingContext.enable_dev,
strict=loadingContext.strict,
fetcher_constructor=loadingContext.fetcher_constructor,
overrides=loadingContext.overrides_list,
skip_schemas = True,
metadata=loadingContext.metadata)

return make_tool(document_loader,
avsc_names,
metadata,
uri,
loadingContext)
def load_tool(argsworkflow, loadingContext):
loadingContext, workflowobj, uri = fetch_document(argsworkflow, loadingContext)
loadingContext, uri = resolve_and_validate_document(loadingContext, workflowobj, uri, skip_schemas=True)
return make_tool(uri, loadingContext)


def load_cwl(cwl_file, default_args):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ def get_version():
),
install_requires=[
'cryptography',
'cwltool == 1.0.20181201184214',
'cwltool == 1.0.20190621234233',
'jsonmerge',
'ruamel.yaml <= 0.15.77',
'apache-airflow == 1.10.3',
'mysqlclient >= 1.3.6, < 1.4',
'pyjwt',
'urllib3<1.24'
'urllib3'
],
options={
'app': {
Expand Down

0 comments on commit 85fc877

Please sign in to comment.