Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix: issue with duplicated prefix for checkpoints on cloud (#1294)
* create tests for issue #574 to reproduce a problem with the use of checkpoints in cloud environments * do not add default remote prefix to files in checkpoints
- Loading branch information
Showing
6 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
|
||
# This test file is adapted from this one: | ||
# https://github.com/snakemake/snakemake/blob/758fabdb64255f8ca79e9c1483ceab67eb39ff07/tests/test_google_lifesciences/Snakefile | ||
from snakemake.remote.GS import RemoteProvider as GSRemoteProvider | ||
GS = GSRemoteProvider() | ||
|
||
rule all: | ||
input: | ||
"landsat-data.txt.bz2" | ||
|
||
checkpoint copy: | ||
input: | ||
GS.remote("gcp-public-data-landsat/LC08/01/001/003/LC08_L1GT_001003_20170430_20170501_01_RT/LC08_L1GT_001003_20170430_20170501_01_RT_MTL.txt") | ||
output: | ||
"landsat-data.txt" | ||
resources: | ||
mem_mb=100 | ||
run: | ||
shell("cp {input} {output}") | ||
|
||
rule pack: | ||
input: | ||
lambda wildcards: checkpoints.copy.get().output[0] | ||
output: | ||
"landsat-data.txt.bz2" | ||
conda: | ||
"env.yml" | ||
log: | ||
"logs/pack.log" | ||
shell: | ||
"bzip2 -c {input} > {output}; echo successful > {log}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"message": "hahaha"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- bzip2 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters