diff --git a/lib/galaxy/datatypes/binary.py b/lib/galaxy/datatypes/binary.py index 27699db7d50b..8ae06b178865 100644 --- a/lib/galaxy/datatypes/binary.py +++ b/lib/galaxy/datatypes/binary.py @@ -4329,9 +4329,9 @@ def __init__(self, **kwd): def sniff(self, filename: str) -> bool: try: - npz = np.load(filename) - if isinstance(npz, np.lib.npyio.NpzFile): - return True + with np.load(filename) as npz: + if isinstance(npz, np.lib.npyio.NpzFile) and any(f.filename.endswith(".npy") for f in npz.zip.filelist): + return True except Exception: return False return False diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index 054f5f1e78a9..43b65e6b0615 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -90,6 +90,7 @@ visit_input_values, ) from galaxy.tools.parameters.basic import ( + ConnectedValue, DataCollectionToolParameter, DataToolParameter, RuntimeValue, @@ -1520,12 +1521,12 @@ def _workflow_to_dict_export(self, trans, stored=None, workflow=None, internal=F if name: input_dicts.append({"name": name, "description": annotation_str}) for name, val in step_state.items(): - if isinstance(val, RuntimeValue): + if isinstance(val, RuntimeValue) and not isinstance(val, ConnectedValue): input_dicts.append({"name": name, "description": f"runtime parameter for tool {module.get_name()}"}) elif isinstance(val, dict): # Input type is described by a dict, e.g. indexed parameters. for partval in val.values(): - if isinstance(partval, RuntimeValue): + if isinstance(partval, RuntimeValue) and not isinstance(val, ConnectedValue): input_dicts.append( {"name": name, "description": f"runtime parameter for tool {module.get_name()}"} )