Open
Conversation
…e versions compatible with numpy<2 (for pycbc match)
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix pycbc and numpy>2 compatibility issue
This pull request introduces compatibility fixes for numpy 2.x, improves developer experience, and cleans up legacy code. The main changes include a new patch script for pycbc, updates to installation instructions and workflow, and removal of deprecated Python 2 namespace declarations.
Numpy 2.x compatibility and pycbc patching:
scripts/patch_pycbc_numpy2.pyto patch pycbc for numpy 2.x incompatibilities, specifically inevents/threshold_cpu.pyandfilter/matchedfilter.py. The patch is safe to re-run and ensures pycbc works with numpy 2.x..github/workflows/tests.ymlto apply the numpy 2.x compatibility patch after dependencies are installed.README.mdto instruct users to run the patch script after installing, and clarified its purpose and safety.setup.pyto print a clear post-install notice reminding users to run the patch script, both for install and develop commands. [1] [2]Python version and packaging improvements:
setup.cfgto declare support for Python 3.12 and restrict installation to Python versions <3.13, preventing accidental installation on unsupported versions. [1] [2]Code cleanup and modernization:
from __future__ import absolute_importfrom all__init__.pyfiles in thePyARTpackage, simplifying the codebase for modern Python. [1] [2]Example and test improvements:
examples/match_sxs.pyto set up logging and improve the loading of SXS data, including additional parameters for robustness and clarity. [1] [2]r_extintests/test_gra.pyfor waveform initialization, improving test coverage.Minor fixes:
PyART/utils/convert_sxs_to_lvc.pyfor clarity.Partly related to #52
Type of change
Please delete options that are not relevant.