[med-svn] [Git][med-team/unicycler][master] 4 commits: spades.patch: unfuzz hunk with offset.

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Sun Dec 8 21:53:24 GMT 2024



Étienne Mollier pushed to branch master at Debian Med / unicycler


Commits:
e329957a by Étienne Mollier at 2024-12-07T10:59:57+01:00
spades.patch: unfuzz hunk with offset.

- - - - -
dd88e025 by Étienne Mollier at 2024-12-07T11:07:02+01:00
d/clean: new: remove leftover .pybuild and egg info.

Closes: #1048635

- - - - -
7a55c47a by Étienne Mollier at 2024-12-08T22:49:30+01:00
leftover-syntax-warnings.patch: fix remaining SyntaxWarnings.

Closes: #1087157

- - - - -
8c55ae75 by Étienne Mollier at 2024-12-08T22:52:47+01:00
d/changelog: ready for upload to unstable.

- - - - -


5 changed files:

- debian/changelog
- + debian/clean
- + debian/patches/leftover-syntax-warnings.patch
- debian/patches/series
- debian/patches/spades.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,16 @@
+unicycler (0.5.1+dfsg-2) unstable; urgency=medium
+
+  [ Michael R. Crusoe ]
+  * salsa ci: skip i386
+
+  [ Étienne Mollier ]
+  * spades.patch: unfuzz hunk with offset.
+  * d/clean: new: remove leftover .pybuild and egg info. (Closes: #1048635)
+  * leftover-syntax-warnings.patch: fix remaining SyntaxWarnings.
+    (Closes: #1087157)
+
+ -- Étienne Mollier <emollier at debian.org>  Sun, 08 Dec 2024 22:50:24 +0100
+
 unicycler (0.5.1+dfsg-1) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/clean
=====================================
@@ -0,0 +1,2 @@
+.pybuild/
+unicycler.egg-info/


=====================================
debian/patches/leftover-syntax-warnings.patch
=====================================
@@ -0,0 +1,53 @@
+Description: fix leftover Python SyntaxWarnings.
+ While upstream version 0.5.1 fixed several SyntaxWarnings associated to
+ the console logotype, there were still leftover SyntaxWarnings,
+ captured for instance upon Debian package installation:
+ .
+  Setting up unicycler (0.5.1+dfsg-1) ...
+  /usr/lib/python3/dist-packages/unicycler/bridge_common.py:43: SyntaxWarning: invalid escape sequence '\l'
+    """
+  /usr/lib/python3/dist-packages/unicycler/bridge_long_read.py:619: SyntaxWarning: invalid escape sequence '\c'
+    """
+  /usr/lib/python3/dist-packages/unicycler/log.py:194: SyntaxWarning: invalid escape sequence '\['
+    return re.sub('\033\[2m', '', text)
+ .
+ This change sets the raw string prefix for the two affected docstrings,
+ and also escapes a backaslash in a regex that also inclues a legitimate
+ \033 escape sequence.
+
+Author: Étienne Mollier <emollier at debian.org>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1087157
+Forwarded: no
+Last-Update: 2024-12-07
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- unicycler.orig/unicycler/bridge_common.py
++++ unicycler/unicycler/bridge_common.py
+@@ -40,7 +40,7 @@
+ 
+ 
+ def get_depth_agreement_factor(start_seg_depth, end_seg_depth):
+-    """
++    r"""
+     This function is set up such that:
+       * equal depths return 1.0
+       * similar depths return a value near 1.0
+--- unicycler.orig/unicycler/bridge_long_read.py
++++ unicycler/unicycler/bridge_long_read.py
+@@ -616,7 +616,7 @@
+ 
+ 
+ def reduce_expected_count(expected_count, a, b):
+-    """
++    r"""
+     This function reduces the expected read count. It reduces by a factor which is a function of
+     the read count, so low expected values aren't reduced much, but high expected values are
+     reduced more. This is to help with high read depth cases where expected counts get quite high.
+--- unicycler.orig/unicycler/log.py
++++ unicycler/unicycler/log.py
+@@ -191,4 +191,4 @@
+ 
+ 
+ def remove_dim_formatting(text):
+-    return re.sub('\033\[2m', '', text)
++    return re.sub('\033\\[2m', '', text)


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ spades.patch
 # bowtie.patch 
 install_wo_extra_steps.patch
 append_flags
+leftover-syntax-warnings.patch


=====================================
debian/patches/spades.patch
=====================================
@@ -2,9 +2,9 @@ Author: Andreas Tille <tille at debian.org>
 Last-Update: Fri, 25 May 2018 10:59:36 +0200
 Description: SPAdes is in Debian at /usr/bin/spades
 Forwarded: not-needed
---- a/test/test_dependencies.py
-+++ b/test/test_dependencies.py
-@@ -42,7 +42,7 @@ class TestDependencies(unittest.TestCase
+--- unicycler.orig/test/test_dependencies.py
++++ unicycler/test/test_dependencies.py
+@@ -42,7 +42,7 @@
  
      def test_spades_not_found(self):
          stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path'])
@@ -13,7 +13,7 @@ Forwarded: not-needed
          self.assertTrue('could not find SPAdes' in stderr)
          self.assertEqual(ret_code, 1)
  
-@@ -61,19 +61,19 @@ class TestDependencies(unittest.TestCase
+@@ -61,19 +61,19 @@
      def test_no_rotate(self):
          stdout, stderr, ret_code = self.run_unicycler(['--spades_path', 'not_a_real_path',
                                                         '--no_rotate'])
@@ -36,9 +36,9 @@ Forwarded: not-needed
 -        self.assertTrue(bool(re.search(r'spades.py\s+not found', stdout)))
 +        self.assertTrue(bool(re.search(r'spades\s+not found', stdout)))
          self.assertTrue(bool(re.search(r'Program\s+Version\s+Status\s+Path', stdout)))
---- a/test/overlap_removal_test.py
-+++ b/test/overlap_removal_test.py
-@@ -94,7 +94,7 @@ def run_spades(out_dir):
+--- unicycler.orig/test/overlap_removal_test.py
++++ unicycler/test/overlap_removal_test.py
+@@ -94,7 +94,7 @@
      reads_2 = os.path.join(out_dir, 'reads_2.fastq')
      reads_unpaired = os.path.join(out_dir, 'reads_unpaired.fastq')
  
@@ -47,9 +47,9 @@ Forwarded: not-needed
  
      if os.path.isfile(reads_1):
          spades_cmd += ['-1', reads_1, '-2', reads_2]
---- a/test/test_misc.py
-+++ b/test/test_misc.py
-@@ -332,14 +332,14 @@ class TestMiscFunctions(unittest.TestCas
+--- unicycler.orig/test/test_misc.py
++++ unicycler/test/test_misc.py
+@@ -332,14 +332,14 @@
  
      def test_spades_version_parsing_3(self):
          spades_version_output = 'option -v not recognized\nSPAdes genome assembler v.3.5.0\n\n' \
@@ -66,9 +66,9 @@ Forwarded: not-needed
                                  '-o <output_dir>\n\nBasic options:'
          version = unicycler.misc.spades_version_from_spades_output(spades_version_output)
          self.assertEqual(version, '2.4.0')
---- a/unicycler/misc.py
-+++ b/unicycler/misc.py
-@@ -124,7 +124,7 @@ def check_spades(spades_path):
+--- unicycler.orig/unicycler/misc.py
++++ unicycler/unicycler/misc.py
+@@ -124,7 +124,7 @@
  
      if not err.decode():
          quit_with_error('SPAdes was found but does not produce output (make sure to use '
@@ -77,7 +77,7 @@ Forwarded: not-needed
  
  
  def get_nice_header(header):
-@@ -823,7 +823,7 @@ def spades_path_and_version(spades_path)
+@@ -823,7 +823,7 @@
  
  def spades_version_from_spades_output(spades_output):
      """
@@ -86,9 +86,9 @@ Forwarded: not-needed
      """
      try:
          return re.search(r'v(\d+\.\d+\.\d+)', spades_output).group(1)
---- a/unicycler/unicycler.py
-+++ b/unicycler/unicycler.py
-@@ -274,7 +274,7 @@ def get_arguments():
+--- unicycler.orig/unicycler/unicycler.py
++++ unicycler/unicycler/unicycler.py
+@@ -274,7 +274,7 @@
                                               'These options control the short-read SPAdes '
                                               'assembly at the beginning of the Unicycler pipeline.'
                                               if show_all_args else argparse.SUPPRESS)
@@ -97,7 +97,7 @@ Forwarded: not-needed
                                help='Path to the SPAdes executable'
                                     if show_all_args else argparse.SUPPRESS)
      spades_group.add_argument('--min_kmer_frac', type=float, default=0.2,
-@@ -671,7 +671,7 @@ def check_dependencies(args, short_reads
+@@ -671,7 +671,7 @@
          spades_path, spades_version, spades_status = '', '', 'not used'
      else:
          spades_path, spades_version, spades_status = spades_path_and_version(args.spades_path)
@@ -106,7 +106,7 @@ Forwarded: not-needed
      if args.verbosity > 1:
          spades_row.append(spades_path)
      program_table.append(spades_row)
-@@ -732,7 +732,7 @@ def quit_if_dependency_problem(spades_st
+@@ -733,7 +733,7 @@
          quit_with_error('SPAdes cannot run due to an incompatible Python version')
      if spades_status == 'bad':
          quit_with_error('SPAdes was found but does not produce output (make sure to use '
@@ -115,9 +115,9 @@ Forwarded: not-needed
      if makeblastdb_status == 'not found':
          quit_with_error('could not find makeblastdb - either specify its location using '
                          '--makeblastdb_path or use --no_rotate to remove BLAST dependency')
---- a/README.md
-+++ b/README.md
-@@ -107,7 +107,7 @@ Reasons to __not__ use Unicycler:
+--- unicycler.orig/README.md
++++ unicycler/README.md
+@@ -107,7 +107,7 @@
      * [ICC](https://software.intel.com/en-us/c-compilers) also works (though I don't know the minimum required version number)
  * [setuptools](https://packaging.python.org/installing/#install-pip-setuptools-and-wheel) (only required for installation of Unicycler)
  * For short-read or hybrid assembly:
@@ -126,7 +126,7 @@ Forwarded: not-needed
  * For long-read or hybrid assembly:
    * [Racon](https://github.com/lbcb-sci/racon) (`racon`)
  * For rotating circular contigs:
-@@ -488,7 +488,7 @@ Other:
+@@ -488,7 +488,7 @@
  SPAdes assembly:
    These options control the short-read SPAdes assembly at the beginning of the Unicycler pipeline.
  
@@ -135,9 +135,9 @@ Forwarded: not-needed
    --min_kmer_frac MIN_KMER_FRAC   Lowest k-mer size for SPAdes assembly, expressed as a fraction of
                                    the read length (default: 0.2)
    --max_kmer_frac MAX_KMER_FRAC   Highest k-mer size for SPAdes assembly, expressed as a fraction of
---- a/setup.py
-+++ b/setup.py
-@@ -61,7 +61,7 @@ def missing_tool(tool_name):
+--- unicycler.orig/setup.py
++++ unicycler/setup.py
+@@ -61,7 +61,7 @@
  
  def tool_check():
      # Check for required programs.



View it on GitLab: https://salsa.debian.org/med-team/unicycler/-/compare/6016310453721bd0ec0d1109d573eebf0849c077...8c55ae75e3261428e9c497bad47db1e0fe6d2f12

-- 
View it on GitLab: https://salsa.debian.org/med-team/unicycler/-/compare/6016310453721bd0ec0d1109d573eebf0849c077...8c55ae75e3261428e9c497bad47db1e0fe6d2f12
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/20241208/025c53f2/attachment-0001.htm>


More information about the debian-med-commit mailing list