%global srcname fbc_curation Name: python-fbc-curation Version: 0.3.2 Release: 1%{?dist} Summary: FROG reports for curating SBML flux balance constraints models License: MIT URL: https://github.com/matthiaskoenig/fbc_curation Source: %{pypi_source %{srcname}} BuildArch: noarch BuildRequires: python3-devel BuildRequires: pyproject-rpm-macros # %%check BuildRequires: python3-pytest %global _description %{expand: fbc_curation creates and compares FROG reports (FBC ROG: flux balance, reaction deletion, objective function and gene deletion results) for SBML models that use the Flux Balance Constraints package. The report is a set of files in a COMBINE archive that another tool can reproduce and compare, which is how a model's expected behaviour is recorded for curation. The reference implementation runs on COBRApy. It installs two commands, `runfrog` to create a report for a model or archive and `runfrog_examples` to rebuild the bundled examples.} %description %_description %package -n python3-fbc-curation Summary: %{summary} %description -n python3-fbc-curation %_description %prep %autosetup -p1 -n %{srcname}-%{version} # fbc_curation 0.3.2 calls pymetadata.log.get_logger(), which pymetadata removed # in 0.6.0 (0.5.12 has it; 0.6.0 to 0.8.2 do not), while its own requirement # is the open-ended "pymetadata>=0.5.4". Against any pymetadata Fedora can carry # nothing in the package imports. Use the standard library's logger, which is # what pymetadata's own log.py now recommends for libraries. for f in $(grep -rl 'log\.get_logger(__name__)' src); do grep -q '^from pymetadata import log$' $f || { echo "$f: expected import not found" >&2; exit 1; } sed -i -e 's/^from pymetadata import log$/import logging/' \ -e 's/log\.get_logger(__name__)/logging.getLogger(__name__)/' $f done ! grep -rq 'get_logger' src %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l %{srcname} %check # Upstream's suite: the FROG creation, the report, the worker, the CLI and the # bundled examples. One case skips itself (cameo, an optional second curator). %pytest -q tests %files -n python3-fbc-curation -f %{pyproject_files} %doc README.md %{_bindir}/runfrog %{_bindir}/runfrog_examples %changelog * Fri Oct 23 2026 Morgan Hough - 0.3.2-1 - Initial package: fbc_curation 0.3.2 (MIT, LICENSE). Net-new to Fedora; pure Python on COBRApy, pymetadata, optlang, sympy, pandas, pydantic and orjson, all of which are in Fedora or this repo at versions above its floors. - Upstream defect handled in %%prep: the package imports pymetadata.log.get_logger, removed in pymetadata 0.6.0, so it cannot even be imported against the 0.8 series. Its pyproject leaves pymetadata open-ended (>=0.5.4). The five modules now use logging.getLogger(__name__); the only visible difference is that the old helper attached a rich handler, so runfrog logs only what the application configures. Worth an upstream issue. - Upstream suite on f44 (loopback up) with pymetadata 0.8.2 and COBRApy 0.32.1: 12 passed, 1 skipped, 0 failed.