-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cogs Face] Update Face SDK with latest auto-rest Swagger and update unit tests #3977
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please sync with David li in case you need more information about recording tests. If not let me know if you have any questions. I am tagging David on this PR
@@ -3,7 +3,7 @@ | |||
<PropertyGroup> | |||
<PackageId>Microsoft.Azure.CognitiveServices.Vision</PackageId> | |||
<Description>This client library provides access to the Microsoft Cognitive Services Vision APIs.</Description> | |||
<VersionPrefix>1.0.1-preview</VersionPrefix> | |||
<VersionPrefix>1.0.2-preview</VersionPrefix> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lebronJ please model your csproj according to the below project.
https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/CognitiveServices/dataPlane/Search/BingCustomSearch/BingCustomSearch/Microsoft.Azure.CognitiveServices.Search.CustomSearch.csproj
you are missing imports at the bottom of the project file and also you don't need few project properties that you have added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refined this csproj following the styles of above BingCustomSearch
{ | ||
// Retrieve the configuration information. | ||
FaceSubscriptionKey = ""; | ||
Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lebronJ you do not set this in test case, rather you set this in your connection string.
you use test framework to record tests
https://github.com/Azure/azure-powershell/blob/preview/documentation/Using-Azure-TestFramework.md#manually-set-environment-variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this unnecessary setting
Environment.SetEnvironmentVariable("AZURE_TEST_MODE", "Playback");
@DavidLiCIG can you review the test part of this PR |
@shahabhijeet Updated following your comments. |
This package should be released as an update to Microsoft.Azure.CognitiveServices.Vision package which is already on version 1.0.1.preview. |
<Folder Include="Generated\Face\Models\" /> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
<Import Condition=" Exists('$([MSBuild]::GetPathOfFileAbove(AzSdk.RP.props))') " Project="$([MSBuild]::GetPathOfFileAbove('AzSdk.RP.props'))" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lebronJ add the following comment above/below line 2 and line 16
https://github.com/Azure/azure-sdk-for-net/blob/psSdkJson6/src/SDKs/AnalysisServices/Management.Analysis/Microsoft.Azure.Management.Analysis.csproj#L2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@shahabhijeet Updated following your comments. Any updates? Thanks. |
Have you used generate.cmd to generate your SDK? Using generate.cmd is essential to create the meta data file (it's a .txt file that has information about from what this SDK was generated) |
@shahabhijeet Updated by regenerating SDK with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add your vision sdk under this directory
SDKs\CognitiveServices\dataPlane\Vision\VisionSdk\VisionSDKs\CognitiveServices\dataPlane\Vision\VisionSdk\Vision.Tests
This helps in identifying tests for your sdk.
This aligns with all the other SDKs that are checked in, e.g. ContentModerator
@shahabhijeet I have updated this PR by separating |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove CognitiveServices/dataPlane/Vision/Vision/Generated/Face
I believe those files were left when you moved the files.
At this point you are better off create a new PR, this PR is already riddled with lot of commits.
It's better you create a new PR with all these changes with minimum commits
…it tests, separate Face/CV aligning with other Vision APIs.
86ca440
to
37d38ac
Compare
Thanks @shahabhijeet , I removed the unused Vision SDK folder as you commented.
So I rebased this PR to latest commit and force pushed it as one single commit. |
Hi @shahabhijeet , could you please help share how to release this updated Nuget package? Thanks. One thing to note: |
Hi @lebronJ you can use this job to publish the new Nuget packages. https://azuresdkci.westus2.cloudapp.azure.com/view/NetCore-SDK/job/NetCore-SDK-Publish/ |
Thanks @DavidLiCIG , published. |
1.0.2
ComputerVision
andFace
aligning with other Vision SDKs.This has been internally reviewed (lebronJ#1) inside Face SDK team.