[med-svn] [Git][med-team/snakemake][debian_for_upstream_5.14.0_which_requires_conda] 4 commits: move python3 fixes to a single patch

Rebecca N. Palmer gitlab at salsa.debian.org
Thu Apr 9 17:30:09 BST 2020



Rebecca N. Palmer pushed to branch debian_for_upstream_5.14.0_which_requires_conda at Debian Med / snakemake


Commits:
56367974 by Rebecca N. Palmer at 2020-04-09T17:15:09+01:00
move python3 fixes to a single patch

- - - - -
e9fcd301 by Rebecca N. Palmer at 2020-04-09T17:18:45+01:00
Disable buggy test (upstream 322) and tests needing conda or docker.

- - - - -
925c7493 by Rebecca N. Palmer at 2020-04-09T17:20:29+01:00
Delete unused patches.

- - - - -
1cf3a516 by Rebecca N. Palmer at 2020-04-09T17:21:38+01:00
Use boto3 (like upstream) not boto.

- - - - -


12 changed files:

- debian/changelog
- debian/control
- − debian/patches/0004-drop_test_symlink_time_handling.patch
- − debian/patches/0005-drop_test_symlink_temp.patch
- − debian/patches/0007-noop-rate-limiter.patch
- − debian/patches/0010-skip-test-without-rmarkdown.patch
- − debian/patches/boto3_is_just_boto
- − debian/patches/py3_subprocess.patch
- debian/patches/python3 → debian/patches/python3.patch
- debian/patches/series
- debian/rules
- debian/tests/run-unit-test


Changes:

=====================================
debian/changelog
=====================================
@@ -10,6 +10,9 @@ snakemake (5.14.0-1) UNRELEASED; urgency=medium
 
   [ Rebecca N. Palmer ]
   * Use Python 3 in subprocess calls.
+  * Disable buggy test (upstream 322) and tests needing conda or docker.
+  * Delete unused patches.
+  * Use boto3 (like upstream) not boto.
 
  -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Thu, 09 Apr 2020 14:57:00 +0100
 


=====================================
debian/control
=====================================
@@ -10,7 +10,7 @@ Build-Depends: ca-certificates,
                imagemagick,
                python3,
                python3-biopython,
-               python3-boto,
+               python3-boto3,
                python3-botocore,
                python3-configargparse,
                python3-datrie,
@@ -71,7 +71,7 @@ Depends: ca-certificates,
 Recommends: cwltool,
             imagemagick,
             python3-biopython,
-            python3-boto,
+            python3-boto3,
             python3-botocore,
             python3-dropbox,
             python3-flask,


=====================================
debian/patches/0004-drop_test_symlink_time_handling.patch deleted
=====================================
@@ -1,20 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 13 Dec 2016 16:05:05 +0100
-Bug-Debian: https://bugs.debian.org/845737
-Description: Ignore failures of test that might happpen in pbuilder
-
---- a/tests/tests.py
-+++ b/tests/tests.py
-@@ -371,7 +371,11 @@ def test_input_generator():
- def test_symlink_time_handling():
-     #See Snakefile for notes on why this fails on some systems
-     if os.utime in os.supports_follow_symlinks:
--        run(dpath("test_symlink_time_handling"))
-+        try:
-+            run(dpath("test_symlink_time_handling"))
-+        except:
-+            # skip this test that might fail when building in a pbuilder chroot
-+            pass
- 
- 
- def test_issue328():


=====================================
debian/patches/0005-drop_test_symlink_temp.patch deleted
=====================================
@@ -1,21 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Tue, 13 Dec 2016 16:05:05 +0100
-Bug-Debian: https://bugs.debian.org/848820
-Description: Ignore failures of test that might happpen in pbuilder
- .
- According to upstream this is fixed in commit d697f23
- so the patch is deactivated
-
---- a/tests/tests.py
-+++ b/tests/tests.py
-@@ -308,10 +308,6 @@
-         cluster_sync="./qsub")
- 
- 
--def test_symlink_temp():
--    run(dpath("test_symlink_temp"), shouldfail=True)
--
--
- def test_empty_include():
-     run(dpath("test_empty_include"))
- 


=====================================
debian/patches/0007-noop-rate-limiter.patch deleted
=====================================
@@ -1,36 +0,0 @@
-Author: Christian Amsüss <chrysn at fsfe.org>
-Last-Update: Tue, 14 Nov 2017 09:28:21 CET +0100
-Description: Temporary workaround for missing ratelimiter package (#880661).
-  This removes functionality and should not be left in for the package for a
-  released version, but eases fixing the build failures.
-
---- a/snakemake/executors.py
-+++ b/snakemake/executors.py
-@@ -405,7 +405,11 @@
-                  exec_job=None,
-                  assume_shared_fs=True,
-                  max_status_checks_per_second=1):
--        from ratelimiter import RateLimiter
-+
-+        import contextlib
-+        @contextlib.contextmanager
-+        def _cm(): yield
-+        RateLimiter = lambda *args, **wkargs: _cm()
- 
-         local_input = local_input or []
-         super().__init__(workflow, dag,
---- a/snakemake/scheduler.py
-+++ b/snakemake/scheduler.py
-@@ -61,7 +61,11 @@
-                  force_use_threads=False,
-                  assume_shared_fs=True):
-         """ Create a new instance of KnapsackJobScheduler. """
--        from ratelimiter import RateLimiter
-+
-+        import contextlib
-+        @contextlib.contextmanager
-+        def _cm(): yield
-+        RateLimiter = lambda *args, **wkargs: _cm()
- 
-         self.cluster = cluster
-         self.cluster_config = cluster_config


=====================================
debian/patches/0010-skip-test-without-rmarkdown.patch deleted
=====================================
The diff for this file was not included because it is too large.

=====================================
debian/patches/boto3_is_just_boto deleted
=====================================
@@ -1,35 +0,0 @@
-Author: Michael R. Crusoe <michael.crusoe at gmail.com>
-Description: In Debian, boto3 is just boto
---- snakemake.orig/snakemake/remote/S3.py
-+++ snakemake/snakemake/remote/S3.py
-@@ -16,7 +16,7 @@
- 
- try:
-     # third-party modules
--    import boto3
-+    import boto as boto3
-     import botocore
- except ImportError as e:
-     raise WorkflowError(
---- snakemake.orig/snakemake/remote/S3Mocked.py
-+++ snakemake/snakemake/remote/S3Mocked.py
-@@ -22,7 +22,7 @@
- 
- try:
-     # third-party
--    import boto3
-+    import boto as boto3
-     from moto import mock_s3
- except ImportError as e:
-     raise WorkflowError(
---- snakemake.orig/tests/test_static_remote/S3MockedForStaticTest.py
-+++ snakemake/tests/test_static_remote/S3MockedForStaticTest.py
-@@ -20,7 +20,7 @@
- 
- try:
-     # third-party
--    import boto3
-+    import boto as boto3
-     from moto import mock_s3
-     import filechunkio
- except ImportError as e:


=====================================
debian/patches/py3_subprocess.patch deleted
=====================================
@@ -1,29 +0,0 @@
-Description: Use Python 3 in subprocess calls
-
-TODO - are any of the ones in snakemake/script.py:execute_script a problem?
-
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-Forwarded: no
-
---- snakemake-5.14.0.orig/tests/test_linting.py
-+++ snakemake-5.14.0/tests/test_linting.py
-@@ -18,7 +18,7 @@ def test_lint(lint, case):
-         out = (
-             sp.check_output(
-                 [
--                    "python",
-+                    "python3",
-                     "-m",
-                     "snakemake",
-                     "--lint",
---- snakemake-5.14.0.orig/tests/test_tibanna.py
-+++ snakemake-5.14.0/tests/test_tibanna.py
-@@ -8,7 +8,7 @@ from common import *
- # run tibanna test before any moto-related tests because they apparently render AWS environment variables invalid or uneffective.
- def test_tibanna():
-     workdir = dpath("test_tibanna")
--    subprocess.check_call(["python", "cleanup.py"], cwd=workdir)
-+    subprocess.check_call(["python3", "cleanup.py"], cwd=workdir)
- 
-     os.environ["TEST_ENVVAR1"] = "test"
-     os.environ["TEST_ENVVAR2"] = "test"


=====================================
debian/patches/python3 → debian/patches/python3.patch
=====================================
@@ -1,5 +1,10 @@
-From: Michael R. Crusoe <michael.crusoe at gmail.com>
-Subject: Use python3 instead of python
+Description: Use Python 3 in subprocess calls
+
+TODO - are any of the ones in snakemake/script.py:execute_script a problem?
+
+Author: Michael R. Crusoe <michael.crusoe at gmail.com>, Rebecca N. Palmer <rebecca_palmer at zoho.com>
+Forwarded: no
+
 --- a/tests/test_delete_all_output/Snakefile
 +++ b/tests/test_delete_all_output/Snakefile
 @@ -8,9 +8,9 @@ rule delete_all_output:
@@ -59,3 +64,25 @@ Subject: Use python3 instead of python
      shell:
 -        "python -m snakemake --cores 1 --profile . -s Snakefile.internal"
 +        "python3 -m snakemake --cores 1 --profile . -s Snakefile.internal"
+--- a/tests/test_linting.py
++++ b/tests/test_linting.py
+@@ -18,7 +18,7 @@ def test_lint(lint, case):
+         out = (
+             sp.check_output(
+                 [
+-                    "python",
++                    "python3",
+                     "-m",
+                     "snakemake",
+                     "--lint",
+--- a/tests/test_tibanna.py
++++ b/tests/test_tibanna.py
+@@ -8,7 +8,7 @@ from common import *
+ # run tibanna test before any moto-related tests because they apparently render AWS environment variables invalid or uneffective.
+ def test_tibanna():
+     workdir = dpath("test_tibanna")
+-    subprocess.check_call(["python", "cleanup.py"], cwd=workdir)
++    subprocess.check_call(["python3", "cleanup.py"], cwd=workdir)
+ 
+     os.environ["TEST_ENVVAR1"] = "test"
+     os.environ["TEST_ENVVAR2"] = "test"


=====================================
debian/patches/series
=====================================
@@ -1,15 +1,9 @@
 0001-Use-the-inbuild-sphinx.ext.napoleon.patch
 0003-Use-debian-s-mathjax-package.patch
 0003-Compat-fix.patch
-# 0004-drop_test_symlink_time_handling.patch
-# 0005-drop_test_symlink_temp.patch - should be fixed in commit d697f23
 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
-# 0010-skip-test-without-rmarkdown.patch
 0011-fix-privacy-breach.patch
-boto3_is_just_boto
-python3
+python3.patch
 workaround_sphinx_issue.patch
-py3_subprocess.patch


=====================================
debian/rules
=====================================
@@ -7,7 +7,7 @@ export HOME=$(CURDIR)/fakehome
 export PYBUILD_NAME=snakemake
 export PYBUILD_DESTDIR_python3=debian/snakemake
 export PYBUILD_BEFORE_TEST_python3=chmod +x {dir}/bin/snakemake; cp -r {dir}/bin {dir}/tests {build_dir}
-export PYBUILD_TEST_ARGS=python{version} -m pytest tests/test*.py -n auto -k 'not report and not ancient and not test_script and not default_remote and not issue635 and not convert_to_cwl and not issue1083 and not issue1092 and not issue1093 and not test_remote and not test_default_resources and not test_tibanna and not test_github_issue78 and not test_output_file_cache_remote and not test_env_modules'
+export PYBUILD_TEST_ARGS=python{version} -m pytest tests/test*.py -n auto -k 'not report and not ancient and not test_script and not default_remote and not issue635 and not convert_to_cwl and not issue1083 and not issue1092 and not issue1093 and not test_remote and not test_default_resources and not test_tibanna and not test_github_issue78 and not test_output_file_cache_remote and not test_env_modules and not test_archive and not test_container and not test_cluster_sync'
 
 # test_report
 # test_ancient
@@ -19,6 +19,9 @@ export PYBUILD_TEST_ARGS=python{version} -m pytest tests/test*.py -n auto -k 'no
 # test_issue1093 fails due to conda usage; commenting that out and installing bwa produces a different ordering than desired
 # test_default_resources and test_remote needs moto to be packaged https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777089
 # test_env_modules relies on "module load" which is not packaged for Debian
+# test_archive uses conda
+# test_container uses docker://bash
+# test_cluster_sync is broken (https://github.com/snakemake/snakemake/issues/322)
 
 export PYBUILD_AFTER_TEST_python3=rm -fr {build_dir}/bin {build_dir}/tests {dir}/tests/test_filegraph/.snakemake/
 


=====================================
debian/tests/run-unit-test
=====================================
@@ -17,5 +17,5 @@ cd "${AUTOPKGTEST_TMP}"
 
 export HOME="${AUTOPKGTEST_TMP}"
 
-python3 -m pytest ${ROOT}/tests/test*.py -n auto -k 'not report and not ancient and not test_script and not default_remote and not issue635 and not convert_to_cwl and not issue1083 and not issue1092 and not issue1093 and not test_remote and not test_default_resources and not test_singularity and not test_singularity_conda and not test_cwl_singularity and not test_cwl and not test_url_include and not test_tibanna and not test_github_issue78 and not test_output_file_cache_remote and not test_env_modules'
+python3 -m pytest ${ROOT}/tests/test*.py -n auto -k 'not report and not ancient and not test_script and not default_remote and not issue635 and not convert_to_cwl and not issue1083 and not issue1092 and not issue1093 and not test_remote and not test_default_resources and not test_singularity and not test_singularity_conda and not test_cwl_singularity and not test_cwl and not test_url_include and not test_tibanna and not test_github_issue78 and not test_output_file_cache_remote and not test_env_modules and not test_archive and not test_container and not test_cluster_sync'
 



View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/compare/c828485311e9ad238e27c94d3a76e366b458564d...1cf3a516468339a8a3489b681efa689a876cab46

-- 
View it on GitLab: https://salsa.debian.org/med-team/snakemake/-/compare/c828485311e9ad238e27c94d3a76e366b458564d...1cf3a516468339a8a3489b681efa689a876cab46
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200409/ed69c72c/attachment-0001.html>


More information about the debian-med-commit mailing list