%global srcname pypesto %global ghname pyPESTO Name: python-%{srcname} Version: 0.7.0 Release: 1%{?dist} Summary: Python-based parameter estimation toolbox License: BSD-3-Clause URL: https://github.com/ICB-DCM/pyPESTO # Not the sdist: PyPI's omits test/. Source: %{url}/archive/v%{version}/%{ghname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check. The suite imports autograd in its helpers; emcee, cma and NLopt are # the optional optimisers and samplers that have tests which can run here. BuildRequires: python3-pytest BuildRequires: python3-sympy BuildRequires: python3-pytest-rerunfailures BuildRequires: python3-autograd BuildRequires: python3-emcee BuildRequires: python3-cma BuildRequires: python3-NLopt %global _description %{expand: pyPESTO is a toolbox for parameter estimation: define an objective, a prior and bounds as a problem; optimise it from many start points with SciPy, Ipopt, dlib, NLopt, CMA-ES or particle swarms; profile the result for identifiability and confidence intervals; and sample the posterior with adaptive Metropolis, parallel tempering, emcee or nested sampling. Objectives can be hand-written Python functions, PEtab problems, or ODE models simulated by AMICI. Fedora's package covers the core toolbox. The PEtab import needs python3-petab, which is pulled in as a weak dependency. AMICI, JAX, fides, PyMC, dynesty and petab-select are not packaged, so objectives built on them are not available.} %description %_description %package -n python3-%{srcname} Summary: %{summary} Recommends: python3-petab Recommends: python3-emcee Recommends: python3-cma Recommends: python3-NLopt Recommends: python3-dlib %description -n python3-%{srcname} %_description %prep %autosetup -p1 -n %{ghname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Upstream's suite is mostly written against optional dependencies Fedora does # not carry (AMICI, JAX, fides, PyMC, dynesty, petab-select, benchmark models), # and 19 of its 37 test files do not even import without them. The run below is # the part that needs only what is packaged: priors, problems, objectives, # histories, workflows, profiles, the optimiser interface and the samplers. # Deselected inside those files: # test_jax - JAX # ResModeHistoryTest, test_hdf5_amici_history, test_laplace_approximation_log_evidence - AMICI # test_fides_optimizer_support - fides # Pymc and Dynesty/dynesty cases - PyMC, dynesty export MPLBACKEND=Agg %pytest -q -o addopts= --import-mode=importlib \ test/base/test_logging.py test/base/test_prior.py test/base/test_problem.py \ test/base/test_workflow.py test/base/test_x_fixed.py test/base/test_objective.py \ test/base/test_history.py test/profile \ test/optimize/test_optimizer_common_interface.py test/sample/test_sample.py \ --deselect test/base/test_objective.py::test_jax \ --deselect test/base/test_history.py::ResModeHistoryTest \ --deselect test/base/test_history.py::test_hdf5_amici_history \ --deselect test/optimize/test_optimizer_common_interface.py::TestOptimizerMaxiterInterface::test_fides_optimizer_support \ --deselect test/optimize/test_optimizer_common_interface.py::TestOptimizerMaxtimeInterface::test_fides_optimizer_support \ --deselect test/sample/test_sample.py::test_laplace_approximation_log_evidence \ -k 'not Pymc and not Dynesty and not dynesty' %files -n python3-%{srcname} -f %{pyproject_files} %doc README.md CHANGELOG.rst %changelog * Fri Oct 23 2026 Morgan Hough - 0.7.0-1 - Initial package: pyPESTO 0.7.0 (BSD-3-Clause, LICENSE). Net-new to Fedora; pure Python. All required dependencies are already in Fedora at versions above upstream's floors (numpy, scipy, pandas, cloudpickle, matplotlib, more-itertools, seaborn, h5py 3.15.1 clear of the !=3.15.0 exclusion, tqdm, tabulate), so no floor is relaxed. - Source is the GitHub tag, not the sdist, which has no tests. - Offline on f44 (loopback up): 237 pass, 39 deselected, 0 failed, with python3-autograd (new, 1.9.1), emcee, cma and NLopt present. The whole suite does not run: AMICI, JAX, fides, PyMC, dynesty, petab-select and benchmark_models_petab are not in Fedora and 19 test files need them. - BuildRequires python3-sympy: %%check failed to import it on every chroot.