[Git][debian-gis-team/pyepr][master] 10 commits: New upstream version 0.9.4

Antonio Valentino gitlab at salsa.debian.org
Mon Apr 30 09:29:17 BST 2018


Antonio Valentino pushed to branch master at Debian GIS Project / pyepr


Commits:
69a5d2a1 by Antonio Valentino at 2018-04-30T06:36:11+00:00
New upstream version 0.9.4
- - - - -
cce344ad by Antonio Valentino at 2018-04-30T06:36:12+00:00
Update upstream source from tag 'upstream/0.9.4'

Update to upstream version '0.9.4'
with Debian dir 3dbdacb83ba08372de226fbf1246fc011b1ff57b
- - - - -
c8a9fdd7 by Antonio Valentino at 2018-04-30T06:36:53+00:00
New upstream release

- - - - -
644cd481 by Antonio Valentino at 2018-04-30T06:39:04+00:00
Standard version bump

- - - - -
465a4a94 by Antonio Valentino at 2018-04-30T06:45:19+00:00
Multi-Arch: same

- - - - -
a93dc51c by Antonio Valentino at 2018-04-30T06:50:49+00:00
Improve installdoc rule

- - - - -
5b4b385b by Antonio Valentino at 2018-04-30T06:58:24+00:00
Refresh all patches

- - - - -
8bd99c31 by Antonio Valentino at 2018-04-30T08:16:29+00:00
Install examples

- - - - -
6a4d2630 by Antonio Valentino at 2018-04-30T08:24:59+00:00
Set distribution to unstable

- - - - -
da72fb9c by Antonio Valentino at 2018-04-30T10:28:33+02:00
Merge remote-tracking branch 'origin/master'

- - - - -


23 changed files:

- .gitignore
- .travis.yml
- Makefile
- README.txt
- debian/changelog
- debian/control
- debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
- + debian/python-epr-doc.examples
- + debian/python-epr-doc.links
- debian/rules
- doc/Makefile
- doc/NEWS.txt
- doc/conf.py
- doc/index.txt
- doc/interactive_use.txt
- doc/make.bat
- doc/reference.txt
- doc/update_example.txt
- doc/usermanual.txt
- setup.py
- src/epr.pxd
- src/epr.pyx
- tests/test_all.py


Changes:

=====================================
.gitignore
=====================================
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 SciTEDirectory.properties
+.idea


=====================================
.travis.yml
=====================================
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,20 +1,23 @@
 language: python
 
 python:
-  - 2.6
-  - 2.7
-  - "2.7_with_system_site_packages"
-  - 3.2
-  - "3.2_with_system_site_packages"
-  - 3.3
-  - 3.4
+  - "2.6"
+  - "2.7"
+  - "3.3"
+  - "3.4"
+  - "3.5"
+  - "3.6"
+  - "3.7-dev"
+  # "pypy2.7"
+  - "pypy3.5"
 
 before_install:
   - sudo apt-get update -qq
-  - sudo apt-get install -qq libepr-api2-dev
-  - pip install -r requirements.txt --use-mirrors
-  - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -U unittest2 --use-mirrors; fi
+  - sudo apt-get install -qq libepr-api-dev
 
-install: python setup.py build_ext --inplace
+install:
+  - pip install -r requirements.txt
+  - if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -U unittest2; fi
+  - python setup.py build_ext --inplace
 
 script: make PYTHON=python check


=====================================
Makefile
=====================================
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
 #!/usr/bin/make -f
 # -*- coding: utf-8 -*-
 
-# Copyright (C) 2011-2014, Antonio Valentino <antonio.valentino at tiscali.it>
+# Copyright (C) 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
 #
 # This file is part of PyEPR.
 #
@@ -54,11 +54,13 @@ eprsrc: epr-api-src LICENSES/epr-api.txt
 fullsdist: doc cythonize eprsrc
 	$(PYTHON) setup.py sdist
 
-upload: doc cythonize eprsrc
-	$(PYTHON) setup.py sdist upload -s -i 24B76CFE
+upload: fullsdist
+	twine upload dist/pyepr-*.tar.gz
 
 doc:
 	$(MAKE) -C doc html
+	$(RM) -r doc/html
+	mv doc/_build/html doc/html
 
 clean:
 	$(PYTHON) setup.py clean --all


=====================================
README.txt
=====================================
--- a/README.txt
+++ b/README.txt
@@ -5,8 +5,8 @@ ENVISAT Product Reader Python API
 :HomePage:  http://avalentino.github.io/pyepr
 :Author:    Antonio Valentino
 :Contact:   antonio.valentino at tiscali.it
-:Copyright: 2011-2015, Antonio Valentino <antonio.valentino at tiscali.it>
-:Version:   0.9.3
+:Copyright: 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
+:Version:   0.9.4
 
 
 Introduction
@@ -35,7 +35,7 @@ Requirements
 In order to use PyEPR it is needed that the following software are
 correctly installed and configured:
 
-* Python2_ >= 2.6 or Python3_ >= 3.1
+* Python2_ >= 2.6 or Python3_ >= 3.1 (including PyPy_)
 * numpy_ >= 1.5.0
 * `EPR API`_ >= 2.2 (optional, since PyEPR 0.7 the source tar-ball comes
   with a copy of the PER C API sources)
@@ -45,6 +45,7 @@ correctly installed and configured:
 
 .. _Python2: Python_
 .. _Python3: Python_
+.. _PyPy: http://pypy.orgv
 .. _numpy: http://www.numpy.org
 .. _gcc: http://gcc.gnu.org
 .. _Cython: http://cython.org
@@ -83,7 +84,7 @@ or::
 
     $ pip install -U --prefix=<TARGET DIRECTORY>
 
-PyEPR_ can be installed from the source tar.ball using the following
+PyEPR_ can be installed from the source tar-ball using the following
 command::
 
     $ python setup.py install
@@ -99,7 +100,7 @@ To install PyEPR_ in a non-standard path::
 License
 =======
 
-Copyright (C) 2011-2015 Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright (C) 2011-2018 Antonio Valentino <antonio.valentino at tiscali.it>
 
 PyEPR is free software: you can redistribute it and/or modify
 it under the terms of the `GNU General Public License`_ as published by


=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,19 @@
-pyepr (0.9.3-6) UNRELEASED; urgency=medium
+pyepr (0.9.4-1) unstable; urgency=medium
 
+  [ Bas Couwenberg ]
   * Update Vcs-* URLs for Salsa.
   * Bump Standards-Version to 4.1.4, no changes.
 
- -- Bas Couwenberg <sebastic at debian.org>  Sat, 31 Mar 2018 12:50:30 +0200
+  [ Antonio Valentino ]
+  * New upstream release.
+  * Set Multi-Arch: same for pythpn(3)-epr(-dbg) packages.
+  * debian/rules
+    - update installdoc rule
+  * debian/patch
+    - refresh all parches
+  * Install examples.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it>  Mon, 30 Apr 2018 08:24:31 +0000
 
 pyepr (0.9.3-5) unstable; urgency=medium
 


=====================================
debian/control
=====================================
--- a/debian/control
+++ b/debian/control
@@ -32,6 +32,7 @@ X-Python3-Version: >= 3.2
 
 Package: python-epr
 Architecture: any
+Multi-Arch: same
 Depends: ${misc:Depends},
          ${python:Depends},
          ${shlibs:Depends},
@@ -53,6 +54,7 @@ Description: Python ENVISAT Product Reader API (Python 2)
 Package: python-epr-dbg
 Section: debug
 Architecture: any
+Multi-Arch: same
 Depends: ${misc:Depends},
          ${python:Depends},
          ${shlibs:Depends},
@@ -73,6 +75,7 @@ Description: Python ENVISAT Product Reader API (debug extension for Python 2)
 
 Package: python3-epr
 Architecture: any
+Multi-Arch: same
 Depends: ${misc:Depends},
          ${python3:Depends},
          ${shlibs:Depends},
@@ -94,6 +97,7 @@ Description: Python ENVISAT Product Reader API (Python 3)
 Package: python3-epr-dbg
 Section: debug
 Architecture: any
+Multi-Arch: same
 Depends: ${misc:Depends},
          ${python3:Depends},
          ${shlibs:Depends},


=====================================
debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
=====================================
--- a/debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
+++ b/debian/patches/0001-Only-use-local-files-for-generating-sphinx-doc.patch
@@ -7,34 +7,38 @@ point to local object.inv files.
 This makes the package self contained and no download attempt
 happens any longer (Closes: #726859).
 ---
- doc/conf.py | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
+ doc/conf.py | 14 ++++++++------
+ 1 file changed, 8 insertions(+), 6 deletions(-)
 
 diff --git a/doc/conf.py b/doc/conf.py
-index 3d21ca8..3d60c09 100644
+index 0c23523..795fd91 100644
 --- a/doc/conf.py
 +++ b/doc/conf.py
-@@ -130,8 +130,10 @@ extlinks = {
+@@ -139,10 +139,10 @@ html_sidebars = {
+         'relations.html',
+         'sourcelink.html',
+         'searchbox.html',
+-        'ohloh.html',
+-        'pypi.html',
+-        'travis-ci.html',
+-        'appveyor.html',
++        # 'ohloh.html',
++        # 'pypi.html',
++        # 'travis-ci.html',
++        # 'appveyor.html',
+     ],
+ }
+ 
+@@ -249,8 +249,10 @@ extlinks = {
  
- # Intersphinx
+ # Example configuration for intersphinx: refer to the Python standard library.
  intersphinx_mapping = {
 -    'python': ('https://docs.python.org/3', None),
--    'numpy':  ('http://docs.scipy.org/doc/numpy', None),
+-    'numpy':  ('https://docs.scipy.org/doc/numpy', None),
 +    'python': ('https://docs.python.org/3',
 +               '/usr/share/doc/python3-doc/html/objects.inv'),
-+    'numpy':  ('http://docs.scipy.org/doc/numpy',
++    'numpy':  ('https://docs.scipy.org/doc/numpy',
 +               '/usr/share/doc/python-numpy-doc/html/objects.inv'),
  }
  
- 
-@@ -188,8 +190,8 @@ html_last_updated_fmt = '%b %d, %Y'
- # Custom sidebar templates, maps document names to template names.
- html_sidebars = {
-    'index': ['globaltoc.html', 'relations.html', 'sourcelink.html',
--             'searchbox.html', 'ohloh.html', 'pypi.html',
--             'travis-ci.html', 'appveyor.html'],
-+             'searchbox.html']  # , 'ohloh.html', 'pypi.html',
-+             # 'travis-ci.html', 'appveyor.html'],
- }
- 
- # Additional templates that should be rendered to pages, maps page names to
+ # If true, `todo` and `todoList` produce output, else they produce nothing.


=====================================
debian/python-epr-doc.examples
=====================================
--- /dev/null
+++ b/debian/python-epr-doc.examples
@@ -0,0 +1 @@
+doc/examples/*


=====================================
debian/python-epr-doc.links
=====================================
--- /dev/null
+++ b/debian/python-epr-doc.links
@@ -0,0 +1 @@
+usr/share/doc/python-epr/examples usr/share/doc/python-epr/html/_downloads


=====================================
debian/rules
=====================================
--- a/debian/rules
+++ b/debian/rules
@@ -76,20 +76,15 @@ endif
 
 override_dh_installdocs:
 ifeq (,$(findstring nodoc,$(DEB_BUILD_OPTIONS)))
-	$(MAKE) -C doc html SPHINXOPTS="$(SPHINXOPTS)"
+	$(MAKE) SPHINXOPTS="$(SPHINXOPTS)" doc
+	$(RM) -r doc/html/_downloads
 else
 	mkdir -p doc/html
 endif
-	dh_installdocs -ppython-epr-doc --doc-main-package=python-epr
-	dh_installdocs --remaining-packages
-
-
-override_dh_installexamples:
-	dh_installexamples -ppython-epr-doc --doc-main-package=python-epr
-	dh_installexamples --remaining-packages
+	dh_installdocs
 
 
 .PHONY: override_dh_gencontrol override_dh_auto_clean override_dh_auto_test \
         override_dh_strip override_dh_installchangelogs override_dh_compress \
-        override_dh_sphinxdoc override_dh_installdocs override_dh_installexamples
+        override_dh_sphinxdoc override_dh_installdocs
 


=====================================
doc/Makefile
=====================================
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -1,177 +1,20 @@
-# Makefile for Sphinx documentation
+# Minimal makefile for Sphinx documentation
 #
 
 # You can set these variables from the command line.
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
-PAPER         =
+SPHINXPROJ    = PyEPR
+SOURCEDIR     = .
 BUILDDIR      = _build
 
-# User-friendly check for sphinx-build
-ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
-$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
-endif
-
-# Internal variables.
-PAPEROPT_a4     = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-# the i18n builder cannot share the environment and doctrees with the others
-I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
-
+# Put it first so that "make" without argument is like "make help".
 help:
-	@echo "Please use \`make <target>' where <target> is one of"
-	@echo "  html       to make standalone HTML files"
-	@echo "  dirhtml    to make HTML files named index.html in directories"
-	@echo "  singlehtml to make a single large HTML file"
-	@echo "  pickle     to make pickle files"
-	@echo "  json       to make JSON files"
-	@echo "  htmlhelp   to make HTML files and a HTML help project"
-	@echo "  qthelp     to make HTML files and a qthelp project"
-	@echo "  devhelp    to make HTML files and a Devhelp project"
-	@echo "  epub       to make an epub"
-	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
-	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
-	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
-	@echo "  text       to make text files"
-	@echo "  man        to make manual pages"
-	@echo "  texinfo    to make Texinfo files"
-	@echo "  info       to make Texinfo files and run them through makeinfo"
-	@echo "  gettext    to make PO message catalogs"
-	@echo "  changes    to make an overview of all changed/added/deprecated items"
-	@echo "  xml        to make Docutils-native XML files"
-	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
-	@echo "  linkcheck  to check all external links for integrity"
-	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
-
-clean:
-	rm -rf $(BUILDDIR)/*
-
-html:
-	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) html
-	@echo
-	@echo "Build finished. The HTML pages are in html."
-
-dirhtml:
-	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
-	@echo
-	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
-	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
-	@echo
-	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
-	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
-	@echo
-	@echo "Build finished; now you can process the pickle files."
-
-json:
-	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
-	@echo
-	@echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
-	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
-	@echo
-	@echo "Build finished; now you can run HTML Help Workshop with the" \
-	      ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
-	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
-	@echo
-	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
-	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyEPR.qhcp"
-	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyEPR.qhc"
-
-devhelp:
-	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
-	@echo
-	@echo "Build finished."
-	@echo "To view the help file:"
-	@echo "# mkdir -p $$HOME/.local/share/devhelp/PyEPR"
-	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyEPR"
-	@echo "# devhelp"
-
-epub:
-	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
-	@echo
-	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo
-	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
-	@echo "Run \`make' in that directory to run these through (pdf)latex" \
-	      "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo "Running LaTeX files through pdflatex..."
-	$(MAKE) -C $(BUILDDIR)/latex all-pdf
-	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-latexpdfja:
-	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
-	@echo "Running LaTeX files through platex and dvipdfmx..."
-	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
-	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
-	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
-	@echo
-	@echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
-	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
-	@echo
-	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-texinfo:
-	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-	@echo
-	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
-	@echo "Run \`make' in that directory to run these through makeinfo" \
-	      "(use \`make info' here to do that automatically)."
-
-info:
-	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
-	@echo "Running Texinfo files through makeinfo..."
-	make -C $(BUILDDIR)/texinfo info
-	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
-
-gettext:
-	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
-	@echo
-	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
-
-changes:
-	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
-	@echo
-	@echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
-	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
-	@echo
-	@echo "Link check complete; look for any errors in the above output " \
-	      "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
-	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
-	@echo "Testing of doctests in the sources finished, look at the " \
-	      "results in $(BUILDDIR)/doctest/output.txt."
+	@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
 
-xml:
-	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
-	@echo
-	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+.PHONY: help Makefile
 
-pseudoxml:
-	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
-	@echo
-	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
+# Catch-all target: route all unknown targets to Sphinx using the new
+# "make mode" option.  $(O) is meant as a shortcut for $(SPHINXOPTS).
+%: Makefile
+	@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)


=====================================
doc/NEWS.txt
=====================================
--- a/doc/NEWS.txt
+++ b/doc/NEWS.txt
@@ -1,6 +1,16 @@
 Change history
 ==============
 
+PyEPR 0.9.4 (29/04/2018)
+------------------------
+
+* Fix compatibility with cython_ >= 0.28
+* PyEPR has been successfully tested with PyPy_
+
+
+.. _PyPy: https://pypy.org
+
+
 PyEPR 0.9.3 (02/05/2015)
 ------------------------
 
@@ -101,8 +111,8 @@ PyEPR 0.9 (27/02/2015)
 .. _setuptools: https://bitbucket.org/pypa/setuptools
 .. _numpy: http://www.numpy.org
 .. _Windows: http://windows.microsoft.com
-.. _AppVeyor: http://www.appveyor.com
-.. _PyPI: https://pypi.python.org/pypi/pyepr
+.. _AppVeyor: https://www.appveyor.com
+.. _PyPI: https://pypi.org/project/pyepr
 
 
 PyEPR 0.8.2 (03/08/2014)
@@ -205,7 +215,7 @@ PyEPR 0.7 (04/08/2013)
   This features also makes it easier to install PyEPR using pip_.
 
   The user can still guild PyEPR against a system version of the ERP-API
-  library simply using the :option:`--epr-api-src` option of the
+  library simply using the `--epr-api-src` option of the
   :file:`setup.py` script with "None"" as value.
 
   The ERP C API included in the source tar-ball is version *2.3dev-pyepr062*,
@@ -224,7 +234,7 @@ PyEPR 0.6.1 (26/04/2012)
 ------------------------
 
 * fix compatibility with cython_ 0.16
-* added a new option to the setup script (:option:`--epr-api-src`) to build
+* added a new option to the setup script (`--epr-api-src`) to build
   PyEPR using the EPR-API C sources
 
 
@@ -253,7 +263,7 @@ PyEPR 0.5 (25/04/2011)
 * suppressed several constness related warnings
 
 .. _`Python 3`: https://docs.python.org/3
-.. _intersphinx: http://sphinx-doc.org/latest/ext/intersphinx.html
+.. _intersphinx: http://www.sphinx-doc.org/en/master/ext/intersphinx.html
 .. _cython: http://cython.org
 
 
@@ -304,7 +314,7 @@ PyEPR 0.2 (20/03/2011)
 * introduced some utility methods to :class:`epr.Product` and
   :class:`epr.Record` classes
 
-.. _sphinx: http://sphinx-doc.org
+.. _sphinx: http://www.sphinx-doc.org
 
 
 PyEPR 0.1 (09/03/2011)


=====================================
doc/conf.py
=====================================
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,7 +1,8 @@
+#!/usr/bin/env python3
 # -*- coding: utf-8 -*-
 #
 # PyEPR documentation build configuration file, created by
-# sphinx-quickstart on Sat Jul 26 10:12:56 2014.
+# sphinx-quickstart on Sun Apr 29 18:26:52 2018.
 #
 # This file is execfile()d with the current directory set to its
 # containing dir.
@@ -12,37 +13,40 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
 
-import sys
-import os
-
 # If extensions (or modules to document with autodoc) are in another directory,
 # add these directories to sys.path here. If the directory is relative to the
 # documentation root, use os.path.abspath to make it absolute, like shown here.
+
+import os
+import sys
 sys.path.insert(0, os.path.abspath('sphinxext'))
 
+
 # -- General configuration ------------------------------------------------
 
 # If your documentation needs a minimal Sphinx version, state it here.
+
 needs_sphinx = '1.0'
 
 # Add any Sphinx extension module names here, as strings. They can be
 # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
 # ones.
 extensions = [
-    #'sphinx.ext.autodoc',
-    #'sphinx.ext.autosummary',
-    #'sphinx.ext.doctest',
+    # 'sphinx.ext.autodoc',
+    # 'sphinx.ext.autosummary',
+    # 'sphinx.ext.doctest',
     'sphinx.ext.intersphinx',
     'sphinx.ext.todo',
-    #'sphinx.ext.coverage',
-    'sphinx.ext.pngmath',
-    #'sphinx.ext.jsmath',
-    #'sphinx.ext.mathjax',
-    #'sphinx.ext.graphviz',
-    #'sphinx.ext.inheritance_diagram',
-    #'sphinx.ext.refcounting',
+    # 'sphinx.ext.coverage',
+    'sphinx.ext.imgmath',
+    # 'sphinx.ext.jsmath',
+    # 'sphinx.ext.mathjax',
+    # 'sphinx.ext.graphviz',
+    # 'sphinx.ext.inheritance_diagram',
+    # 'sphinx.ext.refcounting',
     'sphinx.ext.ifconfig',
     'sphinx.ext.viewcode',
+    # 'sphinx.ext.githubpages',
     'sphinx.ext.extlinks',
     'ipython_console_highlighting',
 ]
@@ -50,95 +54,57 @@ extensions = [
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
 
-# The suffix of source filenames.
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+#
+# source_suffix = ['.rst', '.md']
 source_suffix = '.txt'
 
-# The encoding of source files.
-#source_encoding = 'utf-8-sig'
-
 # The master toctree document.
 master_doc = 'index'
 
 # General information about the project.
 project = u'PyEPR'
-copyright = u'2011-2015, Antonio Valentino'
+copyright = u'2011-2018, Antonio Valentino'
+author = u'Antonio Valentino'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.9.3'
+version = '0.9.4'
 # The full version, including alpha/beta/rc tags.
-release = version + '.dev0'
+release = version  # + '.dev0'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-#language = None
-
-# There are two options for replacing |today|: either, you set today to some
-# non-false value, then it is used:
-#today = ''
-# Else, today_fmt is used as the format for a strftime call.
-#today_fmt = '%B %d, %Y'
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
 
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
-exclude_patterns = ['_build', 'sphinxext', '**/empty.txt']
-
-# The reST default role (used for this markup: `text`) to use for all
-# documents.
-#default_role = None
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-#add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-#add_module_names = True
-
-# If true, sectionauthor and moduleauthor directives will be shown in the
-# output. They are ignored by default.
-#show_authors = False
+# This patterns also effect to html_static_path and html_extra_path
+exclude_patterns = [
+    '_build',
+    'Thumbs.db',
+    '.DS_Store',
+    'sphinxext',
+    '**/empty.txt',
+]
 
 # The name of the Pygments (syntax highlighting) style to use.
 pygments_style = 'sphinx'
 
-# A list of ignored prefixes for module index sorting.
-#modindex_common_prefix = []
-
-# If true, keep warnings as "system message" paragraphs in the built documents.
-#keep_warnings = False
-
-# -- Extensions configuration --------------------------------------------------
-
-# Autodoc configuration
-#autoclass_content = 'both'
-#autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance']
-#                        #,'inherited-members']
-
-# Auto summary generation
-#autosummary_generate = ['reference']
-
-# Enable todo list reporting
-todo_include_todos = True
-
-# External links configuration
-extlinks = {
-    'issue': ('https://github.com/avalentino/pyepr/issues/%s', 'gh-'),
-}
-
-# Intersphinx
-intersphinx_mapping = {
-    'python': ('https://docs.python.org/3', None),
-    'numpy':  ('http://docs.scipy.org/doc/numpy', None),
-}
-
 
 # -- Options for HTML output ----------------------------------------------
 
 # The theme to use for HTML and HTML Help pages.  See the documentation for
 # a list of builtin themes.
+#
+# html_theme = 'alabaster'
 html_theme = 'pydoctheme'
 
 # Theme options are theme-specific and customize the look and feel of a theme
@@ -151,76 +117,40 @@ html_theme_options = {
 # Add any paths that contain custom themes here, relative to this directory.
 html_theme_path = ['.']
 
-# The name for this set of Sphinx documents.  If None, it defaults to
-# "<project> v<release> documentation".
-#html_title = None
-
-# A shorter title for the navigation bar.  Default is the same as html_title.
-#html_short_title = None
-
-# The name of an image file (relative to this directory) to place at the top
-# of the sidebar.
-#html_logo = None
-
-# The name of an image file (within the static path) to use as favicon of the
-# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
-# pixels large.
-#html_favicon = None
-
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
 html_static_path = ['_static']
 
-# Add any extra paths that contain custom files (such as robots.txt or
-# .htaccess) here, relative to this directory. These files are copied
-# directly to the root of the documentation.
-#html_extra_path = []
-
-# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
-# using the given strftime format.
+# If this is not None, a ‘Last updated on:’ timestamp is inserted at every
+# page bottom, using the given strftime() format.
+# The empty string is equivalent to '%b %d, %Y'
+# (or a locale-dependent equivalent).
 html_last_updated_fmt = '%b %d, %Y'
 
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-#html_use_smartypants = True
-
-# Custom sidebar templates, maps document names to template names.
+# Custom sidebar templates, must be a dictionary that maps document names
+# to template names.
+#
+# This is required for the alabaster theme
+# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
 html_sidebars = {
-   'index': ['globaltoc.html', 'relations.html', 'sourcelink.html',
-             'searchbox.html', 'ohloh.html', 'pypi.html',
-             'travis-ci.html', 'appveyor.html'],
+   'index': [
+        'globaltoc.html',
+        'relations.html',
+        'sourcelink.html',
+        'searchbox.html',
+        'ohloh.html',
+        'pypi.html',
+        'travis-ci.html',
+        'appveyor.html',
+    ],
 }
 
-# Additional templates that should be rendered to pages, maps page names to
-# template names.
-#html_additional_pages = {}
-
 # If false, no module index is generated.
 html_domain_indices = False
 
-# If false, no index is generated.
-#html_use_index = True
-
-# If true, the index is split into individual pages for each letter.
-#html_split_index = False
-
-# If true, links to the reST sources are added to the pages.
-#html_show_sourcelink = True
-
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
 
-# If true, an OpenSearch description file will be output, and all pages will
-# contain a <link> tag referring to it.  The value of this option must be the
-# base URL from which the finished HTML is served.
-#html_use_opensearch = ''
-
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# -- Options for HTMLHelp output ------------------------------------------
 
 # Output file base name for HTML help builder.
 htmlhelp_basename = 'PyEPRdoc'
@@ -229,41 +159,31 @@ htmlhelp_basename = 'PyEPRdoc'
 # -- Options for LaTeX output ---------------------------------------------
 
 latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-'papersize': 'a4paper',
+    # The paper size ('letterpaper' or 'a4paper').
+    #
+    'papersize': 'a4paper',
+
+    # The font size ('10pt', '11pt' or '12pt').
+    #
+    'pointsize': '12pt',
 
-# The font size ('10pt', '11pt' or '12pt').
-'pointsize': '12pt',
+    # Additional stuff for the LaTeX preamble.
+    #
+    # 'preamble': '',
 
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
+    # Latex figure (float) alignment
+    #
+    # 'figure_align': 'htbp',
 }
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-  ('index', 'pyepr.tex', u'PyEPR Documentation',
-   u'Antonio Valentino', 'manual'),
+    (master_doc, 'pyepr.tex', u'PyEPR Documentation',
+     author, 'manual'),
 ]
 
-# The name of an image file (relative to this directory) to place at the top of
-# the title page.
-#latex_logo = None
-
-# For "manual" documents, if this is true, then toplevel headings are parts,
-# not chapters.
-#latex_use_parts = False
-
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = 'footnote'
-
-# Documents to append as an appendix to all manuals.
-#latex_appendices = []
-
 # If false, no module index is generated.
 latex_domain_indices = False
 
@@ -273,13 +193,10 @@ latex_domain_indices = False
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    ('index', 'pyepr', u'PyEPR Documentation',
-     [u'Antonio Valentino'], 1)
+    (master_doc, 'pyepr', u'PyEPR Documentation',
+     [author], 1)
 ]
 
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
 
 # -- Options for Texinfo output -------------------------------------------
 
@@ -287,93 +204,55 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-  ('index', 'PyEPR', u'PyEPR Documentation',
-   u'Antonio Valentino', 'PyEPR', 'One line description of project.',
-   'Miscellaneous'),
+    (master_doc, 'PyEPR', u'PyEPR Documentation',
+     author, 'PyEPR', 'One line description of project.',
+     'Miscellaneous'),
 ]
 
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
-
-# If true, do not generate a @detailmenu in the "Top" node's menu.
-#texinfo_no_detailmenu = False
-
 
 # -- Options for Epub output ----------------------------------------------
 
 # Bibliographic Dublin Core info.
 epub_title = project
-epub_author = u'Antonio Valentino'
-epub_publisher = epub_author
+epub_author = author
+epub_publisher = author
 epub_copyright = copyright
 
-# The basename for the epub file. It defaults to the project name.
-#epub_basename = u'PyEPR'
-
-# The HTML theme for the epub output. Since the default themes are not optimized
-# for small screen space, using the same theme for HTML and epub output is
-# usually not wise. This defaults to 'epub', a theme designed to save visual
-# space.
-#epub_theme = 'epub'
-
-# The language of the text. It defaults to the language option
-# or en if the language is not set.
-#epub_language = ''
-
-# The scheme of the identifier. Typical schemes are ISBN or URL.
-#epub_scheme = ''
-
 # The unique identifier of the text. This can be a ISBN number
 # or the project homepage.
-#epub_identifier = ''
+#
+# epub_identifier = ''
 
 # A unique identification for the text.
-#epub_uid = ''
-
-# A tuple containing the cover image and cover page html template filenames.
-#epub_cover = ()
-
-# A sequence of (type, uri, title) tuples for the guide element of content.opf.
-#epub_guide = ()
-
-# HTML files that should be inserted before the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_pre_files = []
-
-# HTML files shat should be inserted after the pages created by sphinx.
-# The format is a list of tuples containing the path and title.
-#epub_post_files = []
+#
+# epub_uid = ''
 
 # A list of files that should not be packed into the epub file.
 epub_exclude_files = ['search.html']
 
-# The depth of the table of contents in toc.ncx.
-#epub_tocdepth = 3
 
-# Allow duplicate toc entries.
-#epub_tocdup = True
+# -- Extensions configuration --------------------------------------------------
 
-# Choose between 'default' and 'includehidden'.
-#epub_tocscope = 'default'
+# Autodoc configuration
+#autoclass_content = 'both'
+#autodoc_default_flags = ['members', 'undoc-members', 'show-inheritance']
+#                        #,'inherited-members']
 
-# Fix unsupported image types using the PIL.
-#epub_fix_images = False
+# Auto summary generation
+#autosummary_generate = ['reference']
 
-# Scale large images.
-#epub_max_image_width = 0
 
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#epub_show_urls = 'inline'
+# External links configuration
+extlinks = {
+    'issue': ('https://github.com/avalentino/pyepr/issues/%s', 'gh-'),
+}
 
-# If false, no index is generated.
-#epub_use_index = True
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {
+    'python': ('https://docs.python.org/3', None),
+    'numpy':  ('https://docs.scipy.org/doc/numpy', None),
+}
 
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = True
 
-# Example configuration for intersphinx: refer to the Python standard library.
-#intersphinx_mapping = {'https://docs.python.org/': None}


=====================================
doc/index.txt
=====================================
--- a/doc/index.txt
+++ b/doc/index.txt
@@ -12,7 +12,7 @@ ENVISAT Product Reader Python API
 :HomePage:  http://avalentino.github.io/pyepr
 :Author:    Antonio Valentino
 :Contact:   antonio.valentino at tiscali.it
-:Copyright: 2011-2015, Antonio Valentino
+:Copyright: 2011-2018, Antonio Valentino
 :Version:   |release|
 
 
@@ -59,18 +59,19 @@ ENVISAT Product Reader Python API
 
     Online documentation for other PyEpr_ versions:
 
-    * `latest <https://pyepr.readthedocs.org/en/latest/>`_ development
-    * `0.9.3 <https://pyepr.readthedocs.org/en/v0.9.3/>`_ (latest stable)
-    * `0.9.2 <https://pyepr.readthedocs.org/en/v0.9.2/>`_
-    * `0.9.1 <https://pyepr.readthedocs.org/en/v0.9.1/>`_
-    * `0.9 <https://pyepr.readthedocs.org/en/v0.9/>`_
-    * `0.8.2 <https://pyepr.readthedocs.org/en/v0.8.2/>`_
-    * `0.8.1 <https://pyepr.readthedocs.org/en/v0.8.1/>`_
-    * `0.8 <https://pyepr.readthedocs.org/en/v0.8/>`_
-    * `0.7.1 <https://pyepr.readthedocs.org/en/v0.7.1/>`_
-    * `0.7 <https://pyepr.readthedocs.org/en/v0.7/>`_
-    * `0.6.1 <https://pyepr.readthedocs.org/en/v0.6.1/>`_
-    * `0.6 <https://pyepr.readthedocs.org/en/v0.6/>`_
+    * `latest <https://pyepr.readthedocs.io/en/latest/>`_ development
+    * `0.9.4 <https://pyepr.readthedocs.io/en/v0.9.4/>`_ (latest stable)
+    * `0.9.3 <https://pyepr.readthedocs.io/en/v0.9.3/>`_
+    * `0.9.2 <https://pyepr.readthedocs.io/en/v0.9.2/>`_
+    * `0.9.1 <https://pyepr.readthedocs.io/en/v0.9.1/>`_
+    * `0.9 <https://pyepr.readthedocs.io/en/v0.9/>`_
+    * `0.8.2 <https://pyepr.readthedocs.io/en/v0.8.2/>`_
+    * `0.8.1 <https://pyepr.readthedocs.io/en/v0.8.1/>`_
+    * `0.8 <https://pyepr.readthedocs.io/en/v0.8/>`_
+    * `0.7.1 <https://pyepr.readthedocs.io/en/v0.7.1/>`_
+    * `0.7 <https://pyepr.readthedocs.io/en/v0.7/>`_
+    * `0.6.1 <https://pyepr.readthedocs.io/en/v0.6.1/>`_
+    * `0.6 <https://pyepr.readthedocs.io/en/v0.6/>`_
 
 
 License
@@ -78,7 +79,7 @@ License
 
 .. index:: license
 
-Copyright (C) 2011-2015 Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright (C) 2011-2018 Antonio Valentino <antonio.valentino at tiscali.it>
 
 PyEPR is free software: you can redistribute it and/or modify
 it under the terms of the `GNU General Public License`_ as published by


=====================================
doc/interactive_use.txt
=====================================
--- a/doc/interactive_use.txt
+++ b/doc/interactive_use.txt
@@ -3,16 +3,16 @@ Interactive use of PyEPR_
 
 .. highlight:: ipython
 
-.. index:: ipython, interactive, ENVISAT, ASAR, ESA, pylab, matplotlib
+.. index:: jupyter, ipython, interactive, ENVISAT, ASAR, ESA, pylab, matplotlib
    pair: interactive; shell
    pair: sample; dataset
 
 In this tutorial it is showed an example of how to use PyEPR_ interactively
 to open, browse and display data of an ENVISAT_ ASAR_ product.
 
-For the interactive session it is used the IPython_ interactive shell an
-started with the :option:`ipython -pylab` option to enable interactive
-plotting provided by the matplotlib_ package.
+For the interactive session it is used the Jupyter_ console started
+with the `--pylab` option to enable the interactive plotting features provided
+by the matplotlib_ package.
 
 The ASAR_ product used in this example is a `free sample`_ available at the
 ESA_ web site.
@@ -20,8 +20,8 @@ ESA_ web site.
 .. _PyEPR: https://github.com/avalentino/pyepr
 .. _ENVISAT: https://envisat.esa.int
 .. _ASAR: https://earth.esa.int/handbooks/asar/CNTR.html
-.. _IPython: http://ipython.org
-.. _matplotlib: http://matplotlib.org
+.. _Jupyter: http://jupyter.org/
+.. _matplotlib: https://matplotlib.org
 .. _`free sample`: https://earth.esa.int/services/sample_products/asar/IMP/ASA_IMP_1PNUPA20060202_062233_000000152044_00435_20529_3110.N1.gz
 .. _ESA: https://earth.esa.int
 
@@ -32,26 +32,25 @@ ESA_ web site.
 :mod:`epr` module and classes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-After starting the ipython shell with the following command:
+After starting the jupyter console with the following command:
 
 .. code-block:: sh
 
-    $ ipython -pylab
+    $ jupyter console -- --pylab
 
 one can import the :mod:`epr` module and start start taking confidence with
 available classes and functions::
 
-    Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
+    Jupyter console 5.2.0
+
+    Python 3.6.5 (default, Apr  1 2018, 05:46:30) 
     Type "copyright", "credits" or "license" for more information.
 
-    IPython 0.10 -- An enhanced Interactive Python.
+    IPython 5.5.0 -- An enhanced Interactive Python.
     ?         -> Introduction and overview of IPython's features.
     %quickref -> Quick reference.
     help      -> Python's own help system.
-    object?   -> Details about 'object'. ?object also works, ?? prints more.
-
-      Welcome to pylab, a matplotlib-based Python environment.
-      For more information, type 'help(pylab)'.
+    object?   -> Details about 'object', use 'object??' for extra details.
 
     In [1]: import epr
 
@@ -88,11 +87,11 @@ available classes and functions::
 
 Docstrings are available for almost all classes, methods and functions in
 the :mod:`epr` and they can be displayed using the :func:`help` python_
-command or the ``?`` IPython_ shortcut as showed above.
+command or the ``?`` Jupyter_ shortcut as showed above.
 
 .. _python: https://www.python.org
 
-Also IPython_ provides a handy tab completion mechanism to automatically
+Also Jupyter_ provides a handy tab completion mechanism to automatically
 complete commands or to display available functions and classes::
 
     In [4]: product = epr. [TAB]
@@ -314,7 +313,7 @@ Dealing with image data is simple as well::
    Image data read from the "proc_data" band
 
 
-.. _iterable: http://docs.python.org/glossary.html#term-iterable
+.. _iterable: https://docs.python.org/3/glossary.html#term-iterable
 
 
 .. index:: close, product


=====================================
doc/make.bat
=====================================
--- a/doc/make.bat
+++ b/doc/make.bat
@@ -1,53 +1,19 @@
 @ECHO OFF
 
+pushd %~dp0
+
 REM Command file for Sphinx documentation
 
 if "%SPHINXBUILD%" == "" (
 	set SPHINXBUILD=sphinx-build
 )
+set SOURCEDIR=.
 set BUILDDIR=_build
-set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
-set I18NSPHINXOPTS=%SPHINXOPTS% .
-if NOT "%PAPER%" == "" (
-	set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
-	set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
-)
+set SPHINXPROJ=PyEPR
 
 if "%1" == "" goto help
 
-if "%1" == "help" (
-	:help
-	echo.Please use `make ^<target^>` where ^<target^> is one of
-	echo.  html       to make standalone HTML files
-	echo.  dirhtml    to make HTML files named index.html in directories
-	echo.  singlehtml to make a single large HTML file
-	echo.  pickle     to make pickle files
-	echo.  json       to make JSON files
-	echo.  htmlhelp   to make HTML files and a HTML help project
-	echo.  qthelp     to make HTML files and a qthelp project
-	echo.  devhelp    to make HTML files and a Devhelp project
-	echo.  epub       to make an epub
-	echo.  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter
-	echo.  text       to make text files
-	echo.  man        to make manual pages
-	echo.  texinfo    to make Texinfo files
-	echo.  gettext    to make PO message catalogs
-	echo.  changes    to make an overview over all changed/added/deprecated items
-	echo.  xml        to make Docutils-native XML files
-	echo.  pseudoxml  to make pseudoxml-XML files for display purposes
-	echo.  linkcheck  to check all external links for integrity
-	echo.  doctest    to run all doctests embedded in the documentation if enabled
-	goto end
-)
-
-if "%1" == "clean" (
-	for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
-	del /q /s %BUILDDIR%\*
-	goto end
-)
-
-
-%SPHINXBUILD% 2> nul
+%SPHINXBUILD% >NUL 2>NUL
 if errorlevel 9009 (
 	echo.
 	echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
@@ -60,183 +26,11 @@ if errorlevel 9009 (
 	exit /b 1
 )
 
-if "%1" == "html" (
-	%SPHINXBUILD% -b html %ALLSPHINXOPTS% html
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The HTML pages are in html.
-	goto end
-)
-
-if "%1" == "dirhtml" (
-	%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
-	goto end
-)
-
-if "%1" == "singlehtml" (
-	%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
-	goto end
-)
-
-if "%1" == "pickle" (
-	%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished; now you can process the pickle files.
-	goto end
-)
-
-if "%1" == "json" (
-	%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished; now you can process the JSON files.
-	goto end
-)
-
-if "%1" == "htmlhelp" (
-	%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished; now you can run HTML Help Workshop with the ^
-.hhp project file in %BUILDDIR%/htmlhelp.
-	goto end
-)
-
-if "%1" == "qthelp" (
-	%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished; now you can run "qcollectiongenerator" with the ^
-.qhcp project file in %BUILDDIR%/qthelp, like this:
-	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\PyEPR.qhcp
-	echo.To view the help file:
-	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\PyEPR.ghc
-	goto end
-)
-
-if "%1" == "devhelp" (
-	%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished.
-	goto end
-)
-
-if "%1" == "epub" (
-	%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The epub file is in %BUILDDIR%/epub.
-	goto end
-)
-
-if "%1" == "latex" (
-	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
-	goto end
-)
-
-if "%1" == "latexpdf" (
-	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-	cd %BUILDDIR%/latex
-	make all-pdf
-	cd %BUILDDIR%/..
-	echo.
-	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
-	goto end
-)
-
-if "%1" == "latexpdfja" (
-	%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
-	cd %BUILDDIR%/latex
-	make all-pdf-ja
-	cd %BUILDDIR%/..
-	echo.
-	echo.Build finished; the PDF files are in %BUILDDIR%/latex.
-	goto end
-)
-
-if "%1" == "text" (
-	%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The text files are in %BUILDDIR%/text.
-	goto end
-)
-
-if "%1" == "man" (
-	%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The manual pages are in %BUILDDIR%/man.
-	goto end
-)
-
-if "%1" == "texinfo" (
-	%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
-	goto end
-)
+%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
+goto end
 
-if "%1" == "gettext" (
-	%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
-	goto end
-)
-
-if "%1" == "changes" (
-	%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.The overview file is in %BUILDDIR%/changes.
-	goto end
-)
-
-if "%1" == "linkcheck" (
-	%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Link check complete; look for any errors in the above output ^
-or in %BUILDDIR%/linkcheck/output.txt.
-	goto end
-)
-
-if "%1" == "doctest" (
-	%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Testing of doctests in the sources finished, look at the ^
-results in %BUILDDIR%/doctest/output.txt.
-	goto end
-)
-
-if "%1" == "xml" (
-	%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The XML files are in %BUILDDIR%/xml.
-	goto end
-)
-
-if "%1" == "pseudoxml" (
-	%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
-	if errorlevel 1 exit /b 1
-	echo.
-	echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
-	goto end
-)
+:help
+%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
 
 :end
+popd


=====================================
doc/reference.txt
=====================================
--- a/doc/reference.txt
+++ b/doc/reference.txt
@@ -36,7 +36,7 @@ Product
 
 .. class:: Product
 
-   ENVISAT product
+   ENVISAT product.
 
    The Product class provides methods and properties to get information
    about an ENVISAT product file.
@@ -48,19 +48,19 @@ Product
 
    .. attribute:: file_path
 
-      The file's path including the file name
+      The file's path including the file name.
 
 
    .. attribute:: mode
 
-      String that specifies the mode in which the file is opened
+      String that specifies the mode in which the file is opened.
 
       Possible values: `rb` for read-only mode, `rb+` for read-write mode.
 
 
    .. attribute:: id_string
 
-      The product identifier string obtained from the MPH parameter 'PRODUCT'
+      The product identifier string obtained from the MPH parameter 'PRODUCT'.
 
       The first 10 characters of this string identify the product type,
       e.g. "MER_1P__FR" for a MERIS Level 1b full resolution product.
@@ -69,12 +69,12 @@ Product
 
    .. attribute:: meris_iodd_version
 
-      For MERIS L1b and RR and FR to provide backward compatibility
+      For MERIS L1b and RR and FR to provide backward compatibility.
 
 
    .. attribute:: tot_size
 
-      The total size in bytes of the product file
+      The total size in bytes of the product file.
 
 
    .. rubric:: Methods
@@ -93,7 +93,7 @@ Product
    .. method:: get_band_at(index)
 
       Gets the :class:`Band` at the specified position within the
-      :class:`product`
+      :class:`product`.
 
       :param index:
             the index identifying the position of the :class:`Band`, starting
@@ -105,7 +105,7 @@ Product
 
    .. method:: get_dataset(name)
 
-      Gets the :class:`Dataset` corresponding to the specified dataset name
+      Gets the :class:`Dataset` corresponding to the specified dataset name.
 
       :param name:
             the :class:`Dataset` name
@@ -116,7 +116,7 @@ Product
    .. method:: get_dataset_at(index)
 
       Gets the :class:`Dataset` at the specified position within the
-      :class:`Product`
+      :class:`Product`.
 
       :param index:
             the index identifying the position of the :class:`Dataset`,
@@ -127,7 +127,7 @@ Product
 
    .. method:: get_dsd_at(index)
 
-      Gets the :class:`DSD` at the specified position
+      Gets the :class:`DSD` at the specified position.
 
       Gets the :class:`DSD` (:class:`Dataset` descriptor) at the specified
       position within the :class:`Product`.
@@ -141,44 +141,44 @@ Product
 
    .. method:: get_num_bands()
 
-      Gets the number of all :class:`Band`\ s contained in a :class:`Product`
+      Gets the number of all :class:`Band`\ s contained in a :class:`Product`.
 
 
    .. method:: get_num_datasets()
 
       Gets the number of all :class:`Dataset`\ s contained in a
-      :class:`Product`
+      :class:`Product`.
 
 
    .. method:: get_num_dsds()
 
       Gets the number of all :class:`DSD`\ s (:class:`Dataset` descriptors)
-      contained in the :class:`Product`
+      contained in the :class:`Product`.
 
 
    .. method:: get_scene_height()
 
-      Gets the :class:`Product` scene height in pixels
+      Gets the :class:`Product` scene height in pixels.
 
 
    .. method:: get_scene_width()
 
-      Gets the :class:`Product` scene width in pixels
+      Gets the :class:`Product` scene width in pixels.
 
 
    .. method:: get_mph()
 
-      The :class:`Record` representing the main product header (MPH)
+      The :class:`Record` representing the main product header (MPH).
 
 
    .. method:: get_sph()
 
-      The :class:`Record` representing the specific product header (SPH)
+      The :class:`Record` representing the specific product header (SPH).
 
 
    .. method:: read_bitmask_raster(bm_expr, xoffset, yoffset, raster)
 
-      Calculates a bit-mask raster
+      Calculates a bit-mask raster.
 
       Calculates a bit-mask, composed of flags of the given :class:`Product`
       and combined as described in the given bit-mask expression, for
@@ -205,7 +205,7 @@ Product
       :returns:
             zero for success, an error code otherwise
 
-      .. seealso:: :func:`create_bitmask_raster`
+      .. seealso:: :func:`create_bitmask_raster`.
 
 
     .. method:: close
@@ -223,7 +223,7 @@ Product
 
     .. method:: flush()
 
-       Flush the file stream
+       Flush the file stream.
 
 
    .. rubric:: High level interface methods
@@ -241,22 +241,22 @@ Product
    .. method:: get_dataset_names()
 
       Return the list of names of the :class:`Dataset`\ s in the
-      :class:`Product`
+      :class:`Product`.
 
 
    .. method:: get_band_names()
 
-      Return the list of names of the :class:`Band`\ s in the :class:`Product`
+      Return the list of names of the :class:`Band`\ s in the :class:`Product`.
 
 
    .. method:: datasets()
 
-      Return the list of :class:`Dataset`\ s in the :class:`Product`
+      Return the list of :class:`Dataset`\ s in the :class:`Product`.
 
 
    .. method:: bands()
 
-      Return the list of :class:`Band`\ s in the :class:`Product`
+      Return the list of :class:`Band`\ s in the :class:`Product`.
 
 
    .. rubric:: Special methods
@@ -278,7 +278,7 @@ Dataset
 
 .. class:: Dataset
 
-   ENVISAT dataset
+   ENVISAT dataset.
 
    The Dataset class contains information about a dataset within an
    ENVISAT product file which has been opened with the :func:`open`
@@ -292,39 +292,39 @@ Dataset
 
    .. attribute:: description
 
-      A short description of the :class:`Band` contents
+      A short description of the :class:`Band` contents.
 
 
    .. attribute:: product
 
-      The :class:`Product` instance to which this :class:`Dataset` belongs to
+      The :class:`Product` instance to which this :class:`Dataset` belongs to.
 
 
    .. rubric:: Methods
 
    .. method:: get_name()
 
-      Gets the name of the :class:`Dataset`
+      Gets the name of the :class:`Dataset`.
 
 
    .. method:: get_dsd()
 
-      Gets the :class:`Dataset` descriptor (:class:`DSD`)
+      Gets the :class:`Dataset` descriptor (:class:`DSD`).
 
 
    .. method:: get_dsd_name()
 
-      Gets the name of the :class:`DSD` (:class:`Dataset` descriptor)
+      Gets the name of the :class:`DSD` (:class:`Dataset` descriptor).
 
 
    .. method:: get_num_records()
 
-      Gets the number of :class:`Record`\ s of the :class:`Dataset`
+      Gets the number of :class:`Record`\ s of the :class:`Dataset`.
 
 
    .. method:: create_record()
 
-      Creates a new :class:`Record`
+      Creates a new :class:`Record`.
 
       Creates a new, empty :class:`Record` with a structure compatible with
       the :class:`Dataset`. Such a :class:`Record` is typically used in
@@ -336,7 +336,7 @@ Dataset
 
    .. method:: read_record(index[, record])
 
-      Reads specified :class:`Record` of the :class:`Dataset`
+      Reads specified :class:`Record` of the :class:`Dataset`.
 
       The :class:`Record` is identified through the given zero-based
       :class:`Record` index. In order to reduce memory reallocation, a
@@ -362,7 +362,7 @@ Dataset
 
       .. versionchanged:: 0.9
 
-         The *index* parameter now defaults to zero
+         The *index* parameter now defaults to zero.
 
 
    .. rubric:: High level interface methods
@@ -374,7 +374,7 @@ Dataset
 
    .. method:: records()
 
-      Return the list of :class:`Record`\ s contained in the :class:`Dataset`
+      Return the list of :class:`Record`\ s contained in the :class:`Dataset`.
 
 
    .. rubric:: Special methods
@@ -395,7 +395,7 @@ Record
 
 .. class:: Record
 
-   Represents a record read from an ENVISAT dataset
+   Represents a record read from an ENVISAT dataset.
 
    A record is composed of multiple fields.
 
@@ -406,14 +406,14 @@ Record
 
    .. attribute::  dataset_name
 
-      The name of the :class:`Dataset` to which this :class:`Record` belongs to
+      The name of the :class:`Dataset` to which this :class:`Record` belongs to.
 
       .. versionadded:: 0.9
 
 
    .. attribute:: tot_size
 
-      The total size in bytes of the :class:`Record`
+      The total size in bytes of the :class:`Record`.
 
       It includes all data elements of all :class:`Field`\ s of a
       :class:`Record` in a :class:`Product` file.
@@ -426,7 +426,7 @@ Record
 
    .. attribute:: index
 
-      Index of the :class:`Record` within the :class:`Dataset`
+      Index of the :class:`Record` within the :class:`Dataset`.
 
       It is *None* for empty :class:`Record`\ s (created with
       :meth:`Dataset.create_record` but still not read) and for *MPH*
@@ -442,7 +442,7 @@ Record
 
    .. method:: get_field(name)
 
-      Gets a :class:`Field` specified by name
+      Gets a :class:`Field` specified by name.
 
       The :class:`Field` is here identified through the given name.
       It contains the :class:`Field` info and all corresponding values.
@@ -457,7 +457,7 @@ Record
    .. method:: get_field_at(index)
 
       Gets a :class:`Field` at the specified position within the
-      :class:`Record`
+      :class:`Record`.
 
       :param index:
             the zero-based index (position within :class:`Record`) of the
@@ -469,16 +469,16 @@ Record
 
    .. method:: get_num_fields()
 
-      Gets the number of :class:`Field`\ s contained in the :class:`Record`
+      Gets the number of :class:`Field`\ s contained in the :class:`Record`.
 
 
    .. method:: print_([ostream])
 
-      Write the :class:`Record` to specified file (default: :data:`sys.stdout`)
+      Write the :class:`Record` to specified file (default: :data:`sys.stdout`).
 
       This method writes formatted contents of the :class:`Record` to
       specified *ostream* text file or (default) the ASCII output
-      is be printed to standard output (:data:`sys.stdout`)
+      is be printed to standard output (:data:`sys.stdout`).
 
       :param ostream:
             the (opened) output file object
@@ -487,16 +487,16 @@ Record
 
          the *ostream* parameter have to be a *real* file not
          a generic stream object like :class:`StringIO.StringIO`
-         instances
+         instances.
 
 
    .. method:: print_element(field_index, element_index[, ostream])
 
-      Write the specified field element to file (default: :data:`sys.stdout`)
+      Write the specified field element to file (default: :data:`sys.stdout`).
 
       This method writes formatted contents of the specified :class:`Field`
       element to the *ostream* text file or (default) the ASCII output
-      will be printed to standard output (:data:`sys.stdout`)
+      will be printed to standard output (:data:`sys.stdout`).
 
       :param field_index:
             the index of :class:`Field` in the :class:`Record`
@@ -509,12 +509,12 @@ Record
 
          the *ostream* parameter have to be a *real* file not
          a generic stream object like :class:`StringIO.StringIO`
-         instances
+         instances.
 
 
    .. method:: get_offset()
 
-      :class:`Record` offset in bytes within the :class:`Dataset`
+      :class:`Record` offset in bytes within the :class:`Dataset`.
 
       .. versionadded:: 0.9
 
@@ -528,12 +528,12 @@ Record
 
    .. method:: get_field_names
 
-      Return the list of names of the :class:`Field`\ s in the :class:`Record`
+      Return the list of names of the :class:`Field`\ s in the :class:`Record`.
 
 
    .. method:: fields()
 
-      Return the list of :class:`Field`\ s contained in the :class:`Record`
+      Return the list of :class:`Field`\ s contained in the :class:`Record`.
 
 
    .. rubric:: Special methods
@@ -554,7 +554,7 @@ Field
 
 .. class:: Field
 
-   Represents a field within a record
+   Represents a field within a record.
 
    A :class:`Field` is composed of one or more data elements of one of the
    types defined in the internal ``field_info`` structure.
@@ -576,32 +576,32 @@ Field
 
    .. method:: get_description()
 
-      Gets the description of the :class:`Field`
+      Gets the description of the :class:`Field`.
 
 
    .. method:: get_name()
 
-      Gets the name of the :class:`Field`
+      Gets the name of the :class:`Field`.
 
 
    .. method:: get_num_elems()
 
-      Gets the number of elements of the :class:`Field`
+      Gets the number of elements of the :class:`Field`.
 
 
    .. method:: get_type()
 
-      Gets the type of the :class:`Field`
+      Gets the type of the :class:`Field`.
 
 
    .. method:: get_unit()
 
-      Gets the unit of the :class:`Field`
+      Gets the unit of the :class:`Field`.
 
 
    .. method:: get_elem([index])
 
-      :class:`Field` single element access
+      :class:`Field` single element access.
 
       This function is for getting the elements of a :class:`Field`.
 
@@ -614,7 +614,7 @@ Field
 
    .. method:: get_elems()
 
-      :class:`Field` array element access
+      :class:`Field` array element access.
 
       This function is for getting an array of field elements of the
       :class:`Field`.
@@ -632,7 +632,7 @@ Field
 
    .. method:: set_elem(elem, [index])
 
-      Set :class:`Field` array element
+      Set :class:`Field` array element.
 
       This function is for setting an array of field element of the
       :class:`Field`.
@@ -652,7 +652,7 @@ Field
 
    .. method:: set_elems(elems)
 
-      Set :class:`Field` array elements
+      Set :class:`Field` array elements.
 
       This function is for setting an array of :class:`Field` elements of
       the :class:`Field`.
@@ -669,11 +669,11 @@ Field
 
    .. method:: print_([ostream])
 
-      Write the :class:`Field` to specified file (default: :data:`sys.stdout`)
+      Write the :class:`Field` to specified file (default: :data:`sys.stdout`).
 
       This method writes formatted contents of the :class:`Field` to
       specified *ostream* text file or (default) the ASCII output
-      is be printed to standard output (:data:`sys.stdout`)
+      is be printed to standard output (:data:`sys.stdout`).
 
       :param ostream:
             the (opened) output file object
@@ -687,7 +687,7 @@ Field
 
    .. method:: get_offset()
 
-      Field offset in bytes within the :class:`Record`
+      Field offset in bytes within the :class:`Record`.
 
       .. versionadded:: 0.9
 
@@ -719,52 +719,52 @@ DSD
 
 .. class:: DSD
 
-   :class:`Dataset` descriptor
+   :class:`Dataset` descriptor.
 
    The DSD class contains information about the properties of a
-   :class:`Dataset` and its location within an ENVISAT :class:`Product` file
+   :class:`Dataset` and its location within an ENVISAT :class:`Product` file.
 
 
    .. rubric:: Attributes
 
    .. attribute:: ds_name
 
-      The :class:`Dataset` name
+      The :class:`Dataset` name.
 
 
    .. attribute:: ds_offset
 
-      The offset of :class:`Dataset` in the :class:`Product` file
+      The offset of :class:`Dataset` in the :class:`Product` file.
 
 
    .. attribute:: ds_size
 
-      The size of :class:`Dataset` in the :class:`Product` file
+      The size of :class:`Dataset` in the :class:`Product` file.
 
 
    .. attribute:: ds_type
 
-      The :class:`Dataset` type descriptor
+      The :class:`Dataset` type descriptor.
 
 
    .. attribute:: dsr_size
 
-      The size of dataset record for the given :class:`Dataset` name
+      The size of dataset record for the given :class:`Dataset` name.
 
 
    .. attribute:: filename
 
-      The filename in the DDDB with the description of this :class:`Dataset`
+      The filename in the DDDB with the description of this :class:`Dataset`.
 
 
    .. attribute:: index
 
-      The index of this :class:`DSD` (zero-based)
+      The index of this :class:`DSD` (zero-based).
 
 
    .. attribute:: num_dsr
 
-      The number of dataset records for the given :class:`Dataset` name
+      The number of dataset records for the given :class:`Dataset` name.
 
 
    .. rubric:: Special methods
@@ -785,7 +785,7 @@ Band
 
 .. class:: Band
 
-   The band of an ENVISAT :class:`Product`
+   The band of an ENVISAT :class:`Product`.
 
    The Band class contains information about a band within an ENVISAT
    :class:`Product` file which has been opened with the :func:`open`
@@ -799,14 +799,14 @@ Band
 
    .. attribute:: bm_expr
 
-      A bit-mask expression used to filter valid pixels
+      A bit-mask expression used to filter valid pixels.
 
-      All others are set to zero
+      All others are set to zero.
 
 
    .. attribute:: data_type
 
-      The data type of the :class:`Band` pixels
+      The data type of the :class:`Band` pixels.
 
       Possible values are:
 
@@ -818,12 +818,12 @@ Band
 
    .. attribute:: description
 
-      A short description of the :class:`Band` contents
+      A short description of the :class:`Band` contents.
 
 
    .. attribute:: lines_mirrored
 
-      Mirrored lines flag
+      Mirrored lines flag.
 
       If true (=1) lines will be mirrored (flipped) after read into a
       raster in order to ensure a pixel ordering in raster X direction
@@ -832,12 +832,12 @@ Band
 
    .. attribute:: product
 
-      The :class:`Product` instance to which this :class:`Band` belongs to
+      The :class:`Product` instance to which this :class:`Band` belongs to.
 
 
    .. attribute:: sample_model
 
-      The sample model operation
+      The sample model operation.
 
       The sample model operation applied to the source :class:`Dataset` for
       getting the correct samples from the MDS (for example MERIS L2).
@@ -852,7 +852,7 @@ Band
 
    .. attribute:: scaling_factor
 
-      The scaling factor
+      The scaling factor.
 
       Possible values are:
 
@@ -897,19 +897,19 @@ Band
 
    .. attribute:: spectr_band_index
 
-      The (zero-based) spectral :class:`Band` index
+      The (zero-based) spectral :class:`Band` index.
 
-       -1 if this is not a spectral :class:`Band`
+      -1 if this is not a spectral :class:`Band`.
 
 
    .. attribute:: unit
 
-      The geophysical unit for the :class:`Band` pixel values
+      The geophysical unit for the :class:`Band` pixel values.
 
 
    .. attribute:: dataset
 
-      The source :class:`Dataset`
+      The source :class:`Dataset`.
 
       The source :class:`Dataset` containing the raw data used to create the
       :class:`Band` pixel values.
@@ -921,13 +921,13 @@ Band
 
    .. method:: get_name()
 
-      Gets the name of the :class:`Band`
+      Gets the name of the :class:`Band`.
 
 
    .. method:: create_compatible_raster([src_width, src_height, xstep, ystep])
 
       Creates a :class:`Raster` which is compatible with the data type of
-      the :class:`Band`
+      the :class:`Band`.
 
       The created :class:`Raster` is used to read the data in it (see
       :meth:`Band.read_raster`).
@@ -991,7 +991,7 @@ Band
    .. method:: read_raster([xoffset, yoffset, raster])
 
       Reads (geo-)physical values of the :class:`Band` of the specified
-      source-region
+      source-region.
 
       The source-region is a defined part of the whole ENVISAT
       :class:`Product` image, which shall be read into a :class:`Raster`.
@@ -1031,7 +1031,7 @@ Band
 
    .. method:: read_as_array([width, height, xoffset, yoffset, xstep, ystep])
 
-      Reads the specified source region as an :class:`numpy.ndarray`
+      Reads the specified source region as an :class:`numpy.ndarray`.
 
       The source-region is a defined part of the whole ENVISAT
       :class:`Product` image, which shall be read into a :class:`Raster`.
@@ -1088,7 +1088,7 @@ Raster
 
 .. class:: Raster
 
-   Represents a raster in which data will be stored
+   Represents a raster in which data will be stored.
 
    All 'size' parameter are in PIXEL.
 
@@ -1097,29 +1097,29 @@ Raster
 
    .. attribute:: data_type
 
-      The data type of the :class:`Band` pixels
+      The data type of the :class:`Band` pixels.
 
-      All ``E_TID_*`` types are possible
+      All ``E_TID_*`` types are possible.
 
 
    .. attribute:: source_height
 
-      The height of the source
+      The height of the source.
 
 
    .. attribute:: source_width
 
-      The width of the source
+      The width of the source.
 
 
    .. attribute:: source_step_x
 
-      The sub-sampling for the across-track direction in pixel
+      The sub-sampling for the across-track direction in pixel.
 
 
    .. attribute:: source_step_y
 
-      The sub-sampling for the along-track direction in pixel
+      The sub-sampling for the along-track direction in pixel.
 
 
    .. rubric:: High level interface attributes
@@ -1131,7 +1131,7 @@ Raster
 
    .. attribute:: data
 
-      Raster data exposed as :class:`numpy.ndarray` object
+      Raster data exposed as :class:`numpy.ndarray` object.
 
       .. note::
 
@@ -1152,7 +1152,7 @@ Raster
 
    .. method:: get_pixel(x, y)
 
-      Single pixel access
+      Single pixel access.
 
       This function is for getting the values of the elements of a
       :class:`Raster` (i.e. pixel)
@@ -1168,17 +1168,17 @@ Raster
    .. method:: get_elem_size()
 
       The size in byte of a single element (sample) of this :class:`Raster`
-      buffer
+      buffer.
 
 
    .. method:: get_height()
 
-      Gets the :class:`Raster` height in pixels
+      Gets the :class:`Raster` height in pixels.
 
 
    .. method:: get_width()
 
-      Gets the :class:`Raster` width in pixels
+      Gets the :class:`Raster` width in pixels.
 
 
    .. rubric:: Special methods
@@ -1213,7 +1213,7 @@ Functions
 
 .. function:: open(filename, mode='rb')
 
-   Opens the ENVISAT product
+   Open the ENVISAT product.
 
    Opens the ENVISAT :class:`Product` file with the given file path,
    reads MPH, SPH and all :class:`DSD`\ s, organized the table with
@@ -1244,34 +1244,34 @@ Functions
 
 .. function:: data_type_id_to_str(type_id)
 
-   Gets the 'C' data type string for the given data type
+   Gets the 'C' data type string for the given data type.
 
 
 .. function:: get_data_type_size(type_id)
 
-   Gets the size in bytes for an element of the given data type
+   Gets the size in bytes for an element of the given data type.
 
 
 .. function:: get_numpy_dtype(type_id)
 
-   Return the numpy data-type specified EPR type ID
+   Return the numpy data-type specified EPR type ID.
 
    .. versionadded:: 0.9
 
 
 .. function:: get_sample_model_name(model)
 
-   Return the name of the specified sample model
+   Return the name of the specified sample model.
 
 
 .. function:: get_scaling_method_name(method)
 
-   Return the name of the specified scaling method
+   Return the name of the specified scaling method.
 
 
 .. function:: create_raster(data_type, src_width, src_height[, xstep, ystep])
 
-   Creates a :class:`Raster` of the specified data type
+   Creates a :class:`Raster` of the specified data type.
 
    This function can be used to create any type of raster, e.g. for
    later use as a bit-mask.
@@ -1304,7 +1304,7 @@ Functions
 
 .. function:: create_bitmask_raster(src_width, src_height[, xstep, ystep])
 
-   Creates a :class:`Raster` to be used for reading bitmasks
+   Creates a :class:`Raster` to be used for reading bitmasks.
 
    The :class:`Raster` returned always is of type ``byte``.
 
@@ -1337,16 +1337,16 @@ EPRError
 
 .. exception:: EPRError
 
-   EPR API error
+   EPR API error.
 
    .. attribute:: code
 
-      EPR API error code
+      EPR API error code.
 
 
    .. method:: __init__([message[, code, *args, **kwargs]])
 
-      Initializer
+      Initializer.
 
       :param message:
             error message
@@ -1359,7 +1359,7 @@ EPRValueError
 
 .. exception:: EPRValueError
 
-   Inherits both :exc:`EPRError` and standard :exc:`exceptions.ValueError`
+   Inherits both :exc:`EPRError` and standard :exc:`exceptions.ValueError`.
 
 
 Data
@@ -1367,12 +1367,12 @@ Data
 
 .. data:: __version__
 
-   Version string of PyEPR
+   Version string of PyEPR.
 
 
 .. data:: EPR_C_API_VERSION
 
-   Version string of the wrapped `EPR API`_ C library
+   Version string of the wrapped `EPR API`_ C library.
 
 
 Data type identifiers
@@ -1413,18 +1413,18 @@ Scaling Methods
 
 .. data:: E_SMID_NON
 
-   No scaling
+   No scaling.
 
 
 .. data:: E_SMID_LIN
 
-   Linear pixel scaling
+   Linear pixel scaling.
 
    .. index:: linear
 
 
 .. data:: E_SMID_LOG
 
-   Logarithmic pixel scaling
+   Logarithmic pixel scaling.
 
    .. index:: logarithmic


=====================================
doc/update_example.txt
=====================================
--- a/doc/update_example.txt
+++ b/doc/update_example.txt
@@ -186,7 +186,7 @@ The complete code of the example can be found at
 
 .. _PyEPR: https://github.com/avalentino/pyepr
 .. _ENVISAT: https://envisat.esa.int
-.. _Matplotlib: http://matplotlib.org
+.. _Matplotlib: https://matplotlib.org
 
 
 .. raw:: latex


=====================================
doc/usermanual.txt
=====================================
--- a/doc/usermanual.txt
+++ b/doc/usermanual.txt
@@ -65,7 +65,7 @@ correctly installed and configured:
 * Python2_ >= 2.6 or Python3_ >= 3.1
 * numpy_ >= 1.5.0
 * `EPR API`_ >= 2.2 (optional, since PyEPR 0.7 the source tar-ball comes
-  with a copy of the PER C API sources)
+  with a copy of the EPR C API sources)
 * a reasonably updated C compiler [#]_ (build only)
 * Cython_ >= 0.19 [#]_ (optional and build only)
 * unittest2_ (only required for Python < 2.7)
@@ -84,7 +84,7 @@ correctly installed and configured:
 .. _numpy: http://www.numpy.org
 .. _gcc: http://gcc.gnu.org
 .. _Cython: http://cython.org
-.. _unittest2: https://pypi.python.org/pypi/unittest2
+.. _unittest2: https://pypi.org/project/unittest2
 
 
 .. index:: download, PyPi, GitHub, project, git
@@ -97,7 +97,7 @@ Download
 
 Official source tar-balls can be downloaded form PyPi_:
 
-    https://pypi.python.org/pypi/pyepr
+    https://pypi.org/project/pyepr
 
 The source code of the development versions is available on the GitHub_
 project page
@@ -108,9 +108,9 @@ To clone the git_ repository the following command can be used::
 
     $ git clone https://github.com/avalentino/pyepr.git
 
-.. _PyPi: https://pypi.python.org/pypi
+.. _PyPi: https://pypi.org
 .. _GitHub: https://github.com
-.. _git: http://git-scm.com
+.. _git: https://git-scm.com
 
 
 .. index:: install, pip
@@ -162,7 +162,7 @@ In this case it is assumed that the `EPR API`_ C library is properly
 installed in the system (see the Requirements_ section).
 
 It is possible to control which `EPR API`_ C sources to use by means of the
-:option:`--epr-api-src` option of the :file:`setup.py` script::
+`--epr-api-src` option of the :file:`setup.py` script::
 
     $ python setup.py install --epr-api-src=../epr-api/src
 
@@ -171,7 +171,7 @@ with the system `EPR API`_ C library::
 
     $ python setup.py install --epr-api-src=None
 
-.. _pip: https://pypi.python.org/pypi/pip
+.. _pip: https://pypi.org/project/pip
 
 
 .. index:: test, setup.py, download
@@ -224,7 +224,7 @@ API,
 Of course there are also some differences that are illustrated in the
 following sections.
 
-.. _`C API`: https://rawgithub.com/bcdev/epr-api/master/docs/epr_c_api/index.html
+.. _`C API`: https://rawgit.com/bcdev/epr-api/master/docs/epr_c_api/index.html
 
 
 .. index:: memory, product


=====================================
setup.py
=====================================
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# Copyright (C) 2011-2015, Antonio Valentino <antonio.valentino at tiscali.it>
+# Copyright (C) 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
 #
 # This file is part of PyEPR.
 #
@@ -207,6 +207,9 @@ any data field contained in a product file.
         'Programming Language :: Python :: 3.2',
         'Programming Language :: Python :: 3.3',
         'Programming Language :: Python :: 3.4',
+        'Programming Language :: Python :: 3.5',
+        'Programming Language :: Python :: 3.6',
+        'Programming Language :: Python :: Implementation :: PyPy',
         'Programming Language :: Cython',
         'Topic :: Software Development :: Libraries',
         'Topic :: Scientific/Engineering',


=====================================
src/epr.pxd
=====================================
--- a/src/epr.pxd
+++ b/src/epr.pxd
@@ -2,7 +2,7 @@
 
 # PyEPR - Python bindings for ENVISAT Product Reader API
 #
-# Copyright (C) 2011-2015, Antonio Valentino <antonio.valentino at tiscali.it>
+# Copyright (C) 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
 #
 # This file is part of PyEPR.
 #


=====================================
src/epr.pyx
=====================================
--- a/src/epr.pyx
+++ b/src/epr.pyx
@@ -2,7 +2,7 @@
 
 # PyEPR - Python bindings for ENVISAT Product Reader API
 #
-# Copyright (C) 2011-2015, Antonio Valentino <antonio.valentino at tiscali.it>
+# Copyright (C) 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
 #
 # This file is part of PyEPR.
 #
@@ -20,7 +20,7 @@
 # along with PyEPR.  If not, see <http://www.gnu.org/licenses/>.
 
 
-'''Python bindings for ENVISAT Product Reader C API
+"""Python bindings for ENVISAT Product Reader C API.
 
 PyEPR_ provides Python_ bindings for the ENVISAT Product Reader C API
 (`EPR API`_) for reading satellite data from ENVISAT_ ESA_ (European
@@ -39,9 +39,9 @@ in a product file.
 .. _ENVISAT: http://envisat.esa.int
 .. _ESA: http://earth.esa.int
 
-'''
+"""
 
-__version__ = '0.9.3'
+__version__ = '0.9.4'
 
 from libc cimport errno
 from libc cimport stdio
@@ -196,10 +196,10 @@ _MODEL_MAP = {
 
 
 class EPRError(Exception):
-    '''EPR API error'''
+    """EPR API error."""
 
     def __init__(self, message='', code=None, *args, **kargs):
-        '''__init__(self, message='', code=None, *args, **kargs)'''
+        """__init__(self, message='', code=None, *args, **kargs)"""
 
         super(EPRError, self).__init__(message, code, *args, **kargs)
 
@@ -234,12 +234,10 @@ cdef pyepr_null_ptr_error(msg='null pointer'):
     cdef str eprmsg = _to_str(<char*>epr_get_last_err_message(), 'ascii')
 
     code = epr_get_last_err_code()
-    if not code:
-        code = None
 
     epr_clear_err()
 
-    raise EPRValueError('%s: %s' % (msg, eprmsg), code=code)
+    raise EPRValueError('%s: %s' % (msg, eprmsg), code=code if code else None)
 
 
 cdef FILE* pyepr_get_file_stream(object ostream) except NULL:
@@ -251,8 +249,8 @@ cdef FILE* pyepr_get_file_stream(object ostream) except NULL:
 
     try:
         ostream.flush()
-    except AttributeError, e:
-        raise TypeError(str(e))
+    except AttributeError as exc:
+        raise TypeError(str(exc))
     else:
         fileno = PyObject_AsFileDescriptor(ostream)
         if fileno == -1:
@@ -267,11 +265,11 @@ cdef FILE* pyepr_get_file_stream(object ostream) except NULL:
 
 
 cdef class _CLib:
-    '''Library object to handle C API initialization/finalization
+    """Library object to handle C API initialization/finalization.
 
     .. warning:: this is meant for internal use only. **Do not use it**.
 
-    '''
+    """
 
     def __cinit__(self, *args, **kwargs):
         cdef bytes msg
@@ -315,11 +313,11 @@ cdef class EprObject:
 
 
 cpdef get_numpy_dtype(EPR_EDataTypeId type_id):
-    '''get_numpy_dtype(epr_type)
+    """get_numpy_dtype(epr_type)
 
-    Return the numpy datatype specified EPR type ID
+    Return the numpy datatype specified EPR type ID.
 
-    '''
+    """
 
     try:
         return _DTYPE_MAP[type_id]
@@ -328,21 +326,21 @@ cpdef get_numpy_dtype(EPR_EDataTypeId type_id):
 
 
 cpdef uint get_data_type_size(EPR_EDataTypeId type_id):
-    '''get_data_type_size(type_id)
+    """get_data_type_size(type_id)
 
-    Gets the size in bytes for an element of the given data type
+    Gets the size in bytes for an element of the given data type.
 
-    '''
+    """
 
     return epr_get_data_type_size(type_id)
 
 
 cpdef str data_type_id_to_str(EPR_EDataTypeId type_id):
-    '''data_type_id_to_str(type_id)
+    """data_type_id_to_str(type_id)
 
-    Gets the 'C' data type string for the given data type
+    Gets the 'C' data type string for the given data type.
 
-    '''
+    """
 
     cdef char* type_id_str = <char*>epr_data_type_id_to_str(type_id)
 
@@ -350,11 +348,11 @@ cpdef str data_type_id_to_str(EPR_EDataTypeId type_id):
 
 
 cpdef str get_scaling_method_name(EPR_ScalingMethod method):
-    '''get_scaling_method_name(method)
+    """get_scaling_method_name(method)
 
-    Return the name of the specified scaling method
+    Return the name of the specified scaling method.
 
-    '''
+    """
 
     try:
         return _METHOD_MAP[method]
@@ -363,11 +361,11 @@ cpdef str get_scaling_method_name(EPR_ScalingMethod method):
 
 
 cpdef str get_sample_model_name(EPR_SampleModel model):
-    '''get_sample_model_name(model)
+    """get_sample_model_name(model)
 
-    Return the name of the specified sample model
+    Return the name of the specified sample model.
 
-    '''
+    """
 
     try:
         return _MODEL_MAP[model]
@@ -376,12 +374,12 @@ cpdef str get_sample_model_name(EPR_SampleModel model):
 
 
 cdef class DSD(EprObject):
-    '''Dataset descriptor
+    """Dataset descriptor.
 
     The DSD class contains information about the properties of a
-    dataset and its location within an ENVISAT product file
+    dataset and its location within an ENVISAT product file.
 
-    '''
+    """
 
     cdef EPR_SDSD* _ptr
     cdef object _parent     # Dataset or Product
@@ -394,56 +392,56 @@ cdef class DSD(EprObject):
             (<Product>self._parent).check_closed_product()
 
     property index:
-        '''The index of this DSD (zero-based)'''
+        """The index of this DSD (zero-based)."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.index
 
     property ds_name:
-        '''The dataset name'''
+        """The dataset name."""
 
         def __get__(self):
             self.check_closed_product()
             return _to_str(self._ptr.ds_name, 'ascii')
 
     property ds_type:
-        '''The dataset type descriptor'''
+        """The dataset type descriptor."""
 
         def __get__(self):
             self.check_closed_product()
             return _to_str(self._ptr.ds_type, 'ascii')
 
     property filename:
-        '''The filename in the DDDB with the description of this dataset'''
+        """The filename in the DDDB with the description of this dataset."""
 
         def __get__(self):
             self.check_closed_product()
             return _to_str(self._ptr.filename, 'ascii')
 
     property ds_offset:
-        '''The offset of dataset-information the product file'''
+        """The offset of dataset-information the product file."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.ds_offset
 
     property ds_size:
-        '''The size of dataset-information in dataset product file'''
+        """The size of dataset-information in dataset product file."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.ds_size
 
     property num_dsr:
-        '''The number of dataset records for the given dataset name'''
+        """The number of dataset records for the given dataset name."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.num_dsr
 
     property dsr_size:
-        '''The size of dataset record for the given dataset name'''
+        """The size of dataset record for the given dataset name."""
 
         def __get__(self):
             self.check_closed_product()
@@ -495,7 +493,7 @@ cdef class DSD(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
@@ -515,14 +513,14 @@ cdef new_dsd(EPR_SDSD* ptr, object parent=None):
 
 
 cdef class Field(EprObject):
-    '''Represents a field within a record
+    """Represents a field within a record.
 
     A field is composed of one or more data elements of one of the
     types defined in the internal ``field_info`` structure.
 
     .. seealso:: :class:`Record`
 
-    '''
+    """
 
     cdef EPR_SField* _ptr
     cdef Record _parent
@@ -533,7 +531,7 @@ cdef class Field(EprObject):
     cdef inline _check_write_mode(self):
         self._parent._check_write_mode()
 
-    cdef long _get_offset(self, bint absolute=0):
+    cdef long _get_offset(self, bint absolute=0) except -1:
         cdef bint found = 0
         cdef int i = 0
         cdef int num_fields_in_record = 0
@@ -556,7 +554,7 @@ cdef class Field(EprObject):
             offset += info.tot_size
 
         if not found:
-            offset = None
+            raise EPRError('inable to compute field offset')
         elif absolute:
             offset += self._parent._get_offset(absolute)
 
@@ -564,13 +562,13 @@ cdef class Field(EprObject):
 
 
     def print_(self, ostream=None):
-        '''print_(self, ostream=None)
+        """print_(self, ostream=None)
 
-        Write the field to specified file (default: :data:`sys.stdout`)
+        Write the field to specified file (default: :data:`sys.stdout`).
 
         This method writes formatted contents of the field to
         specified *ostream* text file or (default) the ASCII output
-        is be printed to standard output (:data:`sys.stdout`)
+        is be printed to standard output (:data:`sys.stdout`).
 
         :param ostream:
             the (opened) output file object
@@ -579,7 +577,7 @@ cdef class Field(EprObject):
                   a generic stream object like
                   :class:`StringIO.StringIO` instances
 
-        '''
+        """
 
         cdef FILE* fstream = pyepr_get_file_stream(ostream)
 
@@ -596,11 +594,11 @@ cdef class Field(EprObject):
     #    pyepr_check_errors()
 
     def get_unit(self):
-        '''get_unit(self)
+        """get_unit(self)
 
-        Gets the unit of the field
+        Gets the unit of the field.
 
-        '''
+        """
 
         cdef const char* unit = NULL
 
@@ -614,11 +612,11 @@ cdef class Field(EprObject):
             return _to_str(<char*>unit, 'ascii')
 
     def get_description(self):
-        '''get_description(self)
+        """get_description(self)
 
-        Gets the description of the field
+        Gets the description of the field.
 
-        '''
+        """
 
         cdef char* description = NULL
 
@@ -629,22 +627,22 @@ cdef class Field(EprObject):
         return _to_str(description, 'ascii')
 
     def get_num_elems(self):
-        '''get_num_elems(self)
+        """get_num_elems(self)
 
-        Gets the number of elements of the field
+        Gets the number of elements of the field.
 
-        '''
+        """
 
         self.check_closed_product()
 
         return epr_get_field_num_elems(self._ptr)
 
     def get_name(self):
-        '''get_name(self)
+        """get_name(self)
 
-        Gets the name of the field
+        Gets the name of the field.
 
-        '''
+        """
 
         cdef char* name = NULL
 
@@ -655,20 +653,20 @@ cdef class Field(EprObject):
         return _to_str(name, 'ascii')
 
     def get_type(self):
-        '''get_type(self)
+        """get_type(self)
 
-        Gets the type of the field
+        Gets the type of the field.
 
-        '''
+        """
 
         self.check_closed_product()
 
         return epr_get_field_type(self._ptr)
 
     def get_elem(self, uint index=0):
-        '''get_elem(self, index=0)
+        """get_elem(self, index=0)
 
-        Field single element access
+        Field single element access.
 
         This function is for getting the elements of a field.
 
@@ -678,7 +676,7 @@ cdef class Field(EprObject):
         :returns:
             the typed value from given field
 
-        '''
+        """
 
         cdef EPR_STime* eprtime
 
@@ -722,9 +720,9 @@ cdef class Field(EprObject):
         return val
 
     def get_elems(self):
-        '''get_elems(self)
+        """get_elems(self)
 
-        Field array element access
+        Field array element access.
 
         This function is for getting an array of field elements of the
         field.
@@ -733,7 +731,7 @@ cdef class Field(EprObject):
             the data array (:class:`numpy.ndarray`) having the type of
             the field
 
-        '''
+        """
 
         cdef void* buf = NULL
         cdef int nd = 1
@@ -870,9 +868,9 @@ cdef class Field(EprObject):
                 'write error: %d of %d bytes written' % (ret, datasize))
 
     def set_elem(self, elem, uint index=0):
-        '''set_elem(self, elem, index=0)
+        """set_elem(self, elem, index=0)
 
-        Set Field array element
+        Set Field array element.
 
         This function is for setting an array of field element of the
         field.
@@ -883,7 +881,7 @@ cdef class Field(EprObject):
             the zero-based index of element to be set, must not be
             negative. Default: 0.
 
-        '''
+        """
 
         self.check_closed_product()
         self._check_write_mode()
@@ -900,9 +898,9 @@ cdef class Field(EprObject):
         self._set_elems(elem, index)
 
     def set_elems(self, elems):
-        '''set_elems(self, elems)
+        """set_elems(self, elems)
 
-        Set Field array elements
+        Set Field array elements.
 
         This function is for setting an array of field elements of the
         field.
@@ -910,7 +908,7 @@ cdef class Field(EprObject):
         :param elems:
             np.ndarray of elements to set
 
-        '''
+        """
 
         cdef uint nelems
 
@@ -930,12 +928,12 @@ cdef class Field(EprObject):
         self._set_elems(elems)
 
     property tot_size:
-        '''The total size in bytes of all data elements of a field.
+        """The total size in bytes of all data elements of a field.
 
         *tot_size* is a derived variable, it is computed at runtime and
         not stored in the DSD-DB.
 
-        '''
+        """
 
         def __get__(self):
             cdef EPR_FieldInfo* info = <EPR_FieldInfo*>self._ptr.info
@@ -1078,14 +1076,14 @@ cdef class Field(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.magic
 
     def get_offset(self):
-        '''Field offset in bytes within the Record'''
+        """Field offset in bytes within the Record."""
 
         self.check_closed_product()
         return self._get_offset()
@@ -1104,13 +1102,13 @@ cdef new_field(EPR_SField* ptr, Record parent=None):
 
 
 cdef class Record(EprObject):
-    '''Represents a record read from an ENVISAT dataset
+    """Represents a record read from an ENVISAT dataset.
 
     A record is composed of multiple fields.
 
     .. seealso:: :class:`Field`
 
-    '''
+    """
 
     cdef EPR_SRecord* _ptr
     cdef object _parent     # Dataset or Product
@@ -1151,22 +1149,22 @@ cdef class Record(EprObject):
         return offset
 
     def get_num_fields(self):
-        '''get_num_fields(self)
+        """get_num_fields(self)
 
-        Gets the number of fields contained in the record
+        Gets the number of fields contained in the record.
 
-        '''
+        """
 
         return epr_get_num_fields(self._ptr)
 
     def print_(self, ostream=None):
-        '''print_(self, ostream=None)
+        """print_(self, ostream=None)
 
-        Write the record to specified file
+        Write the record to specified file.
 
         This method writes formatted contents of the record to
         specified *ostream* text file or (default) the ASCII output
-        is be printed to standard output (:data:`sys.stdout`)
+        is be printed to standard output (:data:`sys.stdout`).
 
         :param ostream:
             the (opened) output file object
@@ -1175,7 +1173,7 @@ cdef class Record(EprObject):
                   a generic stream object like
                   :class:`StringIO.StringIO` instances
 
-        '''
+        """
 
         cdef FILE* fstream = pyepr_get_file_stream(ostream)
 
@@ -1189,13 +1187,13 @@ cdef class Record(EprObject):
 
     def print_element(self, uint field_index, uint element_index,
                       ostream=None):
-        '''print_element(self, field_index, element_index, ostream=None)
+        """print_element(self, field_index, element_index, ostream=None)
 
-        Write the specified field element to file
+        Write the specified field element to file.
 
         This method writes formatted contents of the specified field
         element to the *ostream* text file or (default) the ASCII output
-        will be printed to standard output (:data:`sys.stdout`)
+        will be printed to standard output (:data:`sys.stdout`).
 
         :param field_index:
             the index of field in the record
@@ -1206,9 +1204,9 @@ cdef class Record(EprObject):
 
         .. note:: the *ostream* parameter have to be a *real* file not
                   a generic stream object like
-                  :class:`StringIO.StringIO` instances
+                  :class:`StringIO.StringIO` instances.
 
-        '''
+        """
 
         cdef FILE* fstream = pyepr_get_file_stream(ostream)
 
@@ -1221,9 +1219,9 @@ cdef class Record(EprObject):
         pyepr_check_errors()
 
     def get_field(self, name):
-        '''get_field(self, name)
+        """get_field(self, name)
 
-        Gets a field specified by name
+        Gets a field specified by name.
 
         The field is here identified through the given name.
         It contains the field info and all corresponding values.
@@ -1234,7 +1232,7 @@ cdef class Record(EprObject):
             the specified :class:`Field` or raises an exception
             (:exc:`EPRValueError`) if an error occurred
 
-        '''
+        """
 
         cdef EPR_SField* field_ptr
         cdef bytes cname = _to_bytes(name)
@@ -1248,9 +1246,9 @@ cdef class Record(EprObject):
         return new_field(field_ptr, self)
 
     def get_field_at(self, uint index):
-        '''get_field_at(self, index)
+        """get_field_at(self, index)
 
-        Gets a field at the specified position within the record
+        Gets a field at the specified position within the record.
 
         :param index:
             the zero-based index (position within record) of the field
@@ -1258,7 +1256,7 @@ cdef class Record(EprObject):
             the field or raises and exception (:exc:`EPRValueError`)
             if an error occurred
 
-        '''
+        """
 
         cdef EPR_SField* field_ptr
 
@@ -1271,7 +1269,7 @@ cdef class Record(EprObject):
         return new_field(field_ptr, self)
 
     property dataset_name:
-        '''The name of the dataset to which this record belongs to'''
+        """The name of the dataset to which this record belongs to."""
 
         def __get__(self):
             self.check_closed_product()
@@ -1282,7 +1280,7 @@ cdef class Record(EprObject):
                 return _to_str(info.dataset_name)
 
     property tot_size:
-        '''The total size in bytes of the record
+        """The total size in bytes of the record.
 
         It includes all data elements of all fields of a record in a
         product file.
@@ -1290,7 +1288,7 @@ cdef class Record(EprObject):
         *tot_size* is a derived variable, it is computed at runtime
         and not stored in the DSD-DB.
 
-        '''
+        """
 
         def __get__(self):
             self.check_closed_product()
@@ -1298,7 +1296,7 @@ cdef class Record(EprObject):
             return info.tot_size
 
     property index:
-        '''Index of the record within the dataset
+        """Index of the record within the dataset.
 
         It is *None* for empty records (created with
         :meth:`Dataset.create_record` but still not read) and for *MPH*
@@ -1307,20 +1305,20 @@ cdef class Record(EprObject):
 
         .. seealso:: :meth:`epr.Dataset.read_record`
 
-        '''
+        """
 
         def __get__(self):
             return self._index if self._index >= 0 else None
 
     # --- high level interface ------------------------------------------------
     def get_field_names(self):
-        '''get_field_names(self)
+        """get_field_names(self)
 
-        Return the list of names of the fields in the product
+        Return the list of names of the fields in the product.
 
-        .. note:: this method has no correspondent in the C API
+        .. note:: this method has no correspondent in the C API.
 
-        '''
+        """
 
         cdef EPR_SField* field_ptr
         cdef int idx
@@ -1339,11 +1337,11 @@ cdef class Record(EprObject):
         return names
 
     def fields(self):
-        '''fields(self)
+        """fields(self)
 
-        Return the list of fields contained in the record
+        Return the list of fields contained in the record.
 
-        '''
+        """
 
         return list(self)
 
@@ -1368,14 +1366,14 @@ cdef class Record(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.magic
 
     def get_offset(self):
-        '''Record offset in bytes within the Dataset'''
+        """Record offset in bytes within the Dataset."""
 
         if self._index >= 0:
             self.check_closed_product()
@@ -1399,11 +1397,11 @@ cdef new_record(EPR_SRecord* ptr, object parent=None, bint dealloc=False):
 
 
 cdef class Raster(EprObject):
-    '''Represents a raster in which data will be stored
+    """Represents a raster in which data will be stored.
 
     All 'size' parameter are in PIXEL.
 
-    '''
+    """
 
     cdef EPR_SRaster* _ptr
     cdef Band _parent
@@ -1414,74 +1412,74 @@ cdef class Raster(EprObject):
             epr_free_raster(self._ptr)
 
     property data_type:
-        '''The data type of the band's pixels
+        """The data type of the band's pixels.
 
-        All ``E_TID_*`` types are possible
+        All ``E_TID_*`` types are possible.
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.data_type
 
     property source_width:
-        '''The width of the source'''
+        """The width of the source."""
 
         def __get__(self):
             return self._ptr.source_width
 
     property source_height:
-        '''The height of the source'''
+        """The height of the source."""
 
         def __get__(self):
             return self._ptr.source_height
 
     property source_step_x:
-        '''The sub-sampling for the across-track direction in pixel'''
+        """The sub-sampling for the across-track direction in pixel."""
 
         def __get__(self):
             return self._ptr.source_step_x
 
     property source_step_y:
-        '''The sub-sampling for the along-track direction in pixel'''
+        """The sub-sampling for the along-track direction in pixel."""
 
         def __get__(self):
             return self._ptr.source_step_y
 
     def get_width(self):
-        '''get_width(self)
+        """get_width(self)
 
-        Gets the raster's width in pixels
+        Gets the raster's width in pixels.
 
-        '''
+        """
 
         return epr_get_raster_width(self._ptr)
 
     def get_height(self):
-        '''get_height(self)
+        """get_height(self)
 
-        Gets the raster's height in pixels
+        Gets the raster's height in pixels.
 
-        '''
+        """
 
         return epr_get_raster_height(self._ptr)
 
     def get_elem_size(self):
-        '''get_elem_size(self)
+        """get_elem_size(self)
 
         The size in byte of a single element (sample) of this
-        raster's buffer
+        raster's buffer.
 
-        '''
+        """
 
         return epr_get_raster_elem_size(self._ptr)
 
     def get_pixel(self, int x, int y):
-        '''get_pixel(x, y)
+        """get_pixel(x, y)
 
-        Single pixel access
+        Single pixel access.
 
         This function is for getting the values of the elements of a
-        raster (i.e. pixel)
+        raster (i.e. pixel).
 
         :param x:
             the (zero-based) X coordinate of the pixel
@@ -1490,10 +1488,10 @@ cdef class Raster(EprObject):
         :returns:
             the typed value at the given co-ordinate
 
-        '''
+        """
 
-        if (x < 0 or x >= self._ptr.raster_width or
-            y < 0  or y >= self._ptr.raster_height):
+        if (x < 0 or <uint>x >= self._ptr.raster_width or
+            y < 0  or <uint>y >= self._ptr.raster_height):
             raise ValueError('index out of range: x=%d, y=%d' % (x, y))
 
         cdef EPR_EDataTypeId dtype = self._ptr.data_type
@@ -1535,13 +1533,13 @@ cdef class Raster(EprObject):
         return result
 
     property data:
-        '''Raster data exposed as :class:`numpy.ndarray` object
+        """Raster data exposed as :class:`numpy.ndarray` object.
 
         .. note:: this property shares the data buffer with the
                   :class:`Raster` object so any change in its contents
-                  is also reflected to the :class:`Raster` object
+                  is also reflected to the :class:`Raster` object.
 
-        '''
+        """
 
         def __get__(self):
             cdef object data
@@ -1566,7 +1564,7 @@ cdef class Raster(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             return self._ptr.magic
@@ -1587,9 +1585,9 @@ cdef new_raster(EPR_SRaster* ptr, Band parent=None):
 
 def create_raster(EPR_EDataTypeId data_type, uint src_width, uint src_height,
                   uint xstep=1, uint ystep=1):
-    '''create_raster(data_type, src_width, src_height, xstep=1, ystep=1)
+    """create_raster(data_type, src_width, src_height, xstep=1, ystep=1)
 
-    Creates a raster of the specified data type
+    Creates a raster of the specified data type.
 
     This function can be used to create any type of raster, e.g. for
     later use as a bit-mask.
@@ -1616,7 +1614,7 @@ def create_raster(EPR_EDataTypeId data_type, uint src_width, uint src_height,
 
     .. seealso:: description of :meth:`Band.create_compatible_raster`
 
-    '''
+    """
 
     if xstep == 0 or ystep == 0:
         raise ValueError('invalid step: xspet=%d, ystep=%d' % (xstep, ystep))
@@ -1632,9 +1630,9 @@ def create_raster(EPR_EDataTypeId data_type, uint src_width, uint src_height,
 
 def create_bitmask_raster(uint src_width, uint src_height,
                           uint xstep=1, uint ystep=1):
-    '''create_bitmask_raster(src_width, src_height, xstep=1, ystep=1)
+    """create_bitmask_raster(src_width, src_height, xstep=1, ystep=1)
 
-    Creates a raster to be used for reading bitmasks
+    Creates a raster to be used for reading bitmasks.
 
     The raster returned always is of type ``byte``.
 
@@ -1657,7 +1655,7 @@ def create_bitmask_raster(uint src_width, uint src_height,
     .. seealso:: the description of
                  :meth:`Band.create_compatible_raster`
 
-    '''
+    """
 
     if xstep == 0 or ystep == 0:
         raise ValueError('invalid step: xspet=%d, ystep=%d' % (xstep, ystep))
@@ -1671,7 +1669,7 @@ def create_bitmask_raster(uint src_width, uint src_height,
 
 
 cdef class Band(EprObject):
-    '''The band of an ENVISAT product
+    """The band of an ENVISAT product.
 
     The Band class contains information about a band within an ENVISAT
     product file which has been opened with the :func:`open` function.
@@ -1679,7 +1677,7 @@ cdef class Band(EprObject):
     A new Band instance can be obtained with the
     :meth:`Product.get_band` method.
 
-    '''
+    """
 
     cdef EPR_SBandId* _ptr
     cdef Product _parent
@@ -1688,24 +1686,24 @@ cdef class Band(EprObject):
         self._parent.check_closed_product()
 
     property product:
-        '''The :class:`Product` instance to which this band belongs to'''
+        """The :class:`Product` instance to which this band belongs to."""
 
         def __get__(self):
             return self._parent
 
     property spectr_band_index:
-        '''The (zero-based) spectral band index
+        """The (zero-based) spectral band index.
 
-        -1 if this is not a spectral band
+        -1 if this is not a spectral band.
 
-        '''
+        """
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.spectr_band_index
 
     property sample_model:
-        '''The sample model operation
+        """The sample model operation.
 
         The sample model operation applied to the source dataset for
         getting the correct samples from the MDS (for example MERIS
@@ -1718,13 +1716,13 @@ cdef class Band(EprObject):
         * ``2OF2``  --> second byte of 2-byte interleaved MDS
         * ``0123``  --> combine 3-bytes interleaved to 4-byte integer
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.sample_model
 
     property data_type:
-        '''The data type of the band's pixels
+        """The data type of the band's pixels.
 
         Possible values are:
 
@@ -1733,13 +1731,13 @@ cdef class Band(EprObject):
         * ``uint32_t``  --> 32-bit unsigned integer
         * ``Float``     --> 32-bit IEEE floating point
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.data_type
 
     property scaling_method:
-        '''Scaling method
+        """Scaling method.
 
         The scaling method which must be applied to the raw source data
         in order to get the 'real' pixel values in geo-physical units.
@@ -1755,13 +1753,13 @@ cdef class Band(EprObject):
 
             y = log10(offset + scale * x)
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.scaling_method
 
     property scaling_offset:
-        '''The scaling offset
+        """The scaling offset.
 
         Possible values are:
 
@@ -1772,13 +1770,13 @@ cdef class Band(EprObject):
           Optionally a second element index for multiple-element fields
           can be given too
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.scaling_offset
 
     property scaling_factor:
-        '''The scaling factor
+        """The scaling factor.
 
         Possible values are:
 
@@ -1789,17 +1787,17 @@ cdef class Band(EprObject):
           Optionally a second element index for multiple-element fields
           can be given too
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.scaling_factor
 
     property bm_expr:
-        '''A bit-mask expression used to filter valid pixels
+        """A bit-mask expression used to filter valid pixels.
 
-        All others are set to zero
+        All others are set to zero.
 
-        '''
+        """
 
         def __get__(self):
             if self._ptr.bm_expr is NULL:
@@ -1808,7 +1806,7 @@ cdef class Band(EprObject):
                 return _to_str(self._ptr.bm_expr, 'ascii')
 
     property unit:
-        '''The geophysical unit for the band's pixel values'''
+        """The geophysical unit for the band's pixel values."""
 
         def __get__(self):
             if self._ptr.unit is NULL:
@@ -1817,7 +1815,7 @@ cdef class Band(EprObject):
                 return _to_str(self._ptr.unit, 'ascii')
 
     property description:
-        '''A short description of the band's contents'''
+        """A short description of the band's contents."""
 
         def __get__(self):
             if self._ptr.description is NULL:
@@ -1826,24 +1824,24 @@ cdef class Band(EprObject):
                 return _to_str(self._ptr.description, 'ascii')
 
     property lines_mirrored:
-        '''Mirrored lines flag
+        """Mirrored lines flag.
 
         If true (=1) lines will be mirrored (flipped) after read into a
         raster in order to ensure a pixel ordering in raster X
         direction from WEST to EAST.
 
-        '''
+        """
 
         def __get__(self):
             return <bint>self._ptr.lines_mirrored
 
     property dataset:
-        '''The source dataset
+        """The source dataset.
 
         The source dataset containing the raw data used to create the
         band's pixel values.
 
-        '''
+        """
 
         def __get__(self):
             cdef EPR_SDatasetId* dataset_id = self._ptr.dataset_ref.dataset_id
@@ -1851,11 +1849,11 @@ cdef class Band(EprObject):
             return self.product.get_dataset(name)
 
     def get_name(self):
-        '''get_name(self)
+        """get_name(self)
 
-        Gets the name of the band
+        Gets the name of the band.
 
-        '''
+        """
 
         cdef char* name = NULL
 
@@ -1867,10 +1865,10 @@ cdef class Band(EprObject):
 
     def create_compatible_raster(self, uint src_width=0, uint src_height=0,
                                  uint xstep=1, uint ystep=1):
-        '''create_compatible_raster(self, src_width, src_height, xstep=1, ystep=1)
+        """create_compatible_raster(self, src_width, src_height, xstep=1, ystep=1)
 
         Creates a raster which is compatible with the data type of
-        the band
+        the band.
 
         The created raster is used to read the data in it (see
         :meth:`Band.read_raster`).
@@ -1929,11 +1927,11 @@ cdef class Band(EprObject):
 
                 raster_size = src_size // step
 
-        '''
+        """
 
         cdef EPR_SRaster* raster_ptr = NULL
-        cdef int scene_width
-        cdef int scene_height
+        cdef uint scene_width
+        cdef uint scene_height
 
         self.check_closed_product()
 
@@ -1973,10 +1971,10 @@ cdef class Band(EprObject):
         return new_raster(raster_ptr, self)
 
     cpdef read_raster(self, int xoffset=0, int yoffset=0, Raster raster=None):
-        '''read_raster(self, xoffset=0, yoffset=0, Raster raster=None)
+        """read_raster(self, xoffset=0, yoffset=0, Raster raster=None)
 
         Reads (geo-)physical values of the band of the specified
-        source-region
+        source-region.
 
         The source-region is a defined part of the whole ENVISAT
         product image, which shall be read into a raster.
@@ -2004,11 +2002,11 @@ cdef class Band(EprObject):
         .. seealso:: :meth:`Band.create_compatible_raster` and
                      :func:`create_raster`
 
-        '''
+        """
 
         cdef int ret
-        cdef int scene_width
-        cdef int scene_height
+        cdef uint scene_width
+        cdef uint scene_height
 
         self.check_closed_product()
 
@@ -2038,9 +2036,9 @@ cdef class Band(EprObject):
     def read_as_array(self, width=None, height=None,
                       uint xoffset=0, uint yoffset=0,
                       uint xstep=1, uint ystep=1):
-        '''read_as_array(self, width=None, height=None, xoffset=0, yoffset=0, xstep=1, ystep=1):
+        """read_as_array(self, width=None, height=None, xoffset=0, yoffset=0, xstep=1, ystep=1):
 
-        Reads the specified source region as an :class:`numpy.ndarray`
+        Reads the specified source region as an :class:`numpy.ndarray`.
 
         The source-region is a defined part of the whole ENVISAT
         product image, which shall be read into a raster.
@@ -2076,10 +2074,10 @@ cdef class Band(EprObject):
         .. seealso:: :meth:`Band.create_compatible_raster`,
                      :func:`create_raster` and :meth:`Band.read_raster`
 
-        '''
+        """
 
-        cdef int w
-        cdef int h
+        cdef uint w
+        cdef uint h
         cdef EPR_ProductId* product_id
 
         self.check_closed_product()
@@ -2110,7 +2108,7 @@ cdef class Band(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
@@ -2118,23 +2116,23 @@ cdef class Band(EprObject):
 
 
     property _field_index:
-        '''Index or the field (within the dataset) containing the raw
+        """Index or the field (within the dataset) containing the raw
         data used to create the band's pixel values.
 
-        It is set to -1 if not used
+        It is set to -1 if not used.
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.dataset_ref.field_index
 
     property _elem_index:
-        '''Index or the element (within the dataset field) containing
+        """Index or the element (within the dataset field) containing
         the raw data used to create the band's pixel values.
 
-        It is set to -1 if not used
+        It is set to -1 if not used.
 
-        '''
+        """
 
         def __get__(self):
             return self._ptr.dataset_ref.elem_index
@@ -2153,7 +2151,7 @@ cdef new_band(EPR_SBandId* ptr, Product parent=None):
 
 
 cdef class Dataset(EprObject):
-    '''ENVISAT dataset
+    """ENVISAT dataset.
 
     The Dataset class contains information about a dataset within an
     ENVISAT product file which has been opened with the :func:`open`
@@ -2163,7 +2161,7 @@ cdef class Dataset(EprObject):
     :meth:`Product.get_dataset` or :meth:`Product.get_dataset_at`
     methods.
 
-    '''
+    """
 
     cdef EPR_SDatasetId* _ptr
     cdef Product _parent
@@ -2179,13 +2177,13 @@ cdef class Dataset(EprObject):
         return dsd.ds_offset
 
     property product:
-        '''The :class:`Product` instance to which this dataset belongs to'''
+        """The :class:`Product` instance to which this dataset belongs to."""
 
         def __get__(self):
             return self._parent
 
     property description:
-        '''A short description of the band's contents'''
+        """A short description of the band's contents."""
 
         def __get__(self):
             if self._ptr is not NULL:
@@ -2195,11 +2193,11 @@ cdef class Dataset(EprObject):
             return ''
 
     def get_name(self):
-        '''get_name(self)
+        """get_name(self)
 
-        Gets the name of the dataset
+        Gets the name of the dataset.
 
-        '''
+        """
 
         cdef char* name
 
@@ -2210,11 +2208,11 @@ cdef class Dataset(EprObject):
         return ''
 
     def get_dsd_name(self):
-        '''get_dsd_name(self)
+        """get_dsd_name(self)
 
-        Gets the name of the DSD (dataset descriptor)
+        Gets the name of the DSD (dataset descriptor).
 
-        '''
+        """
 
         cdef char* name
 
@@ -2225,11 +2223,11 @@ cdef class Dataset(EprObject):
         return ''
 
     def get_num_records(self):
-        '''get_num_records(self)
+        """get_num_records(self)
 
-        Gets the number of records of the dataset
+        Gets the number of records of the dataset.
 
-        '''
+        """
 
         if self._ptr is not NULL:
             self.check_closed_product()
@@ -2237,20 +2235,20 @@ cdef class Dataset(EprObject):
         return 0
 
     def get_dsd(self):
-        '''get_dsd(self)
+        """get_dsd(self)
 
-        Gets the dataset descriptor (DSD)
+        Gets the dataset descriptor (DSD).
 
-        '''
+        """
 
         self.check_closed_product()
 
         return new_dsd(<EPR_SDSD*>epr_get_dsd(self._ptr), self)
 
     def create_record(self):
-        '''create_record(self)
+        """create_record(self)
 
-        Creates a new record
+        Creates a new record.
 
         Creates a new, empty record with a structure compatible with
         the dataset. Such a record is typically used in subsequent
@@ -2259,16 +2257,16 @@ cdef class Dataset(EprObject):
         :returns:
             the new record instance
 
-        '''
+        """
 
         self.check_closed_product()
 
         return new_record(epr_create_record(self._ptr), self, True)
 
     def read_record(self, uint index=0, Record record=None):
-        '''read_record(self, index, record=None)
+        """read_record(self, index, record=None)
 
-        Reads specified record of the dataset
+        Reads specified record of the dataset.
 
         The record is identified through the given zero-based record
         index. In order to reduce memory reallocation, a record
@@ -2296,7 +2294,7 @@ cdef class Dataset(EprObject):
 
            The *index* parameter now defaults to zero
 
-        '''
+        """
 
         cdef EPR_SRecord* record_ptr = NULL
 
@@ -2320,11 +2318,11 @@ cdef class Dataset(EprObject):
 
     # --- high level interface ------------------------------------------------
     def records(self):
-        '''records(self)
+        """records(self)
 
-        Return the list of records contained in the dataset
+        Return the list of records contained in the dataset.
 
-        '''
+        """
 
         return list(self)
 
@@ -2345,7 +2343,7 @@ cdef class Dataset(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
@@ -2365,14 +2363,14 @@ cdef new_dataset(EPR_SDatasetId* ptr, Product parent=None):
 
 
 cdef class Product(EprObject):
-    '''ENVISAT product
+    """ENVISAT product.
 
     The Product class provides methods and properties to get
     information about an ENVISAT product file.
 
     .. seealso:: :func:`open`
 
-    '''
+    """
 
     cdef EPR_SProductId* _ptr
     cdef str _mode
@@ -2435,9 +2433,9 @@ cdef class Product(EprObject):
         pass
 
     def close(self):
-        '''close(self)
+        """close(self)
 
-        Closes the ENVISAT :class:`epr.Product` product
+        Closes the ENVISAT :class:`epr.Product` product.
 
         Closes the :class:`epr.Product` product and free the underlying
         file descriptor.
@@ -2449,7 +2447,7 @@ cdef class Product(EprObject):
         As a convenience, it is allowed to call this method more than
         once; only the first call, however, will have an effect.
 
-        '''
+        """
 
         if self._ptr is not NULL:
             #if '+' in self.mode:
@@ -2459,7 +2457,7 @@ cdef class Product(EprObject):
             self._ptr = NULL
 
     def flush(self):
-        '''Flush the file stream'''
+        """Flush the file stream."""
 
         cdef int ret
         if '+' in self.mode:
@@ -2469,7 +2467,7 @@ cdef class Product(EprObject):
                 raise IOError('flush error')
 
     property file_path:
-        '''The file's path including the file name'''
+        """The file's path including the file name."""
 
         def __get__(self):
             self.check_closed_product()
@@ -2479,11 +2477,11 @@ cdef class Product(EprObject):
                 return _to_str(self._ptr.file_path, 'ascii')
 
     property _fileno:
-        '''The fileno of the :class:`epr.Product` input stream
+        """The fileno of the :class:`epr.Product` input stream.
 
         To be used with care.
 
-        '''
+        """
 
         def __get__(self):
             if self._ptr.istream is NULL:
@@ -2493,32 +2491,32 @@ cdef class Product(EprObject):
 
     property mode:
         def __get__(self):
-            '''String that specifies the mode in which the file is opened
+            """String that specifies the mode in which the file is opened.
 
             Possible values: 'rb' for read-only mode, 'rb+' for read-write
             mode.
 
-            '''
+            """
 
             return self._mode
 
     property tot_size:
-        '''The total size in bytes of the product file'''
+        """The total size in bytes of the product file."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.tot_size
 
     property id_string:
-        '''The product identifier string obtained from the MPH
-        parameter 'PRODUCT'
+        """The product identifier string obtained from the MPH
+        parameter 'PRODUCT'.
 
         The first 10 characters of this string identify the product
         type, e.g. "MER_1P__FR" for a MERIS Level 1b full resolution
         product.
         The rest of the string decodes product instance properties.
 
-        '''
+        """
 
         def __get__(self):
             self.check_closed_product()
@@ -2528,69 +2526,69 @@ cdef class Product(EprObject):
                 return _to_str(self._ptr.id_string, 'ascii')
 
     property meris_iodd_version:
-        '''For MERIS L1b and RR and FR to provide backward compatibility'''
+        """For MERIS L1b and RR and FR to provide backward compatibility."""
 
         def __get__(self):
             self.check_closed_product()
             return self._ptr.meris_iodd_version
 
     def get_scene_width(self):
-        '''get_scene_width(self)
+        """get_scene_width(self)
 
-        Gets the product's scene width in pixels
+        Gets the product's scene width in pixels.
 
-        '''
+        """
 
         self.check_closed_product()
         return epr_get_scene_width(self._ptr)
 
     def get_scene_height(self):
-        '''get_scene_height(self)
+        """get_scene_height(self)
 
-        Gets the product's scene height in pixels
+        Gets the product's scene height in pixels.
 
-        '''
+        """
 
         self.check_closed_product()
         return epr_get_scene_height(self._ptr)
 
     def get_num_datasets(self):
-        '''get_num_datasets(self)
+        """get_num_datasets(self)
 
-        Gets the number of all datasets contained in a product
+        Gets the number of all datasets contained in a product.
 
-        '''
+        """
 
         self.check_closed_product()
         return epr_get_num_datasets(self._ptr)
 
     def get_num_dsds(self):
-        '''get_num_dsds(self)
+        """get_num_dsds(self)
 
-        Gets the number of all :class:`DSD`\ s
+        Gets the number of all :class:`DSD`\ s.
 
         Gets the number of all :class:`DSD`\ s (dataset descriptors)
-        contained in the product
+        contained in the product.
 
-        '''
+        """
 
         self.check_closed_product()
         return epr_get_num_dsds(self._ptr)
 
     def get_num_bands(self):
-        '''get_num_bands(self)
+        """get_num_bands(self)
 
-        Gets the number of all bands contained in a product
+        Gets the number of all bands contained in a product.
 
-        '''
+        """
 
         self.check_closed_product()
         return epr_get_num_bands(self._ptr)
 
     def get_dataset_at(self, uint index):
-        '''get_dataset_at(self, index)
+        """get_dataset_at(self, index)
 
-        Gets the dataset at the specified position within the product
+        Gets the dataset at the specified position within the product.
 
         :param index:
             the index identifying the position of the dataset, starting
@@ -2598,7 +2596,7 @@ cdef class Product(EprObject):
         :returns:
             the requested :class:`Dataset`
 
-        '''
+        """
 
         cdef EPR_SDatasetId* dataset_id
         dataset_id = epr_get_dataset_id_at(self._ptr, index)
@@ -2608,16 +2606,16 @@ cdef class Product(EprObject):
         return new_dataset(dataset_id, self)
 
     def get_dataset(self, name):
-        '''get_dataset(self, name)
+        """get_dataset(self, name)
 
-        Gets the dataset corresponding to the specified dataset name
+        Gets the dataset corresponding to the specified dataset name.
 
         :param name:
             the dataset name
         :returns:
             the requested :class:`Dataset` instance
 
-        '''
+        """
 
         cdef EPR_SDatasetId* dataset_id
         cdef bytes cname = _to_bytes(name)
@@ -2628,9 +2626,9 @@ cdef class Product(EprObject):
         return new_dataset(dataset_id, self)
 
     def get_dsd_at(self, uint index):
-        '''get_dsd_at(self, index)
+        """get_dsd_at(self, index)
 
-        Gets the :class:`DSD` at the specified position
+        Gets the :class:`DSD` at the specified position.
 
         Gets the :class:`DSD` (dataset descriptor) at the specified
         position within the product.
@@ -2641,7 +2639,7 @@ cdef class Product(EprObject):
         :returns:
             the requested :class:`DSD` instance
 
-        '''
+        """
 
         cdef EPR_SDSD* dsd_ptr
 
@@ -2654,11 +2652,11 @@ cdef class Product(EprObject):
         return new_dsd(dsd_ptr, self)
 
     def get_mph(self):
-        '''get_mph(self)
+        """get_mph(self)
 
-        The main product header (MPH) :class:`Record`
+        The main product header (MPH) :class:`Record`.
 
-        '''
+        """
 
         cdef EPR_SRecord* record_ptr
         record_ptr = epr_get_mph(self._ptr)
@@ -2668,11 +2666,11 @@ cdef class Product(EprObject):
         return new_record(record_ptr, self, False)
 
     def get_sph(self):
-        '''get_sph(self)
+        """get_sph(self)
 
-        The specific product header (SPH) :class:`Record`
+        The specific product header (SPH) :class:`Record`.
 
-        '''
+        """
 
         cdef EPR_SRecord* record_ptr
         record_ptr = epr_get_sph(self._ptr)
@@ -2682,7 +2680,7 @@ cdef class Product(EprObject):
         return new_record(record_ptr, self, False)
 
     def get_band(self, name):
-        '''get_band(self, name)
+        """get_band(self, name)
 
         Gets the band corresponding to the specified name.
 
@@ -2692,7 +2690,7 @@ cdef class Product(EprObject):
             the requested :class:`Band` instance, or raises a
             :exc:`EPRValueError` if not found
 
-        '''
+        """
 
         cdef EPR_SBandId* band_id
         cdef bytes cname = _to_bytes(name)
@@ -2703,9 +2701,9 @@ cdef class Product(EprObject):
         return new_band(band_id, self)
 
     def get_band_at(self, uint index):
-        '''get_band_at(self, index)
+        """get_band_at(self, index)
 
-        Gets the band at the specified position within the product
+        Gets the band at the specified position within the product.
 
         :param index:
             the index identifying the position of the band, starting
@@ -2714,7 +2712,7 @@ cdef class Product(EprObject):
             the requested :class:`Band` instance, or raises a
             :exc:`EPRValueError` if not found
 
-        '''
+        """
 
         cdef EPR_SBandId* band_id
         band_id = epr_get_band_id_at(self._ptr, index)
@@ -2725,9 +2723,9 @@ cdef class Product(EprObject):
 
     def read_bitmask_raster(self, bm_expr, int xoffset, int yoffset,
                             Raster raster not None):
-        '''read_bitmask_raster(self, bm_expr, xoffset, yoffset, raster)
+        """read_bitmask_raster(self, bm_expr, xoffset, yoffset, raster)
 
-        Calculates a bit-mask raster
+        Calculates a bit-mask raster.
 
         Calculates a bit-mask, composed of flags of the given product
         and combined as described in the given bit-mask expression, for
@@ -2756,7 +2754,7 @@ cdef class Product(EprObject):
 
         .. seealso:: :func:`epr.create_bitmask_raster`
 
-        '''
+        """
 
         cdef bytes c_bm_expr = _to_bytes(bm_expr)
         cdef int ret = 0
@@ -2779,13 +2777,13 @@ cdef class Product(EprObject):
             return self._ptr is NULL
 
     def get_dataset_names(self):
-        '''get_dataset_names(self)
+        """get_dataset_names(self)
 
-        Return the list of names of the datasets in the product
+        Return the list of names of the datasets in the product.
 
         .. note:: this method has no correspondent in the C API
 
-        '''
+        """
 
         cdef EPR_SDatasetId* dataset_ptr
         cdef int idx
@@ -2805,13 +2803,13 @@ cdef class Product(EprObject):
         return names
 
     def get_band_names(self):
-        '''get_band_names(self)
+        """get_band_names(self)
 
-        Return the list of names of the bands in the product
+        Return the list of names of the bands in the product.
 
         .. note:: this method has no correspondent in the C API
 
-        '''
+        """
 
         cdef EPR_SBandId* band_ptr
         cdef int idx
@@ -2831,11 +2829,11 @@ cdef class Product(EprObject):
         return names
 
     def datasets(self):
-        '''datasets(self)
+        """datasets(self)
 
-        Return the list of dataset in the product
+        Return the list of dataset in the product.
 
-        '''
+        """
 
         cdef int idx
         cdef int num_datasets
@@ -2847,11 +2845,11 @@ cdef class Product(EprObject):
         return [self.get_dataset_at(idx) for idx in range(num_datasets)]
 
     def bands(self):
-        '''bands(self)
+        """bands(self)
 
-        Return the list of bands in the product
+        Return the list of bands in the product.
 
-        '''
+        """
 
         cdef int num_bands
 
@@ -2884,7 +2882,7 @@ cdef class Product(EprObject):
 
     # --- low level interface -------------------------------------------------
     property _magic:
-        '''The magic number for internal C structure'''
+        """The magic number for internal C structure."""
 
         def __get__(self):
             self.check_closed_product()
@@ -2892,9 +2890,9 @@ cdef class Product(EprObject):
 
 
 def open(filename, mode='rb'):
-    '''open(filename)
+    """open(filename)
 
-    Opens the ENVISAT product
+    Open the ENVISAT product.
 
     Opens the ENVISAT product file with the given file path, reads MPH,
     SPH and all DSDs, organized the table with parameter of line length
@@ -2913,7 +2911,7 @@ def open(filename, mode='rb'):
 
     .. seealso :class:`Product`
 
-    '''
+    """
 
     return Product(filename, mode)
 


=====================================
tests/test_all.py
=====================================
--- a/tests/test_all.py
+++ b/tests/test_all.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# Copyright (C) 2011-2015, Antonio Valentino <antonio.valentino at tiscali.it>
+# Copyright (C) 2011-2018, Antonio Valentino <antonio.valentino at tiscali.it>
 #
 # This file is part of PyEPR.
 #



View it on GitLab: https://salsa.debian.org/debian-gis-team/pyepr/compare/ce47be9d47be6b9ba1f0eddd77b1366aa2d58d3a...da72fb9c3c42392dddf11d2549d5a2f1eee58458

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyepr/compare/ce47be9d47be6b9ba1f0eddd77b1366aa2d58d3a...da72fb9c3c42392dddf11d2549d5a2f1eee58458
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180430/f3c2b1d0/attachment-0001.html>


More information about the Pkg-grass-devel mailing list