From b50528734a104419409ceba4e8d5b58f412a634e Mon Sep 17 00:00:00 2001 From: Johannes Koester Date: Tue, 17 Feb 2026 18:04:03 +0100 Subject: [PATCH] fix: various fixes --- .../__init__.py | 8 ++++++-- snakemake_interface_software_deployment_plugins/tests.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/snakemake_interface_software_deployment_plugins/__init__.py b/snakemake_interface_software_deployment_plugins/__init__.py index 8f5d0a0..8dfeeb9 100644 --- a/snakemake_interface_software_deployment_plugins/__init__.py +++ b/snakemake_interface_software_deployment_plugins/__init__.py @@ -272,14 +272,18 @@ def hash(self) -> str: return self._managed_generic_hash("hash") def _managed_generic_hash(self, kind: str) -> str: - store = getattr(self, f"_managed_{kind}_store") + store_attr = f"_managed_{kind}_store" + store = getattr(self, store_attr) if store is None: record_hash = f"record_{kind}" hash_object = hashlib.md5() if self.within is not None: - getattr(self.within, record_hash)(hash_object) + # For within, we always take the normal hash, + # since the deployment just runs within that. + self.within.record_hash(hash_object) getattr(self, record_hash)(hash_object) store = hash_object.hexdigest() + setattr(self, store_attr, store) return store def __hash__(self) -> int: diff --git a/snakemake_interface_software_deployment_plugins/tests.py b/snakemake_interface_software_deployment_plugins/tests.py index 76f36db..bff4ec2 100644 --- a/snakemake_interface_software_deployment_plugins/tests.py +++ b/snakemake_interface_software_deployment_plugins/tests.py @@ -92,7 +92,7 @@ def test_deploy(self, tmp_path): env = self._get_env(tmp_path) self._deploy(env, tmp_path) cmd = env.managed_decorate_shellcmd(self.get_test_cmd()) - assert env.run_cmd(cmd).returncode == 0 + assert self.shell_executable.run(cmd).returncode == 0 def test_cache(self, tmp_path): env = self._get_env(tmp_path)