Accepting request 1058764 from devel:languages:python:numeric

OBS-URL: https://build.opensuse.org/request/show/1058764
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-lmfit?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2023-01-17 16:35:08 +00:00 committed by Git OBS Bridge
commit d132d8ae53
4 changed files with 63 additions and 63 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d067c3ea501f035af5d3c079e6e6e35dc3cc1ac7d439429a425b0aeb5a7858a2
size 292475

3
lmfit-1.1.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a2755b708ad7bad010178da28f082f55cbee7a084a625b452632e2d77b5391fb
size 308634

View File

@ -1,3 +1,46 @@
-------------------------------------------------------------------
Fri Jan 13 15:42:09 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to v1.1.0
## New features:
* add Pearson4Model (@lellid; PR #800)
* add SplineModel (PR #804)
* add R^2 rsquared statistic to fit outputs and reports for Model
fits (Issue #803; PR #810)
* add calculation of dely for model components of composite
models (Issue #761; PR #826)
## Bug fixes/enhancements:
* make sure variable spercent is always defined in
params_html_table functions (reported by @MySlientWind; Issue
#768, PR #770)
* always initialize the variables success and covar the
MinimizerResult (reported by Marc W. Pound; PR #771)
* build package following PEP517/PEP518; use pyproject.toml and
setup.cfg; leave setup.py for now (PR #777)
* components used to create a CompositeModel can now have
different independent variables (@Julian-Hochhaus; Discussion
#787; PR #788)
* fixed function definition for StepModel(form='linear'), was not
consistent with the other ones (@matpompili; PR #794)
* fixed height factor for Gaussian2dModel, was not correct
(@matpompili; PR #795)
* for covariances with negative diagonal elements, we set the
covariance to None (PR #813)
* fixed linear mode for RectangleModel (@arunpersaud; Issue #815;
PR #816)
* report correct initial values for parameters with bounds (Issue
#820; PR #821)
* allow recalculation of confidence intervals (@jagerber48; PR
#798)
* include 'residual' in JSON output of ModelResult.dumps
(@mac01021; PR #830)
* supports and is tested against Python 3.11; updated minimum
required version of SciPy, NumPy, and asteval (PR #832)
## Deprecations:
* remove support for Python 3.6 which reached EOL on 2021-12-23
(PR #790)
- Clean check section from extra example
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 28 19:11:00 UTC 2021 - Ben Greiner <code@bnavigator.de> Tue Dec 28 19:11:00 UTC 2021 - Ben Greiner <code@bnavigator.de>

View File

@ -1,7 +1,7 @@
# #
# spec file for package python-lmfit # spec file for package python-lmfit
# #
# Copyright (c) 2021 SUSE LLC # Copyright (c) 2023 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,35 +16,35 @@
# #
%{?!python_module:%define python_module() python3-%{**}}
%define skip_python2 1
%define skip_python36 1
Name: python-lmfit Name: python-lmfit
Version: 1.0.3 Version: 1.1.0
Release: 0 Release: 0
Summary: Least-Squares Minimization with Bounds and Constraints Summary: Least-Squares Minimization with Bounds and Constraints
License: BSD-3-Clause AND MIT 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 base >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm} BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-asteval >= 0.9.22 Requires: python-asteval >= 0.9.28
Requires: python-numpy >= 1.18 Requires: python-numpy >= 1.19
Requires: python-scipy >= 1.3 Requires: python-scipy >= 1.6
Requires: python-uncertainties >= 3.1.4
Recommends: python-dill Recommends: python-dill
Recommends: python-emcee Recommends: python-emcee
Recommends: python-matplotlib Recommends: python-matplotlib
Recommends: python-pandas Recommends: python-pandas
Recommends: python-uncertainties >= 3.0.1
BuildArch: noarch BuildArch: noarch
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module asteval >= 0.9.22} BuildRequires: %{python_module asteval >= 0.9.28}
BuildRequires: %{python_module numpy >= 1.18} BuildRequires: %{python_module numpy >= 1.19}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module scipy >= 1.4} BuildRequires: %{python_module scipy >= 1.6}
BuildRequires: %{python_module uncertainties >= 3.0.1} BuildRequires: %{python_module uncertainties >= 3.1.4}
# /SECTION # /SECTION
%python_subpackages %python_subpackages
@ -74,57 +74,14 @@ sed -i -e '/^#!\//, 1d' lmfit/jsonutils.py
sed -i '/addopts/d' setup.cfg sed -i '/addopts/d' setup.cfg
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%{python_exec -c "import sys, lmfit, numpy, scipy, asteval, uncertainties; # We don't care about speed on obs
print('Python: {}\n\n'
'lmfit: {}, scipy: {}, numpy: {}, asteval: {}, uncertainties: {}'.format(
sys.version,
lmfit.__version__,
scipy.__version__,
numpy.__version__,
asteval.__version__,
uncertainties.__version__
))"}
cat << 'EOF' >> testexample.py
import numpy as np
import lmfit
from lmfit.lineshapes import gaussian
from lmfit.models import PseudoVoigtModel
x = np.linspace(0, 10, 201)
np.random.seed(0)
y = gaussian(x, 10.0, 6.15, 0.8)
y += gaussian(x, 8.0, 6.35, 1.1)
y += gaussian(x, 0.25, 6.00, 7.5)
y += np.random.normal(size=len(x), scale=0.5)
# with NaN values in the input data
y[55] = y[91] = np.nan
mod = PseudoVoigtModel()
params = mod.make_params(amplitude=20, center=5.5,
sigma=1, fraction=0.25)
params['fraction'].vary = False
# with propagate, should get no error, but bad results
result = mod.fit(y, params, x=x, nan_policy='propagate')
lmfit.report_fit(result)
print(result.__dict__)
EOF
cat testexample.py
%python_exec testexample.py
# We don't care about speed
donttest="speed" donttest="speed"
# these tests fail on non x86_64. Upstream does not care: https://github.com/lmfit/lmfit-py/issues/692 # these tests fail on non x86_64. Upstream does not care: https://github.com/lmfit/lmfit-py/issues/692
donttest+=" or test_model_nan_policy" donttest+=" or test_model_nan_policy"
@ -136,7 +93,7 @@ fi
%pytest -k "not ($donttest)" %pytest -k "not ($donttest)"
%files %{python_files} %files %{python_files}
%doc README.rst THANKS.txt %doc README.rst AUTHORS.txt
%license LICENSE %license LICENSE
%{python_sitelib}/lmfit %{python_sitelib}/lmfit
%{python_sitelib}/lmfit-%{version}*-info %{python_sitelib}/lmfit-%{version}*-info