snakemake-interface-software-deployment-plugins 0.10.2__tar.gz → 0.11.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.11.0}/CHANGELOG.md +7 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/PKG-INFO +1 -1
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/pyproject.toml +1 -1
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/snakemake_interface_software_deployment_plugins/__init__.py +20 -9
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/.github/workflows/conventional-prs.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/.github/workflows/release-please.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/.github/workflows/test.yml +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/.gitignore +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/LICENSE +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/README.md +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/snakemake_interface_software_deployment_plugins/_common.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.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.11.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.11.0}/snakemake_interface_software_deployment_plugins/settings.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/snakemake_interface_software_deployment_plugins/tests.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/tests/test_interface.py +0 -0
- {snakemake_interface_software_deployment_plugins-0.10.2 → snakemake_interface_software_deployment_plugins-0.11.0}/tests/test_py37.py +0 -0
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.0](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.10.2...v0.11.0) (2026-02-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* make EnvBase generic; enable EnvSpecBase recursive attribute modification ([1425a51](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/1425a516a5c7152bdb6e291d602247ab8e0b4412))
|
|
9
|
+
|
|
3
10
|
## [0.10.2](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.10.1...v0.10.2) (2026-02-18)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snakemake-interface-software-deployment-plugins
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.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.11.0"
|
|
10
10
|
requires-python = ">=3.11,<4.0"
|
|
11
11
|
dependencies = [
|
|
12
12
|
"argparse-dataclass >=2.0.0,<3.0",
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Generic
|
|
2
|
+
|
|
1
3
|
__author__ = "Johannes Köster"
|
|
2
4
|
__copyright__ = "Copyright 2024, Johannes Köster"
|
|
3
5
|
__email__ = "johannes.koester@uni-due.de"
|
|
@@ -23,6 +25,7 @@ from typing import (
|
|
|
23
25
|
Type,
|
|
24
26
|
TypeVar,
|
|
25
27
|
Union,
|
|
28
|
+
Callable,
|
|
26
29
|
)
|
|
27
30
|
import subprocess as sp
|
|
28
31
|
|
|
@@ -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
|
|
|
@@ -160,14 +171,14 @@ class ShellExecutable:
|
|
|
160
171
|
TSettings = TypeVar("TSettings", bound="SoftwareDeploymentSettingsBase")
|
|
161
172
|
|
|
162
173
|
|
|
163
|
-
class EnvBase(ABC):
|
|
174
|
+
class EnvBase(ABC, Generic[TSettings]):
|
|
164
175
|
_cache: ClassVar[Dict[Tuple[Type["EnvBase"], Optional["EnvBase"]], Any]] = {}
|
|
165
176
|
|
|
166
177
|
def __init__(
|
|
167
178
|
self,
|
|
168
179
|
spec: EnvSpecBase,
|
|
169
180
|
within: Optional["EnvBase"],
|
|
170
|
-
settings: Optional[
|
|
181
|
+
settings: Optional[TSettings],
|
|
171
182
|
shell_executable: ShellExecutable,
|
|
172
183
|
tempdir: Path,
|
|
173
184
|
source_cache: Path,
|
|
@@ -177,7 +188,7 @@ class EnvBase(ABC):
|
|
|
177
188
|
):
|
|
178
189
|
self.spec = spec
|
|
179
190
|
self.within = within
|
|
180
|
-
self.settings: Optional[
|
|
191
|
+
self.settings: Optional[TSettings] = settings
|
|
181
192
|
self.shell_executable = shell_executable
|
|
182
193
|
self.tempdir = tempdir
|
|
183
194
|
self.source_cache: Path = source_cache
|
|
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
|