From 8ba2518333578a567ae89d0351310b5ac224c5ee Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:04:53 -0700 Subject: [PATCH 01/11] BUG: Fix scikits.image.test. --- scikits/image/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scikits/image/__init__.py b/scikits/image/__init__.py index c9307cf9..a945cc2c 100644 --- a/scikits/image/__init__.py +++ b/scikits/image/__init__.py @@ -3,7 +3,8 @@ import os.path as _osp -data_dir = _osp.abspath(_osp.join(_osp.dirname(__file__), 'data')) +pkg_dir = _osp.abspath(_osp.dirname(__file__)) +data_dir = _osp.join(pkg_dir, 'data') from version import version as __version__ @@ -11,7 +12,7 @@ def _setup_test(): import gzip import functools - basedir = _osp.dirname(_osp.join(__file__, '../')) + basedir = _osp.join(pkg_dir, '../') args = ['', '--exe', '-w', '%s' % basedir] try: From 771c90522788ad688267ccbc61ecdbf5d0de2fd5 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:24:35 -0700 Subject: [PATCH 02/11] DOC: Update contributors. --- CONTRIBUTORS.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt index b91e9522..aba19f3b 100644 --- a/CONTRIBUTORS.txt +++ b/CONTRIBUTORS.txt @@ -74,3 +74,7 @@ - David-Warde Farley, Sturla Molden Bresenheim line drawing, from snippets on numpy-discussion. + +- Christoph Gohlke + Windows packaging and Python 3 compatibility. + From 05f780b88793697b237a08bacab55409c0361345 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:39:18 -0700 Subject: [PATCH 03/11] Remove empty gitwash directory in order to fix submodule. --- doc/tools/gitwash | 1 - 1 file changed, 1 deletion(-) delete mode 160000 doc/tools/gitwash diff --git a/doc/tools/gitwash b/doc/tools/gitwash deleted file mode 160000 index e02c2af7..00000000 --- a/doc/tools/gitwash +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e02c2af711ff6b905a3e75f99f55e078a88e6b7e From 603216e4a7db44fd07c92e264f171a49085e0cf5 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:40:40 -0700 Subject: [PATCH 04/11] DOC: Add gitwash as a submodule. --- .gitmodules | 3 +++ doc/tools/gitwash | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 doc/tools/gitwash diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..31ba80b2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "doc/tools/gitwash"] + path = doc/tools/gitwash + url = git@github.com:matthew-brett/gitwash.git diff --git a/doc/tools/gitwash b/doc/tools/gitwash new file mode 160000 index 00000000..06d130ab --- /dev/null +++ b/doc/tools/gitwash @@ -0,0 +1 @@ +Subproject commit 06d130ab98d78e5a831b32a6624cad2bc481cacd From 69a10b62c315d70eb1d5a3ff714e2e58f7df48bc Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:44:59 -0700 Subject: [PATCH 05/11] DOC: Use correct repo URL in gitwash. --- doc/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/Makefile b/doc/Makefile index 29159699..08aaa703 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -123,4 +123,6 @@ gitwash: python tools/gitwash/gitwash_dumper.py source scikits.image \ --project-url=http://scikits-image.org \ --project-ml-url=http://groups.google.com/group/scikits-image \ + --repo-name=scikits.image \ + --github-user=scikits-image \ --source-suffix=.txt From b381d59c675eda526c5d928f1919770cfe8ca4f6 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Wed, 12 Oct 2011 13:45:56 -0700 Subject: [PATCH 06/11] DOC: Rewash the git docs. --- doc/source/gitwash/following_latest.txt | 4 ++-- doc/source/gitwash/maintainer_workflow.txt | 2 +- doc/source/gitwash/patching.txt | 4 ++-- doc/source/gitwash/set_up_fork.txt | 8 ++++---- doc/source/gitwash/this_project.inc | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/doc/source/gitwash/following_latest.txt b/doc/source/gitwash/following_latest.txt index bdf07f4a..9dfff734 100644 --- a/doc/source/gitwash/following_latest.txt +++ b/doc/source/gitwash/following_latest.txt @@ -10,7 +10,7 @@ These are the instructions if you just want to follow the latest The steps are: * :ref:`install-git` -* get local copy of the git repository from github +* get local copy of the `scikits.image github`_ git repository * update local copy from time to time Get the local copy of the code @@ -18,7 +18,7 @@ Get the local copy of the code From the command line:: - git clone git://github.com/scikits.image/scikits.image.git + git clone git://github.com/scikits-image/scikits.image.git You now have a copy of the code tree in the new ``scikits.image`` directory. diff --git a/doc/source/gitwash/maintainer_workflow.txt b/doc/source/gitwash/maintainer_workflow.txt index 64a12d99..cfcd3d38 100644 --- a/doc/source/gitwash/maintainer_workflow.txt +++ b/doc/source/gitwash/maintainer_workflow.txt @@ -16,7 +16,7 @@ access to the upstream repo. Being a maintainer, you've got read-write access. It's good to have your upstream remote have a scary name, to remind you that it's a read-write remote:: - git remote add upstream-rw git@github.com:scikits.image/scikits.image.git + git remote add upstream-rw git@github.com:scikits-image/scikits.image.git git fetch upstream-rw ******************* diff --git a/doc/source/gitwash/patching.txt b/doc/source/gitwash/patching.txt index 110666aa..7b990f86 100644 --- a/doc/source/gitwash/patching.txt +++ b/doc/source/gitwash/patching.txt @@ -29,7 +29,7 @@ Overview git config --global user.email you@yourdomain.example.com git config --global user.name "Your Name Comes Here" # get the repository if you don't have it - git clone git://github.com/scikits.image/scikits.image.git + git clone git://github.com/scikits-image/scikits.image.git # make a branch for your patching cd scikits.image git branch the-fix-im-thinking-of @@ -59,7 +59,7 @@ In detail #. If you don't already have one, clone a copy of the scikits.image_ repository:: - git clone git://github.com/scikits.image/scikits.image.git + git clone git://github.com/scikits-image/scikits.image.git cd scikits.image #. Make a 'feature branch'. This will be where you work on diff --git a/doc/source/gitwash/set_up_fork.txt b/doc/source/gitwash/set_up_fork.txt index fe4a7684..c0e16314 100644 --- a/doc/source/gitwash/set_up_fork.txt +++ b/doc/source/gitwash/set_up_fork.txt @@ -13,7 +13,7 @@ Overview git clone git@github.com:your-user-name/scikits.image.git cd scikits.image - git remote add upstream git://github.com/scikits.image/scikits.image.git + git remote add upstream git://github.com/scikits-image/scikits.image.git In detail ========= @@ -46,7 +46,7 @@ Linking your repository to the upstream repo :: cd scikits.image - git remote add upstream git://github.com/scikits.image/scikits.image.git + git remote add upstream git://github.com/scikits-image/scikits.image.git ``upstream`` here is just the arbitrary name we're using to refer to the main scikits.image_ repository at `scikits.image github`_. @@ -59,8 +59,8 @@ use it to merge into our own code. Just for your own satisfaction, show yourself that you now have a new 'remote', with ``git remote -v show``, giving you something like:: - upstream git://github.com/scikits.image/scikits.image.git (fetch) - upstream git://github.com/scikits.image/scikits.image.git (push) + upstream git://github.com/scikits-image/scikits.image.git (fetch) + upstream git://github.com/scikits-image/scikits.image.git (push) origin git@github.com:your-user-name/scikits.image.git (fetch) origin git@github.com:your-user-name/scikits.image.git (push) diff --git a/doc/source/gitwash/this_project.inc b/doc/source/gitwash/this_project.inc index f7c01aa2..9be8d57a 100644 --- a/doc/source/gitwash/this_project.inc +++ b/doc/source/gitwash/this_project.inc @@ -1,5 +1,5 @@ .. scikits.image .. _scikits.image: http://scikits-image.org -.. _`scikits.image github`: http://github.com/scikits.image/scikits.image +.. _`scikits.image github`: http://github.com/scikits-image/scikits.image .. _`scikits.image mailing list`: http://groups.google.com/group/scikits-image From 98290218f02ea3053fec006f28e9b0feb5d7e964 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 14:06:09 -0700 Subject: [PATCH 07/11] Fix: don't run all scikits tests when running scikits.image.test() --- scikits/image/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scikits/image/__init__.py b/scikits/image/__init__.py index a945cc2c..8d8d51ec 100644 --- a/scikits/image/__init__.py +++ b/scikits/image/__init__.py @@ -12,8 +12,7 @@ def _setup_test(): import gzip import functools - basedir = _osp.join(pkg_dir, '../') - args = ['', '--exe', '-w', '%s' % basedir] + args = ['', '--exe', '-w', '%s' % pkg_dir] try: import nose as _nose From a609bd6416a6886edce4564adaf69920c7b9cfca Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 14:09:29 -0700 Subject: [PATCH 08/11] Fix print statements missed by 2to3 --- scikits/image/morphology/tests/test_watershed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scikits/image/morphology/tests/test_watershed.py b/scikits/image/morphology/tests/test_watershed.py index ca7c43bf..6a3b2750 100644 --- a/scikits/image/morphology/tests/test_watershed.py +++ b/scikits/image/morphology/tests/test_watershed.py @@ -388,11 +388,11 @@ class TestWatershed(unittest.TestCase): before = time.clock() out = watershed(image, markers, self.eight) elapsed = time.clock() - before - print "Fast watershed ran a megapixel image in %f seconds"%(elapsed) + print ("Fast watershed ran a megapixel image in %f seconds"%(elapsed)) before = time.clock() out = scipy.ndimage.watershed_ift(image.astype(np.uint16), markers, self.eight) elapsed = time.clock() - before - print "Scipy watershed ran a megapixel image in %f seconds"%(elapsed) + print ("Scipy watershed ran a megapixel image in %f seconds"%(elapsed)) class TestIsLocalMaximum(unittest.TestCase): From b708d931c2fbeb3e91b6d0eb581a8da9e0bd00c9 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 15:01:31 -0700 Subject: [PATCH 09/11] Update URL in package description --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9d9ab45d..00398ab5 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ Image processing algorithms for SciPy, including IO, morphology, filtering, warping, color manipulation, object detection, etc. Please refer to the online documentation at -http://stefanv.github.com/scikits.image +http://scikits-image.org/ """ DISTNAME = 'scikits.image' From cc84603b1ac5429326bc80ec3115d9f3986e2e76 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 15:25:41 -0700 Subject: [PATCH 10/11] Remove print statements --- scikits/image/morphology/tests/test_watershed.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scikits/image/morphology/tests/test_watershed.py b/scikits/image/morphology/tests/test_watershed.py index 6a3b2750..265a25e2 100644 --- a/scikits/image/morphology/tests/test_watershed.py +++ b/scikits/image/morphology/tests/test_watershed.py @@ -388,11 +388,9 @@ class TestWatershed(unittest.TestCase): before = time.clock() out = watershed(image, markers, self.eight) elapsed = time.clock() - before - print ("Fast watershed ran a megapixel image in %f seconds"%(elapsed)) before = time.clock() out = scipy.ndimage.watershed_ift(image.astype(np.uint16), markers, self.eight) elapsed = time.clock() - before - print ("Scipy watershed ran a megapixel image in %f seconds"%(elapsed)) class TestIsLocalMaximum(unittest.TestCase): From 8024cc9798d7f33289597bc78e8f5fb1b102a7bf Mon Sep 17 00:00:00 2001 From: cgohlke Date: Wed, 12 Oct 2011 15:29:56 -0700 Subject: [PATCH 11/11] Remove print statements --- scikits/image/transform/tests/test_project.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/scikits/image/transform/tests/test_project.py b/scikits/image/transform/tests/test_project.py index 363ff2b7..f1756f99 100644 --- a/scikits/image/transform/tests/test_project.py +++ b/scikits/image/transform/tests/test_project.py @@ -39,8 +39,6 @@ def test_fast_homography(): H[:2, 2] = [tx, ty] for mode in ('constant', 'mirror', 'wrap'): - print 'Transform mode:', mode - p0 = homography(img, H, mode=mode, order=1) p1 = fast_homography(img, H, mode=mode) p1 = np.round(p1) @@ -54,7 +52,6 @@ def test_fast_homography(): ## plt.show() d = np.mean(np.abs(p0 - p1)) - print "delta=", d assert d < 0.2