snakemake-interface-software-deployment-plugins 0.10.2__tar.gz → 0.12.0__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.
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/CHANGELOG.md +21 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/PKG-INFO +1 -1
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/pyproject.toml +1 -1
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/__init__.py +29 -20
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/.github/workflows/conventional-prs.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/.github/workflows/release-please.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/.github/workflows/test.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/.gitignore +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/LICENSE +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/README.md +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/_common.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/registry/__init__.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/registry/plugin.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/settings.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/snakemake_interface_software_deployment_plugins/tests.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/tests/test_interface.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.12.0}/tests/test_py37.py +0 -0
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.12.0](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.11.0...v0.12.0) (2026-02-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* make env spec generic ([c7b9971](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/c7b9971d779909081e50b45ff5f858e67435bd08))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* make generic args more flexible ([af21397](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/af21397717e9400c5a335f3fde5950b9f522626c))
|
|
14
|
+
* relax typing ([0f10324](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/0f10324da494b2fe4b46616aa283abd7f96dcc09))
|
|
15
|
+
* simplify mountpoint information into self.mountpoints, complemented by self.tempdir holding the temporary directory to use ([7112ee6](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/7112ee6bb5eed944dab7da90a30255431b0042bd))
|
|
16
|
+
|
|
17
|
+
## [0.11.0](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.10.2...v0.11.0) (2026-02-23)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* make EnvBase generic; enable EnvSpecBase recursive attribute modification ([1425a51](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/1425a516a5c7152bdb6e291d602247ab8e0b4412))
|
|
23
|
+
|
|
3
24
|
## [0.10.2](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.10.1...v0.10.2) (2026-02-18)
|
|
4
25
|
|
|
5
26
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snakemake-interface-software-deployment-plugins
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.12.0
|
|
4
4
|
Summary: This package provides a stable interface for interactions between Snakemake and its software deployment plugins.
|
|
5
5
|
Project-URL: repository, https://github.com/snakemake/snakemake-interface-software-deployment-plugins
|
|
6
6
|
Author-email: Johannes Köster <johannes.koester@uni-due.de>
|
|
@@ -6,7 +6,7 @@ description = "This package provides a stable interface for interactions between
|
|
|
6
6
|
license = "MIT"
|
|
7
7
|
name = "snakemake-interface-software-deployment-plugins"
|
|
8
8
|
readme = "README.md"
|
|
9
|
-
version = "0.
|
|
9
|
+
version = "0.12.0"
|
|
10
10
|
requires-python = ">=3.11,<4.0"
|
|
11
11
|
dependencies = [
|
|
12
12
|
"argparse-dataclass >=2.0.0,<3.0",
|
|
@@ -21,14 +21,11 @@ from typing import (
|
|
|
21
21
|
Self,
|
|
22
22
|
Tuple,
|
|
23
23
|
Type,
|
|
24
|
-
TypeVar,
|
|
25
24
|
Union,
|
|
25
|
+
Callable,
|
|
26
26
|
)
|
|
27
27
|
import subprocess as sp
|
|
28
28
|
|
|
29
|
-
from snakemake_interface_software_deployment_plugins.settings import (
|
|
30
|
-
SoftwareDeploymentSettingsBase,
|
|
31
|
-
)
|
|
32
29
|
from snakemake_interface_common.exceptions import WorkflowError
|
|
33
30
|
|
|
34
31
|
|
|
@@ -60,8 +57,14 @@ class EnvSpecBase(ABC):
|
|
|
60
57
|
self._obj_hash: Optional[int] = None
|
|
61
58
|
|
|
62
59
|
@classmethod
|
|
63
|
-
def env_cls(cls):
|
|
64
|
-
|
|
60
|
+
def env_cls(cls) -> Type["EnvBase"]:
|
|
61
|
+
try:
|
|
62
|
+
return cls.module().EnvBase
|
|
63
|
+
except AttributeError:
|
|
64
|
+
raise AttributeError(
|
|
65
|
+
"No class Env found next to EnvSpec class. "
|
|
66
|
+
"Make sure to import or define it there."
|
|
67
|
+
)
|
|
65
68
|
|
|
66
69
|
@classmethod
|
|
67
70
|
@abstractmethod
|
|
@@ -92,24 +95,32 @@ class EnvSpecBase(ABC):
|
|
|
92
95
|
return True
|
|
93
96
|
return False
|
|
94
97
|
|
|
95
|
-
def modify_source_paths(self, modify_func) -> Self:
|
|
98
|
+
def modify_source_paths(self, modify_func: Callable) -> Self:
|
|
99
|
+
return self._modify_attributes("source_path_attributes", modify_func)
|
|
100
|
+
|
|
101
|
+
def modify_identity_attributes(self, modify_func: Callable) -> Self:
|
|
102
|
+
return self._modify_attributes("identity_attributes", modify_func)
|
|
103
|
+
|
|
104
|
+
def _modify_attributes(self, attribute_method: str, modify_func: Callable) -> Self:
|
|
96
105
|
if self.has_source_paths():
|
|
97
106
|
self_or_copied = copy(self)
|
|
98
107
|
else:
|
|
99
108
|
return self
|
|
100
|
-
for attr_name in self_or_copied
|
|
109
|
+
for attr_name in getattr(self_or_copied, attribute_method):
|
|
101
110
|
current_value = getattr(self_or_copied, attr_name)
|
|
102
111
|
if current_value is not None:
|
|
103
112
|
setattr(self_or_copied, attr_name, modify_func(current_value))
|
|
104
113
|
|
|
105
114
|
if self_or_copied.within is not None:
|
|
106
|
-
self_or_copied.within = self_or_copied.within.
|
|
107
|
-
|
|
115
|
+
self_or_copied.within = self_or_copied.within._modify_attributes(
|
|
116
|
+
attribute_method,
|
|
117
|
+
modify_func,
|
|
108
118
|
)
|
|
109
119
|
|
|
110
120
|
if self_or_copied.fallback is not None:
|
|
111
|
-
self_or_copied.fallback = self_or_copied.fallback.
|
|
112
|
-
|
|
121
|
+
self_or_copied.fallback = self_or_copied.fallback._modify_attributes(
|
|
122
|
+
attribute_method,
|
|
123
|
+
modify_func,
|
|
113
124
|
)
|
|
114
125
|
return self_or_copied
|
|
115
126
|
|
|
@@ -157,30 +168,28 @@ class ShellExecutable:
|
|
|
157
168
|
return sp.run([self.executable] + self.args + [self.command_arg, cmd], **kwargs)
|
|
158
169
|
|
|
159
170
|
|
|
160
|
-
TSettings = TypeVar("TSettings", bound="SoftwareDeploymentSettingsBase")
|
|
161
|
-
|
|
162
|
-
|
|
163
171
|
class EnvBase(ABC):
|
|
164
172
|
_cache: ClassVar[Dict[Tuple[Type["EnvBase"], Optional["EnvBase"]], Any]] = {}
|
|
165
173
|
|
|
166
174
|
def __init__(
|
|
167
175
|
self,
|
|
168
|
-
spec
|
|
176
|
+
spec,
|
|
169
177
|
within: Optional["EnvBase"],
|
|
170
|
-
settings
|
|
178
|
+
settings,
|
|
171
179
|
shell_executable: ShellExecutable,
|
|
180
|
+
mountpoints: List[Path],
|
|
172
181
|
tempdir: Path,
|
|
173
|
-
source_cache: Path,
|
|
174
182
|
cache_prefix: Path,
|
|
175
183
|
deployment_prefix: Path,
|
|
176
184
|
pinfile_prefix: Path,
|
|
177
185
|
):
|
|
186
|
+
# type annotation for spec and settings is left for implementing plugins
|
|
178
187
|
self.spec = spec
|
|
179
188
|
self.within = within
|
|
180
|
-
self.settings
|
|
189
|
+
self.settings = settings
|
|
181
190
|
self.shell_executable = shell_executable
|
|
191
|
+
self.mountpoints = mountpoints
|
|
182
192
|
self.tempdir = tempdir
|
|
183
|
-
self.source_cache: Path = source_cache
|
|
184
193
|
self._deployment_prefix: Path = deployment_prefix
|
|
185
194
|
self._cache_prefix: Path = cache_prefix
|
|
186
195
|
self._pinfile_prefix: Path = pinfile_prefix
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|