Accepting request 942992 from home:bnavigator:branches:devel:languages:python:numeric
- Update to v1.0.3 **Potentially breaking change:** * argument ``x`` is now required for the ``guess`` method of Models (Issue #747; PR #748) To get reasonable estimates for starting values one should always supply both ``x`` and ``y`` values; in some cases it would work when only providing ``data`` (i.e., y-values). With the change above, ``x`` is now required in the ``guess`` method call, so scripts might need to be updated to explicitly supply ``x``. **Bug fixes/enhancements:** * do not overwrite user-specified figure titles in Model.plot() functions and allow setting with ``title`` keyword argument (PR #711) * preserve Parameters subclass in deepcopy (@jenshnielsen; PR #719) * coerce ``data`` and ``indepdent_vars`` to NumPy array with ``dtype=float64`` or ``dtype=complex128`` where applicable (Issues #723 and #728) * fix collision between parameter names in built-in models and user-specified parameters (Issue #710 and PR #732) * correct error message in PolynomialModel (@kremeyer; PR #737) * improved handling of altered JSON data (Issue #739; PR #740, reported by Matthew Giammar) * map ``max_nfev`` to ``maxiter`` when using ``differential_evolution`` (PR #749, reported by Olivier B.) * correct use of noise versus experimental uncertainty in the documentation (PR #751, reported by Andrés Zelcer) * specify return type of ``eval`` method more precisely and allow for plotting of (Complex)ConstantModel by coercing their OBS-URL: https://build.opensuse.org/request/show/942992 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-lmfit?expand=0&rev=6
This commit is contained in:
parent
635dd2b355
commit
3ead3c1698
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:67090ce56685cf7f92bd7358a1e7d4ad862b3758988109ec440e9825e5184b45
|
|
||||||
size 306039
|
|
3
lmfit-1.0.3.tar.gz
Normal file
3
lmfit-1.0.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d067c3ea501f035af5d3c079e6e6e35dc3cc1ac7d439429a425b0aeb5a7858a2
|
||||||
|
size 292475
|
@ -1,3 +1,69 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 28 19:11:00 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to v1.0.3
|
||||||
|
**Potentially breaking change:**
|
||||||
|
* argument ``x`` is now required for the ``guess`` method of
|
||||||
|
Models (Issue #747; PR #748)
|
||||||
|
|
||||||
|
To get reasonable estimates for starting values one should
|
||||||
|
always supply both ``x`` and ``y`` values; in some cases it
|
||||||
|
would work when only providing ``data`` (i.e., y-values). With
|
||||||
|
the change above, ``x`` is now required in the ``guess`` method
|
||||||
|
call, so scripts might need to be updated to explicitly supply
|
||||||
|
``x``.
|
||||||
|
**Bug fixes/enhancements:**
|
||||||
|
* do not overwrite user-specified figure titles in Model.plot()
|
||||||
|
functions and allow setting with ``title`` keyword argument (PR
|
||||||
|
#711)
|
||||||
|
* preserve Parameters subclass in deepcopy (@jenshnielsen; PR
|
||||||
|
#719)
|
||||||
|
* coerce ``data`` and ``indepdent_vars`` to NumPy array with
|
||||||
|
``dtype=float64`` or ``dtype=complex128`` where applicable
|
||||||
|
(Issues #723 and #728)
|
||||||
|
* fix collision between parameter names in built-in models and
|
||||||
|
user-specified parameters (Issue #710 and PR #732)
|
||||||
|
* correct error message in PolynomialModel (@kremeyer; PR #737)
|
||||||
|
* improved handling of altered JSON data (Issue #739; PR #740,
|
||||||
|
reported by Matthew Giammar)
|
||||||
|
* map ``max_nfev`` to ``maxiter`` when using
|
||||||
|
``differential_evolution`` (PR #749, reported by Olivier B.)
|
||||||
|
* correct use of noise versus experimental uncertainty in the
|
||||||
|
documentation (PR #751, reported by Andrés Zelcer)
|
||||||
|
* specify return type of ``eval`` method more precisely and allow
|
||||||
|
for plotting of (Complex)ConstantModel by coercing their
|
||||||
|
``float``, ``int``, or ``complex`` return value to a
|
||||||
|
``numpy.ndarray`` (Issue #684 and PR #754)
|
||||||
|
* fix ``dho`` (Damped Harmonic Oscillator) lineshape (PR #755;
|
||||||
|
@rayosborn)
|
||||||
|
* reset ``Minimizer._abort`` to ``False`` before starting a new
|
||||||
|
fit (Issue #756 and PR #757; @azelcer)
|
||||||
|
* fix typo in ``guess_from_peak2d`` (@ivan-usovl; PR #758)
|
||||||
|
**Various:**
|
||||||
|
* update asteval dependency to >= 0.9.22 to avoid
|
||||||
|
DeprecationWarnings from NumPy v1.20.0 (PR #707)
|
||||||
|
* remove incorrectly spelled ``DonaichModel`` and ``donaich``
|
||||||
|
lineshape, deprecated in version 1.0.1 (PR #707)
|
||||||
|
* remove occurrences of OrderedDict throughout the code; dict is
|
||||||
|
order-preserving since Python 3.6 (PR #713)
|
||||||
|
* update the contributing instructions (PR #718; @martin-majlis)
|
||||||
|
* (again) defer import of matplotlib to when it is needed
|
||||||
|
(@zobristnicholas; PR #721)
|
||||||
|
* fix description of ``name`` argument in ``Parameters.add``
|
||||||
|
(@kristianmeyerr; PR #725)
|
||||||
|
* update dependencies, make sure a functional development
|
||||||
|
environment is installed on Windows (Issue #712)
|
||||||
|
* use ``setuptools_scm`` for version info instead of
|
||||||
|
``versioneer`` (PR #729)
|
||||||
|
* transition to using ``f-strings`` (PR #730)
|
||||||
|
* mark ``test_manypeaks_speed.py`` as flaky to avoid intermittent
|
||||||
|
test failures (repeat up to 5 times; PR #745)
|
||||||
|
* update scipy dependency to >= 1.14.0 (PR #751)
|
||||||
|
* improvement to output of examples in sphinx-gallery and use
|
||||||
|
higher resolution figures (PR #753)
|
||||||
|
* remove deprecated functions ``lmfit.printfuncs.report_errors``
|
||||||
|
and ``asteval`` argument in ``Parameters`` class (PR #759)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 17 11:46:57 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
Wed Feb 17 11:46:57 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -16,20 +16,21 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
Name: python-lmfit
|
Name: python-lmfit
|
||||||
Version: 1.0.2
|
Version: 1.0.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Least-Squares Minimization with Bounds and Constraints
|
Summary: Least-Squares Minimization with Bounds and Constraints
|
||||||
License: MIT AND BSD-3-Clause
|
License: BSD-3-Clause AND MIT
|
||||||
URL: https://lmfit.github.io/lmfit-py/
|
URL: https://lmfit.github.io/lmfit-py/
|
||||||
Source: https://files.pythonhosted.org/packages/source/l/lmfit/lmfit-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/l/lmfit/lmfit-%{version}.tar.gz
|
||||||
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-asteval >= 0.9.21
|
Requires: python-asteval >= 0.9.22
|
||||||
Requires: python-numpy >= 1.18
|
Requires: python-numpy >= 1.18
|
||||||
Requires: python-scipy >= 1.3
|
Requires: python-scipy >= 1.3
|
||||||
Recommends: python-dill
|
Recommends: python-dill
|
||||||
@ -39,10 +40,10 @@ Recommends: python-pandas
|
|||||||
Recommends: python-uncertainties >= 3.0.1
|
Recommends: python-uncertainties >= 3.0.1
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module asteval >= 0.9.21}
|
BuildRequires: %{python_module asteval >= 0.9.22}
|
||||||
BuildRequires: %{python_module numpy >= 1.18}
|
BuildRequires: %{python_module numpy >= 1.18}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module scipy >= 1.3}
|
BuildRequires: %{python_module scipy >= 1.4}
|
||||||
BuildRequires: %{python_module uncertainties >= 3.0.1}
|
BuildRequires: %{python_module uncertainties >= 3.0.1}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@ -69,6 +70,8 @@ questionable.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n lmfit-%{version}
|
%setup -q -n lmfit-%{version}
|
||||||
sed -i -e '/^#!\//, 1d' lmfit/jsonutils.py
|
sed -i -e '/^#!\//, 1d' lmfit/jsonutils.py
|
||||||
|
# only coverage related pytest flags here. remove
|
||||||
|
sed -i '/addopts/d' setup.cfg
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
@ -78,16 +81,16 @@ sed -i -e '/^#!\//, 1d' lmfit/jsonutils.py
|
|||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{python_exec -c "import sys, lmfit, numpy, scipy, asteval, uncertainties, six;
|
%{python_exec -c "import sys, lmfit, numpy, scipy, asteval, uncertainties;
|
||||||
print('Python: {}\n\n'
|
print('Python: {}\n\n'
|
||||||
'lmfit: {}, scipy: {}, numpy: {}, asteval: {}, uncertainties: {}, six: {}'.format(
|
'lmfit: {}, scipy: {}, numpy: {}, asteval: {}, uncertainties: {}'.format(
|
||||||
sys.version,
|
sys.version,
|
||||||
lmfit.__version__,
|
lmfit.__version__,
|
||||||
scipy.__version__,
|
scipy.__version__,
|
||||||
numpy.__version__,
|
numpy.__version__,
|
||||||
asteval.__version__,
|
asteval.__version__,
|
||||||
uncertainties.__version__,
|
uncertainties.__version__
|
||||||
six.__version__))"}
|
))"}
|
||||||
|
|
||||||
cat << 'EOF' >> testexample.py
|
cat << 'EOF' >> testexample.py
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -121,10 +124,16 @@ cat testexample.py
|
|||||||
|
|
||||||
%python_exec testexample.py
|
%python_exec testexample.py
|
||||||
|
|
||||||
# We don't care about speed, and test_itercb is architecture-specific
|
# We don't care about speed
|
||||||
# test_model_nan_policy - fails on non x86_64
|
donttest="speed"
|
||||||
# test_shgo_scipy_vs_lmfit_2 - fails on non x86_64
|
# these tests fail on non x86_64. Upstream does not care: https://github.com/lmfit/lmfit-py/issues/692
|
||||||
%pytest -k 'not speed and not (test_model_nan_policy or test_shgo_scipy_vs_lmfit_2)'
|
donttest+=" or test_model_nan_policy"
|
||||||
|
donttest+=" or test_shgo_scipy_vs_lmfit_2"
|
||||||
|
# fails on 32-bit
|
||||||
|
if [ $(getconf LONG_BIT) -ne 64 ]; then
|
||||||
|
donttest+=" or (test_itercb_minimizer_class and leastsq and False)"
|
||||||
|
fi
|
||||||
|
%pytest -k "not ($donttest)"
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.rst THANKS.txt
|
%doc README.rst THANKS.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user