nanograv / enterprise

ENTERPRISE (Enhanced Numerical Toolbox Enabling a Robust PulsaR Inference SuitE) is a pulsar timing analysis code, aimed at noise analysis, gravitational-wave searches, and timing model analysis.
https://enterprise.readthedocs.io
MIT License
65 stars 67 forks source link

Fix astropy._erfa Import to use pyerfa instead #328

Closed JPGlaser closed 1 year ago

JPGlaser commented 1 year ago

As it says on the tin. See the below import error that always appears.

+ python -c from enterprise.pulsar import Pulsar
WARNING: AstropyDeprecationWarning: The private astropy._erfa module has been made into its own package, pyerfa, which is a dependency of astropy and can be imported directly using "import erfa" [astropy._erfa]

~ Joe G.

vallis commented 1 year ago

This warning comes from code inside PINT... looking there, astropy._erfa is imported as a fallback if pyerfa is not available.

Now, I see that pyerfa is included in requirements.txt, but not in setup.py/setup.cfg. That means that it is only installed with "pip install -r", but not, e.g., when PINT is installed in the course of the enterprise install.

I think the solution here is to include pyerfa in PINT's setup.cfg.

aarchiba commented 1 year ago

This is fixed now: https://github.com/nanograv/PINT/pull/1508

AaronDJohnson commented 1 year ago

Closed as completed