snakemake-software-deployment-plugin-container 0.7.3__tar.gz → 0.7.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (11) hide show
  1. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/CHANGELOG.md +14 -0
  2. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/PKG-INFO +1 -1
  3. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/pyproject.toml +1 -1
  4. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/src/snakemake_software_deployment_plugin_container/__init__.py +26 -2
  5. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/.github/workflows/ci.yml +0 -0
  6. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/.github/workflows/conventional-prs.yml +0 -0
  7. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/.github/workflows/release-please.yml +0 -0
  8. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/.gitignore +0 -0
  9. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/LICENSE +0 -0
  10. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/README.md +0 -0
  11. {snakemake_software_deployment_plugin_container-0.7.3 → snakemake_software_deployment_plugin_container-0.7.5}/tests/test_plugin.py +0 -0
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.7.5](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.7.4...v0.7.5) (2026-09-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * specify UDOCKER_DIR with udocker run ([59a66f4](https://github.com/snakemake/snakemake-software-deployment-plugin-container/commit/59a66f4924059ad3b3c84853d8cd7a4173b4bfb6))
9
+
10
+ ## [0.7.4](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.7.3...v0.7.4) (2026-09-10)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * handle runtime setup (for now needed by udocker) ([78cc3ac](https://github.com/snakemake/snakemake-software-deployment-plugin-container/commit/78cc3ace79c5a6305ae2676a82d46b83f30a2347))
16
+
3
17
  ## [0.7.3](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.7.2...v0.7.3) (2026-09-10)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: snakemake-software-deployment-plugin-container
3
- Version: 0.7.3
3
+ Version: 0.7.5
4
4
  Project-URL: repository, https://github.com/snakemake/snakemake-software-deployment-plugin-container
5
5
  Project-URL: documentation, https://snakemake.github.io/snakemake-plugin-catalog/plugins/software-deployment/container.html
6
6
  Author-email: Ben Carrillo <ben.uzh@pm.me>, Johannes Köster <johannes.koester@uni-due.de>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "snakemake-software-deployment-plugin-container"
3
- version = "0.7.3"
3
+ version = "0.7.5"
4
4
  authors = [
5
5
  { name = "Ben Carrillo", email = "ben.uzh@pm.me" },
6
6
  { name = "Johannes Köster", email = "johannes.koester@uni-due.de" }
@@ -1,3 +1,4 @@
1
+ from typing import ClassVar
1
2
  from pathlib import Path
2
3
  from abc import abstractmethod
3
4
  from snakemake_interface_software_deployment_plugins import DeployableEnvBase
@@ -114,6 +115,13 @@ class Env(DeployableEnvBase, EnvBase):
114
115
  elif self.settings.runtime == Runtime.UDOCKER:
115
116
  self.runtime_manager = RuntimeManagerUdocker(self)
116
117
 
118
+ # Handle runtime manager setup if needed.
119
+ # This is only done once per runtime manager type, not per environment.
120
+ if not self.runtime_manager.is_setup:
121
+ if self.runtime_manager.setup_cmd() is not None:
122
+ self.run_cmd(self.runtime_manager.setup_cmd(), check=True)
123
+ self.runtime_manager.__class__.is_setup = True
124
+
117
125
  # The decorator ensures that the decorated method is only called once
118
126
  # in case multiple environments of the same kind are created.
119
127
  @EnvBase.once
@@ -192,7 +200,7 @@ class Env(DeployableEnvBase, EnvBase):
192
200
  self.is_deployable()
193
201
  and self.runtime_manager.deployed_image_path() is not None
194
202
  ):
195
- self.runtime_manager.deployed_image_path.unlink(missing_ok=True)
203
+ self.runtime_manager.deployed_image_path().unlink(missing_ok=True)
196
204
 
197
205
  def is_deployable(self) -> bool:
198
206
  return (
@@ -204,6 +212,10 @@ class Env(DeployableEnvBase, EnvBase):
204
212
  @dataclass
205
213
  class RuntimeManager:
206
214
  env: Env
215
+ is_setup: ClassVar[bool] = False
216
+
217
+ def setup_cmd(self) -> str | None:
218
+ return None
207
219
 
208
220
  def deployed_image_name(self) -> str:
209
221
  return (
@@ -218,6 +230,9 @@ class RuntimeManager:
218
230
  @abstractmethod
219
231
  def deploy_cmd(self) -> str | None: ...
220
232
 
233
+ def pre_cmd(self) -> str:
234
+ return ""
235
+
221
236
  def pre_subcommand_options(self) -> str:
222
237
  return ""
223
238
 
@@ -258,8 +273,11 @@ class RuntimeManager:
258
273
 
259
274
  def decorate_shellcmd(self, cmd: str) -> str:
260
275
  mountpoints = self.get_mountpoint_args()
276
+ pre_cmd = self.pre_cmd()
277
+ if pre_cmd:
278
+ pre_cmd += " "
261
279
  return (
262
- f"{self.env.settings.runtime}"
280
+ f"{pre_cmd}{self.env.settings.runtime}"
263
281
  f" {self.pre_subcommand_options()}"
264
282
  f" {self.subcommand()}"
265
283
  f" {self.options()}"
@@ -324,6 +342,12 @@ class RuntimeManagerDocker(RuntimeManager):
324
342
 
325
343
 
326
344
  class RuntimeManagerUdocker(RuntimeManager):
345
+ def setup_cmd(self) -> str | None:
346
+ return "udocker install"
347
+
348
+ def pre_cmd(self) -> str:
349
+ return f"UDOCKER_DIR={self.env.deployment_path}"
350
+
327
351
  def pre_subcommand_options(self) -> str:
328
352
  return "--quiet"
329
353