Repository navigation
Suppress expected jwst_gtvt future-date ERFA warnings locally - #718
Open
taylorbell57 wants to merge 2 commits into
Open
taylorbell57 wants to merge 2 commits into
taylorbell57 wants to merge 2 commits into
Conversation
taylorbell57
force-pushed
the
suppress-gtvt-erfa-warning
branch
2 times, most recently
from
July 20, 2026 21:31
835bdc9 to
66482dc
Compare
taylorbell57
force-pushed
the
suppress-gtvt-erfa-warning
branch
from
August 4, 2026 01:35
66482dc to
8fadd1d
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses noisy ERFA dubious year warnings emitted during jwst_gtvt ephemeris construction by adding a narrowly scoped warning suppression around BoundedEphemeris() construction, plus a regression test ensuring unrelated ERFA warnings are still surfaced to callers.
Changes:
- Locally suppress the specific ERFA
dtf2d“dubious year (Note 6)” warning only duringBoundedEphemerisconstruction. - Add a regression test that verifies the expected warning is suppressed while unrelated
ErfaWarnings remain visible.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
exoctk/contam_visibility/new_vis_plot.py |
Adds a tightly scoped warnings filter around ephemeris construction to ignore only the expected ERFA “dubious year” warning. |
exoctk/tests/test_contam_visibility.py |
Adds a regression test to ensure only the expected ERFA warning is suppressed and unrelated ERFA warnings still propagate. |
Suppressed comments (1)
exoctk/tests/test_contam_visibility.py:249
- After restricting the capture to
ErfaWarning, the assertion can be simplified; usingw.messagealso avoids relying on the local variable namewarningand keeps the expression concise.
assert [str(warning.message) for warning in caught] == [
'unrelated ERFA warning']
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
taylorbell57
force-pushed
the
suppress-gtvt-erfa-warning
branch
from
August 4, 2026 15:49
0a16788 to
4fea80d
Compare
Limit the ERFA dubious-year suppression to Ephemeris construction, where jwst_gtvt validates its internal maximum date. Add a regression test confirming unrelated ERFA warnings are still emitted.
taylorbell57
force-pushed
the
suppress-gtvt-erfa-warning
branch
from
October 1, 2026 21:20
4fea80d to
bf26859
Compare
This branch has not been deployed
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.
Closes #716
jwst_gtvt validates its internal future maximum date while constructing an ephemeris, producing an ERFA
dubious yearwarning even when the requested visibility period is earlier.This change suppresses only that expected warning, only during ephemeris construction. A regression test verifies that unrelated ERFA warnings remain visible.
Tests:
pytest exoctk/tests/test_contam_visibility.py -q -k 'new_vis_plot or visibility_ephemeris_suppresses'