Skip to content
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

Adding Cognitive Services Data Plane Vision+Language SDK #3604

Merged
merged 24 commits into from
Sep 12, 2017

Conversation

DavidLiCIG
Copy link
Contributor

Description


This checklist is used to make sure that common guidelines for a pull request are followed.

General Guidelines

  • [x ] Title of the pull request is clear and informative.
  • [x ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • [x ] Pull request includes test coverage for the included changes.

SDK Generation Guidelines

  • [x ] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
  • [x ] The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
  • [x ] The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

@msftclas
Copy link

@DavidLiCIG,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot

@shahabhijeet
Copy link
Member

@DavidLiCIG seems tests are failing on CI

@@ -0,0 +1,43 @@
<Project Sdk="Microsoft.NET.Sdk">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG can you model your test project by looking at other tests.

@DavidLiCIG DavidLiCIG changed the title Adding Cognitive Services Data Plane Vision SDK. Adding Cognitive Services Data Plane Vision+Language SDK Aug 30, 2017
using System.Net.Http;
using System.Runtime.CompilerServices;

namespace Microsoft.CognitiveServices.Language.Tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the namespace be Microsoft.CognitiveServices.Language.TextAnalytics.Tests? To better match the namespace of the actual API?

}));

Assert.Equal("English", result.Documents[0].DetectedLanguages[0].Name);
Assert.Equal("en", result.Documents[0].DetectedLanguages[0].Iso6391Name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also worth adding an assert for the score

Copy link
Member

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG travis changes have been pushed.
Please address the feedback and this PR is good to be merged

@@ -0,0 +1,28 @@
using Microsoft.CognitiveServices.Language.TextAnalytics;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG we have certain directory structure that is being used throughout the repo.

  1. One being, if you have management and data plane the directories should be structured as
    SDKs\CognitiveServices\management
    SDKs\CognitiveServices\dataPlane
    we rely on particular names to build and run tests during CI build.

Please change the directory structure accordingly.


<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG please remove GeneratePackageOnBuild, we have specific targets to build pacakges.
The target that we use is /t:CreateNugetPackage to create nuget packages, having it part of build system hampers the CI perf.

<PropertyGroup>
<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageReleaseNotes>For detailed release notes, see: </PackageReleaseNotes>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< packagereleasenotes > should be included on the top PropertyGroup where you have PackageId and version defined.
move it under right propertygroup.

<PackageReleaseNotes>For detailed release notes, see: </PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG remove line 20 to 32.
All these are already included for your projects.
Also we no longer use PORTABLE compiler constant in the entire repo. We have few traces of those constants being used in couple of RPs which are on track to be removed.

</ItemGroup>

<ItemGroup>
<None Update="TestImages\detection1.jpg">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG combine items in Itemgroup starting line 27 to be part of ItemGroup starting line 17
Please organize items in limited item groups especially if they logically belong to same category

<PackageReleaseNotes>For detailed release notes, see: </PackageReleaseNotes>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)'=='net452' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG please format project file according to the feedback given to the language project

@@ -0,0 +1,10 @@
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG this file is not needed.

@DavidLiCIG
Copy link
Contributor Author

@shahabhijeet Thanks. All feedbacks are addressed

Copy link
Member

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot to mention earlier.
add < PackageReleaseNotes > and add Release notes.
I would recommend to use < ![CDATA and then format your Release notes

Copy link
Member

@shahabhijeet shahabhijeet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did not see AssemblyInfo for individual SDKs which has AssemblyVersion and AssemblyFileVersion.
If you are missing you need those files.

<PropertyGroup>
<PackageId>Microsoft.CognitiveServices.Language</PackageId>
<Description>This client library provides access to the Microsoft Cognitive Services Language APIs.</Description>
<VersionPrefix>1.0.0</VersionPrefix>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG if this is a preview release, I still see your SDK nuget is not marked as preview
the version should 1.0.0-preview

<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLigCIG please remove this redundant ItemGroup, this is not needed

<PropertyGroup>
<PackageId>Microsoft.CognitiveServices.Vision</PackageId>
<Description>This client library provides access to the Microsoft Cognitive Services Vision APIs.</Description>
<VersionPrefix>1.0.0</VersionPrefix>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG please mark this version as preview if this is a preview release. Release notes say this is preview but the version is not marked accordingly.
Developers who will be downloading from nuget will be confused what is the case, is it preview or not.

<TargetFrameworks>net452;netstandard1.4</TargetFrameworks>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the Itemgroup as it's not needed.

<AssemblyName>Microsoft.CognitiveServices.Language</AssemblyName>
<PackageTags>Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;Text Analytics API;Text Analytics;REST HTTP client;netcore451511</PackageTags>
<PackageReleaseNotes>This is a preview release of the Cognitive Services Language SDK. Included with this release is support for Text Analytics API.</PackageReleaseNotes>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG generating documentation property is already applicable for the SDKs, this is again redundant, please remove

<AssemblyName>Microsoft.CognitiveServices.Vision</AssemblyName>
<PackageTags>Microsoft Cognitive Services;Cognitive Services;Cognitive Services SDK;Face API;REST HTTP client;Face SDK;netcore451511</PackageTags>
<PackageReleaseNotes>This is a preview release of the Cognitive Services Vision SDK. Included with this release is support for Face API.</PackageReleaseNotes>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DavidLiCIG please remove redundant property

@shahabhijeet shahabhijeet merged commit 9210f53 into Azure:psSdkJson6 Sep 12, 2017
JasonYang-MSFT pushed a commit to JasonYang-MSFT/azure-sdk-for-net that referenced this pull request Dec 8, 2017
* Adding Vision SDK.

* Add Text Analytics SDK.

* Adding Vision

* Removing key.

* Removing unneeded files

* Removing key.

* Hooking up Cognitive SDKs with build.

* Updating Swagger spec.

* Fix build

* Moving files around and adding sub namespace for TA.

* Moving managemenet and dataplane folders into their respective folders.

* Updating csproj and files based on comments.

* Simplifying csprojects

* Move to temp directory

* Move back to dataPlane with right casing

* Move to dataPlane directory

* Fixing presumptive OS specific path convention.

* Adding Assembly.Info for Language

* Adding AssemblyInfo for VIsion

* Updates based on feedback.

* Adding a simple readme.md.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants