snakemake-interface-software-deployment-plugins 0.20.0__tar.gz → 0.21.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.
Files changed (17) hide show
  1. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/CHANGELOG.md +7 -0
  2. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/PKG-INFO +1 -1
  3. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/pyproject.toml +1 -1
  4. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/__init__.py +8 -1
  5. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/tests.py +10 -8
  6. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/.github/workflows/conventional-prs.yml +0 -0
  7. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/.github/workflows/release-please.yml +0 -0
  8. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/.github/workflows/test.yml +0 -0
  9. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/.gitignore +0 -0
  10. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/LICENSE +0 -0
  11. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/README.md +0 -0
  12. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/_common.py +0 -0
  13. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/registry/__init__.py +0 -0
  14. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/registry/plugin.py +0 -0
  15. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/snakemake_interface_software_deployment_plugins/settings.py +0 -0
  16. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/tests/test_interface.py +0 -0
  17. {snakemake_interface_software_deployment_plugins-0.20.0 → snakemake_interface_software_deployment_plugins-0.21.0}/tests/test_py37.py +0 -0
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.21.0](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.20.0...v0.21.0) (2026-09-18)
4
+
5
+
6
+ ### Features
7
+
8
+ * provide method for retrieving the cache_asset path of a given asset ([#71](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/issues/71)) ([7f41c7d](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/commit/7f41c7d36fda57d0479bdca1df725ff265154ee8))
9
+
3
10
  ## [0.20.0](https://github.com/snakemake/snakemake-interface-software-deployment-plugins/compare/v0.19.2...v0.20.0) (2026-09-17)
4
11
 
5
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: snakemake-interface-software-deployment-plugins
3
- Version: 0.20.0
3
+ Version: 0.21.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
  Project-URL: homepage, https://snakemake.github.io
@@ -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.20.0"
9
+ version = "0.21.0"
10
10
  requires-python = ">=3.11,<4.0"
11
11
  dependencies = [
12
12
  "argparse-dataclass >=2.0.0,<3.0",
@@ -399,7 +399,7 @@ class CacheableEnvBase(EnvBase, ABC):
399
399
  )
400
400
  os.close(fd)
401
401
  tmp_cache_path = Path(tmp_cache_path)
402
- cache_path = self.cache_path / asset
402
+ cache_path = self.get_cache_asset_path(asset)
403
403
  try:
404
404
  await self.cache_asset(asset, tmp_cache_path)
405
405
  os.replace(tmp_cache_path, cache_path)
@@ -415,6 +415,13 @@ class CacheableEnvBase(EnvBase, ABC):
415
415
  def cache_path(self) -> Path:
416
416
  return self._cache_prefix
417
417
 
418
+ @property
419
+ def get_cache_asset_path(self, asset: str) -> Path:
420
+ """Return the path to the cached asset.
421
+ This does not check whether the asset exists.
422
+ """
423
+ return self.cache_path / asset
424
+
418
425
  async def remove_cache(self) -> None:
419
426
  """Remove the cached environment assets."""
420
427
  for asset in await self.get_cache_assets():
@@ -101,6 +101,10 @@ class TestSoftwareDeploymentBase(ABC):
101
101
  assert cmd != decorated_cmd
102
102
  assert env.run_cmd(decorated_cmd).returncode == 0
103
103
 
104
+ async def _cache_assets(env):
105
+ for asset in await env.get_cache_assets():
106
+ await env.managed_cache_asset(asset)
107
+
104
108
  def test_deploy(self, tmp_path):
105
109
  env = self._get_env(tmp_path)
106
110
  self._deploy(env, tmp_path)
@@ -114,13 +118,7 @@ class TestSoftwareDeploymentBase(ABC):
114
118
 
115
119
  assert isinstance(env, CacheableEnvBase)
116
120
 
117
- async def cache_assets(env):
118
- for asset in await env.get_cache_assets():
119
- await env.managed_cache_asset(asset)
120
-
121
- asyncio.run(cache_assets(env))
122
-
123
- self._deploy(env, tmp_path)
121
+ asyncio.run(self.cache_assets(env))
124
122
 
125
123
  assert any(env.cache_path.iterdir())
126
124
 
@@ -134,7 +132,6 @@ class TestSoftwareDeploymentBase(ABC):
134
132
  asyncio.run(env.pin())
135
133
  assert env.pinfile.exists()
136
134
  print("Pinfile content:", env.pinfile.read_text(), sep="\n")
137
- self._deploy(env, tmp_path)
138
135
 
139
136
  def test_report_software(self, tmp_path):
140
137
  env = self._get_env(tmp_path)
@@ -257,6 +254,11 @@ class TestSoftwareDeploymentBase(ABC):
257
254
  if not env.is_deployable():
258
255
  pytest.skip("Environment is not deployable.")
259
256
 
257
+ if env.is_pinnable():
258
+ asyncio.run(env.pin())
259
+ if env.is_cacheable():
260
+ asyncio.run(self._cache_assets(env))
261
+
260
262
  assert isinstance(env, DeployableEnvBase)
261
263
  asyncio.run(env.deploy())
262
264
  assert any((tmp_path / env.spec.module().__name__ / "deployments").iterdir())