Skip to content

Commit

Permalink
Merge pull request #654 from odlgroup/release_note_updates_for_0.5
Browse files Browse the repository at this point in the history
DOC/REL: Update release notes with several PRs for 0.5
  • Loading branch information
Holger Kohr authored Oct 21, 2016
2 parents 930f630 + a54393f commit d445705
Show file tree
Hide file tree
Showing 9 changed files with 98 additions and 47 deletions.
8 changes: 3 additions & 5 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package:
name: odl
version: "0.4.0"
version: "0.5.0"

source:
# fn: odl-0.4.0.tar.gz
# url: https://pypi.python.org/packages/4d/f4/f7e0dbc1162d7286a306cd5a985a4d1f705a3bc1d892c5991b86037c2cb6/odl-0.4.0.tar.gz
# md5: aba2e6b826aae1ff8f95bf495b67034b
git_url: https://github.com/odlgroup/odl
git_rev: master # for testing
git_rev: master # for testing, put any branch here
# git_rev: v0.5.0 # release

build:
noarch_python: True
Expand Down
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def pytest_addoption(parser):
parser.addoption('--examples', action='store_true',
help='Run examples')

parser.addoption('--documentation', action='store_true',
help='Run doctests in the documentation')


# reusable fixtures
fn_impl_params = odl.FN_IMPLS.keys()
Expand Down
4 changes: 2 additions & 2 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
# Intersphinx to get Numpy and other targets
intersphinx_mapping = {
'python': ('https://docs.python.org/3/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/reference/', None),
'matplotlib': ('http://matplotlib.org/', None),
'pywt': ('http://www.pybytes.com/pywavelets/', None),
'pyfftw': ('https://hgomersall.github.io/pyFFTW/', None)}
Expand Down
16 changes: 0 additions & 16 deletions doc/source/guide/index.rst

This file was deleted.

66 changes: 56 additions & 10 deletions doc/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,30 @@ Release Notes
Next release
============


ODL 0.5.0 Release Notes (2016-10-21)
====================================

This release features a new important top level class ``Functional`` that is intended to be used in optimization methods.
Beyond its parent ``Operator``, it provides special methods and properties like ``gradient`` or ``proximal`` which are useful in advanced smooth or non-smooth optimization schemes.
The interfaces of all solvers in ``odl.solvers`` have been updated to make use of functionals instead of their proximals, gradients etc. directly.

Further notable changes are the implementation of an ``as_writable_array`` context manager that exposes arbitrary array storage as writable Numpy arrays, and the generalization of the wavelet transform to arbitrary dimensions.

See below for a complete list of changes.


New features
------------
- Add ``Functional`` class to the solvers package. (:pull:`498`)
``Functional`` is a subclass of odl ``Operator`` and intended to help in formulating and solving optimization problems.
It contains optimization specific features like ``proximal`` and ``convex_conj``, and built-in intelligence for handling things like translation, scaling of argument or scaling of functional.
* Migrate all solvers to work with ``Functional``'s instead of raw proximals etc. (:pull:`587`)
* ``FunctionalProduct`` and ``FunctionalQuotient`` which allow evaluation of the product/quotient of functions and also provides a gradient through the Leibniz/quotient rules. (:pull:`586`)
* ``FunctionalDefaultConvexConjugate`` which acts as a default for ``Functional.convex_conj``, providing it with a proximal property. (:pull:`588`)
* ``IndicatorBox`` and ``IndicatorNonnegativity`` which are indicator functions on a box shaped set and the set of nonnegative numbers, respectively. They return 0 if all points in a vector are inside the box, and infinity otherwise. (:pull:`589`)
* Add ``Functional``s for ``KullbackLeibler`` and ``KullbackLeiblerCrossEntropy``, together with corresponding convex conjugates (:pull:`627`).
Also add proximal operator for the convex conjugate of cross entropy Kullback-Leibler divergence, called ``proximal_cconj_kl_cross_entropy`` (:pull:`561`)
- Add ``ResizingOperator`` for shrinking and extending (padding) of discretized functions, including a variety of padding methods. (:pull:`499`)
- Add ``as_writable_array`` that allows casting arbitrary array-likes to a numpy array and then storing the results later on. This is
intended to be used with odl vectors that may not be stored in numpy format (like cuda vectors), but can be used with other types like lists.
Expand All @@ -26,7 +48,14 @@ New features
- Add ``FunctionalDefaultConvexConjugate`` which acts as a default for ``Functional.convex_conj``, providing it with a proximal property. (:pull:`588`)
- Add ``IndicatorBox`` and ``IndicatorNonnegativity`` which are indicator functions on a box shaped set and the set of nonnegative numbers, respectively. They return 0 if all points in a vector are inside the box, and infinity otherwise. (:pull:`589`)
- Add proximal operator for the convex conjugate of cross entropy Kullback-Leibler divergence, called ``proximal_cconj_kl_cross_entropy`` (:pull:`561`)
- Add ``Functional``s for ``KullbackLeibler`` and ``KullbackLeiblerCrossEntropy``, together with corresponding convex conjugates (:pull:`627`)
- Add ``Functional``'s for ``KullbackLeibler`` and ``KullbackLeiblerCrossEntropy``, together with corresponding convex conjugates (:pull:`627`)
- Add tutorial style example. (:pull:`521`)
- Add MLEM solver. (:pull:`497`)
- Add ``MatVecOperator.inverse``. (:pull:`608`)
- Add the ``Rosenbrock`` standard test functional. (:pull:`602`)
- Add broadcasting of vector arithmetic involving ``ProductSpace`` vectors. (:pull:`555`)
- Add ``phantoms.poisson_noise``. (:pull:`630`)
- Add ``NumericalGradient`` and ``NumericalDerivative`` that numerically compute gradient and derivative of ``Operator``'s and ``Functional``'s. (:pull:`624`)

Improvements
------------
Expand All @@ -36,35 +65,52 @@ Improvements
- Allow showing subsets of the whole volume in ``DiscreteLpElement.show``. Previously this allowed slices to be shown, but the new version allows subsets such as ``0 < x < 3`` to be shown as well. (:pull:`574`)
- Add ``Solvercallback.reset()`` which allows users to reset a callback to its initial state. Applicable if users want to reuse a callback in another solver. (:pull:`553`)
- ``WaveletTransform`` and related operators now work in arbitrary dimensions. (:pull:`547`)
- Several documentation improvements. Including:

* Move documentation from ``_call`` to ``__init__``. (:pull:`549`)
* Major review of minor style issues. (:pull:`534`)
* Typeset math in proximals. (:pull:`580`)

- Improved installation docs and update of Chambolle-Pock documentation. (:pull:`121`)

Changes
--------
- Changed definition of ``LinearSpaceVector.multiply`` to match the definition used by Numpy. (:pull:`509`)
- The parameters ``padding_method`` in ``diff_ops.py`` and ``mode`` in ``wavelet.py`` have been renamed to ``pad_mode``.
- Change definition of ``LinearSpaceVector.multiply`` to match the definition used by Numpy. (:pull:`509`)
- Rename the parameters ``padding_method`` in ``diff_ops.py`` and ``mode`` in ``wavelet.py`` to ``pad_mode``.
The parameter ``padding_value`` is now called ``pad_const``. (:pull:`511`)
- Expose ``ellipse_phantom`` and ``shepp_logan_ellipses`` to ``odl.phantom``. (:pull:`529`)
- Unify the names of minimum (``min_pt``), maximum (``max_pt``) and middle (``mid_pt``) points as well as number of points (``shape``) in grids, interval products and factory functions for discretized spaces. (:pull:`541`)
- Removed ``simple_operator`` since it was never used and did not follow the ODL style. (:pull:`543`)
- Remove ``simple_operator`` since it was never used and did not follow the ODL style. (:pull:`543`)
The parameter ``padding_value`` is now called ``pad_const``.
- Removed ``Interval``, ``Rectangle`` and ``Cuboid`` since they were confusing (Capitalized name but not a Cunction) and barely ever used.
- Remove ``Interval``, ``Rectangle`` and ``Cuboid`` since they were confusing (Capitalized name but not a class) and barely ever used.
Users should instead use ``IntervalProd`` in all cases. (:pull:`537`)
- The following classes have been renamed:
- The following classes have been renamed (:pull:`560`):

* ``LinearSpaceVector`` -> ``LinearSpaceElement``
* ``DiscreteLpVector`` -> ``DiscreteLpElement``
* ``ProductSpaceVector`` -> ``ProductSpaceElement``
* ``DiscretizedSetVector`` -> ``DiscretizedSetElement``
* ``DiscretizedSpaceVector`` -> ``DiscretizedSpaceElement``
* ``FunctionSetVector`` -> ``FunctionSetElement``
* ``FunctionSpaceVector`` -> ``FunctionSpaceElement``
- Changed parameter style of differential operators from having a ``pad_mode`` and a separate ``edge_order`` argument that were mutually exclusive to a single ``pad_mode`` that covers all cases.

- Change parameter style of differential operators from having a ``pad_mode`` and a separate ``edge_order`` argument that were mutually exclusive to a single ``pad_mode`` that covers all cases.
Also added several new pad modes to the differential operators. (:pull:`548`)
- Switch from RTD documentation hosting to gh-pages and let Travis CI build and deploy the documentation. (:pull:`536`)
- Update name of ``proximal_zero`` to ``proximal_const_func``. (:pull:`582`)
- Move unit tests from top level ``test/`` to ``odl/test/`` folder and distribute them with the source. (:pull:`638`)
- Update pytest dependency to [>3.0] and use new featuers. (:pull:`653`)
- Add pytest option ``--documentation`` to test all doctest examples in the online documentation.
- Remove the ``pip install odl[all]`` option since it fails by default.


Bugfixes
--------
- Fixed ``python -c "import odl; odl.test()"`` not working on Windows. (:pull:`508`)
- Fixed a ``TypeError`` being raised in ``OperatorTest`` when running ``optest.ajoint()`` without specifying an operator norm. (:pull:`525`)

- Fix ``python -c "import odl; odl.test()"`` not working on Windows. (:pull:`508`)
- Fix a ``TypeError`` being raised in ``OperatorTest`` when running ``optest.ajoint()`` without specifying an operator norm. (:pull:`525`)
- Fix scaling of scikit ray transform for non full scan. (:pull:`523`)
- Fix bug causing classes to not be vectorizable. (:pull:`604`)
- Fix rounding problem in some proximals (:pull:`661`)

ODL 0.4.0 Release Notes (2016-08-17)
====================================
Expand Down
2 changes: 1 addition & 1 deletion odl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

from __future__ import absolute_import

__version__ = '0.4.0'
__version__ = '0.5.0'
__all__ = ('diagnostics', 'discr', 'operator', 'set', 'space', 'solvers',
'tomo', 'trafos', 'util', 'phantom', 'deform')

Expand Down
32 changes: 28 additions & 4 deletions doc/doctest_doc.py → odl/test/test_doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
# You should have received a copy of the GNU General Public License
# along with ODL. If not, see <http://www.gnu.org/licenses/>.

"""Run all doctests in the online documentation.
Running this file causes all relevant files in the online documentation to
be run by ``doctest``, and any exception will give a FAILED result.
All other results are considered PASSED.
This test file assumes that all dependencies are installed.
"""

# Imports for common Python 2/3 codebase
from __future__ import print_function, division, absolute_import
from future import standard_library
Expand All @@ -23,6 +32,7 @@
import doctest
from doctest import IGNORE_EXCEPTION_DETAIL, ELLIPSIS, NORMALIZE_WHITESPACE
import os
import pytest

# Modules to be added to testing globals
import numpy
Expand All @@ -36,7 +46,9 @@
doctest_extraglobs = {'odl': odl, 'np': numpy, 'scipy': scipy,
'proximal': proximal}

root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'source')
root_dir = os.path.join(os.path.abspath(os.path.dirname(__file__)),
'../../doc/source')
root_dir = os.path.normpath(root_dir)
test_dirs = ['guide', 'getting_started']
test_suffixes = ['.rst', '.py']
exclude_files = ['faq.rst']
Expand All @@ -49,9 +61,21 @@
for filename in filenames:
if (any(filename.endswith(suffix) for suffix in test_suffixes) and
filename not in exclude_files):
doc_src_files.append(path + '/' + filename)
doc_src_files.append(os.path.join(path, filename))


for doc_src_file in doc_src_files:
@pytest.fixture(scope="module", ids=doc_src_files, params=doc_src_files)
def doc_src_file(request):
return request.param


@pytest.mark.skipif("not pytest.config.getoption('--documentation')",
reason='Need --documentation option to run')
def test_file(doc_src_file):
doctest.testfile(doc_src_file, module_relative=False, report=True,
extraglobs=doctest_extraglobs,
extraglobs=doctest_extraglobs, verbose=True,
optionflags=doctest_optionflags)


if __name__ == '__main__':
pytest.main([str(__file__.replace('\\', '/')), '-v', '--documentation'])
2 changes: 1 addition & 1 deletion odl/test/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with ODL. If not, see <http://www.gnu.org/licenses/>.

"""Tests that all examples run at all.
"""Test that all examples run.
Running this file causes all examples to be run, and any exception will give
a FAILED result. All other results are considered PASSED.
Expand Down
12 changes: 4 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def run_tests(self):
setup(
name='odl',

version='0.4.0',
version='0.5.0',

description='Operator Discretization Library',
long_description=long_description,
Expand Down Expand Up @@ -119,10 +119,7 @@ def run_tests(self):
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',

'Operating System :: POSIX :: Linux',
'Operating System :: Microsoft :: Windows',
'Operating System :: MacOS :: MacOS X',

'Operating System :: OS Independent'
],

keywords='research development mathematics prototyping imaging tomography',
Expand All @@ -137,9 +134,8 @@ def run_tests(self):
'show': 'matplotlib',
'fftw': 'pyfftw',
'pywavelets': 'Pywavelets>=0.4',
'scikit' : 'scikit-image',
'proximal' : 'proximal',
'all': test_requires + ['matplotlib', 'pyfftw', 'Pywavelets', 'scikit-image', 'proximal']
'scikit': 'scikit-image',
'proximal': 'proximal',
},

cmdclass={'test': PyTest},
Expand Down

0 comments on commit d445705

Please sign in to comment.