Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ee26d86
Generated from cf8d4b7ee4befc39b377d86669411e557618edf4
AutorestCI Oct 18, 2018
557d4dd
Packaging update of azure-cognitiveservices-search-newssearch
azuresdkci Oct 18, 2018
0dbceb1
Packaging update of azure-cognitiveservices-search-newssearch
AutorestCI Jan 12, 2020
2af9c81
Packaging update of azure-cognitiveservices-language-spellcheck
AutorestCI Jan 12, 2020
1c4e976
regeneared search services
Jan 12, 2020
e058095
Merge branch 'restapi_auto_generated/cognitiveservices-2018-10-18-779…
Jan 12, 2020
09347db
Packaging update of azure-cognitiveservices-search-autosuggest
AutorestCI Jan 12, 2020
d390535
Packaging update of azure-cognitiveservices-search-videosearch
AutorestCI Jan 12, 2020
28e5cd3
Packaging update of azure-cognitiveservices-search-websearch
AutorestCI Jan 12, 2020
c7534d1
Packaging update of azure-cognitiveservices-search-entitysearch
AutorestCI Jan 12, 2020
03be6fb
Packaging update of azure-cognitiveservices-search-customimagesearch
AutorestCI Jan 12, 2020
0f0b384
Packaging update of azure-cognitiveservices-search-customsearch
AutorestCI Jan 12, 2020
d29871d
fixed test
Jan 12, 2020
cfa67d5
Merge branch 'restapi_auto_generated/cognitiveservices-2018-10-18-779…
Jan 12, 2020
e19fadc
updated history and version
Jan 12, 2020
63b8ac8
removed change made by accident?
Jan 12, 2020
2f18913
spacing
Jan 12, 2020
74631a1
additional test fixes
Jan 12, 2020
8484baa
try to fix test
Jan 12, 2020
f945177
fix test again
Jan 12, 2020
bfdf667
skipping spell test check
Jan 12, 2020
c268e45
import unittest
Jan 12, 2020
6ed6a20
skipping tests
Jan 12, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
Release History
===============

2.0.0 (2020-01-12)
++++++++++++++++++

**Breaking changes**

- SpellCheckAPI main client has been renamed SpellCheckClient

**General Breaking Changes**

This version uses a next-generation code generator that might introduce breaking changes if from some import. In summary, some modules were incorrectly visible/importable and have been renamed. This fixed several issues caused by usage of classes that were not supposed to be used in the first place.
SpellCheckClient cannot be imported from azure.cognitiveservices.language.spellcheck.spell_check_api anymore (import from azure.cognitiveservices.language.spellcheck works like before)
SpellCheckClientConfiguration import has been moved from azure.cognitiveservices.language.spellcheck.spell_check_api to azure.cognitiveservices.language.spellcheck
A model MyClass from a "models" sub-module cannot be imported anymore using azure.cognitiveservices.language.spellcheck.models.my_class (import from azure.cognitiveservices.language.spellcheck.models works like before)
An operation class MyClassOperations from an operations sub-module cannot be imported anymore using azure.cognitiveservices.language.spellcheck.operations.my_class_operations (import from azure.cognitiveservices.language.spellcheck.operations works like before)
Last but not least, HTTP connection pooling is now enabled by default. You should always use a client as a context manager, or call close(), or use no more than one client per process.

1.0.0 (2018-05-02)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Azure SDK for Python

This is the Microsoft Azure Cognitive Services Spellcheck Client Library.

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.

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

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

from .spell_check_api import SpellCheckAPI
from .version import VERSION
from ._configuration import SpellCheckClientConfiguration
from ._spell_check_client import SpellCheckClient
__all__ = ['SpellCheckClient', 'SpellCheckClientConfiguration']

__all__ = ['SpellCheckAPI']
from .version import VERSION

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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 import Configuration

from .version import VERSION


class SpellCheckClientConfiguration(Configuration):
"""Configuration for SpellCheckClient
Note that all parameters used to create this instance are saved as instance
attributes.

:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: "https://westus.api.cognitive.microsoft.com",
"https://api.cognitive.microsoft.com").
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

if endpoint is None:
raise ValueError("Parameter 'endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = '{Endpoint}/bing/v7.0'

super(SpellCheckClientConfiguration, self).__init__(base_url)

# Starting Autorest.Python 4.0.64, make connection pool activated by default
self.keep_alive = True

self.add_user_agent('azure-cognitiveservices-language-spellcheck/{}'.format(VERSION))

self.endpoint = endpoint
self.credentials = credentials
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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.service_client import SDKClient
from msrest import Serializer, Deserializer

from ._configuration import SpellCheckClientConfiguration
from .operations import SpellCheckClientOperationsMixin
from . import models


class SpellCheckClient(SpellCheckClientOperationsMixin, SDKClient):
"""The Spell Check API - V7 lets you check a text string for spelling and grammar errors.

:ivar config: Configuration for client.
:vartype config: SpellCheckClientConfiguration

:param endpoint: Supported Cognitive Services endpoints (protocol and
hostname, for example: "https://westus.api.cognitive.microsoft.com",
"https://api.cognitive.microsoft.com").
:type endpoint: str
:param credentials: Subscription credentials which uniquely identify
client subscription.
:type credentials: None
"""

def __init__(
self, endpoint, credentials):

self.config = SpellCheckClientConfiguration(endpoint, credentials)
super(SpellCheckClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '1.0'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

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

try:
from .spelling_token_suggestion_py3 import SpellingTokenSuggestion
from .spelling_flagged_token_py3 import SpellingFlaggedToken
from .spell_check_py3 import SpellCheck
from .answer_py3 import Answer
from .response_py3 import Response
from .identifiable_py3 import Identifiable
from .error_py3 import Error
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .response_base_py3 import ResponseBase
from ._models_py3 import Answer
from ._models_py3 import Error
from ._models_py3 import ErrorResponse, ErrorResponseException
from ._models_py3 import Identifiable
from ._models_py3 import Response
from ._models_py3 import ResponseBase
from ._models_py3 import SpellCheck
from ._models_py3 import SpellingFlaggedToken
from ._models_py3 import SpellingTokenSuggestion
except (SyntaxError, ImportError):
from .spelling_token_suggestion import SpellingTokenSuggestion
from .spelling_flagged_token import SpellingFlaggedToken
from .spell_check import SpellCheck
from .answer import Answer
from .response import Response
from .identifiable import Identifiable
from .error import Error
from .error_response import ErrorResponse, ErrorResponseException
from .response_base import ResponseBase
from .spell_check_api_enums import (
ErrorType,
from ._models import Answer
from ._models import Error
from ._models import ErrorResponse, ErrorResponseException
from ._models import Identifiable
from ._models import Response
from ._models import ResponseBase
from ._models import SpellCheck
from ._models import SpellingFlaggedToken
from ._models import SpellingTokenSuggestion
from ._spell_check_client_enums import (
ActionType,
ErrorCode,
ErrorSubCode,
ActionType,
ErrorType,
Mode,
)

__all__ = [
'SpellingTokenSuggestion',
'SpellingFlaggedToken',
'SpellCheck',
'Answer',
'Response',
'Identifiable',
'Error',
'ErrorResponse', 'ErrorResponseException',
'Identifiable',
'Response',
'ResponseBase',
'SpellCheck',
'SpellingFlaggedToken',
'SpellingTokenSuggestion',
'ErrorType',
'ErrorCode',
'ErrorSubCode',
'ActionType',
'Mode',
]
Loading