[skimage] 01/02: Apply patch by Michael Hudson-Doyle
Andreas Tille
tille at debian.org
Thu Aug 17 20:50:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository skimage.
commit 47aea76e4549c1c2453fc300fe45357be609042d
Author: Andreas Tille <tille at debian.org>
Date: Thu Aug 17 22:42:30 2017 +0200
Apply patch by Michael Hudson-Doyle
---
debian/changelog | 15 ++++
debian/control | 27 ++++---
...t_6807f4ee8f5501703e447f95701190c836deaae1.diff | 14 ----
debian/patches/dask-optional-dep.patch | 77 ------------------
debian/patches/doc-privacy.patch | 2 +-
debian/patches/fix-doc-links.patch | 6 +-
debian/patches/fix_shape_type.patch | 15 ----
debian/patches/search-html.patch | 21 -----
debian/patches/series | 7 +-
.../patches/skip-failing-test-on-big-endian.patch | 22 ++++++
debian/patches/skip-failing-test-on-i386.patch | 47 +++++++++++
.../skip_tests_failing_on_some_architectures.patch | 91 ----------------------
debian/rules | 2 +-
13 files changed, 107 insertions(+), 239 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 7d60099..8c48020 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,18 @@
+skimage (0.13.0-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * d/patches/:
+ - changeset_6807f4ee8f5501703e447f95701190c836deaae1.diff,
+ dask-optional-dep.patch, fix_shape_type.patch, search-html.patch: dropped,
+ applied upstream.
+ - fix-doc-links.patch: updated
+ - skip_tests_failing_on_some_architectures.patch: split into more targetted
+ skip-failing-test-on-i386.patch & skip-failing-test-on-big-endian.patch.
+ * d/rules: CONTRIBUTING.txt has moved.
+ * d/control: add dependencies on python{3,}-pywt. python{3,}-numpydoc.
+
+ -- Michael Hudson-Doyle <michael.hudson at ubuntu.com> Fri, 14 Jul 2017 12:34:25 +1200
+
skimage (0.12.3-9) unstable; urgency=medium
* Team upload.
diff --git a/debian/control b/debian/control
index 5b81a4b..09d3f2c 100644
--- a/debian/control
+++ b/debian/control
@@ -10,21 +10,25 @@ Build-Depends: cython (>= 0.23),
libjs-twitter-bootstrap,
python-all-dev (>= 2.6.6-3~),
python-matplotlib (>= 1.3.1),
+ python-networkx (>= 1.8),
python-nose,
python-numpy (>= 1.7.2),
+ python-numpydoc,
python-pil (>= 1.7.8) | python-imaging,
+ python-pywt,
python-scipy (>= 0.10),
- python-networkx (>= 1.8),
python-setuptools,
python-six (>= 1.4),
python-sphinx (>= 1.3.0),
python3-all-dev,
python3-matplotlib (>= 1.3.1),
+ python3-networkx (>= 1.8),
python3-nose,
python3-numpy (>= 1.7.2),
+ python3-numpydoc,
python3-pil (>= 1.7.8) | python3-imaging,
+ python3-pywt,
python3-scipy,
- python3-networkx (>= 1.8),
python3-setuptools,
python3-six (>= 1.3.0),
xauth,
@@ -38,17 +42,16 @@ X-Python3-Version: >= 3.2
Package: python-skimage
Architecture: all
-Depends: python-numpy,
+Depends: python-matplotlib (>= 1.3.1),
+ python-networkx (>= 1.8),
+ python-numpy,
+ python-pil (>= 1.7.8) | python-imaging,
python-scipy (>= 0.10),
python-six (>= 1.4),
- python-matplotlib (>= 1.3.1),
- python-pil (>= 1.7.8) | python-imaging,
- python-networkx (>= 1.8),
python-skimage-lib (>= ${source:Version}),
${misc:Depends},
${python:Depends}
-Recommends: python-nose,
- python-qt4
+Recommends: python-nose, python-qt4
Suggests: python-opencv, python-skimage-doc
Description: Python modules for image processing
scikit-image is a collection of image processing algorithms for
@@ -59,12 +62,12 @@ Description: Python modules for image processing
Package: python3-skimage
Architecture: all
-Depends: python3-numpy (>= 1.7.2),
+Depends: python3-matplotlib (>= 1.3.1),
+ python3-networkx (>= 1.8),
+ python3-numpy (>= 1.7.2),
+ python3-pil (>= 1.7.8) | python3-imaging,
python3-scipy (>= 0.10),
python3-six (>= 1.4),
- python3-matplotlib (>= 1.3.1),
- python3-pil (>= 1.7.8) | python3-imaging,
- python3-networkx (>= 1.8),
python3-skimage-lib (>= ${source:Version}),
${misc:Depends},
${python3:Depends}
diff --git a/debian/patches/changeset_6807f4ee8f5501703e447f95701190c836deaae1.diff b/debian/patches/changeset_6807f4ee8f5501703e447f95701190c836deaae1.diff
deleted file mode 100644
index 2bd35c7..0000000
--- a/debian/patches/changeset_6807f4ee8f5501703e447f95701190c836deaae1.diff
+++ /dev/null
@@ -1,14 +0,0 @@
-From: Yaroslav Halchenko <debian at onerussian.com>
-Subject: BF: Initialize firstbg to the numels so if no bg value found, second loop is not executed
-
---- a/skimage/measure/_ccomp.pyx
-+++ b/skimage/measure/_ccomp.pyx
-@@ -541,7 +541,7 @@ cdef void scanBG(DTYPE_t *data_p, DTYPE_
-
- The result of this function is update of forest_p and bg parameter.
- """
-- cdef DTYPE_t i, bgval = bg.background_val, firstbg
-+ cdef DTYPE_t i, bgval = bg.background_val, firstbg = shapeinfo.numels
- # We find the provisional label of the background, which is the index of
- # the first background pixel
- for i in range(shapeinfo.numels):
diff --git a/debian/patches/dask-optional-dep.patch b/debian/patches/dask-optional-dep.patch
deleted file mode 100644
index fe9a238..0000000
--- a/debian/patches/dask-optional-dep.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-Description: Make dask an optional dependency.
-
---- a/skimage/util/apply_parallel.py
-+++ b/skimage/util/apply_parallel.py
-@@ -4,6 +4,13 @@
- __all__ = ['apply_parallel']
-
-
-+try:
-+ import dask.array as da
-+ dask_available = True
-+except ImportError:
-+ dask_available = False
-+
-+
- def _get_chunks(shape, ncpu):
- """Split the array into equal sized chunks based on the number of
- available processors. The last chunk in each dimension absorbs the
-@@ -82,7 +89,9 @@
- equivalent `dask` boundary modes 'reflect', 'periodic' and 'nearest',
- respectively.
- """
-- import dask.array as da
-+ if not dask_available:
-+ raise RuntimeError("Could not import 'dask'. Please install "
-+ "using 'pip install dask'")
-
- if chunks is None:
- shape = array.shape
---- a/skimage/util/tests/test_apply_parallel.py
-+++ b/skimage/util/tests/test_apply_parallel.py
-@@ -2,11 +2,13 @@
-
- import numpy as np
- from numpy.testing import assert_array_almost_equal
-+from numpy.testing.decorators import skipif
-
- from skimage.filters import threshold_adaptive, gaussian
--from skimage.util.apply_parallel import apply_parallel
-+from skimage.util.apply_parallel import apply_parallel, dask_available
-
-
-+ at skipif(not dask_available)
- def test_apply_parallel():
- # data
- a = np.arange(144).reshape(12, 12).astype(float)
-@@ -28,6 +30,7 @@
- assert_array_almost_equal(result2, expected2)
-
-
-+ at skipif(not dask_available)
- def test_no_chunks():
- a = np.ones(1 * 4 * 8 * 9).reshape(1, 4, 8, 9)
-
-@@ -40,6 +43,7 @@
- assert_array_almost_equal(result, expected)
-
-
-+ at skipif(not dask_available)
- def test_apply_parallel_wrap():
- def wrapped(arr):
- return gaussian(arr, 1, mode='wrap')
-@@ -50,6 +54,7 @@
- assert_array_almost_equal(result, expected)
-
-
-+ at skipif(not dask_available)
- def test_apply_parallel_nearest():
- def wrapped(arr):
- return gaussian(arr, 1, mode='nearest')
---- a/requirements.txt
-+++ b/requirements.txt
-@@ -4,4 +4,3 @@
- six>=1.7.3
- networkx>=1.8
- pillow>=2.1.0
--dask[array]>=0.5.0
diff --git a/debian/patches/doc-privacy.patch b/debian/patches/doc-privacy.patch
index b234df1..f40debb 100644
--- a/debian/patches/doc-privacy.patch
+++ b/debian/patches/doc-privacy.patch
@@ -19,7 +19,7 @@ Description: avoid privacy breach
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}
-@@ -111,20 +109,3 @@
+@@ -106,20 +104,3 @@
</div>
</body>
</html>
diff --git a/debian/patches/fix-doc-links.patch b/debian/patches/fix-doc-links.patch
index 6e5f435..6495e9b 100644
--- a/debian/patches/fix-doc-links.patch
+++ b/debian/patches/fix-doc-links.patch
@@ -2,15 +2,17 @@ Description: fix documentation links
change to absolute filesystem links
--- a/doc/source/_templates/navbar.html
+++ b/doc/source/_templates/navbar.html
-@@ -1,7 +1,7 @@
+@@ -1,8 +1,8 @@
-<li><a href="/">Home</a></li>
-<li><a href="/download.html">Download</a></li>
-<li><a href="/docs/dev/auto_examples">Gallery</a></li>
-<li><a href="/docs/dev">Documentation</a></li>
+-<li><a href="/community_guidelines.html">Community Guidelines</a></li>
+<li><a href="/usr/share/doc/python-skimage-doc/html/index.html">Home</a></li>
+<li><a href="http://scikit-image.org/download.html">Download</a></li>
+<li><a href="/usr/share/doc/python-skimage-doc/html/auto_examples/index.html">Gallery</a></li>
+<li><a href="/usr/share/doc/python-skimage-doc/html/index.html">Documentation</a></li>
++<li><a href="/usr/share/doc/python-skimage-doc/html/community_guidelines.html">Community Guidelines</a></li>
+
<li><a href="https://github.com/scikit-image/scikit-image">
<img src="{{ pathto('_static', 1) }}/GitHub-Mark-32px.png"
- style="height: 15px; width: 15px;
diff --git a/debian/patches/fix_shape_type.patch b/debian/patches/fix_shape_type.patch
deleted file mode 100644
index 110de74..0000000
--- a/debian/patches/fix_shape_type.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Author: Ole Streicher <olebole at debian.org>
-Description: Fix shape type for histogram
-
-The number of bins is always an integer, independently of the image data type.
---- a/skimage/filters/rank/generic.py
-+++ b/skimage/filters/rank/generic.py
-@@ -977,7 +977,7 @@
- """
-
- if n_bins is None:
-- n_bins = image.max() + 1
-+ n_bins = int(image.max()) + 1
-
- return _apply_vector_per_pixel(generic_cy._windowed_hist, image, selem,
- out=out, mask=mask,
diff --git a/debian/patches/search-html.patch b/debian/patches/search-html.patch
deleted file mode 100644
index 25945b4..0000000
--- a/debian/patches/search-html.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: change to ajax load of searchindex
- required so dh_sphinx recognises it as a search.html
---- a/doc/source/themes/scikit-image/search.html
-+++ b/doc/source/themes/scikit-image/search.html
-@@ -10,7 +10,15 @@
- {% extends "layout.html" %}
- {% set title = _('Search') %}
- {% set script_files = script_files + ['_static/searchtools.js'] %}
--{% set script_files = script_files + ['searchindex.js'] %}
-+{% block extrahead %}
-+ <script type="text/javascript">
-+ jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });
-+ </script>
-+ {# this is used when loading the search index using $.ajax fails,
-+ such as on Chrome for documents on localhost #}
-+ <script type="text/javascript" id="searchindexloader"></script>
-+ {{ super() }}
-+{% endblock %}
- {% block body %}
- <h1 id="search-documentation">{{ _('Search') }}</h1>
- <div id="fallback" class="admonition warning">
diff --git a/debian/patches/series b/debian/patches/series
index 55d477b..563c38c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,7 +1,4 @@
-changeset_6807f4ee8f5501703e447f95701190c836deaae1.diff
-dask-optional-dep.patch
-search-html.patch
fix-doc-links.patch
doc-privacy.patch
-fix_shape_type.patch
-skip_tests_failing_on_some_architectures.patch
+skip-failing-test-on-big-endian.patch
+skip-failing-test-on-i386.patch
diff --git a/debian/patches/skip-failing-test-on-big-endian.patch b/debian/patches/skip-failing-test-on-big-endian.patch
new file mode 100644
index 0000000..10e5b41
--- /dev/null
+++ b/debian/patches/skip-failing-test-on-big-endian.patch
@@ -0,0 +1,22 @@
+--- a/skimage/io/tests/test_pil.py
++++ b/skimage/io/tests/test_pil.py
+@@ -1,8 +1,10 @@
+ import os.path
+ import numpy as np
++import sys
+ from numpy.testing import (
+ assert_array_equal, assert_array_almost_equal, assert_raises,
+ assert_allclose, run_module_suite)
++from numpy.testing.decorators import skipif
+
+ from tempfile import NamedTemporaryFile
+
+@@ -220,6 +222,8 @@
+ color_check('pil', 'bmp')
+
+
++# https://github.com/scikit-image/scikit-image/issues/2120
++ at skipif(sys.byteorder == 'big')
+ def test_all_mono():
+ mono_check('pil')
+
diff --git a/debian/patches/skip-failing-test-on-i386.patch b/debian/patches/skip-failing-test-on-i386.patch
new file mode 100644
index 0000000..f1999f4
--- /dev/null
+++ b/debian/patches/skip-failing-test-on-i386.patch
@@ -0,0 +1,47 @@
+--- a/skimage/feature/tests/test_orb.py
++++ b/skimage/feature/tests/test_orb.py
+@@ -1,6 +1,8 @@
++import os
+ import numpy as np
+ from numpy.testing import (assert_equal, assert_almost_equal, run_module_suite,
+ assert_raises)
++from numpy.testing.decorators import skipif
+ from skimage.feature import ORB
+ from skimage import data
+ from skimage._shared.testing import test_parallel
+@@ -69,6 +71,8 @@
+ assert_almost_equal(exp_cols, detector_extractor.keypoints[:, 1])
+
+
++# https://github.com/scikit-image/scikit-image/issues/2529
++ at skipif(os.uname()[4] == 'i686')
+ def test_descriptor_orb():
+ detector_extractor = ORB(fast_n=12, fast_threshold=0.20)
+
+--- a/skimage/filters/rank/tests/test_rank.py
++++ b/skimage/filters/rank/tests/test_rank.py
+@@ -10,6 +10,7 @@
+ from skimage._shared._warnings import expected_warnings
+ from skimage._shared.testing import test_parallel
+
++machine = os.uname()[4]
+
+ class TestRank():
+ def setup(self):
+@@ -82,10 +83,12 @@
+ rank.tophat(self.image, selem))
+ assert_equal(refs["noise_filter"],
+ rank.noise_filter(self.image, selem))
+- assert_equal(refs["entropy"],
+- rank.entropy(self.image, selem))
+- assert_equal(refs["otsu"],
+- rank.otsu(self.image, selem))
++ # https://github.com/scikit-image/scikit-image/issues/2528
++ if machine != "i686":
++ assert_equal(refs["entropy"],
++ rank.entropy(self.image, selem))
++ assert_equal(refs["otsu"],
++ rank.otsu(self.image, selem))
+ assert_equal(refs["percentile"],
+ rank.percentile(self.image, selem))
+ assert_equal(refs["windowed_histogram"],
diff --git a/debian/patches/skip_tests_failing_on_some_architectures.patch b/debian/patches/skip_tests_failing_on_some_architectures.patch
deleted file mode 100644
index 4e112fe..0000000
--- a/debian/patches/skip_tests_failing_on_some_architectures.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Author: Andreas Tille <tille at debian.org>
-Last-Update: Fri, 23 Dec 2016 08:45:21 +0100
-Bug-Debian: https://bugs.debian.org/840589
-Description: For the moment ignore tests failing on some architectures
-
---- a/skimage/feature/tests/test_orb.py
-+++ b/skimage/feature/tests/test_orb.py
-@@ -67,41 +67,5 @@
- assert_almost_equal(exp_rows, detector_extractor.keypoints[:, 0])
- assert_almost_equal(exp_cols, detector_extractor.keypoints[:, 1])
-
--
--def test_descriptor_orb():
-- detector_extractor = ORB(fast_n=12, fast_threshold=0.20)
--
-- exp_descriptors = np.array([[0, 1, 1, 1, 0, 1, 0, 1, 0, 1],
-- [1, 1, 1, 0, 0, 1, 0, 0, 1, 1],
-- [1, 0, 1, 1, 0, 0, 1, 1, 0, 0],
-- [0, 0, 0, 0, 0, 0, 0, 0, 1, 0],
-- [0, 1, 0, 0, 0, 0, 0, 0, 1, 0],
-- [1, 1, 0, 1, 1, 1, 0, 0, 1, 1],
-- [1, 1, 0, 1, 0, 0, 1, 0, 1, 1],
-- [0, 0, 1, 0, 1, 0, 0, 1, 1, 0],
-- [1, 0, 0, 0, 1, 0, 0, 0, 0, 1],
-- [0, 1, 1, 1, 1, 1, 1, 1, 1, 1],
-- [1, 1, 0, 1, 0, 1, 0, 0, 1, 1],
-- [1, 1, 1, 0, 0, 0, 1, 1, 1, 0],
-- [1, 1, 1, 1, 1, 1, 0, 0, 0, 0],
-- [1, 1, 1, 0, 1, 1, 1, 1, 0, 0],
-- [1, 1, 0, 0, 1, 0, 0, 1, 0, 1],
-- [1, 1, 0, 0, 0, 0, 1, 0, 0, 1],
-- [0, 0, 0, 0, 1, 1, 1, 0, 1, 0],
-- [0, 0, 0, 0, 1, 1, 1, 0, 0, 1],
-- [0, 0, 0, 0, 0, 1, 1, 0, 1, 1],
-- [0, 0, 0, 0, 1, 0, 1, 0, 1, 1]], dtype=bool)
-- detector_extractor.detect(img)
-- detector_extractor.extract(img, detector_extractor.keypoints,
-- detector_extractor.scales,
-- detector_extractor.orientations)
-- assert_equal(exp_descriptors,
-- detector_extractor.descriptors[100:120, 10:20])
--
-- detector_extractor.detect_and_extract(img)
-- assert_equal(exp_descriptors,
-- detector_extractor.descriptors[100:120, 10:20])
--
--
- if __name__ == '__main__':
- run_module_suite()
---- a/skimage/filters/rank/tests/test_rank.py
-+++ b/skimage/filters/rank/tests/test_rank.py
-@@ -79,10 +79,10 @@
- rank.tophat(image, selem))
- assert_equal(refs["noise_filter"],
- rank.noise_filter(image, selem))
-- assert_equal(refs["entropy"],
-- rank.entropy(image, selem))
-- assert_equal(refs["otsu"],
-- rank.otsu(image, selem))
-+ #assert_equal(refs["entropy"],
-+ # rank.entropy(image, selem))
-+ #assert_equal(refs["otsu"],
-+ # rank.otsu(image, selem))
- assert_equal(refs["percentile"],
- rank.percentile(image, selem))
- assert_equal(refs["windowed_histogram"],
---- a/skimage/io/tests/test_pil.py
-+++ b/skimage/io/tests/test_pil.py
-@@ -216,10 +216,6 @@
- color_check('pil', 'bmp')
-
-
--def test_all_mono():
-- mono_check('pil')
--
--
- def test_multi_page_gif():
- img = imread(os.path.join(data_dir, 'no_time_for_that_tiny.gif'))
- assert img.shape == (24, 25, 14, 3), img.shape
---- a/skimage/transform/tests/test_integral.py
-+++ b/skimage/transform/tests/test_integral.py
-@@ -43,7 +43,8 @@
- x[30:, 31:].sum()])
- start_pts = [(r0[i], c0[i]) for i in range(len(r0))]
- end_pts = [(r1[i], c1[i]) for i in range(len(r0))]
-- assert_equal(expected, integrate(s, r0, c0, r1, c1)) # test deprecated
-+# see https://github.com/numpy/numpy/issues/8413
-+# assert_equal(expected, integrate(s, r0, c0, r1, c1)) # test deprecated
- assert_equal(expected, integrate(s, start_pts, end_pts))
-
-
diff --git a/debian/rules b/debian/rules
index 979b53b..8e21c3e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -85,7 +85,7 @@ endif
endif
override_dh_installdocs:
- dh_installdocs -A CONTRIBUTORS.txt README.md CONTRIBUTING.txt TASKS.txt
+ dh_installdocs -A CONTRIBUTORS.txt README.md .github/CONTRIBUTING.txt TASKS.txt
dh_link -ppython-skimage-doc /usr/share/twitter-bootstrap/files/js/bootstrap.min.js \
usr/share/doc/python-skimage-doc/html/_static/js/bootstrap.min.js
dh_link -ppython-skimage-doc /usr/share/twitter-bootstrap/files/css/bootstrap.min.css \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/skimage.git
More information about the debian-science-commits
mailing list