[pyfai] 03/06: remove all patches applyed upstream

Frédéric-Emmanuel Picca picca at moszumanska.debian.org
Fri Oct 17 12:41:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

picca pushed a commit to branch experimental
in repository pyfai.

commit 4e30d0178eb57d6cc8708d3c60fba8dd9696a367
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Mon Jan 13 23:38:57 2014 +0100

    remove all patches applyed upstream
---
 ...warded-setup-teardown-to-remove-temporary.patch | 143 ---------------------
 ...wareded-do-not-alter-the-original-poni-fi.patch |  37 ------
 ...warded-upstream-fix-the-averageImage-test.patch |  33 -----
 debian/patches/series                              |   3 -
 4 files changed, 216 deletions(-)

diff --git a/debian/patches/0001-feature-forwarded-setup-teardown-to-remove-temporary.patch b/debian/patches/0001-feature-forwarded-setup-teardown-to-remove-temporary.patch
deleted file mode 100644
index b02b461..0000000
--- a/debian/patches/0001-feature-forwarded-setup-teardown-to-remove-temporary.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Sat, 28 Dec 2013 12:00:17 +0100
-Subject: feature forwarded setup teardown to remove temporary files
-
----
- test/testAzimuthalIntegrator.py | 34 +++++++++++++++++++++++++++-------
- test/testPeakPicking.py         | 13 +++++++++----
- 2 files changed, 36 insertions(+), 11 deletions(-)
-
-diff --git a/test/testAzimuthalIntegrator.py b/test/testAzimuthalIntegrator.py
-index 8fb3cc7..834b270 100755
---- a/test/testAzimuthalIntegrator.py
-+++ b/test/testAzimuthalIntegrator.py
-@@ -38,6 +38,8 @@ import numpy
- import logging, time
- import sys
- import fabio
-+import shutil
-+import tempfile
- 
- from utilstest import UtilsTest, Rwp, getLogger
- logger = getLogger(__file__)
-@@ -46,6 +48,9 @@ from pyFAI.azimuthalIntegrator import AzimuthalIntegrator
- if logger.getEffectiveLevel() <= logging.INFO:
-     import pylab
- 
-+dirname = os.path.dirname(os.path.abspath(__file__))
-+
-+
- class test_azim_halfFrelon(unittest.TestCase):
-     """basic test"""
-     fit2dFile = '1460/fit2d.dat'
-@@ -61,6 +66,9 @@ class test_azim_halfFrelon(unittest.TestCase):
-         self.halfFrelon = UtilsTest.getimage(self.__class__.halfFrelon)
-         self.splineFile = UtilsTest.getimage(self.__class__.splineFile)
-         self.poniFile = UtilsTest.getimage(self.__class__.poniFile)
-+
-+        self.tmpdir = tempfile.mkdtemp(dir=dirname)
-+
-         with open(self.poniFile) as f:
-             data = []
-             for line in f:
-@@ -74,8 +82,9 @@ class test_azim_halfFrelon(unittest.TestCase):
-         self.ai = AzimuthalIntegrator()
-         self.ai.load(self.poniFile)
-         self.data = fabio.open(self.halfFrelon).data
--        if not os.path.isdir("tmp"):
--            os.mkdir("tmp")
-+
-+    def tearDown(self):
-+        shutil.rmtree(self.tmpdir, True)
- 
-     def test_numpy_vs_fit2d(self):
-         """
-@@ -83,7 +92,9 @@ class test_azim_halfFrelon(unittest.TestCase):
-         """
- #        logger.info(self.ai.__repr__())
-         tth, I = self.ai.xrpd_numpy(self.data,
--                                     len(self.fit2d), "tmp/numpy.dat", correctSolidAngle=False)
-+                                    len(self.fit2d),
-+                                    os.path.join(self.tmpdir, "numpy.dat"),
-+                                    correctSolidAngle=False)
-         rwp = Rwp((tth, I), self.fit2d.T)
-         logger.info("Rwp numpy/fit2d = %.3f" % rwp)
-         if logger.getEffectiveLevel() == logging.DEBUG:
-@@ -105,7 +116,9 @@ class test_azim_halfFrelon(unittest.TestCase):
-         """
- #        logger.info(self.ai.__repr__())
-         tth, I = self.ai.xrpd_cython(self.data,
--                                     len(self.fit2d), "tmp/cython.dat", correctSolidAngle=False, pixelSize=None)
-+                                     len(self.fit2d),
-+                                     os.path.join(self.tmpdir, "cython.dat"),
-+                                     correctSolidAngle=False, pixelSize=None)
- #        logger.info(tth)
- #        logger.info(I)
-         rwp = Rwp((tth, I), self.fit2d.T)
-@@ -133,7 +146,10 @@ class test_azim_halfFrelon(unittest.TestCase):
-         logger.info("in test_cythonSP_vs_fit2d Before SP")
- 
-         tth, I = self.ai.xrpd_splitPixel(self.data,
--                                     len(self.fit2d), "tmp/cythonSP.dat", correctSolidAngle=False)
-+                                         len(self.fit2d),
-+                                         os.path.join(self.tmpdir,
-+                                                      "cythonSP.dat"),
-+                                         correctSolidAngle=False)
-         logger.info("in test_cythonSP_vs_fit2d Before")
-         t1 = time.time() - t0
- #        logger.info(tth)
-@@ -239,10 +255,14 @@ class test_saxs(unittest.TestCase):
-         self.poniFile = UtilsTest.getimage(self.__class__.poniFile)
-         self.maskRef = UtilsTest.getimage(self.__class__.maskRef)
-         self.maskDummy = UtilsTest.getimage(self.__class__.maskDummy)
-+
-+        self.tmpdir = tempfile.mkdtemp(dir=dirname)
-+
-         self.ai = AzimuthalIntegrator()
-         self.ai.load(self.poniFile)
--        if not os.path.isdir("tmp"):
--            os.mkdir("tmp")
-+
-+    def tearDown(self):
-+        shutil.rmtree(self.tmpdir, True)
- 
-     def test_mask(self):
-         """test the generation of mask"""
-diff --git a/test/testPeakPicking.py b/test/testPeakPicking.py
-index b37b7df..2377174 100755
---- a/test/testPeakPicking.py
-+++ b/test/testPeakPicking.py
-@@ -38,6 +38,9 @@ import numpy
- import logging, time
- import sys
- import fabio
-+import shutil
-+import tempfile
-+
- from utilstest import UtilsTest, Rwp, getLogger
- logger = getLogger(__file__)
- pyFAI = sys.modules["pyFAI"]
-@@ -47,6 +50,8 @@ from pyFAI.geometryRefinement import GeometryRefinement
- if logger.getEffectiveLevel() <= logging.INFO:
-     import pylab
- 
-+dirname = os.path.dirname(os.path.abspath(__file__))
-+
- 
- class test_peak_picking(unittest.TestCase):
-     """basic test"""
-@@ -72,10 +77,10 @@ class test_peak_picking(unittest.TestCase):
-         """Download files"""
-         self.img = UtilsTest.getimage(self.__class__.calibFile)
-         self.pp = PeakPicker(self.img, dSpacing=self.ds, wavelength=self.wavelength)
--        dirname = os.path.dirname(os.path.abspath(__file__))
--        self.tmpdir = os.path.join(dirname, "tmp")
--        if not os.path.isdir(self.tmpdir):
--            os.mkdir(self.tmpdir)
-+        self.tmpdir = tempfile.mkdtemp(dir=dirname)
-+
-+    def tearDown(self):
-+        shutil.rmtree(self.tmpdir, True)
- 
-     def test_peakPicking(self):
-         """first test peak-picking then checks the geometry found is OK"""
diff --git a/debian/patches/0002-feature-forwareded-do-not-alter-the-original-poni-fi.patch b/debian/patches/0002-feature-forwareded-do-not-alter-the-original-poni-fi.patch
deleted file mode 100644
index 74f4204..0000000
--- a/debian/patches/0002-feature-forwareded-do-not-alter-the-original-poni-fi.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Sat, 28 Dec 2013 13:03:06 +0100
-Subject: feature forwareded do not alter the original poni file during tests
-
----
- test/testAzimuthalIntegrator.py | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/test/testAzimuthalIntegrator.py b/test/testAzimuthalIntegrator.py
-index 834b270..1d3bfce 100755
---- a/test/testAzimuthalIntegrator.py
-+++ b/test/testAzimuthalIntegrator.py
-@@ -69,6 +69,7 @@ class test_azim_halfFrelon(unittest.TestCase):
- 
-         self.tmpdir = tempfile.mkdtemp(dir=dirname)
- 
-+        # prepare the poni file and add the spline information
-         with open(self.poniFile) as f:
-             data = []
-             for line in f:
-@@ -76,11 +77,14 @@ class test_azim_halfFrelon(unittest.TestCase):
-                     data.append("SplineFile: " + self.splineFile)
-                 else:
-                     data.append(line.strip())
--        with open(self.poniFile, "w") as f:
-+
-+        poniFile = os.path.join(self.tmpdir, "test.poni")
-+        with open(poniFile, "w") as f:
-             f.write(os.linesep.join(data))
-+
-         self.fit2d = numpy.loadtxt(self.fit2dFile)
-         self.ai = AzimuthalIntegrator()
--        self.ai.load(self.poniFile)
-+        self.ai.load(poniFile)
-         self.data = fabio.open(self.halfFrelon).data
- 
-     def tearDown(self):
diff --git a/debian/patches/0003-forwarded-upstream-fix-the-averageImage-test.patch b/debian/patches/0003-forwarded-upstream-fix-the-averageImage-test.patch
deleted file mode 100644
index f56b616..0000000
--- a/debian/patches/0003-forwarded-upstream-fix-the-averageImage-test.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Sat, 28 Dec 2013 14:16:29 +0100
-Subject: forwarded upstream fix the averageImage test
-
-remove the generated file during the test
----
- test/testUtils.py | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/test/testUtils.py b/test/testUtils.py
-index e32a924..cb83bcf 100755
---- a/test/testUtils.py
-+++ b/test/testUtils.py
-@@ -29,7 +29,7 @@ __license__ = "GPLv3+"
- __copyright__ = "European Synchrotron Radiation Facility, Grenoble, France"
- __date__ = "11/04/2013"
- 
--
-+import os
- import unittest
- import numpy
- import logging
-@@ -99,7 +99,9 @@ class test_utils(unittest.TestCase):
-         self.assert_(abs(self.dark - six).max() < 1e-4, "data are the same: test threshold")
- 
-         seven = pyFAI.utils.averageImages([self.raw], darks=[self.dark], flats=[self.flat], threshold=0)
--        self.assert_(abs(numpy.ones_like(self.dark) - fabio.open(seven).data).mean() < 1e-2, "averageImages")
-+        seven_data = fabio.open(seven).data
-+        os.remove(seven)
-+        self.assert_(abs(numpy.ones_like(self.dark) - seven_data).mean() < 1e-2, "averageImages")
- 
-     def test_shift(self):
-         """
diff --git a/debian/patches/series b/debian/patches/series
deleted file mode 100644
index e83d8b5..0000000
--- a/debian/patches/series
+++ /dev/null
@@ -1,3 +0,0 @@
-0001-feature-forwarded-setup-teardown-to-remove-temporary.patch
-0002-feature-forwareded-do-not-alter-the-original-poni-fi.patch
-0003-forwarded-upstream-fix-the-averageImage-test.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyfai.git



More information about the debian-science-commits mailing list