Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into fr-business-cards

* 'master' of https://github.com/Azure/azure-sdk-for-python: (21 commits)
  Sync eng/common directory with azure-sdk-tools for PR 1052 (#14232)
  [Storage][FileShare]Regenerate code for file tier (#14302)
  [ServiceBus] ServiceBus Operation Timeout Support (#13854)
  Increment package version after release of azure_data_tables (#14309)
  Increment version for textanalytics releases (#14295)
  [formrecognizer] add locale to receipt samples (#14292)
  [form recognizer] add sample business cards to test forms (#14303)
  add back code (#14289)
  update release date (#14291)
  Increment version for search releases (#14290)
  Update Changelog for communication packages (#14268)
  Changelog for azure-identity 1.5.0b2 (#14288)
  [text analytics] changelog add release date, fix wording (#14286)
  Computer Vision 0.7.0 release (#14269)
  SetDevVersion Is Triggering Oddly (#14261)
  Revise get_token docs (#14263)
  Increment version for servicebus releases (#14265)
  redo the dep update (#14264)
  [EventGrid] Prepare for beta3 release (#14262)
  [ServiceBus] b7 release doc fixes (#14247)
  ...
  • Loading branch information
iscai-msft committed Oct 7, 2020
2 parents 4961506 + 0415c8a commit c3b049c
Show file tree
Hide file tree
Showing 92 changed files with 1,107 additions and 917 deletions.
14 changes: 10 additions & 4 deletions eng/common/pipelines/templates/steps/create-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ parameters:
GHTeamReviewersVariable: ''
# Multiple labels seperated by comma, e.g. "bug, APIView"
PRLabels: ''
SkipCheckingForChanges: false

steps:

Expand All @@ -35,15 +36,19 @@ steps:
echo "##vso[task.setvariable variable=HasChanges]$false"
echo "No changes so skipping code push"
}
displayName: Check for changes
condition: and(succeeded(), eq(${{ parameters.SkipCheckingForChanges }}, false))
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- pwsh: |
# Remove the repo owner from the front of the repo name if it exists there
$repoName = "${{ parameters.RepoName }}" -replace "^${{ parameters.RepoOwner }}/", ""
echo "##vso[task.setvariable variable=RepoNameWithoutOwner]$repoName"
echo "RepoName = $repName"
displayName: Check for changes
echo "RepoName = $repoName"
displayName: Remove Repo Owner from Repo Name
condition: succeeded()
workingDirectory: ${{ parameters.WorkingDirectory }}
ignoreLASTEXITCODE: true

- task: PowerShell@2
displayName: Push changes
Expand All @@ -57,6 +62,7 @@ steps:
-CommitMsg "${{ parameters.CommitMsg }}"
-GitUrl "https://$(azuresdk-github-pat)@github.com/${{ parameters.PROwner }}/$(RepoNameWithoutOwner).git"
-PushArgs "${{ parameters.PushArgs }}"
-SkipCommit $${{parameters.SkipCheckingForChanges}}
- task: PowerShell@2
displayName: Create pull request
Expand Down
53 changes: 53 additions & 0 deletions eng/common/scripts/Add-Issue-Comment.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter(Mandatory = $true)]
[string]$RepoOwner,

[Parameter(Mandatory = $true)]
[string]$RepoName,

[Parameter(Mandatory = $true)]
[string]$IssueNumber,

[Parameter(Mandatory = $false)]
[string]$CommentPrefix,

[Parameter(Mandatory = $true)]
[string]$Comment,

[Parameter(Mandatory = $false)]
[string]$CommentPostFix,

[Parameter(Mandatory = $true)]
[string]$AuthToken
)

. "${PSScriptRoot}\logging.ps1"

$headers = @{
Authorization = "bearer $AuthToken"
}

$apiUrl = "https://api.github.com/repos/$RepoOwner/$RepoName/issues/$IssueNumber/comments"

$commentPrefixValue = [System.Environment]::GetEnvironmentVariable($CommentPrefix)
$commentValue = [System.Environment]::GetEnvironmentVariable($Comment)
$commentPostFixValue = [System.Environment]::GetEnvironmentVariable($CommentPostFix)

if (!$commentPrefixValue) { $commentPrefixValue = $CommentPrefix }
if (!$commentValue) { $commentValue = $Comment }
if (!$commentPostFixValue) { $commentPostFixValue = $CommentPostFix }

$PRComment = "$commentPrefixValue $commentValue $commentPostFixValue"

$data = @{
body = $PRComment
}

try {
$resp = Invoke-RestMethod -Method POST -Headers $headers -Uri $apiUrl -Body ($data | ConvertTo-Json)
}
catch {
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_"
exit 1
}
56 changes: 56 additions & 0 deletions eng/common/scripts/Queue-Pipeline.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
[CmdletBinding(SupportsShouldProcess = $true)]
param(
[Parameter(Mandatory = $true)]
[string]$Organization,

[Parameter(Mandatory = $true)]
[string]$Project,

[Parameter(Mandatory = $true)]
[string]$SourceBranch,

[Parameter(Mandatory = $true)]
[int]$DefinitionId,

[Parameter(Mandatory = $false)]
[string]$VsoQueuedPipelines,

[Parameter(Mandatory = $true)]
[string]$AuthToken
)

. "${PSScriptRoot}\logging.ps1"

$headers = @{
Authorization = "Basic $AuthToken"
}

$apiUrl = "https://dev.azure.com/$Organization/$Project/_apis/build/builds?api-version=6.0"

$body = @{
sourceBranch = $SourceBranch
definition = @{ id = $DefinitionId }
}

Write-Verbose ($body | ConvertTo-Json)

try {
$resp = Invoke-RestMethod -Method POST -Headers $headers $apiUrl -Body ($body | ConvertTo-Json) -ContentType application/json
}
catch {
LogError "Invoke-RestMethod [ $apiUrl ] failed with exception:`n$_"
exit 1
}

LogDebug "Pipeline [ $($resp.definition.name) ] queued at [ $($resp._links.web.href) ]"

if ($VsoQueuedPipelines) {
$enVarValue = [System.Environment]::GetEnvironmentVariable($VsoQueuedPipelines)
$QueuedPipelineLinks = if ($enVarValue) {
"$enVarValue<br>[$($resp.definition.name)]($($resp._links.web.href))"
}else {
"[$($resp.definition.name)]($($resp._links.web.href))"
}
$QueuedPipelineLinks
Write-Host "##vso[task.setvariable variable=$VsoQueuedPipelines]$QueuedPipelineLinks"
}
22 changes: 15 additions & 7 deletions eng/common/scripts/git-branch-push.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ param(
[string] $GitUrl,

[Parameter(Mandatory = $false)]
[string] $PushArgs = ""
[string] $PushArgs = "",

[Parameter(Mandatory = $false)]
[boolean] $SkipCommit = $false
)

# This is necessay because of the janky git command output writing to stderr.
Expand Down Expand Up @@ -57,12 +60,17 @@ if ($LASTEXITCODE -ne 0)
exit $LASTEXITCODE
}

Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`""
git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)"
if ($LASTEXITCODE -ne 0)
{
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above."
exit $LASTEXITCODE
if (!$SkipCommit) {
Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`""
git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)"
if ($LASTEXITCODE -ne 0)
{
Write-Error "Unable to add files and create commit LASTEXITCODE=$($LASTEXITCODE), see command output above."
exit $LASTEXITCODE
}
}
else {
Write-Host "Skipped applying commit"
}

# The number of retries can be increased if necessary. In theory, the number of retries
Expand Down
1 change: 0 additions & 1 deletion eng/common/scripts/modules/ChangeLog-Operations.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Common Changelog Operations

$RELEASE_TITLE_REGEX = "(?<releaseNoteTitle>^\#+.*(?<version>\b\d+\.\d+\.\d+([^0-9\s][^\s:]+)?)(\s(?<releaseStatus>\(Unreleased\)|\(\d{4}-\d{2}-\d{2}\)))?)"

# Returns a Collection of changeLogEntry object containing changelog info for all version present in the gived CHANGELOG
Expand Down
1 change: 1 addition & 0 deletions eng/common/scripts/modules/Package-Properties.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# This Files has been retired
# Helper functions for retireving useful information from azure-sdk-for-* repo
# Example Use : Import-Module .\eng\common\scripts\modules
class PackageProps
Expand Down
3 changes: 2 additions & 1 deletion eng/ignore-links.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}}
https://docs.microsoft.com/python/api/overview/azure/{{package_doc_id}}
https://pypi.org/project/azure-servicebus/7.0.0b7/
22 changes: 18 additions & 4 deletions scripts/devops_tasks/build_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,18 @@
sys.path.append(tox_path)
from sanitize_setup import process_requires

def build_packages(targeted_packages, distribution_directory, is_dev_build = False):

def str_to_bool(input_string):
if isinstance(input_string, bool):
return input_string
elif input_string.lower() in ("true", "t", "1"):
return True
elif input_string.lower() in ("false", "f", "0"):
return False
else:
return False

def build_packages(targeted_packages, distribution_directory, is_dev_build=False):
# run the build and distribution
for package_root in targeted_packages:
print(package_root)
Expand Down Expand Up @@ -93,7 +104,6 @@ def verify_update_package_requirement(pkg_root):
),
)


args = parser.parse_args()

# We need to support both CI builds of everything and individual service
Expand All @@ -104,5 +114,9 @@ def verify_update_package_requirement(pkg_root):
else:
target_dir = root_dir

targeted_packages = process_glob_string(args.glob_string, target_dir, args.package_filter_string)
build_packages(targeted_packages, args.distribution_directory, bool(args.is_dev_build))
targeted_packages = process_glob_string(
args.glob_string, target_dir, args.package_filter_string
)
build_packages(
targeted_packages, args.distribution_directory, str_to_bool(args.is_dev_build)
)
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 0.7.0 (2020-10-08)

**Features**

- Supports 3.1 service version

## 0.6.0 (2020-05-18)

**Features**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(
super(ComputerVisionClient, 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 = '3.0'
self.api_version = '3.1'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
raise ValueError("Parameter 'endpoint' must not be None.")
if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
base_url = '{Endpoint}/vision/v3.0'
base_url = '{Endpoint}/vision/v3.1'

super(ComputerVisionClientConfiguration, self).__init__(base_url)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -726,14 +726,14 @@ def read(
:param url: Publicly reachable URL of an image.
:type url: str
:param language: The BCP-47 language code of the text to be detected
in the image. In future versions, when language parameter is not
passed, language detection will be used to determine the language.
However, in the current version, missing language parameter will cause
English to be used. To ensure that your document is always parsed in
English without the use of language detection in the future, pass “en”
in the language parameter. Possible values include: 'en', 'es', 'fr',
'de', 'it', 'nl', 'pt'
:param language: The BCP-47 language code of the text in the document.
Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German
(‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are
supported. Read supports auto language identification and
multi-language documents, so only provide a language code if you would
like to force the documented to be processed as that specific
language. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl',
'pt'
:type language: str or
~azure.cognitiveservices.vision.computervision.models.OcrDetectionLanguage
:param dict custom_headers: headers that will be added to the request
Expand Down Expand Up @@ -1513,14 +1513,14 @@ def read_in_stream(
:param image: An image stream.
:type image: Generator
:param language: The BCP-47 language code of the text to be detected
in the image. In future versions, when language parameter is not
passed, language detection will be used to determine the language.
However, in the current version, missing language parameter will cause
English to be used. To ensure that your document is always parsed in
English without the use of language detection in the future, pass “en”
in the language parameter. Possible values include: 'en', 'es', 'fr',
'de', 'it', 'nl', 'pt'
:param language: The BCP-47 language code of the text in the document.
Currently, only English ('en'), Dutch (‘nl’), French (‘fr’), German
(‘de’), Italian (‘it’), Portuguese (‘pt), and Spanish ('es') are
supported. Read supports auto language identification and
multi-language documents, so only provide a language code if you would
like to force the documented to be processed as that specific
language. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl',
'pt'
:type language: str or
~azure.cognitiveservices.vision.computervision.models.OcrDetectionLanguage
:param dict custom_headers: headers that will be added to the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------

VERSION = "0.6.0"
VERSION = "0.7.0"

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Release History

## 1.0.0b2 (Unreleased)
## 1.0.0b2 (2020-10-06)
- Added support for phone number administration.

## 1.0.0b1 (2020-09-22)
- Preview release of the package
- Preview release of the package.
5 changes: 3 additions & 2 deletions sdk/communication/azure-communication-chat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Release History

## 1.0.0b2 (Unreleased)
## 1.0.0b2 (2020-10-06)
- Updated `azure-communication-chat` version.

## 1.0.0b1 (2020-09-22)
- Add ChatClient and ChatThreadClient
- Add ChatClient and ChatThreadClient.
5 changes: 3 additions & 2 deletions sdk/communication/azure-communication-sms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Release History

## 1.0.0b2 (Unreleased)
## 1.0.0b2 (2020-10-06)
- Updated `azure-communication-sms` version.

## 1.0.0b1 (2020-09-22)
- Preview release of the package
- Preview release of the package.
3 changes: 3 additions & 0 deletions sdk/communication/azure-mgmt-communication/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Release History

## 1.0.0b3 (2020-10-06)
- Updated `azure-mgmt-communication` version.

## 1.0.0b2 (2020-09-22)

This version uses a next-generation code generator that introduces important breaking changes, but also important new features (like unified authentication and async programming).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b2"
VERSION = "1.0.0b3"
2 changes: 1 addition & 1 deletion sdk/eventgrid/azure-eventgrid/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Release History

## 2.0.0b3 (Unreleased)
## 2.0.0b3 (2020-10-05)

**Feature**
- Added support for Keyvault Event Types
Expand Down
2 changes: 2 additions & 0 deletions sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

- New methods `begin_recognize_business_cards` and `beging_recognize_business_cards_from_url` introduced to the SDK. Use these
methods to recognize data from business cards.
- Recognize receipt methods now take keyword argument `locale` to optionally indicate the locale of the receipt for
improved results

## 3.0.0 (2020-08-20)

Expand Down
Loading

0 comments on commit c3b049c

Please sign in to comment.