Skip to content

Conversation

@bcouturi
Copy link
Contributor

@bcouturi bcouturi commented Jan 27, 2022

Description

The idea of this PR is to add a "remote_prefix" in RemoteObject, thus making sure we can have different paths for the local file and the remote one e.g. with

from snakemake.remote.XRootD import RemoteProvider as XRootDRemoteProvider
XRootD = XRootDRemoteProvider(stay_on_remote=False,  keep_local=True, 
                              remote_prefix="root://server//eos/path/")

rule test1:
    input:
        "input.txt"
    output:
        XRootD.remote("output.txt")
    shell:
        "echo 'Output is: {output}.'; cat {input} > {output}"

The local output would be 'output.txt' but the remote file would be 'root://server//eos/path/output.txt'

QC

  • The PR contains a test case for the changes or the changes are already covered by an existing test case.
  • The documentation (docs/) is updated to reflect the changes or this is not necessary (e.g. if the change does neither modify the language nor the behavior or functionalities of Snakemake).

@bcouturi bcouturi changed the title Introduction of remote_prefix remotes feat: Introduction of remote_prefix remotes Feb 3, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@johanneskoester
Copy link
Contributor

johanneskoester commented Mar 25, 2022

Hi, yes, that's a reasonable idea. I am happy to take a PR, but it should handle the issue for all remote providers via the AbstractRemoteProvider class.

@bcouturi
Copy link
Contributor Author

bcouturi commented Apr 13, 2022

Hi,
The AbstractRemoteProvider has been updated indeed, and the remote_file of the AbstractRemoteObject has been changed to add the remote_prefix after the protocol. In principle this should work for other providers but I only have a simple way to test the xroot one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants