Skip to content

Commit 1079706

Browse files
authored
Merge pull request watson-developer-cloud#112 from watson-developer-cloud/rc-1.0.0
.NET Standard SDK v1.0.0
2 parents 4eeaba3 + 07cf980 commit 1079706

File tree

659 files changed

+32580
-9945
lines changed

Some content is hidden

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

659 files changed

+32580
-9945
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
*.userosscache
88
*.sln.docstates
99
config
10-
10+
packages/
11+
coverage/
1112
# User-specific files (MonoDevelop/Xamarin Studio)
1213
*.userprefs
1314

@@ -236,4 +237,4 @@ _Pvt_Extensions
236237
# FAKE - F# Make
237238
.fake/
238239
/src/IBM.WatsonDeveloperCloud.LanguageTranslator.Test/appsettings.json
239-
/test/IBM.WatsonDeveloperCloud.LanguageTranslator.IntegrationTests/appsettings.json
240+
/test/IBM.WatsonDeveloperCloud.LanguageTranslator.v2.IntegrationTests/appsettings.json

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
Change Log
22
==========
3+
## Version 1.0.0
4+
_2017-06_19_
5+
* Breaking Change: Refactor SDK to integrate generated services including adding service version to the package namespace.
6+
* New: Generate services for `Personality Insights`, `Tone Analyzer`, `Conversation`, `Natural Language Understanding` and `Discovery` via Swagger Codegen.
7+
* Integration and unit test for all generated services.
8+
39
## Version 0.2.0
410
_2017-04-25_
511

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "Watson Developer Cloud .NET Standard SDK"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = 0.1.0
41+
PROJECT_NUMBER = 1.0.0
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

IBM.WatsonDeveloperCloud.sln

Lines changed: 317 additions & 279 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,15 @@ Ensure you have the following prerequisites:
2323
## Installing the Watson .NET Standard SDK
2424
You can get the latest SDK packages through NuGet. Installation instructions can be found in the ReadMe of each package.
2525

26-
* [Speech to Text](/src/IBM.WatsonDeveloperCloud.SpeechToText)
27-
* [Text to Speech](/src/IBM.WatsonDeveloperCloud.TextToSpeech)
28-
* [Conversation](/src/IBM.WatsonDeveloperCloud.Conversation)
29-
* [Visual Recognition](/src/IBM.WatsonDeveloperCloud.VisualRecognition)
30-
* [Language Translator](/src/IBM.WatsonDeveloperCloud.LanguageTranslator)
31-
* [Tone Analyzer](/src/IBM.WatsonDeveloperCloud.ToneAnalyzer)
32-
* [Personality Insights](/src/IBM.WatsonDeveloperCloud.PersonalityInsights)
33-
<!-- * [Discovery](/src/IBM.WatsonDeveloperCloud.Discovery) -->
26+
* [Conversation](/src/IBM.WatsonDeveloperCloud.Conversation.v1)
27+
* [Discovery](/src/IBM.WatsonDeveloperCloud.Discovery.v1)
28+
* [Language Translator](/src/IBM.WatsonDeveloperCloud.LanguageTranslator.v2)
29+
* [Natural Language Understanding](/src/IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1)
30+
* [Personality Insights](/src/IBM.WatsonDeveloperCloud.PersonalityInsights.v3)
31+
* [Speech to Text](/src/IBM.WatsonDeveloperCloud.SpeechToText.v1)
32+
* [Text to Speech](/src/IBM.WatsonDeveloperCloud.TextToSpeech.v1)
33+
* [Tone Analyzer](/src/IBM.WatsonDeveloperCloud.ToneAnalyzer.v3)
34+
* [Visual Recognition](/src/IBM.WatsonDeveloperCloud.VisualRecognition.v3)
3435

3536
Or manually [here][latest_release].
3637

@@ -60,20 +61,20 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).<TODO revise coding standard>
6061
[dw-answers]: https://developer.ibm.com/answers/questions/ask/?topics=watson
6162
[stack-overflow]: http://stackoverflow.com/questions/ask?tags=ibm-watson
6263

63-
[conversation]:http://www.ibm.com/watson/developercloud/doc/conversation/
64-
[discovery]: http://www.ibm.com/watson/developercloud/discovery/api/v1/
65-
[speech_to_text]: http://www.ibm.com/watson/developercloud/doc/speech-to-text/
66-
[text_to_speech]: http://www.ibm.com/watson/developercloud/doc/text-to-speech/
67-
[visual_recognition]: http://www.ibm.com/watson/developercloud/visual-recognition/api/v3/
68-
[language_translator]: http://www.ibm.com/watson/developercloud/doc/language-translator/
69-
[personality_insights]: http://www.ibm.com/watson/developercloud/personality-insights/api/v2/
70-
[tone_analyzer]: http://www.ibm.com/watson/developercloud/doc/tone-analyzer/
71-
72-
[document_conversion]: http://www.ibm.com/watson/developercloud/document-conversion/api/v1/
73-
[retrieve_and_rank]: http://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/
74-
[natural_language_classifier]: http://www.ibm.com/watson/developercloud/doc/natural-language-classifier/index.html
75-
[alchemyData_news]: http://www.ibm.com/watson/developercloud/alchemy-data-news.html
76-
[tradeoff_analytics]: http://www.ibm.com/watson/developercloud/doc/tradeoff-analytics/
64+
[conversation]:https://www.ibm.com/watson/developercloud/conversation/api/v1/
65+
[discovery]: https://www.ibm.com/watson/developercloud/discovery/api/v1/
66+
[language_translator]: https://www.ibm.com/watson/developercloud/language-translator/api/v2/
67+
[natural_language_understanding]: https://www.ibm.com/watson/developercloud/natural-language-understanding/api/v1/
68+
[personality_insights]: https://www.ibm.com/watson/developercloud/personality-insights/api/v2/
69+
[speech_to_text]: https://www.ibm.com/watson/developercloud/speech-to-text/api/v1/
70+
[text_to_speech]: https://www.ibm.com/watson/developercloud/text-to-speech/api/v1/
71+
[tone_analyzer]: https://www.ibm.com/watson/developercloud/tone-analyzer/api/v3/
72+
[visual_recognition]: https://www.ibm.com/watson/developercloud/visual-recognition/api/v3/
73+
74+
[document_conversion]: https://www.ibm.com/watson/developercloud/document-conversion/api/v1/
75+
[retrieve_and_rank]: https://www.ibm.com/watson/developercloud/retrieve-and-rank/api/v1/
76+
[natural_language_classifier]: https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/
77+
[tradeoff_analytics]: https://www.ibm.com/watson/developercloud/tradeoff-analytics/api/v1/
7778

7879
[dotnet-core-download]: https://www.microsoft.com/net/download/core
7980
[visual-studio-download]: https://www.visualstudio.com/vs/community/

appveyor.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.1.{build}
1+
version: 0.3.{build}
22
branches:
33
except:
44
- gh-pages
@@ -54,10 +54,12 @@ after_build:
5454
Write-Output "branchName is " + $branchName
5555
5656
57-
If($branchName -eq "development" -or $branchName -eq $env:APPVEYOR_REPO_TAG_NAME -or $branchName -eq "release")
57+
.\packages\Doxygen.1.8.13\tools\doxygen.exe Doxyfile
58+
59+
60+
If($branchName -eq "development" -or $branchName -eq $env:APPVEYOR_REPO_TAG_NAME -or $branchName -eq "master")
5861
5962
{
60-
.\packages\Doxygen.1.8.13\tools\doxygen.exe Doxyfile
6163
git config --global user.email "[email protected]"
6264
git config --global user.name "Watson Github Bot"
6365
git clone --quiet --branch=gh-pages https://$env:[email protected]/watson-developer-cloud/dotnet-standard-sdk.git gh-pages
@@ -84,32 +86,38 @@ after_build:
8486
}
8587
8688
87-
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.VisualRecognition.IntegrationTests\exampleData C:\projects\dotnet-standard-sdk
89+
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.VisualRecognition.v3.IntegrationTests\VisualRecognitionTestData C:\projects\dotnet-standard-sdk\VisualRecognitionTestData
90+
91+
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.SpeechToText.v1.IntegrationTests\SpeechToTextTestData C:\projects\dotnet-standard-sdk\SpeechToTextTestData
8892
89-
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.SpeechToText.IntegrationTests\Assets C:\projects\dotnet-standard-sdk
93+
Move-Item C:\projects\dotnet-standard-sdk\test\IBM.WatsonDeveloperCloud.Discovery.v1.IntegrationTests\DiscoveryTestData C:\projects\dotnet-standard-sdk\DiscoveryTestData
9094
test_script:
91-
- ps: "if((Test-Path -Path coverage))\n{\n rm coverage -r -force\n}\nNew-Item -path . -name coverage -itemtype directory\nForEach ($folder in (Get-ChildItem -Path C:\\projects\\dotnet-standard-sdk\\test -Directory)) { \n if(!$folder.Name.Contains(\"Discovery\") -and !$folder.Name.Contains(\"TextToSpeech\") -and !$folder.Name.Contains(\"PersonalityInsights\"))\n {\n if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)\n {\n Write-Output \"No pull request number. Executing tests\"\n dotnet test $folder.FullName\n if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }\n echo \"Test passed: $?\"\n echo \"LastExitCode: $LastExitCode\"\n $openCover = 'C:\\projects\\dotnet-standard-sdk\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe' \n $targetArgs = '-targetargs: test ' + $folder.FullName + ' -c Release -f netcoreapp1.0'\n $filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'\n & $openCover '-target:C:\\Program Files\\dotnet\\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\\bin\\release\\netcoreapp1.0' '-output:coverage\\coverage.xml'\n }\n else\n {\n Write-Output \"Pull request number is $env:APPVEYOR_PULL_REQUEST_NUMBER. Skipping tests.\"\n }\n }\n}\n\nC:\\projects\\dotnet-standard-sdk\\packages\\ReportGenerator.2.4.5.0\\tools\\ReportGenerator.exe -reports:coverage\\coverage.xml -targetdir:coverage -verbosity:Error\n\nif($env:COVERALLS_REPO_TOKEN)\n{\n C:\\projects\\dotnet-standard-sdk\\packages\\coveralls.net.0.7.0\\tools\\csmacnz.Coveralls.exe --opencover -i coverage\\coverage.xml --useRelativePaths\n}\nelse\n{\n Write-Output \"There is no Coveralls Repo Token - not pushing coverage.\"\n}"
95+
- ps: "if((Test-Path -Path coverage))\n{\n rm coverage -r -force\n}\nNew-Item -path . -name coverage -itemtype directory\nForEach ($folder in (Get-ChildItem -Path C:\\projects\\dotnet-standard-sdk\\test -Directory)) { \n if(!$folder.Name.Contains(\"TextToSpeech\"))\n {\n if($env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)\n {\n Write-Output \"No pull request number. Executing tests\"\n dotnet test $folder.FullName\n if($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode ) }\n echo \"Test passed: $?\"\n echo \"LastExitCode: $LastExitCode\"\n $openCover = 'C:\\projects\\dotnet-standard-sdk\\packages\\OpenCover.4.6.519\\tools\\OpenCover.Console.exe' \n $targetArgs = '-targetargs: test ' + $folder.FullName + ' -c Release -f netcoreapp1.0'\n $filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'\n & $openCover '-target:C:\\Program Files\\dotnet\\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\\bin\\release\\netcoreapp1.0' '-output:coverage\\coverage.xml'\n }\n else\n {\n Write-Output \"Pull request number is $env:APPVEYOR_PULL_REQUEST_NUMBER. Skipping tests.\"\n }\n }\n}\n\nC:\\projects\\dotnet-standard-sdk\\packages\\ReportGenerator.2.4.5.0\\tools\\ReportGenerator.exe -reports:coverage\\coverage.xml -targetdir:coverage -verbosity:Error\n\nif($env:COVERALLS_REPO_TOKEN)\n{\n C:\\projects\\dotnet-standard-sdk\\packages\\coveralls.net.0.7.0\\tools\\csmacnz.Coveralls.exe --opencover -i coverage\\coverage.xml --useRelativePaths\n}\nelse\n{\n Write-Output \"There is no Coveralls Repo Token - not pushing coverage.\"\n}"
9296
artifacts:
9397
- path: '\src\IBM.WatsonDeveloperCloud\bin\$(configuration)\*.nupkg'
9498
name: IBM.WatsonDeveloperCloud
95-
- path: '\src\IBM.WatsonDeveloperCloud.Conversation\bin\$(configuration)\*.nupkg'
96-
name: IBM.WatsonDeveloperCloud.Conversation
97-
- path: '\src\IBM.WatsonDeveloperCloud.LanguageTranslator\bin\$(configuration)\*.nupkg'
98-
name: IBM.WatsonDeveloperCloud.LanguageTranslator
99-
- path: '\src\IBM.WatsonDeveloperCloud.PersonalityInsights\bin\$(configuration)\*.nupkg'
100-
name: IBM.WatsonDeveloperCloud.PersonalityInsights
101-
- path: '\src\IBM.WatsonDeveloperCloud.SpeechToText\bin\$(configuration)\*.nupkg'
102-
name: IBM.WatsonDeveloperCloud.SpeechToText
103-
- path: '\src\IBM.WatsonDeveloperCloud.TextToSpeech\bin\$(configuration)\*.nupkg'
104-
name: IBM.WatsonDeveloperCloud.TextToSpeech
105-
- path: '\src\IBM.WatsonDeveloperCloud.ToneAnalyzer\bin\$(configuration)\*.nupkg'
106-
name: IBM.WatsonDeveloperCloud.ToneAnalyzer
107-
- path: '\src\IBM.WatsonDeveloperCloud.VisualRecognition\bin\$(configuration)\*.nupkg'
108-
name: IBM.WatsonDeveloperCloud.VisualRecognition
99+
- path: '\src\IBM.WatsonDeveloperCloud.Conversation.v1\bin\$(configuration)\*.nupkg'
100+
name: IBM.WatsonDeveloperCloud.Conversation.v1
101+
- path: '\src\IBM.WatsonDeveloperCloud.LanguageTranslator.v2\bin\$(configuration)\*.nupkg'
102+
name: IBM.WatsonDeveloperCloud.LanguageTranslator.v2
103+
- path: '\src\IBM.WatsonDeveloperCloud.PersonalityInsights.v3\bin\$(configuration)\*.nupkg'
104+
name: IBM.WatsonDeveloperCloud.PersonalityInsights.v3
105+
- path: '\src\IBM.WatsonDeveloperCloud.SpeechToText.v1\bin\$(configuration)\*.nupkg'
106+
name: IBM.WatsonDeveloperCloud.SpeechToText.v1
107+
- path: '\src\IBM.WatsonDeveloperCloud.TextToSpeech.v1\bin\$(configuration)\*.nupkg'
108+
name: IBM.WatsonDeveloperCloud.TextToSpeech.v1
109+
- path: '\src\IBM.WatsonDeveloperCloud.ToneAnalyzer.v3\bin\$(configuration)\*.nupkg'
110+
name: IBM.WatsonDeveloperCloud.ToneAnalyzer.v3
111+
- path: '\src\IBM.WatsonDeveloperCloud.VisualRecognition.v3\bin\$(configuration)\*.nupkg'
112+
name: IBM.WatsonDeveloperCloud.VisualRecognition.v3
113+
- path: '\src\IBM.WatsonDeveloperCloud.Discovery.v1\bin\$(configuration)\*.nupkg'
114+
name: IBM.WatsonDeveloperCloud.Discovery.v1
115+
- path: '\src\IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1\bin\$(configuration)\*.nupkg'
116+
name: IBM.WatsonDeveloperCloud.NaturalLanguageUnderstanding.v1
109117
deploy:
110118
- provider: NuGet
111119
api_key:
112120
secure: AaqUbQ5mJm8bYbpNH7GbAzYl45fZZHpqeNdtSd0wQNxjgYmLmvtMU5eByA/mkhxB
113121
on:
114-
branch: release
122+
branch: master
115123
APPVEYOR_REPO_TAG: true

config.enc

368 Bytes
Binary file not shown.

coverage.ps1

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
if((Test-Path -Path coverage))
2+
{
3+
Remove-Item .\coverage -recurse
4+
}
5+
6+
dotnet restore
7+
8+
if((Test-Path -Path packages))
9+
{
10+
Remove-Item .\packages -recurse
11+
}
12+
13+
New-Item -path . -name packages -itemtype directory
14+
nuget install -Verbosity quiet -OutputDirectory packages -Version 4.6.519 OpenCover
15+
nuget install -Verbosity quiet -OutputDirectory packages -Version 2.4.5.0 ReportGenerator
16+
17+
New-Item -path . -name coverage -itemtype directory
18+
Copy-Item .\test\IBM.WatsonDeveloperCloud.VisualRecognition.v3.IntegrationTests\VisualRecognitionTestData .\VisualRecognitionTestData -recurse
19+
Copy-Item .\test\IBM.WatsonDeveloperCloud.SpeechToText.v1.IntegrationTests\SpeechToTextTestData .\SpeechToTextTestData -recurse
20+
Copy-Item .\test\IBM.WatsonDeveloperCloud.Discovery.v1.IntegrationTests\DiscoveryTestData .\DiscoveryTestData -recurse
21+
22+
$openCover = '.\packages\OpenCover.4.6.519\tools\OpenCover.Console.exe'
23+
24+
ForEach($projectFolder in (Get-ChildItem -Path .\src -Directory))
25+
{
26+
$projectJson = $projectFolder.FullName + '\project.json'
27+
echo 'building ' $projectFolder.Name
28+
dotnet build $projectJson
29+
}
30+
31+
ForEach ($folder in (Get-ChildItem -Path .\test -Directory))
32+
{
33+
if(!$folder.Name.Contains("TextToSpeech"))
34+
{
35+
$targetArgs = '-targetargs: test \"' + $folder.FullName + '\" -c Debug -f netcoreapp1.0'
36+
$filter = '-filter:+[IBM.WatsonDeveloperCloud*]*-[*Tests*]*-[*Example*]*'
37+
& $openCover '-target:C:\Program Files\dotnet\dotnet.exe' $targetArgs '-register:user' $filter '-oldStyle' '-mergeoutput' '-hideskipped:File' '-searchdirs:$testdir\bin\Debug\netstandard1.6' '-output:coverage\coverage.xml'
38+
}
39+
}
40+
41+
$reportGenerator = '.\packages\ReportGenerator.2.4.5.0\tools\ReportGenerator.exe'
42+
& $reportGenerator -reports:coverage\coverage.xml -targetdir:coverage -verbosity:Error
43+
44+
Remove-Item .\VisualRecognitionTestData -recurse
45+
Remove-Item .\SpeechToTextTestData -recurse
46+
Remove-Item .\DiscoveryTestData -recurse
47+
Remove-Item .\packages -recurse

examples/IBM.WatsonDeveloperCloud.Conversation.Example/ConversationServiceExample.cs

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)