snakemake-software-deployment-plugin-container 0.6.0__tar.gz → 0.6.2__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 (12) hide show
  1. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/.github/workflows/ci.yml +4 -0
  2. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/.gitignore +5 -0
  3. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/CHANGELOG.md +14 -0
  4. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/PKG-INFO +1 -1
  5. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/pyproject.toml +1 -1
  6. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/src/snakemake_software_deployment_plugin_container/__init__.py +12 -1
  7. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/tests/test_plugin.py +4 -25
  8. snakemake_software_deployment_plugin_container-0.6.0/pixi.lock +0 -1464
  9. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/.github/workflows/conventional-prs.yml +0 -0
  10. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/.github/workflows/release-please.yml +0 -0
  11. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/LICENSE +0 -0
  12. {snakemake_software_deployment_plugin_container-0.6.0 → snakemake_software_deployment_plugin_container-0.6.2}/README.md +0 -0
@@ -41,6 +41,10 @@ jobs:
41
41
  - name: Setup pixi
42
42
  uses: prefix-dev/setup-pixi@v0
43
43
 
44
+ - run: |
45
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_unconfined=0
46
+ sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
47
+
44
48
  - name: Run pytest
45
49
  run: pixi run test -v
46
50
 
@@ -5,3 +5,8 @@ __pycache__/
5
5
  *$py.class
6
6
  *.swp
7
7
  *.swo
8
+
9
+ /.coverage
10
+ /pixi.lock
11
+ /.zed
12
+ coverage.xml
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.2](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.6.1...v0.6.2) (2026-06-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * do not use hardcoded bash path when decorating commands ([#18](https://github.com/snakemake/snakemake-software-deployment-plugin-container/issues/18)) ([394602c](https://github.com/snakemake/snakemake-software-deployment-plugin-container/commit/394602c53224f82078c3b3a4c104e66ff34503f4))
9
+
10
+ ## [0.6.1](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.6.0...v0.6.1) (2026-06-03)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * add parse and unparse func for runtime argument ([e4f9a8d](https://github.com/snakemake/snakemake-software-deployment-plugin-container/commit/e4f9a8df27ea4848b46127f7f88e8045202ed489))
16
+
3
17
  ## [0.6.0](https://github.com/snakemake/snakemake-software-deployment-plugin-container/compare/v0.5.2...v0.6.0) (2026-03-10)
4
18
 
5
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snakemake-software-deployment-plugin-container
3
- Version: 0.6.0
3
+ Version: 0.6.2
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.6.0"
3
+ version = "0.6.2"
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" }
@@ -46,6 +46,8 @@ class Settings(SoftwareDeploymentSettingsBase):
46
46
  "env_var": False,
47
47
  "required": False,
48
48
  "choices": Runtime.choices(),
49
+ "parse_func": Runtime.parse_choice,
50
+ "unparse_func": Runtime.item_to_choice,
49
51
  },
50
52
  )
51
53
  mountpoints: List[str] = field(
@@ -106,6 +108,8 @@ class Env(EnvBase):
106
108
  self.runtime_manager = RuntimeManagerApptainer(self)
107
109
  elif self.settings.runtime == Runtime.DOCKER:
108
110
  self.runtime_manager = RuntimeManagerDocker(self)
111
+ elif self.settings.runtime == Runtime.UDOCKER:
112
+ self.runtime_manager = RuntimeManagerUdocker(self)
109
113
 
110
114
  # The decorator ensures that the decorated method is only called once
111
115
  # in case multiple environments of the same kind are created.
@@ -203,7 +207,7 @@ class RuntimeManager:
203
207
  f" {self.workdir_option()} {getcwd()!r}" # Working directory inside container
204
208
  f" {mountpoints}"
205
209
  f" {self.image_uri()}" # Container image
206
- " /bin/sh" # Shell executable
210
+ " bash" # Shell executable
207
211
  f" -c {shlex.quote(cmd)}" # The command to execute
208
212
  )
209
213
 
@@ -237,3 +241,10 @@ class RuntimeManagerDocker(RuntimeManager):
237
241
  gid = os.getgid()
238
242
  options += f" --user {uid}:{gid}"
239
243
  return options
244
+
245
+
246
+ class RuntimeManagerUdocker(RuntimeManager):
247
+ def options(self) -> str:
248
+ options = super().options()
249
+ options += " --nobanner --env TINI_SUBREAPER=1"
250
+ return options
@@ -21,18 +21,13 @@ from snakemake_software_deployment_plugin_container import (
21
21
  Runtime,
22
22
  )
23
23
 
24
- # There can be multiple subclasses of SoftwareDeploymentProviderBase here.
25
- # This way, you can implement multiple test scenarios.
26
- # For each subclass, the test suite tests the environment activation and execution
27
- # within, and, if applicable, environment deployment and archiving.
28
-
29
24
 
30
25
  class TestBase(TestSoftwareDeploymentBase):
31
- test_container = "alpine:latest"
26
+ test_container = "quay.io/biocontainers/samtools:1.23.1--ha83d96e_0"
32
27
 
33
28
  def get_contained_executable(self) -> str:
34
29
  # just provide something that is available inside of the container
35
- return "sh"
30
+ return "samtools"
36
31
 
37
32
  def get_env_spec(self) -> EnvSpecBase:
38
33
  # If the software deployment provider does not support deployable environments,
@@ -50,27 +45,11 @@ class TestBase(TestSoftwareDeploymentBase):
50
45
  def get_test_cmd(self) -> str:
51
46
  # Return a test command that should be executed within the environment
52
47
  # with exit code 0 (i.e. without error).
53
- return "/bin/true"
48
+ return "samtools --version"
54
49
 
55
50
 
56
51
  class TestApptainerContainer(TestBase):
57
- # TODO reactivate apptainer tests, they currently fail in CI with
58
- # ERROR : Could not write info to setgroups: Permission denied
59
- # ERROR : Error while waiting event for user namespace mappings: no event received
60
- __test__ = False
61
-
62
- def get_settings(
63
- self,
64
- ) -> Optional[SoftwareDeploymentSettingsBase]:
65
- return Settings(runtime=Runtime.APPTAINER)
66
-
67
-
68
- class TestApptainerContainerWithScheme(TestBase):
69
- # TODO reactivate apptainer tests, they currently fail in CI with
70
- # ERROR : Could not write info to setgroups: Permission denied
71
- # ERROR : Error while waiting event for user namespace mappings: no event received
72
- __test__ = False
73
- test_container = "docker://alpine:latest"
52
+ __test__ = True
74
53
 
75
54
  def get_settings(
76
55
  self,