## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pypi_name sklearn-genetic-opt %bcond tests 1 Name: python-%{pypi_name} Version: 0.11.1 Release: %autorelease Summary: Hyperparameters tuning and feature selection %global forgeurl https://github.com/rodrigo-arenas/Sklearn-genetic-opt %global tag %{version} %forgemeta # SPDX License: MIT URL: https://github.com/rodrigo-arenas/Sklearn-genetic-opt Source0: %{forgesource} BuildArch: noarch BuildRequires: make BuildRequires: python3-devel BuildRequires: %{py3_dist pandas} BuildRequires: %{py3_dist matplotlib} %if %{with tests} BuildRequires: python3dist(pytest) %endif %global _description %{expand: scikit-learn models hyperparameters tuning and feature selection, using evolutionary algorithms. This is meant to be an alternative to popular methods inside scikit-learn such as Grid Search and Randomized Grid Search for hyperparameters tuning, and from RFE (Recursive Feature Elimination), Select From Model for feature selection. Sklearn-genetic-opt uses evolutionary algorithms from the DEAP (Distributed Evolutionary Algorithms in Python) package to choose the set of hyperparameters that optimizes (max or min) the cross-validation scores, it can be used for both regression and classification problems. Documentation: https://sklearn-genetic-opt.readthedocs.io/} %description %_description %package -n python3-%{pypi_name} Summary: %{summary} Obsoletes: python-%{pypi_name}-doc < 0.11.1 %description -n python3-%{pypi_name} %_description # `mlflow`, `tensorflow` and, by extension, `all` extras cannot be # provided due to required dependencies not being available in Fedora. %pyproject_extras_subpkg -n python3-%{pypi_name} seaborn %prep %forgeautosetup -p1 # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters sed -r -i 's/ --cov[^[:blank:]]+//g' pytest.ini %generate_buildrequires %pyproject_buildrequires -x seaborn %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l sklearn_genetic %check %if %{with tests} # test_tensorboard_callback fails due to missing tensorflow dep # https://github.com/rodrigo-arenas/Sklearn-genetic-opt/issues/134 k="${k-}${k+ and }not test_tensorboard_callback" # Two failing tests in Python3.12. Disable for now. # TODO: Investigate and report failing tests upstream. k="${k-}${k+ and }not test_wrong_scheduler_methods" k="${k-}${k+ and }not test_wrong_dimension" # Exclude `test_mlflow` (`mlflow` is not packaged in Fedora) %pytest -v --ignore sklearn_genetic/tests/test_mlflow.py ${k+-k }"${k-}" %else %pyproject_check_import %endif %files -n python3-sklearn-genetic-opt -f %{pyproject_files} %doc README.rst %changelog ## START: Generated by rpmautospec * Sat Sep 28 2024 Sandro - 0.11.1-9 - Verify License: field is SPDX compliant * Tue Sep 17 2024 Sandro - 0.11.1-8 - Drop doc sub package * Tue Sep 17 2024 Sandro - 0.11.1-7 - Fix test exclusion syntax - Run import check when building without tests * Tue Sep 17 2024 Sandro - 0.11.1-6 - Provide seaborn extra * Tue Sep 17 2024 Sandro - 0.11.1-5 - Add BRs to base package * Tue Sep 17 2024 Sandro - 0.11.1-4 - Drop ExcludeArch * Tue Sep 17 2024 Sandro - 0.11.1-3 - Update description and reformat * Tue Sep 17 2024 Sandro - 0.11.1-2 - Group forge macros and use them throughout * Tue Sep 17 2024 Benjamin A. Beasley - 0.11.1-1 - Update to 0.11.1 (close RHBZ#2312041) * Tue Sep 17 2024 Benjamin A. Beasley - 0.10.1-11 - Assert that .dist-info contains a license file * Fri Jul 19 2024 Fedora Release Engineering - 0.10.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sun Jun 09 2024 Python Maint - 0.10.1-8 - Rebuilt for Python 3.13 * Fri Jan 26 2024 Fedora Release Engineering - 0.10.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.10.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Sep 26 2023 Sandro - 0.10.1-5 - Disable failing tests for now * Fri Jul 21 2023 Fedora Release Engineering - 0.10.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Jul 16 2023 Python Maint - 0.10.1-3 - Rebuilt for Python 3.12 * Sun Jul 16 2023 Orion Poplawski - 0.10.1-2 - Add comment about tensorflow dep * Sun Jun 25 2023 Orion Poplawski - 0.10.1-1 - Update to 0.10.1 * Sun Feb 26 2023 Benjamin A. Beasley - 0.9.0-5 - Leaf package: drop i686 support * Fri Jan 20 2023 Fedora Release Engineering - 0.9.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jul 04 2022 Python Maint - 0.9.0-2 - Rebuilt for Python 3.11 * Tue Jun 14 2022 Iztok Fister Jr - 0.9.0-1 - Initial import (fedora#2095975). ## END: Generated by rpmautospec