From d49c5f03eb637b3a4f07d2585b63365fc75851c9 Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Fri, 9 Oct 2015 22:31:09 -0500 Subject: [PATCH 1/2] #96: documentation changes --- nd2reader/interface.py | 12 ++---------- nd2reader/version.py | 3 +-- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/nd2reader/interface.py b/nd2reader/interface.py index 9f3403b..a0d1d4f 100644 --- a/nd2reader/interface.py +++ b/nd2reader/interface.py @@ -50,15 +50,6 @@ class Nd2(object): """ Allows slicing ND2s. - >>> nd2 = Nd2("my_images.nd2") - >>> image = nd2[16] # gets 17th frame - >>> for image in nd2[100:200]: # iterate over the 100th to 200th images - >>> do_something(image) - >>> for image in nd2[::-1]: # iterate backwards - >>> do_something(image) - >>> for image in nd2[37:422:17]: # do something super weird if you really want to - >>> do_something(image) - :type item: int or slice :rtype: nd2reader.model.Image() or generator @@ -102,7 +93,8 @@ class Nd2(object): :return: model.ImageSet() """ - warnings.warn("Nd2.image_sets will be removed from the nd2reader library in the near future.", DeprecationWarning) + warnings.warn("Nd2.image_sets will be removed from the nd2reader library in the near future.", + DeprecationWarning) for frame in self.frames: image_group = ImageGroup() diff --git a/nd2reader/version.py b/nd2reader/version.py index ca50011..33f8d4e 100644 --- a/nd2reader/version.py +++ b/nd2reader/version.py @@ -6,8 +6,7 @@ def get_version(fh): """ Determines what version the ND2 is. - :param filename: the path (absolute or relative) to the ND2 - :type filename: str + :param fh: a file handle to the ND2 """ # the first 16 bytes seem to have no meaning, so we skip them From dcdfe161d09eeba4d651a158ca55ab9077843f8c Mon Sep 17 00:00:00 2001 From: Jim Rybarski Date: Fri, 9 Oct 2015 23:28:13 -0500 Subject: [PATCH 2/2] resolves #84: tests run --- tests/driver/driver.py | 7 ------- tests/driver/version.py | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 tests/driver/driver.py diff --git a/tests/driver/driver.py b/tests/driver/driver.py deleted file mode 100644 index 35752e4..0000000 --- a/tests/driver/driver.py +++ /dev/null @@ -1,7 +0,0 @@ -import unittest -from nd2reader.driver import get_driver - - -class TestDriver(unittest.TestCase): - def test_get_driver(self): - pass \ No newline at end of file diff --git a/tests/driver/version.py b/tests/driver/version.py index 9add147..c894b61 100644 --- a/tests/driver/version.py +++ b/tests/driver/version.py @@ -1,5 +1,5 @@ import unittest -from nd2reader.driver.version import parse_version +from nd2reader.version import parse_version class VersionTests(unittest.TestCase):