Skip to content
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

Warn on DAL overflow #329

Merged
merged 5 commits into from
May 27, 2022
Merged

Warn on DAL overflow #329

merged 5 commits into from
May 27, 2022

Conversation

andamian
Copy link
Contributor

Fix for #322 .

@andamian andamian added the bug label May 13, 2022
@andamian andamian added this to the v1.3.1 milestone May 13, 2022
@codecov
Copy link

codecov bot commented May 13, 2022

Codecov Report

Merging #329 (740953d) into main (949693c) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #329      +/-   ##
==========================================
+ Coverage   75.49%   75.52%   +0.02%     
==========================================
  Files          44       44              
  Lines        5125     5131       +6     
==========================================
+ Hits         3869     3875       +6     
  Misses       1256     1256              
Impacted Files Coverage Δ
pyvo/dal/__init__.py 100.00% <100.00%> (ø)
pyvo/dal/exceptions.py 77.02% <100.00%> (+0.63%) ⬆️
pyvo/dal/query.py 85.12% <100.00%> (+0.15%) ⬆️

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@andamian andamian requested a review from msdemlei May 13, 2022 23:08
Copy link
Contributor

@msdemlei msdemlei left a comment

Choose a reason for hiding this comment

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

Looks basically fine too me. A few nitpicks that I'd rather see fixed/addressed before merging this:

  • Quite a few of the test VOTables were re-written and thus have meaningless changes. I'm not saying that's a drama, but saying a few words how these changes came about would be great.
  • There's now an overflow warning in pyvo/dal/tests/test_datalink.py::test_datalink_batch, which is because the obscore test result (pyvo/dal/tests/data/datalink/datalink-obscore.xml) is overflowing on creation. I'd be fine with both manually removing the INFO element and with swallowing the warning. It shouldn't go unhandled, though.

@andamian
Copy link
Contributor Author

andamian commented May 16, 2022

Looks basically fine too me. A few nitpicks that I'd rather see fixed/addressed before merging this:

  • Quite a few of the test VOTables were re-written and thus have meaningless changes. I'm not saying that's a drama, but saying a few words how these changes came about would be great.

I've run the script that generates these files with a different version of astropy(votable). Where should I add this comment?

  • There's now an overflow warning in pyvo/dal/tests/test_datalink.py::test_datalink_batch, which is because the obscore test result (pyvo/dal/tests/data/datalink/datalink-obscore.xml) is overflowing on creation. I'd be fine with both manually removing the INFO element and with swallowing the warning. It shouldn't go unhandled, though.

Good point. I've missed that.

@andamian
Copy link
Contributor Author

@msdemlei - I've opted for removing the OVERFLOW status from the test data since that was a byproduct of the way they were generated (a SELECT TOP would not have had those in).

@msdemlei
Copy link
Contributor

msdemlei commented May 17, 2022 via email

Copy link
Contributor

@tomdonaldson tomdonaldson left a comment

Choose a reason for hiding this comment

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

This looks good to me. Just the one question about the placement of the INFO element in the test data.

@@ -376,9 +381,13 @@ def _findstatus(self, votable):

def _findstatusinfo(self, infos):
# this can be overridden to specialize for a particular DAL protocol
status = None
# return the last status to catch potential overflow or error sent
Copy link
Contributor

Choose a reason for hiding this comment

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

This is interesting. I had to go back and look at the DALI standard to see that this would work to the OVERFLOW case (i.e., that OVERFLOW would come last).

pyvo/dal/tests/data/query/overflowstatus.xml Outdated Show resolved Hide resolved
@andamian andamian merged commit 82ed24d into astropy:main May 27, 2022
@andamian andamian deleted the overflow branch May 27, 2022 17:46
@bsipocz bsipocz modified the milestones: v1.3.1, v1.4 Sep 20, 2022
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.

None yet

4 participants