drizzlepac icon indicating copy to clipboard operation
drizzlepac copied to clipboard

Replace spacetelescope/stregion dependency with astropy/regions

Open larrybradley opened this issue 1 year ago • 5 comments

The spacetelescope/stregion dependency is a frozen copy of spacetelescope/pyregion, which in turn is a frozen copy of astropy/pyregion, which has not been maintained for many years. The astropy/pyregion package has been superseded by the astropy/regions package (I am the maintainer). The regions API is different from pyregion, but it should have all the features that drizzlepac needs.

This is an issue because spacetelescope/stregion cannot be built with Python 3.12.

larrybradley avatar Nov 07 '23 17:11 larrybradley

https://github.com/spacetelescope/stregion/pull/11 fixes the build issue with Python 3.12.

jhunkeler avatar Nov 12 '23 13:11 jhunkeler

This issue is tracked on JIRA as HLA-1162.

stscijgbot-hstdp avatar Nov 15 '23 06:11 stscijgbot-hstdp

Why was this closed? I don't see where stregion was replaced with astropy/regions. https://github.com/spacetelescope/drizzlepac/blob/main/pyproject.toml#L31

larrybradley avatar Feb 20 '24 15:02 larrybradley

Sorry @larrybradley, you're right. It seems that we fixed the build issue, but there is still stregion code in drizzlepac. We are now tracking that with issue #1742 which is also tracked on JIRA. Thanks for reminding me to add a note here.

s-goldman avatar Feb 20 '24 15:02 s-goldman

Comment by Nadia Dencheva on JIRA:

Some notes from Mihai who developed this code originally:

I think it would be a major work to switch to astropy regions. Also, it may not be possible to do what pyregions could do with astropy/regions (at least at the beginning, they did not handle distortions and didn’t care about them – that’s why I decided to keep using pyregions/stregions). Maybe things have changed, but one needs to investigate this.```

stscijgbot-hstdp avatar Feb 28 '24 17:02 stscijgbot-hstdp