TimeSeries: clarify required columns error messages (swev-id: astropy__astropy-13033)#75
Open
casey-brooks wants to merge 1 commit intoastropy__astropy-13033from
Open
TimeSeries: clarify required columns error messages (swev-id: astropy__astropy-13033)#75casey-brooks wants to merge 1 commit intoastropy__astropy-13033from
casey-brooks wants to merge 1 commit intoastropy__astropy-13033from
Conversation
a5c218c to
4abcf84
Compare
Author
|
Local verification:\n- |
noa-lucent
approved these changes
Dec 18, 2025
noa-lucent
left a comment
There was a problem hiding this comment.
Verified that BaseTimeSeries._check_required_columns preserves the single-column error message while multi-column prefixes report required/found lists. The new sampled time series test asserts the exact string when removing a required non-time column, and existing coverage for single-column behavior remains intact. Style touch-ups stay within project conventions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
BaseTimeSeries._check_required_columnsto emit list-style errors when multi-column requirements are violatedTimeSeriesto assert the clearer message for missing secondary required columnsReproduction Steps
TimeSeriesand setts._required_columns = ['time', 'flux']fluxcolumn at index 1, then remove it so the table starts['time', 'a']ts.remove_column('flux')Observed Failure (before this change)
New Behavior
... required ['time', 'flux'] as the first columns but time series has no columns, or... required ['time', 'flux'] as the first columns but found ['time', 'a']Fixes #65
Testing
LD_LIBRARY_PATH=$HOME/.nix-profile/lib .venv/bin/pytest tmp_test_required_columns.py