Skip to content

Fix dependencies#59

Open
RoxGamba wants to merge 3 commits intomainfrom
fix-dependencies
Open

Fix dependencies#59
RoxGamba wants to merge 3 commits intomainfrom
fix-dependencies

Conversation

@RoxGamba
Copy link
Copy Markdown
Owner

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:

  • Added scripts/patch_pycbc_numpy2.py to patch pycbc for numpy 2.x incompatibilities, specifically in events/threshold_cpu.py and filter/matchedfilter.py. The patch is safe to re-run and ensures pycbc works with numpy 2.x.
  • Updated .github/workflows/tests.yml to apply the numpy 2.x compatibility patch after dependencies are installed.
  • Modified README.md to instruct users to run the patch script after installing, and clarified its purpose and safety.
  • Enhanced setup.py to 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:

  • Updated setup.cfg to 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:

  • Removed deprecated Python 2 namespace declarations and from __future__ import absolute_import from all __init__.py files in the PyART package, simplifying the codebase for modern Python. [1] [2]

Example and test improvements:

  • Updated examples/match_sxs.py to set up logging and improve the loading of SXS data, including additional parameters for robustness and clarity. [1] [2]
  • Added a new parameter r_ext in tests/test_gra.py for waveform initialization, improving test coverage.

Minor fixes:

  • Corrected a comment in PyART/utils/convert_sxs_to_lvc.py for clarity.

Partly related to #52

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

@RoxGamba RoxGamba self-assigned this Mar 20, 2026
@RoxGamba RoxGamba marked this pull request as ready for review March 20, 2026 01:51
@RoxGamba RoxGamba mentioned this pull request Mar 30, 2026
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant