[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1054286: bookworm-pu: package python-cogent/2023.2.12a1+dfsg-2+deb12u1



El 29/10/23 a las 20:11, Adam D. Barratt escribió:
Flagged for rejection.

Thank you!

Continuing to use this bug is fine, but please send an updated debdiff
to it matching what you upload.

Ok, I'm attaching the updated debdiff here.

Everything is explained in the changelog.

Thanks.
diff -Nru python-cogent-2023.2.12a1+dfsg/debian/changelog python-cogent-2023.2.12a1+dfsg/debian/changelog
--- python-cogent-2023.2.12a1+dfsg/debian/changelog	2023-02-24 14:18:01.000000000 +0100
+++ python-cogent-2023.2.12a1+dfsg/debian/changelog	2023-10-29 21:45:00.000000000 +0100
@@ -1,3 +1,14 @@
+python-cogent (2023.2.12a1+dfsg-2+deb12u1) bookworm; urgency=medium
+
+  * Team upload.
+  * Drop old patch fix-build-on-single-cpu-systems.patch, as it was
+    disabling the affected tests for everybody.
+  * Add new patch skip-parallel-tests-on-single-cpu-systems.patch,
+    where the tests are only skipped when the system has a single CPU.
+    Closes: #1030885.
+
+ -- Santiago Vila <sanvila@debian.org>  Sun, 29 Oct 2023 21:45:00 +0100
+
 python-cogent (2023.2.12a1+dfsg-2) unstable; urgency=medium
 
   * Restrict to 64 bit architectures
diff -Nru python-cogent-2023.2.12a1+dfsg/debian/patches/fix-build-on-single-cpu-systems.patch python-cogent-2023.2.12a1+dfsg/debian/patches/fix-build-on-single-cpu-systems.patch
--- python-cogent-2023.2.12a1+dfsg/debian/patches/fix-build-on-single-cpu-systems.patch	2023-02-24 14:18:01.000000000 +0100
+++ python-cogent-2023.2.12a1+dfsg/debian/patches/fix-build-on-single-cpu-systems.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,59 +0,0 @@
-Author:: Santiago Vila <sanvila@debian.org>
-Last-Upate: Wed, 8 Feb 2023 19:40:13 +0100
-Bug-Debian: https://bugs.debian.org/1030885
-Description: Skip tests that are failing on single-cpu systems
-
---- a/tests/test_app/test_evo.py
-+++ b/tests/test_app/test_evo.py
-@@ -2,7 +2,7 @@ import pathlib
- 
- from os.path import dirname, join
- from tempfile import TemporaryDirectory
--from unittest import TestCase, main
-+from unittest import TestCase, main, skip
- from unittest.mock import MagicMock
- 
- from numpy.testing import assert_allclose, assert_raises
-@@ -854,6 +854,7 @@ class TestBootstrap(TestCase):
-         # correct message being relayed
-         self.assertTrue("ValueError: '-' at" in result.message)
- 
-+    @skip("Does not work on single-cpu systems")
-     def test_bstrap_parallel(self):
-         """exercising bootstrap with parallel"""
-         aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
---- a/tests/test_util/test_parallel.py
-+++ b/tests/test_util/test_parallel.py
-@@ -2,7 +2,7 @@ import multiprocessing
- import sys
- import time
- 
--from unittest import TestCase, main, skipIf
-+from unittest import TestCase, main, skipIf, skip
- 
- import numpy
- 
-@@ -35,6 +35,7 @@ def check_is_master_process(n):
- 
- 
- class ParallelTests(TestCase):
-+    @skip("Does not work on single-cpu systems")
-     def test_create_processes(self):
-         """Procressor pool should create multiple distingue processes"""
-         max_worker_count = multiprocessing.cpu_count() - 1
-@@ -45,6 +46,7 @@ class ParallelTests(TestCase):
-         self.assertEqual(sorted(list(result_values)), index)
-         self.assertEqual(len(set(result_processes)), max_worker_count)
- 
-+    @skip("Does not work on single-cpu systems")
-     def test_random_seeding(self):
-         """Random seed should be set every function call"""
-         # On Windows process ids are not guaranteed to be sequential(1,2,3,4...)
-@@ -56,6 +58,7 @@ class ParallelTests(TestCase):
-         self.assertEqual(result1[0], result2[0])
-         self.assertNotEqual(result1, result2)
- 
-+    @skip("Does not work on single-cpu systems")
-     @skipIf(sys.version_info[1] < 7, "method exclusive to Python 3.7 and above")
-     def test_is_master_process(self):
-         """
diff -Nru python-cogent-2023.2.12a1+dfsg/debian/patches/series python-cogent-2023.2.12a1+dfsg/debian/patches/series
--- python-cogent-2023.2.12a1+dfsg/debian/patches/series	2023-02-24 14:18:01.000000000 +0100
+++ python-cogent-2023.2.12a1+dfsg/debian/patches/series	2023-10-29 21:45:00.000000000 +0100
@@ -2,4 +2,4 @@
 fix_interpreter.patch
 remove-jupyter-sphinx.patch
 ignore_tests_accessing_network.patch
-fix-build-on-single-cpu-systems.patch
+skip-parallel-tests-on-single-cpu-systems.patch
diff -Nru python-cogent-2023.2.12a1+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch python-cogent-2023.2.12a1+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch
--- python-cogent-2023.2.12a1+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch	1970-01-01 01:00:00.000000000 +0100
+++ python-cogent-2023.2.12a1+dfsg/debian/patches/skip-parallel-tests-on-single-cpu-systems.patch	2023-10-29 21:45:00.000000000 +0100
@@ -0,0 +1,73 @@
+Author: Santiago Vila <sanvila@debian.org>
+Last-Update: 2023-10-28
+Bug-Debian: https://bugs.debian.org/1030885
+Description: Skip parallel tests on single-cpu systems
+
+--- a/tests/test_app/test_evo.py
++++ b/tests/test_app/test_evo.py
+@@ -1,8 +1,9 @@
+ import pathlib
++import multiprocessing
+ 
+ from os.path import dirname, join
+ from tempfile import TemporaryDirectory
+-from unittest import TestCase, main
++from unittest import TestCase, main, skipIf
+ from unittest.mock import MagicMock
+ 
+ from numpy.testing import assert_allclose, assert_raises
+@@ -854,6 +855,7 @@
+         # correct message being relayed
+         self.assertTrue("ValueError: '-' at" in result.message)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_bstrap_parallel(self):
+         """exercising bootstrap with parallel"""
+         aln = load_aligned_seqs(join(data_dir, "brca1.fasta"), moltype="dna")
+--- a/tests/test_app/test_io_new.py
++++ b/tests/test_app/test_io_new.py
+@@ -4,8 +4,10 @@
+ import os
+ import pathlib
+ import pickle
++import multiprocessing
+ 
+ from pathlib import Path
++from unittest import skipIf
+ 
+ import numpy
+ import pytest
+@@ -479,6 +481,7 @@
+     assert isinstance(writer.data_store.summary_not_completed, Table)
+ 
+ 
++@skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+ def test_write_db_parallel(tmp_dir, fasta_dir):
+     """writing with overwrite in parallel should reset db"""
+     dstore = open_data_store(fasta_dir, suffix="fasta")
+--- a/tests/test_util/test_parallel.py
++++ b/tests/test_util/test_parallel.py
+@@ -35,6 +35,7 @@
+ 
+ 
+ class ParallelTests(TestCase):
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_create_processes(self):
+         """Procressor pool should create multiple distingue processes"""
+         max_worker_count = multiprocessing.cpu_count() - 1
+@@ -45,6 +46,7 @@
+         self.assertEqual(sorted(list(result_values)), index)
+         self.assertEqual(len(set(result_processes)), max_worker_count)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     def test_random_seeding(self):
+         """Random seed should be set every function call"""
+         # On Windows process ids are not guaranteed to be sequential(1,2,3,4...)
+@@ -56,6 +58,7 @@
+         self.assertEqual(result1[0], result2[0])
+         self.assertNotEqual(result1, result2)
+ 
++    @skipIf(multiprocessing.cpu_count() == 1, "Does not work on single-cpu systems")
+     @skipIf(sys.version_info[1] < 7, "method exclusive to Python 3.7 and above")
+     def test_is_master_process(self):
+         """

Reply to: