Skip to content

Manual backport of PR 11128 (TST: Fix hypothesis fuzzing logic on CI) - #11409

Merged
eteq merged 1 commit into
astropy:v4.2.xfrom
pllim:backport-pr11128
Mar 24, 2021
Merged

eteq merged 1 commit into
astropy:v4.2.xfrom
pllim:backport-pr11128

Conversation

@pllim

@pllim pllim commented Mar 23, 2021

Copy link
Copy Markdown
Member

Manual backport of #11128

TST: Fix hypothesis fuzzing logic on CI
@pllim pllim added this to the v4.2.1 milestone Mar 23, 2021
@pllim
pllim marked this pull request as ready for review March 23, 2021 19:40
@pllim
pllim requested a review from eteq March 23, 2021 19:40
@pllim

pllim commented Mar 23, 2021

Copy link
Copy Markdown
Member Author

I think we can ignore the samp failures.

As for the coordinates failure, does this mean we need to backport #11308 too?

_____________________________ test_against_pyephem _____________________________

    def test_against_pyephem():
        """Check that Astropy gives consistent results with one PyEphem example.
    
        PyEphem: https://rhodesmill.org/pyephem/
    
        See example input and output here:
        https://gist.github.com/zonca/1672906
        https://github.com/phn/pytpm/issues/2#issuecomment-3698679
        """
        obstime = Time('2011-09-18 08:50:00')
        location = EarthLocation(lon=Angle('-109d24m53.1s'),
                                 lat=Angle('33d41m46.0s'),
                                 height=30000. * u.m)
        # We are using the default pressure and temperature in PyEphem
        # relative_humidity = ?
        # obswl = ?
        altaz_frame = AltAz(obstime=obstime, location=location,
                            temperature=15 * u.deg_C, pressure=1.010 * u.bar)
    
        altaz = SkyCoord('6.8927d -60.7665d', frame=altaz_frame)
        radec_actual = altaz.transform_to('icrs')
    
        radec_expected = SkyCoord('196.497518d -4.569323d', frame='icrs')  # EPHEM
        # radec_expected = SkyCoord('196.496220d -4.569390d', frame='icrs')  # HORIZON
        distance = radec_actual.separation(radec_expected).to('arcsec')
        # TODO: why is this difference so large?
        # It currently is: 31.45187984720655 arcsec
        assert distance < 1e3 * u.arcsec
    
        # Add assert on current Astropy result so that we notice if something changes
        radec_expected = SkyCoord('196.495372d -4.560694d', frame='icrs')
        distance = radec_actual.separation(radec_expected).to('arcsec')
        # Current value: 0.0031402822944751997 arcsec
>       assert distance < 1 * u.arcsec
E       assert <Angle 521.28428052 arcsec> < (1 * Unit("arcsec"))
E        +  where Unit("arcsec") = u.arcsec

astropy_tests/coordinates/tests/accuracy/test_altaz_icrs.py:127: AssertionError

@eteq

eteq commented Mar 24, 2021

Copy link
Copy Markdown
Member

Hmm. I'm not sure about backporting #11308 because of the issue that this introduces a pinning where it wasn't there before. So we might need some other workaround for this branch. But I agree it's unrelated to this PR!

@eteq eteq closed this Mar 24, 2021
@eteq eteq reopened this Mar 24, 2021
@eteq
eteq merged commit b2821c2 into astropy:v4.2.x Mar 24, 2021
@pllim
pllim deleted the backport-pr11128 branch March 24, 2021 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants