Merged
Conversation
Contributor
|
WIthout even looking, a custom |
Contributor
Author
|
Ok, I'll see if I can do without the JSON encoder. |
| PROJECT = 'PROJECT' | ||
| IMAGE_SOURCE = 'gs://some/image.jpg' | ||
| IMAGE_CONTENT = '/9j/4QNURXhpZgAASUkq' | ||
| B64_IMAGE_CONTENT = base64.b64encode(IMAGE_CONTENT) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Contributor
|
|
gcloud/vision/test_client.py
Outdated
| return self._getTargetClass()(*args, **kw) | ||
|
|
||
| def test_make_vision_request(self): | ||
| IMAGE_CONTENT = '/9j/4QNURXhpZgAASUkq' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Contributor
Author
|
@tseaver, should I try and leave out image.py and try and test the client.py code with all just Mocks? |
Contributor
|
@daspecster the tests of the |
- Add more docstrings and corrections - Add gcs_uri support - Remove VisionEncoder
Contributor
Author
Contributor
|
LGTM |
Contributor
Author
Contributor
|
You don't need two reviewers. Feel free to merge. |
Merged
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.
Areas of focus:
This PR is a bit large, but it's mostly due to vision/fixtures.py which I would like your feedback on.
The image source passed into the client will eventually be able to be a raw string/byte stream of the image, a gs://bucket/image.jpg or a URL to be downloaded via httplib2.
VisionJSONEncoder is probably a topic of debate.
VisionRequest should probably be in it's own file or I suppose it's functionality could be absorbed by Client. I'm not sure the best path there.
LMKWYT!