Skip to content

Commit 41e37c8

Browse files
AutorestCIlmazuel
authored andcommitted
[AutoPR] cognitiveservices/data-plane/ComputerVision (#2614)
* Generated from 984c12a568b2dd36acb521eb3b1c00fbd5b42995 (#2575) Update CognitiveService ComputerVision Swagger for new extensions (#1) * Merged PR 17875: Add new languages Add new languages Also tidy up the enum definition so that AutoRest generates C# that actually compiles * Merged PR 17942: Replace fancy quotes with plain single quotes Make javac compile without complaint even without setting the codepage to utf-8 by dropping the gratuitous typographic quotes. * Merged PR 17956: Rename url argument for overloaded endpoint to imageUrl This name will become the name of the argument in Python. Since you can used named arguments in Python, give them less ambiguous names. * Changes to make --azure-validator run more cleanly Errors Fixed * XmsExamplesRequired/D5001/Documentation (7) * XmsPathsMustOverloadPaths/R2058/SDKViolation (7) Errors Ignored * SecurityDefinitionsStructure/R2054/SDKViolation (1) - API Key scheme for Cognitive Services * APIVersionPattern/R3012/ARMViolation (1) - Keeping with the Cognitive Services numbering scheme * OperationsAPIImplementation/R3023/ARMViolation (1) - Not sure what this is Warnings Fixed * XmsEnumValidation/R2018/SDKViolation (1) * DescriptionAndTitleMissing/R4000/SDKViolation (1) Warnings Ignored * DescriptionAndTitleMissing/R4000/SDKViolation (35) - description is contained in #ref * EnumInsteadOfBoolean/R3018/ARMViolation (5) - fix would be a breaking change * ListInOperationName/R1003/SDKViolation (1) - fix would be a breaking change * LongRunningOperationsWithLongRunningExtension/R2007/SDKViolation (2) - endpoint will not ultimately yield a 200, as this extension would require * NonApplicationJsonType/R2004/ARMViolation (15) - fix would be breaking change * PageableOperation/R2029/SDKViolation (1) - not actually pageable * ParameterNotDefinedInGlobalParameters/R2015/SDKViolation (1) - All our own parameters specify x-ms-parameter-location * PostOperationIdContainsUrlVerb/R2066/SDKViolation (7) - fix would be breaking change * Generated from bd6c66b615b94480a1458dde3a8bc42f3a689548 (#2645) ComputerVision - collection of fixes * fix ocr language parameter to fix [bug](Azure/azure-sdk-for-net#4083) * language parameter missing for /tag path * language parameter missing for /models/*/analyze path * make /models/*/analyze return a more generic type * add specific types for /models/*/analyze to return for current models * Generated from b35c48945774ac7be9bf0fa05e19c0890141bb3d (#2731) Add Spanish as an option as ServiceLanguage for ComputerVision. * [AutoPR cognitiveservices/data-plane/ComputerVision] Update CognitiveService ComputerVision API to V2 (#2747) * Generated from c2567da015994dac3301f495b6c5011d28ceaffe Add post-processing directive to swap argument order for RecognizeText to position the url argument ahead of the mode argument. autorest does not generate the intended order, so we add a post-processing directive, for each target language, * Generated from 973322cfd6ec2ced60a732f53b5318ceded5de7b Fix validation errors * Generated from 70efe042d607cbd973734e432da395ed35191a03 Add Spanish support for ServiceLanguage This is for parity with V1. * Generated from 6492fb4e04a3e5d7330ceccbb9f67e2a839e2290 (#2775) ComputerVision add tag.hint Hints provided additional info for whole-image analysis tags. This PR is to make the Swagger match the service behavior. * Update version.py * ComputerVision 0.2.0 packaging
1 parent 223ddb6 commit 41e37c8

File tree

73 files changed

+1781
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1781
-736
lines changed

azure-cognitiveservices-vision-computervision/HISTORY.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,48 @@
33
Release History
44
===============
55

6+
0.2.0 (2018-06-22)
7+
++++++++++++++++++
8+
9+
**Features**
10+
11+
- analyze_image now support 'en', 'es', 'ja', 'pt', 'zh' (including "in_stream" version of these operations)
12+
- describe_image/tag_image/analyze_image_by_domain now support the language parameter (including "in_stream" version of these operations)
13+
- Client class can be used as a context manager to keep the underlying HTTP session open for performance
14+
15+
**Bug fixes**
16+
17+
- Fix several invalid JSON description, that was raising unexpected exceptions (including OCRResult from bug #2614)
18+
19+
**Breaking changes**
20+
21+
- recognize_text "detect_handwriting" boolean is now a "mode" str between 'Handwritten' and 'Printed'
22+
23+
**General Breaking changes**
24+
25+
This version uses a next-generation code generator that *might* introduce breaking changes.
26+
27+
- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
28+
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
29+
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
30+
While this is not a breaking change, the distinctions are important, and are documented here:
31+
https://docs.python.org/3/library/enum.html#others
32+
At a glance:
33+
34+
- "is" should not be used at all.
35+
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.
36+
37+
- New Long Running Operation:
38+
39+
- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
40+
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
41+
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
42+
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
43+
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
44+
the response of the initial call will be returned without polling.
45+
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
46+
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.
47+
648
0.1.0 (2018-01-23)
749
++++++++++++++++++
850

azure-cognitiveservices-vision-computervision/README.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,7 @@ Microsoft Azure SDK for Python
33

44
This is the Microsoft Azure Cognitive Services Computer Vision Client Library.
55

6-
Azure Resource Manager (ARM) is the next generation of management APIs that
7-
replace the old Azure Service Management (ASM).
8-
9-
This package has been tested with Python 2.7, 3.3, 3.4, 3.5 and 3.6.
10-
11-
For the older Azure Service Management (ASM) libraries, see
12-
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
6+
This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
137

148
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.
159

@@ -33,6 +27,14 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
3327
pip uninstall azure
3428
3529
30+
Usage
31+
=====
32+
33+
For code examples, see `Cognitive Services Computer Vision
34+
<https://docs.microsoft.com/python/api/overview/azure/cognitive-services>`__
35+
on docs.microsoft.com.
36+
37+
3638
Provide Feedback
3739
================
3840

0 commit comments

Comments
 (0)