Skip to content

also test astropy/7.x#591

Merged
sbailey merged 7 commits intomainfrom
github_tests
Jan 7, 2026
Merged

also test astropy/7.x#591
sbailey merged 7 commits intomainfrom
github_tests

Conversation

@sbailey
Copy link
Contributor

@sbailey sbailey commented Jan 6, 2026

This PR updates the github tests to include astropy/7.x . Tests pass at NERSC with astropy/7.1.0 .

Copilot AI review requested due to automatic review settings January 6, 2026 19:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the GitHub Actions test workflow to support testing with astropy 7.x by changing the astropy version constraint from '<7' to '<8'. The PR description indicates that tests pass at NERSC with astropy 7.1.0.

  • Updated astropy version constraint to allow testing with astropy 7.x versions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sbailey
Copy link
Contributor Author

sbailey commented Jan 6, 2026

related:

We're not out of the woods yet on the github actions failures, but at least it is now due to actual test failures and not requirements installation failures. Note that tests do pass at NERSC so it is still something specific to the github environment.

@sbailey
Copy link
Contributor Author

sbailey commented Jan 6, 2026

@weaverba137 do you recognize the root cause of this traceback? It is something IERS format related, but I'm not seeing what we're doing wrong, especially given that the same tests passes at NERSC. The full test log history is at https://github.com/desihub/desisim/actions/runs/20764369358/job/59627019038?pr=591

py/desisim/test/test_obs.py:67: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
py/desisim/obs.py:148: in new_exposure
    sim, fibermap = desisim.simexp.simflat(infile, nspec=nspec,
py/desisim/simexp.py:186: in simflat
    sim = desisim.specsim.get_simulator(config, num_fibers=nspec,
py/desisim/specsim.py:50: in get_simulator
    qsim = specsim.simulator.Simulator(config, num_fibers,
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/specsim/simulator.py:77: in __init__
    self.observation = specsim.observation.initialize(config)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/specsim/observation.py:239: in initialize
    obs = Observation(
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/specsim/observation.py:63: in __init__
    self._update_model()
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/specsim/observation.py:82: in _update_model
    self.boresight_altaz = specsim.transform.sky_to_altaz(
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/specsim/transform.py:391: in sky_to_altaz
    altaz_out = sky_coords.transform_to(observing_model)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/sky_coordinate.py:551: in transform_to
    new_coord = trans(self.frame, generic_frame)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/transformations/composite.py:113: in __call__
    curr_coord = t(curr_coord, curr_toframe)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/transformations/function.py:174: in __call__
    return supcall(fromcoord, toframe)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/builtin_frames/icrs_observed_transforms.py:35: in icrs_to_observed
    astrom = erfa_astrom.get().apco(observed_frame)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/erfa_astrom.py:67: in apco
    xp, yp = get_polar_motion(obstime)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/coordinates/builtin_frames/utils.py:45: in get_polar_motion
    iers_table = iers.earth_orientation_table.get()
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/state.py:57: in get
    return cls.validate(cls._value)
           ^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/iers/iers.py:1031: in validate
    value = IERS_Auto.open()
            ^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/iers/iers.py:811: in open
    cls._iers_table_bundled = cls.read()
                              ^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/iers/iers.py:656: in read
    table = cls._combine_a_b_columns(iers_a)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/iers/iers.py:566: in _combine_a_b_columns
    table = cls._substitute_iers_b(table)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/utils/iers/iers.py:986: in _substitute_iers_b
    table["dX_2000A_B"][:n_iers_b] = iers_b["dX_2000A"]
                                     ^^^^^^^^^^^^^^^^^^
/opt/hostedtoolcache/Python/3.13.11/x64/lib/python3.13/site-packages/astropy/table/table.py:2105: in __getitem__
    return self.columns[item]
           ^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <TableColumns names=('year','month','day','MJD','PolPMFlag_A','PM_x_A','e_PM_x_A','PM_y_A','e_PM_y_A','UT1Flag_A','UT1...,'e_dY_2000A_A','PM_X_B','PM_Y_B','UT1_UTC_B','dX_2000A_B','dY_2000A_B','UT1_UTC','UT1Flag','PM_x','PM_y','PolPMFlag')>
item = 'dX_2000A'

    def __getitem__(self, item):
        """Get items from a TableColumns object.
    
        ::
    
          tc = TableColumns(cols=[Column(name='a'), Column(name='b'), Column(name='c')])
          tc['a']  # Column('a')
          tc[1] # Column('b')
          tc['a', 'b'] # <TableColumns names=('a', 'b')>
          tc[1:3] # <TableColumns names=('b', 'c')>
        """
        if isinstance(item, str):
>           return OrderedDict.__getitem__(self, item)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E           KeyError: 'dX_2000A'

@weaverba137
Copy link
Member

@sbailey, that is familiar because desiutil < 3.6 still has older-format IERS files that are not compatible with Astropy >= 7.0. You want to use desiutil >= 3.6.0.

@sbailey
Copy link
Contributor Author

sbailey commented Jan 7, 2026

Thanks @weaverba137, that worked. Summarizing changes to github config:

  • test astropy/7.x for python/3.13
  • install dependencies with --no-build-isolation due to specsim and simqso not yet having pyproject.toml
  • update desiutil to 3.6.0 (oldest working version with astropy 7.x)

Coverage is still low, but that is beyond the scope of this PR, which didn't make the coverage worse.

@sbailey sbailey merged commit 68966ac into main Jan 7, 2026
14 of 16 checks passed
@sbailey sbailey deleted the github_tests branch January 7, 2026 01:12
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.

3 participants