[med-svn] [snakemake] 02/05: Patch out a test case whose dependencies are not present in Debian
chrysn
chrysn-guest at moszumanska.debian.org
Mon Dec 11 16:18:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
chrysn-guest pushed a commit to branch master
in repository snakemake.
commit 894281112b636bbcbd9b24d106e350f355d1acbd
Author: chrysn <chrysn at fsfe.org>
Date: Mon Dec 11 14:54:45 2017 +0100
Patch out a test case whose dependencies are not present in Debian
---
.../0009-skip-test-without-google-cloud-sdk.patch | 35 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 36 insertions(+)
diff --git a/debian/patches/0009-skip-test-without-google-cloud-sdk.patch b/debian/patches/0009-skip-test-without-google-cloud-sdk.patch
new file mode 100644
index 0000000..dc7b28c
--- /dev/null
+++ b/debian/patches/0009-skip-test-without-google-cloud-sdk.patch
@@ -0,0 +1,35 @@
+--- a/tests/test_remote_gs/Snakefile
++++ b/tests/test_remote_gs/Snakefile
+@@ -1,15 +1,19 @@
+-from snakemake.remote import GS
+-import google.auth
+ try:
+- GS = GS.RemoteProvider()
++ from snakemake.remote import GS
++except WorkflowError:
++ print("skipping test_remote_gs: The Python 3 package 'google-cloud-sdk' needs to be installed to use GS remote() file functionality. No module named 'google.cloud'")
++else:
++ import google.auth
++ try:
++ GS = GS.RemoteProvider()
+
+- rule 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"
+- shell:
+- "cp {input} {output}"
+-except google.auth.exceptions.DefaultCredentialsError:
+- # ignore the test if not authenticated
+- print("skipping test_remote_gs because we are not authenticated with gcloud")
++ rule 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"
++ shell:
++ "cp {input} {output}"
++ except google.auth.exceptions.DefaultCredentialsError:
++ # ignore the test if not authenticated
++ print("skipping test_remote_gs because we are not authenticated with gcloud")
diff --git a/debian/patches/series b/debian/patches/series
index ea2dca2..186b8ab 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@
0006-restore-bin.patch
# 0007-noop-rate-limiter.patch - broken and obsolete with https://bugs.debian.org/880661
0008-remove_sphinx.ext.patch
+0009-skip-test-without-google-cloud-sdk.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/snakemake.git
More information about the debian-med-commit
mailing list