[pyfai] 04/06: refresh patch series
Frédéric-Emmanuel Picca
picca at moszumanska.debian.org
Sun Jan 1 10:55:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
picca pushed a commit to branch master
in repository pyfai.
commit 204c5b3681b7e706fb92cbec5abe5c28fde5533d
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Sat Dec 3 10:00:07 2016 +0100
refresh patch series
---
.../0001-remove-useless-logic-in-conf.py.patch | 43 -------
debian/patches/0002-skip-test-if-no-network.patch | 142 ---------------------
debian/patches/0003-use-the-system-mathjax.patch | 4 +-
...t-use-deprecated-sphinx-pngmath-extension.patch | 29 -----
debian/patches/series | 3 -
5 files changed, 2 insertions(+), 219 deletions(-)
diff --git a/debian/patches/0001-remove-useless-logic-in-conf.py.patch b/debian/patches/0001-remove-useless-logic-in-conf.py.patch
deleted file mode 100644
index fbb0660..0000000
--- a/debian/patches/0001-remove-useless-logic-in-conf.py.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Tue, 7 Jun 2016 15:38:36 +0200
-Subject: remove useless logic in conf.py
-
----
- doc/source/conf.py | 23 -----------------------
- 1 file changed, 23 deletions(-)
-
-diff --git a/doc/source/conf.py b/doc/source/conf.py
-index 8dd2f77..e08ccdc 100644
---- a/doc/source/conf.py
-+++ b/doc/source/conf.py
-@@ -19,29 +19,6 @@ import os
- # documentation root, use os.path.abspath to make it absolute, like shown here.
- # sys.path.insert(0, os.path.abspath('.'))
-
--import glob
--import shutil
--root_dir = os.path.abspath("../..")
--build_dir = glob.glob('../../build/lib*')
--if (not build_dir) or ("__init__.py" not in os.listdir(os.path.join(build_dir[0],"pyFAI"))):
-- import subprocess
-- curr_dir = os.getcwd()
-- os.chdir(root_dir)
-- errno = subprocess.call([sys.executable, 'setup.py', 'build'])
-- if errno != 0:
-- raise SystemExit(errno)
-- else:
-- os.chdir(curr_dir)
-- build_dir = glob.glob('../../build/lib*')
-- calib_dir = os.path.join(build_dir[0],"pyFAI","calibration")
-- if not os.path.exists(calib_dir):
-- print(root_dir,calib_dir)
-- shutil.copytree(os.path.join(root_dir,"calibration"), calib_dir)
--sys.path.insert(1, build_dir[0])
--os.environ["PATH"] = os.path.join(root_dir,"scripts") + os.pathsep + os.environ.get("PATH","")
--os.environ["PYTHONPATH"] = build_dir[0] + os.pathsep+os.environ.get("PYTHONPATH","")
--
--
- # -- General configuration -----------------------------------------------------
-
- # If your documentation needs a minimal Sphinx version, state it here.
diff --git a/debian/patches/0002-skip-test-if-no-network.patch b/debian/patches/0002-skip-test-if-no-network.patch
deleted file mode 100644
index 0655a84..0000000
--- a/debian/patches/0002-skip-test-if-no-network.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
- <picca at synchrotron-soleil.fr>
-Date: Wed, 8 Jun 2016 14:54:28 +0200
-Subject: skip test if no network
-
----
- pyFAI/test/test_azimuthal_integrator.py | 4 +++-
- pyFAI/test/test_csr.py | 22 ++++++++++++----------
- pyFAI/test/test_integrate.py | 16 +++++++++-------
- pyFAI/test/utilstest.py | 13 ++++++++-----
- 4 files changed, 32 insertions(+), 23 deletions(-)
-
-diff --git a/pyFAI/test/test_azimuthal_integrator.py b/pyFAI/test/test_azimuthal_integrator.py
-index be03f8a..9de7e44 100644
---- a/pyFAI/test/test_azimuthal_integrator.py
-+++ b/pyFAI/test/test_azimuthal_integrator.py
-@@ -58,7 +58,9 @@ except ImportError:
-
-
- class TestAzimPilatus(unittest.TestCase):
-- img = UtilsTest.getimage("1884/Pilatus6M.cbf")
-+ @classmethod
-+ def setUpClass(cls):
-+ cls.img = UtilsTest.getimage("1884/Pilatus6M.cbf")
-
- def setUp(self):
- """Download files"""
-diff --git a/pyFAI/test/test_csr.py b/pyFAI/test/test_csr.py
-index 835f825..f98b7eb 100644
---- a/pyFAI/test/test_csr.py
-+++ b/pyFAI/test/test_csr.py
-@@ -49,11 +49,6 @@ if opencl.ocl:
-
- import fabio
-
--N = 1000
--ai = AzimuthalIntegrator.sload(UtilsTest.getimage("1893/Pilatus1M.poni"))
--data = fabio.open(UtilsTest.getimage("1883/Pilatus1M.edf")).data
--ai.xrpd_LUT(data, N)
--
-
- class ParameterisedTestCase(unittest.TestCase):
- """ TestCase classes that want to be parameterised should
-@@ -61,6 +56,13 @@ class ParameterisedTestCase(unittest.TestCase):
- From Eli Bendersky's website
- http://eli.thegreenplace.net/2011/08/02/python-unit-testing-parametrized-test-cases/
- """
-+ @classmethod
-+ def setUpClass(cls):
-+ cls.N = 1000
-+ cls.ai = AzimuthalIntegrator.sload(UtilsTest.getimage("1893/Pilatus1M.poni"))
-+ cls.data = fabio.open(UtilsTest.getimage("1883/Pilatus1M.edf")).data
-+ cls.ai.xrpd_LUT(cls.data, cls.N)
-+
- def __init__(self, methodName='runTest', param=None):
- super(ParameterisedTestCase, self).__init__(methodName)
- self.param = param
-@@ -82,20 +84,20 @@ class ParamOpenclCSR(ParameterisedTestCase):
-
- def test_csr(self):
- workgroup_size = self.param
-- out_ref = splitBBox.histoBBox1d(data, ai.ttha, ai._cached_array["2th_delta"], bins=N)
-- csr = splitBBoxCSR.HistoBBox1d(ai.ttha, ai._cached_array["2th_delta"], bins=N, unit="2th_deg")
-+ out_ref = splitBBox.histoBBox1d(self.data, self.ai.ttha, self.ai._cached_array["2th_delta"], bins=self.N)
-+ csr = splitBBoxCSR.HistoBBox1d(self.ai.ttha, self.ai._cached_array["2th_delta"], bins=self.N, unit="2th_deg")
- if not opencl.ocl:
- skip = True
- else:
- try:
-- ocl_csr = ocl_azim_csr.OCL_CSR_Integrator(csr.lut, data.size, "ALL", profile=True, block_size=workgroup_size)
-- out_ocl_csr = ocl_csr.integrate(data)
-+ ocl_csr = ocl_azim_csr.OCL_CSR_Integrator(csr.lut, self.data.size, "ALL", profile=True, block_size=workgroup_size)
-+ out_ocl_csr = ocl_csr.integrate(self.data)
- except (opencl.pyopencl.MemoryError, MemoryError):
- logger.warning("Skipping test due to memory error on device")
- skip = True
- else:
- skip = False
-- out_cyt_csr = csr.integrate(data)
-+ out_cyt_csr = csr.integrate(self.data)
- cmt = "Testing ocl_csr with workgroup_size= %s" % (workgroup_size)
- logger.debug(cmt)
- if skip:
-diff --git a/pyFAI/test/test_integrate.py b/pyFAI/test/test_integrate.py
-index 17efa5c..5d1c415 100644
---- a/pyFAI/test/test_integrate.py
-+++ b/pyFAI/test/test_integrate.py
-@@ -110,13 +110,15 @@ class TestIntegrate1D(unittest.TestCase):
-
-
- class TestIntegrate2D(unittest.TestCase):
-- npt = 500
-- img = UtilsTest.getimage("1883/Pilatus1M.edf")
-- data = fabio.open(img).data
-- ai = AzimuthalIntegrator(1.58323111834, 0.0334170169115, 0.0412277798782, 0.00648735642526, 0.00755810191106, 0.0, detector=Pilatus1M())
-- ai.wavelength = 1e-10
-- Rmax = 20
-- delta_pos_azim_max = 0.28
-+ @classmethod
-+ def setUpClass(cls):
-+ cls.npt = 500
-+ cls.img = UtilsTest.getimage("1883/Pilatus1M.edf")
-+ cls.data = fabio.open(cls.img).data
-+ cls.ai = AzimuthalIntegrator(1.58323111834, 0.0334170169115, 0.0412277798782, 0.00648735642526, 0.00755810191106, 0.0, detector=Pilatus1M())
-+ cls.ai.wavelength = 1e-10
-+ cls.Rmax = 20
-+ cls.delta_pos_azim_max = 0.28
-
- def testQ(self):
- res = {}
-diff --git a/pyFAI/test/utilstest.py b/pyFAI/test/utilstest.py
-index 812a311..0d48afe 100644
---- a/pyFAI/test/utilstest.py
-+++ b/pyFAI/test/utilstest.py
-@@ -50,9 +50,9 @@ import distutils.util
- import unittest
- import logging
- try: # Python3
-- from urllib.request import urlopen, ProxyHandler, build_opener
-+ from urllib.request import urlopen, ProxyHandler, build_opener, URLError
- except ImportError: # Python2
-- from urllib2 import urlopen, ProxyHandler, build_opener
-+ from urllib2 import urlopen, ProxyHandler, build_opener, URLError
- # import urllib2
- import numpy
- import shutil
-@@ -185,9 +185,12 @@ class UtilsTest(object):
- opener = urlopen
-
- logger.info("wget %s/%s" % (cls.url_base, imagename))
-- data = opener("%s/%s" % (cls.url_base, imagename),
-- data=None, timeout=cls.timeout).read()
-- logger.info("Image %s successfully downloaded." % imagename)
-+ try:
-+ data = opener("%s/%s" % (cls.url_base, imagename),
-+ data=None, timeout=cls.timeout).read()
-+ logger.info("Image %s successfully downloaded." % imagename)
-+ except URLError:
-+ raise unittest.SkipTest("network unreachable.")
-
- try:
- with open(fullimagename, "wb") as outfile:
diff --git a/debian/patches/0003-use-the-system-mathjax.patch b/debian/patches/0003-use-the-system-mathjax.patch
index 18a5fe2..fafeaed 100644
--- a/debian/patches/0003-use-the-system-mathjax.patch
+++ b/debian/patches/0003-use-the-system-mathjax.patch
@@ -8,10 +8,10 @@ Subject: use the system mathjax
1 file changed, 6 insertions(+)
diff --git a/doc/source/conf.py b/doc/source/conf.py
-index e08ccdc..b9945e6 100644
+index 3b2cead..dd312ea 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
-@@ -187,6 +187,12 @@ html_static_path = ['_static']
+@@ -200,6 +200,12 @@ html_static_path = ['_static']
htmlhelp_basename = 'pyFAIdoc'
diff --git a/debian/patches/0004-do-not-use-deprecated-sphinx-pngmath-extension.patch b/debian/patches/0004-do-not-use-deprecated-sphinx-pngmath-extension.patch
deleted file mode 100644
index fc7eff4..0000000
--- a/debian/patches/0004-do-not-use-deprecated-sphinx-pngmath-extension.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
-Date: Wed, 17 Aug 2016 15:30:06 +0200
-Subject: do not use deprecated sphinx pngmath extension
-
----
- doc/source/conf.py | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/doc/source/conf.py b/doc/source/conf.py
-index b9945e6..4f60d42 100644
---- a/doc/source/conf.py
-+++ b/doc/source/conf.py
-@@ -40,7 +40,6 @@ except:
- extensions = [
- 'sphinx.ext.autodoc',
- 'sphinx.ext.todo',
-- 'sphinx.ext.pngmath',
- 'sphinxcontrib.programoutput',
- 'sphinx.ext.mathjax'
- ]
-@@ -274,7 +273,7 @@ re_field = re.compile('@(param|type|rtype|return)')
-
-
- def fix_docstring(app, what, name, obj, options, lines):
-- for i in xrange(len(lines)):
-+ for i in range(len(lines)):
- lines[i] = re_field.sub(r':\1', lines[i])
-
-
diff --git a/debian/patches/series b/debian/patches/series
index 929afd9..c81655a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,4 +1 @@
-0001-remove-useless-logic-in-conf.py.patch
-0002-skip-test-if-no-network.patch
0003-use-the-system-mathjax.patch
-0004-do-not-use-deprecated-sphinx-pngmath-extension.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