Skip to content

Commit

Permalink
Fix do_eval() function
Browse files Browse the repository at this point in the history
  • Loading branch information
nsoranzo committed Mar 7, 2024
1 parent 1406a61 commit 833ad06
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions lib/galaxy/tools/expressions/evaluation.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
import json
import os
import subprocess
from typing import MutableMapping
from typing import (
Optional,
TYPE_CHECKING,
)

from cwl_utils.expression import do_eval as _do_eval

from .util import find_engine

if TYPE_CHECKING:
from cwl_utils.types import (
CWLObjectType,
CWLOutputType,
)

FILE_DIRECTORY = os.path.normpath(os.path.dirname(os.path.join(__file__)))
NODE_ENGINE = os.path.join(FILE_DIRECTORY, "cwlNodeEngine.js")


def do_eval(expression: str, context: MutableMapping):
def do_eval(expression: str, jobinput: "CWLObjectType", context: Optional["CWLOutputType"] = None):
return _do_eval(
expression,
context,
jobinput,
[{"class": "InlineJavascriptRequirement"}],
None,
None,
{},
context=context,
cwlVersion="v1.2.1",
)

Expand Down

0 comments on commit 833ad06

Please sign in to comment.