GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add Vision Client by daspecster · Pull Request #2179 · googleapis/google-cloud-python

Conversation

@daspecster

@daspecster daspecster commented Aug 24, 2016

Copy link
Copy Markdown
Contributor

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!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@daspecster
Add Vision Client.
976e8ed
@daspecster daspecster added the api: vision Issues related to the Cloud Vision API. label Aug 24, 2016
@daspecster daspecster assigned tseaver and dhermes Aug 24, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 24, 2016
@dhermes

dhermes commented Aug 24, 2016

Copy link
Copy Markdown
Contributor

WIthout even looking, a custom json encoder seems like big time overkil (and may even be a performance hit).

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster

daspecster commented Aug 24, 2016

Copy link
Copy Markdown
Contributor Author

Ok, I'll see if I can do without the JSON encoder.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver
tseaver reviewed Aug 25, 2016
View reviewed changes
Comment thread gcloud/vision/test_client.py
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.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

gcloud.vision.test_image is missing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tseaver
tseaver reviewed Aug 25, 2016
View reviewed changes
Comment thread 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.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster

daspecster commented Aug 25, 2016

Copy link
Copy Markdown
Contributor Author

@tseaver, should I try and leave out image.py and try and test the client.py code with all just Mocks?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Aug 25, 2016

Copy link
Copy Markdown
Contributor

@daspecster the tests of the Client.image factory pretty much need to use the Image class: mocking it away doesn't win any clarity.

daspecster reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster
- Updated bytes usage
e55b036
- Add more docstrings and corrections
- Add gcs_uri support
- Remove VisionEncoder
@daspecster

daspecster commented Aug 29, 2016

Copy link
Copy Markdown
Contributor Author

@dhermes @tseaver I think I addressed your comments from before. As soon as this is merged I'll get the face detection PR together.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tseaver

tseaver commented Aug 29, 2016

Copy link
Copy Markdown
Contributor

LGTM

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster

daspecster commented Aug 29, 2016

Copy link
Copy Markdown
Contributor Author

Thanks @tseaver!

@dhermes did you have anything else?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dhermes

dhermes commented Aug 29, 2016

Copy link
Copy Markdown
Contributor

You don't need two reviewers. Feel free to merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@daspecster
daspecster merged commit a678774 into googleapis:master Aug 29, 2016
@dhermes dhermes mentioned this pull request Sep 19, 2016
Cut 0.19.0 release. #2270
Merged
@daspecster
daspecster deleted the vision-client branch January 24, 2017 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@tseaver tseaver

Labels

api: vision Issues related to the Cloud Vision API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@daspecster @dhermes @tseaver @googlebot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.