commit 700975c861991c50b1aee68bf6a58a5423ea413be852bf7912d43c3eec2c4c94 Author: Dmitry Roshchin Date: Mon Sep 16 06:15:52 2024 +0000 Add python-PyCBC-tests-numpy-2.0-compat.patch for compatibility with numpy >= 2.0 in tests. OBS-URL: https://build.opensuse.org/package/show/science/python-PyCBC?expand=0&rev=40 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/PyCBC-2.4.0.tar.gz b/PyCBC-2.4.0.tar.gz new file mode 100644 index 0000000..06be077 --- /dev/null +++ b/PyCBC-2.4.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a616eb17bbdc5886faabcda4c18461d90af9183544214a650d727f12934d319 +size 11846954 diff --git a/PyCBC-2.5.1.tar.gz b/PyCBC-2.5.1.tar.gz new file mode 100644 index 0000000..3e0a9e2 --- /dev/null +++ b/PyCBC-2.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e370a1ff82f49d8c1f2550841f2a70fe8328b3d810d46f7c8c646006309a29a6 +size 11749616 diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-PyCBC-tests-numpy-2.0-compat.patch b/python-PyCBC-tests-numpy-2.0-compat.patch new file mode 100644 index 0000000..a9e333c --- /dev/null +++ b/python-PyCBC-tests-numpy-2.0-compat.patch @@ -0,0 +1,18 @@ +--- + pycbc/conversions.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: pycbc-2.5.1/pycbc/conversions.py +=================================================================== +--- pycbc-2.5.1.orig/pycbc/conversions.py ++++ pycbc-2.5.1/pycbc/conversions.py +@@ -77,7 +77,8 @@ def ensurearray(*args): + inputs was an array. + """ + input_is_array = any(isinstance(arg, numpy.ndarray) for arg in args) +- args = numpy.broadcast_arrays(*args) ++ # For numpy >= 2, broadcast_arrays returns tuple instead of list ++ args = list(numpy.broadcast_arrays(*args)) + args.append(input_is_array) + return args + diff --git a/python-PyCBC.changes b/python-PyCBC.changes new file mode 100644 index 0000000..f5f7ecf --- /dev/null +++ b/python-PyCBC.changes @@ -0,0 +1,271 @@ +------------------------------------------------------------------- +Sun Sep 15 14:03:59 UTC 2024 - Atri Bhattacharya + +- Add python-PyCBC-tests-numpy-2.0-compat.patch for compatibility + with numpy >= 2.0 in tests. + +------------------------------------------------------------------- +Sat Aug 17 05:29:48 UTC 2024 - Atri Bhattacharya + +- Update to version 2.5.1: + * enable checksum by default for h5py datasets + * use a personal branch of BBHx to allow python3.9 to run +- Changes from version 2.5.0: + * Add support for python 3.12, drop support for python 3.8 + * Standardization of logging and versioning information + +------------------------------------------------------------------- +Thu Oct 19 12:40:49 UTC 2023 - Atri Bhattacharya + +- Update to version 2.4.0: + * Prevent conda pointing to the LVK release branch. + +------------------------------------------------------------------- +Fri Oct 13 02:47:44 UTC 2023 - Atri Bhattacharya + +- Update to version 2.3.0: + * Various small improvements with respect to v2.2.2 + +------------------------------------------------------------------- +Tue Oct 10 22:56:31 UTC 2023 - Atri Bhattacharya + +- Update to version 2.2.2: + * Adds a variety of incremental improvements with respect to + v2.2.1, including the ability to use the SEOBNRv5 waveform. +- Update to version 2.2.1: + * Adds a variety of incremental improvements with respect to + v2.2.0. +- Disable test_waveform.py: requires pykerr which is not packaged + for openSUSE. + +------------------------------------------------------------------- +Tue May 23 12:22:42 UTC 2023 - Atri Bhattacharya + +- Update to version 2.2.0: + * Bugfix to remove calls to removed lalsuite functions. +- Disable a few more tests requiring access to network. + +------------------------------------------------------------------- +Wed Aug 24 23:43:08 UTC 2022 - Atri Bhattacharya + +- Update to version 2.0.5: + * Change how FFT is imported to avoid segfaults which occur on + 2.0.4 on some systems. + +------------------------------------------------------------------- +Fri Jul 1 11:22:33 UTC 2022 - Ben Greiner + +- Update to version 2.0.4 + * Add Multisignal models and fix issue where loading MKLblibs + before FFTW can in some cases cause a segfault. +- Release 2.0.3 + * Adds support for hierarchical inference models and astropy 5.1 + release. +- Update requirements +- Test in multibuild flavor in order to verify requirements. + +------------------------------------------------------------------- +Mon Mar 7 22:43:17 UTC 2022 - Atri Bhattacharya + +- Update to version 2.0.2: + * Add option for more accurate match calculation. + +------------------------------------------------------------------- +Sat Feb 5 11:50:20 UTC 2022 - Atri Bhattacharya + +- Add Obsoletes: python-PyCBC <= 1.18.0 to PyCBC-utils package to + avoid conflicts during updates. +- Disable builds for python <= 3.6 by requiring python-devel >= + 3.7 in keeping with setup.py. + +------------------------------------------------------------------- +Thu Jan 20 12:36:02 UTC 2022 - Atri Bhattacharya + +- Update to version 2.0.1: +- Split out utilities into new package called PyCBC-utils, which + requires the default py3 flavour. +- Build the python module itself for all supported python + flavours; disable python2 which is no longer supported by PyCBC + or its dependencies. +- Run tests using pytest; note that using the pytest_arch macro + leads to errors, so we largely replicate its behaviour except + for running pytest itself without any options passed to it. +- Re-check which tests work and rm those which do not to avoid + module import errors. +- New BuildRequires: python-pyFFTW. + +------------------------------------------------------------------- +Wed Nov 17 12:33:08 UTC 2021 - Dominique Leuenberger + +- Do not build for %ix86: lal is not available on this platform. + +------------------------------------------------------------------- +Fri Feb 26 21:12:02 UTC 2021 - Atri Bhattacharya + +- Update to version 1.18.0: + * update dependencies (require lalsuite, no longer require + emcee). + * build wheels and update build infrastructure. +- Drop usage of python singlespec macros and switch to supporting + just the default python3 environment. The large number of + binaries installed to _bindir and the lack of a reasonable way + to use python_clone for all the binaries forces this change. +- Promote lal* to Requires and drop BuildRequires/Recommends on + python-emcee in keeping with upstream changes. +- Drop additional source utils.py: not needed any more. +- Enable tests after deleting broken test cases. +- Add BuildRequires/Requires on lalpulsar, python-ligo-lw, + python-lscsoft-glue: new upstream dependencies. +- Switch source tarball to GitHub since PyPI tarball does not + carry the helper scripts and data files for test suite. + +------------------------------------------------------------------- +Mon Dec 21 02:56:08 UTC 2020 - Atri Bhattacharya + +- Update to version 1.17.0: + * gwtc-2 included in catalog package. + * New interface for search statistics. + * Allow for time variance in antenna pattern for relative + likelihood. +- Setup but don't run tests: some of them are broken (known + upstream). + +------------------------------------------------------------------- +Fri Oct 23 05:01:05 UTC 2020 - Atri Bhattacharya + +- Update to version 1.16.11: + * Extra vetoes around gates and other things which are useful + for IMBH searches. + +------------------------------------------------------------------- +Wed Oct 7 13:56:50 UTC 2020 - Atri Bhattacharya + +- Update to version 1.16.10: + * Updates to statistics using PSD variation. + * Allow triggers at certain times to be manually removed from + significance calculations on the command line. + +------------------------------------------------------------------- +Thu Aug 20 23:28:07 UTC 2020 - Atri Bhattacharya + +- Update to version 1.16.9: + * Allow the compression level of HDF5 files created by + `pycbc_coinc_mergetrigs` to be specified by a command-line + argument (default to 6, not 9), speeding up execution with + only marginal increase in the resulting file size + (gh#gwastro/pycbc#3428). + +------------------------------------------------------------------- +Sat Aug 15 13:16:35 UTC 2020 - Atri Bhattacharya + +- Update to version 1.16.8: + * Allow optimal_snr jobs to be parallelized. + * Speed up in trigger fitting. + +------------------------------------------------------------------- +Sun Aug 2 15:44:34 UTC 2020 - Atri Bhattacharya + +- Update to version 0.16.7: + * Work around an unhandled exception when a GPU is present on a + system but not allocated to the process + [gh#gwastro/pycbc#3403]. + * Fix typo in ACT printed to screen [gh#gwastro/pycbc#3402]. + * Fix nonfsio site so that it does not allow jobs on that site + to run on the grid [gh#gwastro/pycbc#3399]. + * Fix error caused by missing https:// prefix on + segments.ligo.org [gh#gwastro/pycbc#3398]. + +------------------------------------------------------------------- +Sat Aug 1 18:37:44 UTC 2020 - Atri Bhattacharya + +- Update to version 0.16.6: + * Fix a bug from v1.16.5 in how pycbc_coinc_hdfinjfind deals + with segment attributes in the statmap files. + * Allow use of reuse cache files stored on web pages behind + authentication. +- Changes from version 0.16.5: + - Improvements to efficiency of coincidence finding in the + offline search. + - Changes to allow for time-dependent arguments for channel + names. + - Settings to allow for different handling of file I/O in + overloaded filesystems. +- Update the list of Requires and Recommends to provide a more + complete experience. + +------------------------------------------------------------------- +Mon Jul 6 20:33:51 UTC 2020 - Atri Bhattacharya + +- Update to version 0.16.4: + * Adds plugin support for pycbc waveform. + * Adds additional parameter mappings. +- Changes from version 0.16.3: + * Fix a bug in version 0.16.2. +- Changes from version 0.16.2: + * Update some offline statistic naming. + * Add the ability to alter the search string in live. + * Correct some issues found in the creation of phase time + amplitude difference histograms + +------------------------------------------------------------------- +Wed May 27 20:51:44 UTC 2020 - Atri Bhattacharya + +- Update to version 0.16.1: + * Backward incompatible Changes to the offline search analysis, + notably in the naming of ranking statistics + +------------------------------------------------------------------- +Thu Apr 23 15:50:06 UTC 2020 - Atri Bhattacharya + +- Update to version 1.15.6: + * More functionality for the multi-detector workflow + * A patch to the PSD variation is added to avoid time around + autogated periods is not strongly upranked. + * Steady improvements to the inference toolkit. + +------------------------------------------------------------------- +Mon Feb 3 16:48:32 UTC 2020 - Atri Bhattacharya + +- Update min required version of numpy to 1.16.0 for + BuildRequires. + +------------------------------------------------------------------- +Mon Feb 3 16:41:10 UTC 2020 - Atri Bhattacharya + +- Update to version 1.15.4 + * Workflow code can now run on python3 + * Inference data reading interface is now standardized + * XML segment files can be provided as input in workflow + generation + * Some patches have been applied for PyCBC Live. +- Fix env based hashbangs for exec in bindir; remove the hashbangs + for non-bindir files. +- Drop python-PyCBC-work-with-latest-numpy.patch: no longer needed + as python-numpy >= 1.16.0 is now supported by default. +- Package binaries only for python3 version. + +------------------------------------------------------------------- +Mon Jul 22 11:01:38 UTC 2019 - Atri Bhattacharya + +- Update to version 1.14.1: + * Bug fixed: issues with the dqsegdb integration in the new + dq.py module. +- Changes from version 1.14.0: + * Beta support for python3 (not enabled on openSUSE builds) + * Development towards a multi-ifo offline search code + * Numerous improvements in other code modules +- Add python-PyCBC-work-with-latest-numpy.patch to avoid checking + for max supported numpy version for python2 to get it building + on openSUSE >= 1550 where the current python2-numpy version is + 1.16.x. +- Drop no longer needed sed commands. + +------------------------------------------------------------------- +Thu Feb 7 15:10:46 UTC 2019 - badshah400@gmail.com + +- Add python-numpy Requires. + +------------------------------------------------------------------- +Thu Jan 31 13:37:31 UTC 2019 - badshah400@gmail.com + +- Initial package. diff --git a/python-PyCBC.spec b/python-PyCBC.spec new file mode 100644 index 0000000..4671f07 --- /dev/null +++ b/python-PyCBC.spec @@ -0,0 +1,175 @@ +# +# spec file for package python-PyCBC +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +# Python2 no longer supported by PyCBC +%define skip_python2 1 + +%define modname PyCBC +Name: python-PyCBC%{psuffix} +Version: 2.5.1 +Release: 0 +Summary: Core library to analyze gravitational-wave data +License: GPL-3.0-or-later +URL: http://www.pycbc.org/ +Source0: https://github.com/gwastro/pycbc/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM python-PyCBC-tests-numpy-2.0-compat.patch badshah400@gmail.com -- Fix appending to numpy.broadcast_arrays output for numpy >= 2.0 +Patch1: python-PyCBC-tests-numpy-2.0-compat.patch +BuildRequires: %{python_module Cython >= 0.29} +BuildRequires: %{python_module devel >= 3.9} +BuildRequires: %{python_module numpy-devel >= 1.16.0} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: python-rpm-macros +# Note: The definitive specification is setup.py, not requirements.txt! +Requires: python-Cython >= 0.29 +Requires: python-Jinja2 +Requires: python-Mako >= 1.0.1 +Requires: python-Pillow +Requires: python-astropy >= 2.0.3 +Requires: python-beautifulsoup4 >= 4.6.0 +Requires: python-gwdatafind +Requires: python-h5py >= 3.0 +# SECTION lalsuite, see below +Requires: python-lal +Requires: python-lalframe +Requires: python-lalpulsar +Requires: python-lalsimulation +# /SECTION +Requires: python-ligo-lw >= 1.7.0 +Requires: python-ligo-segments +Requires: python-lscsoft-glue +Requires: python-matplotlib >= 1.5.1 +Requires: python-mpld3 >= 0.3 +Requires: python-numpy >= 1.16.0 +Requires: python-pegasus-wms.api >= 5.0.1 +Requires: python-scipy >= 0.16 +Requires: python-tqdm +Conflicts: python-astropy = 4.0.5 +Conflicts: python-astropy = 4.2.1 +Conflicts: python-lal = 7.2 +Conflicts: python-numpy = 1.19.0 +ExclusiveArch: x86_64 +%if %{with test} +BuildRequires: %{python_module PyCBC = %{version}} +BuildRequires: %{python_module pyFFTW} +BuildRequires: %{python_module pytest} +%endif +%python_subpackages + +%description +PyCBC is a software package used to explore astrophysical sources of +gravitational waves. It contains algorithms to analyze +gravitational-wave data from the LIGO and Virgo detectors, detect +coalescing compact binaries, and measure the astrophysical parameters +of detected sources. + +%package -n %{modname}-utils +Summary: PyCBC utilities to analyze gravitational-wave data +Requires: python3-PyCBC = %{version} +Obsoletes: python3-%{modname} <= 1.18.0 +BuildArch: noarch + +%description -n %{modname}-utils +PyCBC is a software package used to explore astrophysical sources of +gravitational waves. It contains algorithms to analyze +gravitational-wave data from the LIGO and Virgo detectors, detect +coalescing compact binaries, and measure the astrophysical parameters +of detected sources. + +This package provides PyCBC utility programs that are built against +the default python3 flavour. + +%prep +%autosetup -p1 -n pycbc-%{version} +# there is no python metadata in the distribution to provide "lalsuite" +sed -i '/lalsuite/d' setup.py + +# FOR REAL EXECUTABLES SET HASHBANG TO PYTHON3 DIRECTLY +sed -E -i "1{s|^#\!\s*/usr/bin/env python|#\!%{_bindir}/python3|}" \ + bin/pycbc_* \ + bin/*/pycbc_* + +# FOR FILES NOT INSTALLED TO BINDIR, REMOVE HASHBANGS +sed -E -i "1{/^#\!\s*\/usr\/bin/d}" \ + pycbc/fft/fft_callback.py \ + pycbc/filter/fotonfilter.py \ + pycbc/psd/*.py \ + pycbc/results/*.py + +%build +%if !%{with test} +%python_build +%endif + +%install +%if !%{with test} +%python_install +sed -E -i "1 s|^#\!\s*/usr/bin/env\s*bash|#\!/bin/bash|" %{buildroot}%{_bindir}/run_pycbc_inference + +%python_expand chmod -x %{buildroot}%{$python_sitearch}/pycbc/results/static/js/fancybox/2.1.5/jquery.fancybox*.js + +%python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif + +%if %{with test} +%check +# Tests that either require network or require special setups +# test_waveform.py requires pykerr, openSUSE don't have packages for it +# can't use pytest --ignore because of a special arg parser in test/utils.py +rm -r \ + test/test_chisq.py \ + test/test_dq.py \ + test/test_fft_mkl_threaded.py \ + test/test_fftw_openmp.py \ + test/test_frame.py \ + test/test_live_coinc_compare.py \ + test/test_infmodel.py \ + test/test_skymax.py \ + test/test_tmpltbank.py \ + test/test_waveform.py \ + %{nil} + +pushd test +%{python_expand # can't use the macro because of a special arg parser in test/utils.py +export PYTHONDONTWRITEBYTECODE=1 +pytest-%{$python_bin_suffix} +} +popd +%endif + +%if !%{with test} +%files -n %{modname}-utils +%{_bindir}/pycbc_* +%{_bindir}/run_pycbc_inference + +%files %{python_files} +%{python_sitearch}/pycbc +%{python_sitearch}/%{modname}-%{version}*-info +%endif + +%changelog