| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
WIthout even looking, a custom json encoder seems like big time overkil (and may even be a performance hit). |
Sorry, something went wrong.
|
Ok, I'll see if I can do without the JSON encoder. |
Sorry, something went wrong.
| PROJECT = 'PROJECT' | ||
| IMAGE_SOURCE = 'gs://some/image.jpg' | ||
| IMAGE_CONTENT = '/9j/4QNURXhpZgAASUkq' | ||
| B64_IMAGE_CONTENT = base64.b64encode(IMAGE_CONTENT) |
|
gcloud.vision.test_image is missing. |
Sorry, something went wrong.
| return self._getTargetClass()(*args, **kw) | ||
|
|
||
| def test_make_vision_request(self): | ||
| IMAGE_CONTENT = '/9j/4QNURXhpZgAASUkq' |
|
@tseaver, should I try and leave out image.py and try and test the client.py code with all just Mocks? |
Sorry, something went wrong.
|
@daspecster the tests of the Client.image factory pretty much need to use the Image class: mocking it away doesn't win any clarity. |
Sorry, something went wrong.
- Add more docstrings and corrections - Add gcs_uri support - Remove VisionEncoder
|
LGTM |
Sorry, something went wrong.
Sorry, something went wrong.
|
You don't need two reviewers. Feel free to merge. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
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!