Skip to content

Commit

Permalink
[AutoPR] cognitiveservices/data-plane/ComputerVision (#2978)
Browse files Browse the repository at this point in the history
* Generated from d796a072098d20051200552d7cbd6608587ffd23 (#2951)

Enable Computer Vision Client to customize endpoint.

* Generated from a3c7072f01f807edbb028085a23278d6f7980fa1 (#2990)

ComputerVision: bug fixes for /describe and /analyze

* Inconsistent argument type for `/analyze?details=...` between URL and stream methods
* BingIU imagetype return values needs to be integral
* Description `maxCandidates` argument needs to be integral

* [AutoPR cognitiveservices/data-plane/ComputerVision] Split Ocr out into own Swagger file (#3543)

* Generated from 0dc03413967addc6fb33eba01bf4b8074f5fe91a

Split Ocr out

* Packaging update of azure-cognitiveservices-vision-computervision

* [AutoPR cognitiveservices/data-plane/ComputerVision] Rename examples to match generated names (#3541)

* Generated from 5aa27bd9abb8f6f416b054d64536ee2f7175f662

Rename examples to match generated names

* Packaging update of azure-cognitiveservices-vision-computervision

* Generated from 5aa27bd9abb8f6f416b054d64536ee2f7175f662

Rename examples to match generated names

* [AutoPR cognitiveservices/data-plane/ComputerVision]  Add areaOfInterest and detectObject to CV API (#3997)

* Generated from 0bc892729baf0d049695c873e9afe139211c259d

 Add areaOfInterest and detectObject

* Replace the current swagger with an auto-generated one.
* Add example files for areaOfInterest and detectObject.
* Fix example validation errors for analyze and describe.
* A few fixes for generating java sdk

* Packaging update of azure-cognitiveservices-vision-computervision

* Packaging update of azure-cognitiveservices-vision-computervision

* Generated from 66af0936fc20f7164f70de9d36271b12fbc2a5c7 (#2985)

Remove basePath from Computer Vision 2.0 swagger.

* Update version.py

* Update sdk_packaging.toml

* Packaging update of azure-cognitiveservices-vision-computervision

* [AutoPR cognitiveservices/data-plane/ComputerVision] Analyze brands (#4294)

* Generated from 0ac968f914274f0f98612a60ac4f8998a60ff1af

Analyze brands

* Packaging update of azure-cognitiveservices-vision-computervision

* [AutoPR cognitiveservices/data-plane/ComputerVision] [Computer Vision] Add read to CV OCR API. (#4473)

* Generated from cbcb8cc3c280c9725bca0f4e0feb4bfc57b677ec

Add read to OCR API.

* Packaging update of azure-cognitiveservices-vision-computervision

* Generated from 51742b3e212c2e900ed5c24f7c351fa7f896d25e

Mark asyncBatchAnalyze as long running operation.

* Generated from b047a112a2c4cddaa54605d5de6a7bc3faab38c7

Update page property.

* Packaging update of azure-cognitiveservices-vision-computervision

* 0.3.0
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 9, 2019
1 parent 024f20f commit 6a45cf2
Show file tree
Hide file tree
Showing 71 changed files with 1,993 additions and 771 deletions.
17 changes: 16 additions & 1 deletion azure-cognitiveservices-vision-computervision/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
Release History
===============

0.3.0 (2019-03-11)
++++++++++++++++++

**Features**

- Model ImageAnalysis has a new parameter brands
- Model ImageAnalysis has a new parameter objects
- Model Word has a new parameter confidence

**Breaking changes**

- Client ComputerVisionAPI has been renamed ComputerVisionClient
- Parameter text of model Word is now required
- Parameter bounding_box of model Word is now required

0.2.0 (2018-06-22)
++++++++++++++++++

Expand Down Expand Up @@ -38,7 +53,7 @@ This version uses a next-generation code generator that *might* introduce breaki

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
Expand Down
5 changes: 5 additions & 0 deletions azure-cognitiveservices-vision-computervision/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py
include azure/cognitiveservices/vision/__init__.py

19 changes: 0 additions & 19 deletions azure-cognitiveservices-vision-computervision/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell
pip freeze
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell
pip uninstall azure
Usage
=====

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .computer_vision_api import ComputerVisionAPI
from .computer_vision_client import ComputerVisionClient
from .version import VERSION

__all__ = ['ComputerVisionAPI']
__all__ = ['ComputerVisionClient']

__version__ = VERSION

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@
# --------------------------------------------------------------------------

try:
from .word_py3 import Word
from .line_py3 import Line
from .recognition_result_py3 import RecognitionResult
from .text_operation_result_py3 import TextOperationResult
from .face_rectangle_py3 import FaceRectangle
from .celebrities_model_py3 import CelebritiesModel
from .landmarks_model_py3 import LandmarksModel
Expand All @@ -26,26 +22,33 @@
from .image_caption_py3 import ImageCaption
from .image_description_details_py3 import ImageDescriptionDetails
from .face_description_py3 import FaceDescription
from .bounding_rect_py3 import BoundingRect
from .object_hierarchy_py3 import ObjectHierarchy
from .detected_object_py3 import DetectedObject
from .detected_brand_py3 import DetectedBrand
from .image_metadata_py3 import ImageMetadata
from .image_analysis_py3 import ImageAnalysis
from .image_description_py3 import ImageDescription
from .detect_result_py3 import DetectResult
from .model_description_py3 import ModelDescription
from .list_models_result_py3 import ListModelsResult
from .domain_model_results_py3 import DomainModelResults
from .ocr_word_py3 import OcrWord
from .ocr_line_py3 import OcrLine
from .ocr_region_py3 import OcrRegion
from .ocr_result_py3 import OcrResult
from .model_description_py3 import ModelDescription
from .list_models_result_py3 import ListModelsResult
from .domain_model_results_py3 import DomainModelResults
from .celebrity_results_py3 import CelebrityResults
from .landmark_results_py3 import LandmarkResults
from .image_description_py3 import ImageDescription
from .tag_result_py3 import TagResult
from .computer_vision_error_py3 import ComputerVisionError, ComputerVisionErrorException
from .area_of_interest_result_py3 import AreaOfInterestResult
from .image_url_py3 import ImageUrl
from .computer_vision_error_py3 import ComputerVisionError, ComputerVisionErrorException
from .landmark_results_py3 import LandmarkResults
from .celebrity_results_py3 import CelebrityResults
from .word_py3 import Word
from .line_py3 import Line
from .text_recognition_result_py3 import TextRecognitionResult
from .text_operation_result_py3 import TextOperationResult
from .read_operation_result_py3 import ReadOperationResult
except (SyntaxError, ImportError):
from .word import Word
from .line import Line
from .recognition_result import RecognitionResult
from .text_operation_result import TextOperationResult
from .face_rectangle import FaceRectangle
from .celebrities_model import CelebritiesModel
from .landmarks_model import LandmarksModel
Expand All @@ -58,37 +61,44 @@
from .image_caption import ImageCaption
from .image_description_details import ImageDescriptionDetails
from .face_description import FaceDescription
from .bounding_rect import BoundingRect
from .object_hierarchy import ObjectHierarchy
from .detected_object import DetectedObject
from .detected_brand import DetectedBrand
from .image_metadata import ImageMetadata
from .image_analysis import ImageAnalysis
from .image_description import ImageDescription
from .detect_result import DetectResult
from .model_description import ModelDescription
from .list_models_result import ListModelsResult
from .domain_model_results import DomainModelResults
from .ocr_word import OcrWord
from .ocr_line import OcrLine
from .ocr_region import OcrRegion
from .ocr_result import OcrResult
from .model_description import ModelDescription
from .list_models_result import ListModelsResult
from .domain_model_results import DomainModelResults
from .celebrity_results import CelebrityResults
from .landmark_results import LandmarkResults
from .image_description import ImageDescription
from .tag_result import TagResult
from .computer_vision_error import ComputerVisionError, ComputerVisionErrorException
from .area_of_interest_result import AreaOfInterestResult
from .image_url import ImageUrl
from .computer_vision_api_enums import (
TextOperationStatusCodes,
from .computer_vision_error import ComputerVisionError, ComputerVisionErrorException
from .landmark_results import LandmarkResults
from .celebrity_results import CelebrityResults
from .word import Word
from .line import Line
from .text_recognition_result import TextRecognitionResult
from .text_operation_result import TextOperationResult
from .read_operation_result import ReadOperationResult
from .computer_vision_client_enums import (
Gender,
ComputerVisionErrorCodes,
VisualFeatureTypes,
TextOperationStatusCodes,
TextRecognitionResultDimensionUnit,
TextRecognitionResultConfidenceClass,
OcrLanguages,
VisualFeatureTypes,
TextRecognitionMode,
AzureRegions,
Details,
)

__all__ = [
'Word',
'Line',
'RecognitionResult',
'TextOperationResult',
'FaceRectangle',
'CelebritiesModel',
'LandmarksModel',
Expand All @@ -101,27 +111,38 @@
'ImageCaption',
'ImageDescriptionDetails',
'FaceDescription',
'BoundingRect',
'ObjectHierarchy',
'DetectedObject',
'DetectedBrand',
'ImageMetadata',
'ImageAnalysis',
'ImageDescription',
'DetectResult',
'ModelDescription',
'ListModelsResult',
'DomainModelResults',
'OcrWord',
'OcrLine',
'OcrRegion',
'OcrResult',
'ModelDescription',
'ListModelsResult',
'DomainModelResults',
'CelebrityResults',
'LandmarkResults',
'ImageDescription',
'TagResult',
'ComputerVisionError', 'ComputerVisionErrorException',
'AreaOfInterestResult',
'ImageUrl',
'TextOperationStatusCodes',
'ComputerVisionError', 'ComputerVisionErrorException',
'LandmarkResults',
'CelebrityResults',
'Word',
'Line',
'TextRecognitionResult',
'TextOperationResult',
'ReadOperationResult',
'Gender',
'ComputerVisionErrorCodes',
'VisualFeatureTypes',
'TextOperationStatusCodes',
'TextRecognitionResultDimensionUnit',
'TextRecognitionResultConfidenceClass',
'OcrLanguages',
'VisualFeatureTypes',
'TextRecognitionMode',
'AzureRegions',
'Details',
]
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class AdultInfo(Model):
:param is_adult_content: A value indicating if the image contains
adult-oriented content.
:type is_adult_content: bool
:param is_racy_content: A value indicating if the image is race.
:param is_racy_content: A value indicating if the image is racy.
:type is_racy_content: bool
:param adult_score: Score from 0 to 1 that indicates how much of adult
content is within the image.
:param adult_score: Score from 0 to 1 that indicates how much the content
is considered adult-oriented within the image.
:type adult_score: float
:param racy_score: Score from 0 to 1 that indicates how suggestive is the
image.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class AdultInfo(Model):
:param is_adult_content: A value indicating if the image contains
adult-oriented content.
:type is_adult_content: bool
:param is_racy_content: A value indicating if the image is race.
:param is_racy_content: A value indicating if the image is racy.
:type is_racy_content: bool
:param adult_score: Score from 0 to 1 that indicates how much of adult
content is within the image.
:param adult_score: Score from 0 to 1 that indicates how much the content
is considered adult-oriented within the image.
:type adult_score: float
:param racy_score: Score from 0 to 1 that indicates how suggestive is the
image.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AreaOfInterestResult(Model):
"""Result of AreaOfInterest operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar area_of_interest: A bounding box for an area of interest inside an
image.
:vartype area_of_interest:
~azure.cognitiveservices.vision.computervision.models.BoundingRect
:param request_id: Id of the REST API request.
:type request_id: str
:param metadata:
:type metadata:
~azure.cognitiveservices.vision.computervision.models.ImageMetadata
"""

_validation = {
'area_of_interest': {'readonly': True},
}

_attribute_map = {
'area_of_interest': {'key': 'areaOfInterest', 'type': 'BoundingRect'},
'request_id': {'key': 'requestId', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'ImageMetadata'},
}

def __init__(self, **kwargs):
super(AreaOfInterestResult, self).__init__(**kwargs)
self.area_of_interest = None
self.request_id = kwargs.get('request_id', None)
self.metadata = kwargs.get('metadata', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class AreaOfInterestResult(Model):
"""Result of AreaOfInterest operation.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar area_of_interest: A bounding box for an area of interest inside an
image.
:vartype area_of_interest:
~azure.cognitiveservices.vision.computervision.models.BoundingRect
:param request_id: Id of the REST API request.
:type request_id: str
:param metadata:
:type metadata:
~azure.cognitiveservices.vision.computervision.models.ImageMetadata
"""

_validation = {
'area_of_interest': {'readonly': True},
}

_attribute_map = {
'area_of_interest': {'key': 'areaOfInterest', 'type': 'BoundingRect'},
'request_id': {'key': 'requestId', 'type': 'str'},
'metadata': {'key': 'metadata', 'type': 'ImageMetadata'},
}

def __init__(self, *, request_id: str=None, metadata=None, **kwargs) -> None:
super(AreaOfInterestResult, self).__init__(**kwargs)
self.area_of_interest = None
self.request_id = request_id
self.metadata = metadata
Loading

0 comments on commit 6a45cf2

Please sign in to comment.