-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 Vision Client #2179
Add Vision Client #2179
Conversation
WIthout even looking, a custom |
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.
|
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.
@tseaver, should I try and leave out image.py and try and test the client.py code with all just Mocks? |
@daspecster the tests of the |
- Add more docstrings and corrections - Add gcs_uri support - Remove VisionEncoder
LGTM |
You don't need two reviewers. Feel free to merge. |
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!