diff -Nru python-bumps-0.7.10/bumps/gui/util.py python-bumps-0.7.11/bumps/gui/util.py --- python-bumps-0.7.10/bumps/gui/util.py 2018-06-15 16:54:46.000000000 +0000 +++ python-bumps-0.7.11/bumps/gui/util.py 2018-10-04 15:23:11.000000000 +0000 @@ -6,6 +6,8 @@ import wx +import numpy as np + class EmbeddedPylab(object): """ Define a 'with' context manager that lets you use pylab commands to @@ -96,7 +98,7 @@ def nice(v, digits=4): """Fix v to a value with a given number of digits of precision""" - if v == 0.: + if v == 0. or not np.isfinite(v): return v else: sign = v/abs(v) diff -Nru python-bumps-0.7.10/bumps/__init__.py python-bumps-0.7.11/bumps/__init__.py --- python-bumps-0.7.10/bumps/__init__.py 2018-06-15 16:54:46.000000000 +0000 +++ python-bumps-0.7.11/bumps/__init__.py 2018-10-04 15:23:11.000000000 +0000 @@ -12,7 +12,7 @@ See http://www.reflectometry.org/danse/reflectometry for online manuals. """ -__version__ = "0.7.10" +__version__ = "0.7.11" def data_files(): diff -Nru python-bumps-0.7.10/bumps/parameter.py python-bumps-0.7.11/bumps/parameter.py --- python-bumps-0.7.10/bumps/parameter.py 2018-06-15 16:54:46.000000000 +0000 +++ python-bumps-0.7.11/bumps/parameter.py 2018-10-04 15:23:11.000000000 +0000 @@ -255,6 +255,14 @@ def __repr__(self): return "Parameter(%s)" % self + def to_dict(self): + """ + Return a dict represention of the object. + """ + return dict(name=self.name, type=type(self).__name__, + value=self.value, fixed=self.fixed, + bounds=dict(type=type(self._bounds).__name__, limits=self._bounds.limits)) + class Constant(BaseParameter): """ diff -Nru python-bumps-0.7.10/debian/bumps-private-libs.dirs python-bumps-0.7.11/debian/bumps-private-libs.dirs --- python-bumps-0.7.10/debian/bumps-private-libs.dirs 1970-01-01 00:00:00.000000000 +0000 +++ python-bumps-0.7.11/debian/bumps-private-libs.dirs 2018-12-12 04:37:14.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/bumps/ diff -Nru python-bumps-0.7.10/debian/changelog python-bumps-0.7.11/debian/changelog --- python-bumps-0.7.10/debian/changelog 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/changelog 2018-12-26 07:35:44.000000000 +0000 @@ -1,3 +1,30 @@ +python-bumps (0.7.11-2) unstable; urgency=medium + + * Ensure arch-dep and arch-indep parts can be built separately + (Closes: #917062). + * Only try to build shared object on supported architectures. + * Make the python-bumps modules packages depend on the compiled libraries + in bumps-private-libs where possible (Closes: #916617). + * Update Standards-Version to 4.3.0 (no changes required). + + -- Stuart Prescott Wed, 26 Dec 2018 18:35:44 +1100 + +python-bumps (0.7.11-1) unstable; urgency=medium + + [ Drew Parsons ] + * add BSD-3 licence entry for Random123 to debian/copyright. + * build compiled.c with Random123 to speed up bumps/dream + - destabilises build time tests of dream, so skip them + + [ Stuart Prescott ] + * New upstream release. + * Add new bumps-private-libs package for .so. + * Fix compile flags for .so. + * Also skip dream tests in the autopkgtests. + * Update Standards-Version to 4.2.1 (no changes required). + + -- Stuart Prescott Wed, 12 Dec 2018 01:31:28 +1100 + python-bumps (0.7.10-1) unstable; urgency=medium * New upstream version. diff -Nru python-bumps-0.7.10/debian/control python-bumps-0.7.11/debian/control --- python-bumps-0.7.10/debian/control 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/control 2018-12-26 07:35:44.000000000 +0000 @@ -20,7 +20,6 @@ python-pyparsing (>= 1.5.2), python-six, python-sklearn, - python-sphinx, python-typing, python-wxgtk3.0, python3-all, @@ -35,8 +34,9 @@ python3-sklearn, python3-sphinx, python3-wxgtk4.0, + librandom123-dev, texinfo -Standards-Version: 4.1.4 +Standards-Version: 4.3.0 Homepage: https://github.com/bumps/bumps Vcs-Git: https://salsa.debian.org/science-team/python-bumps.git Vcs-Browser: https://salsa.debian.org/science-team/python-bumps @@ -52,8 +52,9 @@ python-six, python-typing, ${misc:Depends}, - ${python:Depends} + ${python:Depends}, Recommends: + bumps-private-libs, python-wxgtk3.0 Suggests: python-bumps-doc, @@ -93,8 +94,9 @@ python3-scipy (>= 0.7.0), python3-six, ${misc:Depends}, - ${python3:Depends} + ${python3:Depends}, Recommends: + bumps-private-libs, python3-wxgtk4.0 Suggests: python-bumps-doc, @@ -125,6 +127,38 @@ . This package installs the library for Python 3. +Package: bumps-private-libs +Architecture: any-amd64 any-i386 powerpc +Section: libs +Depends: + ${misc:Depends}, + ${shlibs:Depends} +Description: data fitting and Bayesian uncertainty modeling for inverse problems (libraries) + Bumps is a set of routines for curve fitting and uncertainty analysis + from a Bayesian perspective. In addition to traditional optimizers + which search for the best minimum they can find in the search space, + bumps provides uncertainty analysis which explores all viable minima + and finds confidence intervals on the parameters based on uncertainty + in the measured values. Bumps has been used for systems of up to 100 + parameters with tight constraints on the parameters. Full uncertainty + analysis requires hundreds of thousands of function evaluations, + which is only feasible for cheap functions, systems with many + processors, or lots of patience. + . + Bumps includes several traditional local optimizers such as + Nelder-Mead simplex, BFGS and differential evolution. Bumps + uncertainty analysis uses Markov chain Monte Carlo to explore the + parameter space. Although it was created for curve fitting problems, + Bumps can explore any probability density function, such as those + defined by PyMC. In particular, the bumps uncertainty analysis works + well with correlated parameters. + . + Bumps can be used as a library within your own applications, or as a + framework for fitting, complete with a graphical user interface to + manage your models. + . + This package installs the compiled libraries used by the Python modules. + Package: python-bumps-doc Architecture: all Section: doc diff -Nru python-bumps-0.7.10/debian/copyright python-bumps-0.7.11/debian/copyright --- python-bumps-0.7.10/debian/copyright 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/copyright 2018-08-26 08:30:35.000000000 +0000 @@ -148,3 +148,36 @@ along with python-fedoracommons. If not, see . . On Debian systems the GPL-3 licence may be found at /usr/share/common-licenses/GPL-3 + +Files: Random123/* +Copyright: 2010-2012, D. E. Shaw Research. +License: BSD-3-random123 + Copyright 2010-2012, D. E. Shaw Research. + All rights reserved. + . + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright + notice, this list of conditions, and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions, and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + * Neither the name of D. E. Shaw Research nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff -Nru python-bumps-0.7.10/debian/gbp.conf python-bumps-0.7.11/debian/gbp.conf --- python-bumps-0.7.10/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ python-bumps-0.7.11/debian/gbp.conf 2018-12-26 07:35:44.000000000 +0000 @@ -0,0 +1,4 @@ +[DEFAULT] +pristine-tar = True +sign-tags = True + diff -Nru python-bumps-0.7.10/debian/patches/series python-bumps-0.7.11/debian/patches/series --- python-bumps-0.7.10/debian/patches/series 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/patches/series 2018-12-26 07:35:44.000000000 +0000 @@ -1 +1,2 @@ +sphinx_matplotlib.patch sphinx-local-mathjax.patch diff -Nru python-bumps-0.7.10/debian/patches/sphinx_matplotlib.patch python-bumps-0.7.11/debian/patches/sphinx_matplotlib.patch --- python-bumps-0.7.10/debian/patches/sphinx_matplotlib.patch 1970-01-01 00:00:00.000000000 +0000 +++ python-bumps-0.7.11/debian/patches/sphinx_matplotlib.patch 2018-12-26 07:35:44.000000000 +0000 @@ -0,0 +1,29 @@ +Description: Fix sphinx for newer matplotlib + The htmlonly directive has been removed in matplotlib 3. +Author: Stuart Prescott +Forwarded: https://github.com/bumps/bumps/pull/20 +--- a/doc/conf.py ++++ b/doc/conf.py +@@ -52,7 +52,6 @@ + 'sphinx.ext.mathjax', + #'only_directives', + #'matplotlib.sphinxext.mathmpl', +- 'matplotlib.sphinxext.only_directives', + 'matplotlib.sphinxext.plot_directive', + #'inheritance_diagram', + 'dollarmath', +@@ -282,4 +281,4 @@ + + # Generate tutorials + import gentut +-gentut.make() +\ No newline at end of file ++gentut.make() +--- a/doc/index.rst ++++ b/doc/index.rst +@@ -1,4 +1,4 @@ +-.. htmlonly:: ++.. only:: html + + :Release: |version| + :Date: |today| diff -Nru python-bumps-0.7.10/debian/python3-bumps.links python-bumps-0.7.11/debian/python3-bumps.links --- python-bumps-0.7.10/debian/python3-bumps.links 1970-01-01 00:00:00.000000000 +0000 +++ python-bumps-0.7.11/debian/python3-bumps.links 2018-12-12 04:25:26.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/bumps/random123_compiled.so /usr/lib/python3/dist-packages/bumps/dream/_compiled.so diff -Nru python-bumps-0.7.10/debian/python-bumps.links python-bumps-0.7.11/debian/python-bumps.links --- python-bumps-0.7.10/debian/python-bumps.links 1970-01-01 00:00:00.000000000 +0000 +++ python-bumps-0.7.11/debian/python-bumps.links 2018-12-12 04:25:26.000000000 +0000 @@ -0,0 +1 @@ +/usr/lib/bumps/random123_compiled.so /usr/lib/python2.7/dist-packages/bumps/dream/_compiled.so diff -Nru python-bumps-0.7.10/debian/relocate python-bumps-0.7.11/debian/relocate --- python-bumps-0.7.10/debian/relocate 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/relocate 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh - -PACKAGE=$1 -SRC=$2 -DEST=$3 - -mkdir -p debian/$PACKAGE/$DEST -mv debian/$PACKAGE/$SRC debian/$PACKAGE/$DEST -ln -sf /$DEST debian/$PACKAGE/$SRC diff -Nru python-bumps-0.7.10/debian/rules python-bumps-0.7.11/debian/rules --- python-bumps-0.7.10/debian/rules 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/rules 2018-12-26 07:35:44.000000000 +0000 @@ -3,38 +3,64 @@ # output every command that modifies files on the build system. #export DH_VERBOSE = 1 +export DEB_BUILD_MAINT_OPTIONS = hardening=+all,-pie + export PYBUILD_NAME=bumps +export libdir=/usr/lib/bumps/ + %: dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild override_dh_auto_clean: dh_auto_clean rm -rf .mplconfig doc/_build doc/api doc/dream doc/tutorial api dream .cache + rm -f bumps/dream/_compiled.so override_dh_install: dh_install mv debian/python-bumps/usr/bin/bumps debian/python-bumps/usr/bin/bumps2 - ./debian/relocate python-bumps usr/lib/python2.7/dist-packages/bumps/gui/resources usr/share/python-bumps/python - for py in `py3versions -i`; do \ - ./debian/relocate python3-bumps usr/lib/$$py/dist-packages/bumps/gui/resources usr/share/python-bumps/python3; \ - done find debian/python3-bumps/usr -name __pycache__ -exec rm -rf {} + -override_dh_auto_build: +override_dh_auto_build-common: dh_auto_build - PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -bhtml doc/ build/html # HTML generator + +override_dh_auto_build-indep: override_dh_auto_build-common + PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -bhtml doc/ build/html # HTML generator ln -sf /usr/share/javascript/mathjax/ build/html/_static/mathjax - PYTHONPATH=. http_proxy='127.0.0.1:9' sphinx-build -N -btexinfo doc/ build/texinfo # texinfo generator + PYTHONPATH=. http_proxy='127.0.0.1:9' python3 -m sphinx -N -btexinfo doc/ build/texinfo # texinfo generator + +override_dh_auto_build-arch: override_dh_auto_build-common + (cd bumps/dream && $(CC) compiled.c \ + $(shell dpkg-buildflags --get CPPFLAGS) \ + $(shell dpkg-buildflags --get CFLAGS) \ + $(shell dpkg-buildflags --get LDFLAGS) \ + -fopenmp -shared -lm -o _compiled.so -fPIC) + for pybuilddir in .pybuild/cpython*_*_bumps/build/bumps/dream; do \ + cp bumps/dream/_compiled.so $$pybuilddir; \ + done + +# bumps/dream:_compiled.so is hardwired into compiled.py, so don't rename +override_dh_python2: + dh_python2 --no-ext-rename + +override_dh_python3: + dh_python3 --no-ext-rename + +override_dh_auto_install-arch: + dh_auto_install + rm debian/python*-bumps/usr/lib/python*/*packages/bumps/dream/*.so + cp bumps/dream/_compiled.so \ + debian/bumps-private-libs/usr/lib/bumps/random123_compiled.so -override_dh_installinfo: +override_dh_installinfo-indep: cd build/texinfo; \ for p in *.png; do mv $$p bumps-$$p; done; \ sed "s/@image{/@image{bumps-/" -i bumps.texi; \ makeinfo bumps.texi dh_installinfo -override_dh_installman: +override_dh_installman-indep: cp debian/bumps.1 debian/bumps2.1 dh_installman rm debian/bumps2.1 @@ -42,7 +68,7 @@ override_dh_auto_test: ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) LC_ALL=C.UTF-8 \ - PYBUILD_TEST_ARGS_python2="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE bumps" \ - PYBUILD_TEST_ARGS_python3="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -egui bumps" \ + PYBUILD_TEST_ARGS_python2="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -edream bumps" \ + PYBUILD_TEST_ARGS_python3="-v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -edream bumps" \ dh_auto_test endif diff -Nru python-bumps-0.7.10/debian/tests/python3-bumps python-bumps-0.7.11/debian/tests/python3-bumps --- python-bumps-0.7.10/debian/tests/python3-bumps 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/tests/python3-bumps 2018-12-09 10:18:52.000000000 +0000 @@ -2,10 +2,10 @@ set -e -u export PYTHONWARNINGS=d -cp test.py "$ADTTMP" +cp test.py "$AUTOPKGTEST_TMP" -cd "$ADTTMP" +cd "$AUTOPKGTEST_TMP" for py in $(py3versions -i); do - $py -m nose -v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -egui bumps + $py -m nose -v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -egui -edream bumps done diff -Nru python-bumps-0.7.10/debian/tests/python-bumps python-bumps-0.7.11/debian/tests/python-bumps --- python-bumps-0.7.10/debian/tests/python-bumps 2018-06-17 18:03:18.000000000 +0000 +++ python-bumps-0.7.11/debian/tests/python-bumps 2018-12-26 07:35:44.000000000 +0000 @@ -2,10 +2,10 @@ set -e -u export PYTHONWARNINGS=d -cp test.py "$ADTTMP" +cp test.py "$AUTOPKGTEST_TMP" -cd "$ADTTMP" +cd "$AUTOPKGTEST_TMP" for py in $(pyversions -i); do - $py -m nose -v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE bumps + $py -m nose -v --all-modules --with-doctest --doctest-options=+ELLIPSIS,+NORMALIZE_WHITESPACE -egui -edream bumps done diff -Nru python-bumps-0.7.10/README.rst python-bumps-0.7.11/README.rst --- python-bumps-0.7.10/README.rst 2018-06-15 16:54:46.000000000 +0000 +++ python-bumps-0.7.11/README.rst 2018-10-04 15:23:11.000000000 +0000 @@ -34,6 +34,11 @@ Release notes ============= +v0.7.11 2018-09-24 +------------------ + +* Added support for paramameter serialization + v0.7.10 2018-06-15 ------------------