%global pypi_name robustica Name: python-%{pypi_name} Version: 0.1.4 Release: 1%{?dist} Summary: Robust Independent Component Analysis by clustering repeated FastICA runs # README and LICENSE say BSD 3-Clause. The LICENSE text is a copy of # scikit-learn's, with its copyright line; the source files carry only a # "Centre de Regulacio Genomica - All Rights Reserved" header. Flagged upstream # in docs/upstream/robustica-licence.md. License: BSD-3-Clause URL: https://github.com/CRG-CNAG/robustica Source0: %{pypi_source %{pypi_name}} BuildArch: noarch BuildRequires: python3-devel %global _description %{expand: RobustICA runs FastICA many times, clusters the resulting components and returns the cluster centroids with a quality index for each, so that the components are reproducible rather than an accident of one random start. tedana uses it as an alternative to a single FastICA run.} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} %description -n python3-%{pypi_name} %_description %prep %autosetup -n %{pypi_name}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l robustica %check # Four known independent sources (square wave, Laplace noise, a cubed sine, # uniform noise) mixed into 30 channels with a little noise: RobustICA must # return all four, each correlated > 0.99 with its source. cd %{_tmppath} %{py3_test_envvars} %{python3} - <<'PY' import numpy as np from robustica import RobustICA, __version__ assert __version__ == "%{version}" rng = np.random.default_rng(0) n = 2000 S = np.stack([np.sign(np.sin(np.linspace(0, 60, n))), rng.laplace(size=n), np.sin(np.linspace(0, 31, n))**3, rng.uniform(-1, 1, n)]) X = S.T @ rng.standard_normal((30, 4)).T + 0.05*rng.standard_normal((n, 30)) est, mixing = RobustICA(n_components=4, robust_runs=10, random_state=0, n_jobs=1).fit_transform(X) assert est.shape == (n, 4) and mixing.shape == (30, 4) C = np.abs(np.corrcoef(est.T, S)[:4, 4:]) print(C.round(3)) assert (C.max(axis=1) > 0.99).all() assert sorted(C.argmax(axis=1)) == [0, 1, 2, 3] PY %files -n python3-%{pypi_name} -f %{pyproject_files} %license LICENSE %doc README.md %changelog * Fri Oct 16 2026 Morgan Hough - 0.1.4-1 - New package: required by tedana 26