Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ keywords = ["snakemake", "plugin", "storage", "filesystem", "rsync"]
[tool.poetry.dependencies]
python = "^3.11"
snakemake-interface-common = "^1.17.0"
snakemake-interface-storage-plugins = "^4.0.1"
snakemake-interface-storage-plugins = "^4.1.0"
sysrsync = "^1.1.1"
reretry = "^0.11.8"

Expand Down
18 changes: 14 additions & 4 deletions snakemake_storage_plugin_fs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,10 +199,20 @@ def size(self) -> int:

def retrieve_object(self):
# Ensure that the object is accessible locally under self.local_path()
cmd = sysrsync.get_rsync_command(
str(self.query_path), str(self.local_path()), options=["-av"]
)
self._run_cmd(cmd)
if self.is_ondemand_eligible:
self.provider.logger.info(
f"Creating symlink for on-demand retrieval of {self.query_path}."
)
os.symlink(
self.query_path,
self.local_path(),
target_is_directory=self.query_path.is_dir(),
)
else:
cmd = sysrsync.get_rsync_command(
str(self.query_path), str(self.local_path()), options=["-av"]
)
self._run_cmd(cmd)

def store_object(self):
# Ensure that the object is stored at the location specified by
Expand Down