From f5bf1dd3b962514c269a1a653cdd2c1d1be38b26 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Tue, 30 Jun 2015 22:49:21 +1000 Subject: [PATCH 1/4] Point contributors to coordinate conventions --- CONTRIBUTING.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.txt b/CONTRIBUTING.txt index 9b1df551..fc62ea01 100644 --- a/CONTRIBUTING.txt +++ b/CONTRIBUTING.txt @@ -152,6 +152,10 @@ Stylistic Guidelines * When documenting array parameters, use ``image : (M, N) ndarray`` and then refer to ``M`` and ``N`` in the docstring, if necessary. +* Refer to array dimensions as (plane), row, column, not as x, y, z. See + `Coordinate conventions `__ + in the user guide for more information. + * Functions should support all input image dtypes. Use utility functions such as ``img_as_float`` to help convert to an appropriate type. The output format can be whatever is most efficient. This allows us to string together From e1afe7e65a1c84911f8322a311fa33433b75215f Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Tue, 30 Jun 2015 22:49:48 +1000 Subject: [PATCH 2/4] Ask contributors to wrap Cython functions in Python --- CONTRIBUTING.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.txt b/CONTRIBUTING.txt index fc62ea01..3f0eed9c 100644 --- a/CONTRIBUTING.txt +++ b/CONTRIBUTING.txt @@ -166,6 +166,10 @@ Stylistic Guidelines * Use ``Py_ssize_t`` as data type for all indexing, shape and size variables in C/C++ and Cython code. +* Wrap Cython code in a pure Python function, which defines the API. This + improves compatibility with code introspection tools, which are often not + aware of Cython code. + Test coverage ------------- From eb8aaeb61db6bda8a2030aeeabd77619fb1653f6 Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Tue, 30 Jun 2015 23:37:30 +1000 Subject: [PATCH 3/4] Use Sphinx links to reference from contributing guide --- CONTRIBUTING.txt | 2 +- doc/source/user_guide/numpy_images.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.txt b/CONTRIBUTING.txt index 3f0eed9c..79b691e4 100644 --- a/CONTRIBUTING.txt +++ b/CONTRIBUTING.txt @@ -153,7 +153,7 @@ Stylistic Guidelines and then refer to ``M`` and ``N`` in the docstring, if necessary. * Refer to array dimensions as (plane), row, column, not as x, y, z. See - `Coordinate conventions `__ + :ref:`Coordinate conventions ` in the user guide for more information. * Functions should support all input image dtypes. Use utility functions such diff --git a/doc/source/user_guide/numpy_images.txt b/doc/source/user_guide/numpy_images.txt index e976ae7e..5bba5da0 100644 --- a/doc/source/user_guide/numpy_images.txt +++ b/doc/source/user_guide/numpy_images.txt @@ -130,6 +130,7 @@ the grayscale image above: >>> plt.imshow(cat) +.. _numpy-images-coordinate-conventions: Coordinate conventions ---------------------- From cba1cb1e1fea72859448c7d214be6c8c3944f4db Mon Sep 17 00:00:00 2001 From: Juan Nunez-Iglesias Date: Wed, 1 Jul 2015 00:47:19 +1000 Subject: [PATCH 4/4] Add blank line after ref to keep Sphinx happy ;) --- doc/source/user_guide/numpy_images.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/source/user_guide/numpy_images.txt b/doc/source/user_guide/numpy_images.txt index 5bba5da0..46f21afa 100644 --- a/doc/source/user_guide/numpy_images.txt +++ b/doc/source/user_guide/numpy_images.txt @@ -131,6 +131,7 @@ the grayscale image above: .. _numpy-images-coordinate-conventions: + Coordinate conventions ----------------------