diff --git a/CHANGELOG.md b/CHANGELOG.md index 414c1f96..c1da84c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ Types of changes # Latch SDK Changelog +## 2.38.7 - 2023-01-26 + +### Fixed + +* Snakemake + + warn instead of error when config parameter type cannot be parsed in generate-metadata command + ## 2.38.6 - 2023-01-26 ### Added diff --git a/latch_cli/snakemake/config/parser.py b/latch_cli/snakemake/config/parser.py index 8219acf6..dbd8c677 100644 --- a/latch_cli/snakemake/config/parser.py +++ b/latch_cli/snakemake/config/parser.py @@ -66,7 +66,14 @@ def parse_config( parsed: Dict[str, Type] = {} for k, v in res.items(): - typ = parse_type(v, k, infer_files=infer_files) + try: + typ = parse_type(v, k, infer_files=infer_files) + except ValueError as e: + click.secho( + f"WARNING: Skipping parameter {k}. Failed to parse type: {e}.", + fg="yellow", + ) + continue val, default = parse_value(typ, v) parsed[k] = (typ, (val, default)) diff --git a/latch_cli/snakemake/config/utils.py b/latch_cli/snakemake/config/utils.py index f476b8db..4bac2c18 100644 --- a/latch_cli/snakemake/config/utils.py +++ b/latch_cli/snakemake/config/utils.py @@ -117,10 +117,11 @@ def parse_type( ) for x in v ) - if len(set(parsed_types)) > 1: + + if len(set(parsed_types)) != 1: raise ValueError( - "Generic Lists are not supported - please ensure that all elements in a" - " list are of the same type", + "Generic Lists are not supported - please" + f" ensure that all elements in {name} are of the same type", ) typ = parsed_types[0] if typ in {LatchFile, LatchDir}: diff --git a/setup.py b/setup.py index f617e856..e02ee2fe 100644 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( name="latch", - version="v2.38.6", + version="v2.38.7", author_email="kenny@latch.bio", description="The Latch SDK", packages=find_packages(),