New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blank table handling for new returns from heasarc #2624
Conversation
@keflavich - can you rebase, that should fix CI. |
Now I'm confused. The test code is explicitly catching the warning that is getting raised, following the python guidelines, but the test code is still failing on the warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will need a changelog entry. And could you squash the testing iterations a bit?
And I see some remote tests failings
""" | ||
heasarc = Heasarc() | ||
|
||
with warnings.catch_warnings(record=True) as warn: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use pytest.warns
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because I didn't remember it was a thing
once this passes, I'll squash |
Codecov Report
@@ Coverage Diff @@
## main #2624 +/- ##
==========================================
+ Coverage 64.33% 64.35% +0.02%
==========================================
Files 130 130
Lines 16836 16846 +10
==========================================
+ Hits 10832 10842 +10
Misses 6004 6004
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
remove unused variable add remote test and restructure fallback catch warning import warnings try changing the warning filter to 'always' check in message, not in str rearrange warning test DEBUG reading the instructions tells you how to use the tool. fix to use pytest.warns
fix obvious typo remove unused import apparently I had comment row 0 wrong? add some comments in case the remote test fails for good reason in the future [ci skip]
it passed, I squashed, has changelog. Going to bed. $5 says it'll break and I'll need to do more in the morning. |
haha, the only thing that breaks atm is that in the squash you left the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all green now, and changes look good. Ideally the problem should be reported upstream (no results wrapped in a fitsfile is more than weird), but that's out of scope for the PR.
Thanks Adam! |
HEASARC is returning FITS files with blank data and a little header metadata as null results now, so we need to handle them.
WIP: requires a test.