Fix ResourceType._allows_mpack check.#31
Merged
vshlapakov merged 1 commit intomasterfrom Oct 18, 2016
Merged
Conversation
Current coverage is 47.87% (diff: 27.27%)@@ master #31 diff @@
==========================================
Files 14 14
Lines 1169 1178 +9
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 561 564 +3
- Misses 608 614 +6
Partials 0 0
|
b73e877 to
78952a4
Compare
vshlapakov
reviewed
Oct 18, 2016
| # path | ||
| path = urlpathjoin(path or '') | ||
| match = COLLECTIONS_MSGPACK_REGEX.match(path) | ||
| if match: |
Contributor
There was a problem hiding this comment.
Maybe it's better to shorten it a bit?
return (match and match.group('key') != 'count)'
Contributor
|
Except minor proposal, LGTM 👍 |
78952a4 to
e456071
Compare
Existing check is broken. It works for items, logs and samples only if one uses them through Job object. However it doesn't work correctly for `list(proj.items.apiget('33/5/stats'))`). Also for collections it applies the same rules as for items, but only few collections endpoints support msgpack - scan, batch scan and get collection item. Other endpoints do no support msgpack.
Contributor
Author
|
@vshlapakov does it look better now? |
chekunkov
commented
Oct 18, 2016
| """ | ||
| if not MSGPACK_AVAILABLE: | ||
| return False | ||
| # path |
Contributor
Author
There was a problem hiding this comment.
oops, meaningless comment, fixed in fe134f0
chekunkov
added a commit
to scrapinghub/python-hubstorage
that referenced
this pull request
Dec 2, 2016
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.
Existing check is broken. It works for items, logs and samples only if one uses them through Job object. However it doesn't work correctly for
list(proj.items.apiget('33/5/stats'))). Also for collections it applies the same rules as for items, but only few collections endpoints support msgpack - scan, batch scan and get collection item. Other endpoints do no support msgpack.