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

Fix unit test regressions #168

Merged
merged 6 commits into from
Nov 1, 2017
Merged

Conversation

valgur
Copy link
Member

@valgur valgur commented Oct 24, 2017

It's been a while since the VCR cassettes have been updated. So I did. This broke a bunch of them, tough. About a half of these were due to simple content changes on the server (images appearing or disappearing). The rest were caused by some minor apparent changes in the server-side query handling and required some actual code change. This includes:

The server's response for invalide queries has changed. An empty query is now returned instead of an error.
SentinelDataHub/DataHubSystem#29
Unescaped quote symbols no longer cause errors, so a workaround is no longer needed.
The needed changes were all trivial and simply account for changes in the server content.
@codecov
Copy link

codecov bot commented Oct 24, 2017

Codecov Report

Merging #168 into master will decrease coverage by 0.24%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #168      +/-   ##
==========================================
- Coverage   95.53%   95.28%   -0.25%     
==========================================
  Files           3        3              
  Lines         537      530       -7     
  Branches      108      108              
==========================================
- Hits          513      505       -8     
- Misses         15       16       +1     
  Partials        9        9
Impacted Files Coverage Δ
sentinelsat/sentinel.py 95.48% <100%> (-0.3%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 127619f...c3c4475. Read the comment docs.

@valgur
Copy link
Member Author

valgur commented Oct 24, 2017

The first change raises a small question though. With this PR, invalid query parameters no longer raise an error but return an empty response instead. This reflects the server-side behavior.
However, due to the server-side bug, which returns null as the product count, we still have this information, implicitly.
Should we continue raising an exception in case of invalid queries? I'm veering on the side of yes, since this seems more informative and useful to me. Using a server-side bug to implement this is a bit unreliable, though.

@j08lue
Copy link
Contributor

j08lue commented Oct 24, 2017

I am in favor of raising an error for invalid queries, too. The server will evolve (hopefully) and we will keep adapting our client. If the server at some point stops returning null, we will notice, at least when we update the VCRs again, and can reconsider this question then.

@kr-stn
Copy link
Member

kr-stn commented Oct 25, 2017

+1 on continue to raise the exception.

Even though we state in our contribution guidelines, that "sentinelsat should interface the functions of DHuS where possible" I think a server side bug is clearly not a function.

@kr-stn kr-stn added this to the next Minor release milestone Oct 25, 2017
@valgur valgur requested review from kr-stn and j08lue October 29, 2017 17:15
@valgur valgur merged commit ce674ff into sentinelsat:master Nov 1, 2017
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