spacetelescope / spherical_geometry

A Python package for handling spherical polygons that represent arbitrary regions of the sky
http://spherical-geometry.readthedocs.io/
62 stars 31 forks source link

BLD: Use numpy 2.x ABI #274

Closed pllim closed 4 months ago

pllim commented 5 months ago

BLD: Use numpy 2.x ABI.

DEP: Clean up dependencies and associated docs.

Fix https://github.com/spacetelescope/spherical_geometry/issues/272

codecov[bot] commented 5 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 80.25%. Comparing base (7da4a41) to head (6e6c264). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #274 +/- ## ======================================= Coverage 80.25% 80.25% ======================================= Files 5 5 Lines 1013 1013 ======================================= Hits 813 813 Misses 200 200 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

pllim commented 5 months ago

With this patch, C-ext is now available in devdeps, see https://github.com/spacetelescope/spherical_geometry/actions/runs/9099962846/job/25013742232?pr=274

test_basic.py::test_math_util_inner1d PASSED

mcara commented 5 months ago

Why use a not-yet-released version (of numpy) when building releases?

pllim commented 5 months ago

You can wait to merge, no rush on my side. I was just trying to see if this would fix the problem of C-extension not on devdeps and it does.

mcara commented 5 months ago

I was just trying to see if this would fix the problem of C-extension not on devdeps and it does.

I know it does. I mentioned this in https://github.com/spacetelescope/spherical_geometry/pull/265#issuecomment-2106356771 and https://github.com/spacetelescope/spherical_geometry/pull/265#discussion_r1598976025

pllim commented 5 months ago

Ah, sorry if I missed it! I think this diff just need minor tweaks when numpy 2.0 is released.

mcara commented 5 months ago

The code was tested to work with C extension build against numpy 2.0.0.dev0 and so if numpy will not make any dramatic changes before an official release - the code will work just fine once numpy 2.0.0 is officially released. If I have to choose between building with an officially release version and not tests devdeps vs building with an experimental version but being able to test with latest alpha/beta numpy, I would prefer the former.

pllim commented 5 months ago

if numpy will not make any dramatic changes before an official release

Last I heard, they were debating whether to drop Python 3.9 or not. 😬

Anyways, like I said, you can keep this open for now if you want to wait. I am not asking for you to merge this today.

zacharyburnett commented 4 months ago

sorry, I didn't see this PR before merging #279; this PR will need to be rebased