From 64ecfacbd588737ea7627153ac9a25b5c3ad5d90 Mon Sep 17 00:00:00 2001 From: nishchaykarle Date: Tue, 20 Feb 2024 23:25:10 -0800 Subject: [PATCH] bug fixes --- cwl/cwl_app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cwl/cwl_app.py b/cwl/cwl_app.py index e6121bd..e8206cc 100644 --- a/cwl/cwl_app.py +++ b/cwl/cwl_app.py @@ -153,7 +153,7 @@ def __process_array_value(self, value: Any, str_quote="") -> str: def __lt__(self, other) -> bool: if self.position is None: - return other.position is None + return other.position is not None return True if other.position is None else self.position < other.position @@ -331,7 +331,7 @@ def validate_cwl(cls, cwl_content: Dict[str, any]) -> Dict[str, any]: "id": Regex( r"^[a-zA-Z_][a-zA-Z0-9_]*$", ), - "type": input_simple_types, + "type": input_types_schema, Opt("items"): Or(*input_simple_types), Opt("default"): Or( int, float, str, bool, list, error="Invalid default value" @@ -499,7 +499,7 @@ def get_command(self, **kwargs) -> str: else: raise ArgumentMissing(f"missing required value for argument: {input_arg.arg_id}") - return f"{self.__base_command} {' '.join(input_args)}" + return f"{self.__base_command} {' '.join(filter(None, input_args))}" def __get_parsl_bash_app_args(self, **kwargs) -> Dict[str, Any]: """Args needed to run the command using Parsl