amplify-swift/AmplifyPlugins/Predictions/AWSPredictionsPluginIntegra...
Sebastian Villena 08d7313870
chore: Fixing SwiftLint warnings (#2732)
* chore: Fixing SwiftLint warnings in Amplify project

* chore: Fixing SwiftLint warnings in APICategoryPlugin  project

* chore: Fixing SwiftLint warnings in AnalyticsCategoryPlugin project

* chore: Fixing SwiftLint warnings in AWSCognitoAuthPlugin project

* chore: Fixing SwiftLint warnings in DataStoreCategoryPlugin project

* chore: Fixing SwiftLint warnings in PredictionsCategoryPlugin project

* chore: Fixing SwiftLint warnings in StoragePlugin project
2023-02-08 15:06:41 -05:00
..
Resources fix(predictions): TABLE, CELL & KEY_VALUE_SET blocks are not properly processed (#660) 2020-08-10 16:35:19 -07:00
AWSPredictionsPluginTestBase.swift test: Update predictions test to fix failures (#1747) 2022-04-15 11:09:54 -07:00
ConvertBasicIntegrationTests.swift chore: Remove copyright year from .swift, .h, .plist files (#1008) 2021-01-06 11:44:40 -08:00
IdentifyBasicIntegrationTests.swift chore: Fixing SwiftLint warnings (#2732) 2023-02-08 15:06:41 -05:00
InterpretBasicIntegrationTests.swift chore: Fixing SwiftLint warnings (#2732) 2023-02-08 15:06:41 -05:00
README.md fix(predictions): TABLE, CELL & KEY_VALUE_SET blocks are not properly processed (#660) 2020-08-10 16:35:19 -07:00

README.md

AWSPredictionsPluginIntegrationTests

The following steps demonstrate how to set up DataStore with a conflict resolution enabled API through amplify CLI, with API key authentication mode.

Set-up

  1. amplify init and choose iOS for type of app you are building

  2. amplify add predictions to add Identify Labels function

? Please select from one of the categories below `Identify`
? You need to add auth (Amazon Cognito) to your project in order to add storage 
for user files. Do you want to add auth now? `Yes`
? Do you want to use the default authentication and security configuration? `Default configuration`
? How do you want users to be able to sign in? `Username`
? Do you want to configure advanced settings? `No, I am done`
? What would you like to identify? `Identify Labels`
? Provide a friendly name for your resource `yourResourceName`
? Would you like use the default configuration? `Default configuration`
? Who should have access? `Auth and Guest users`
  1. amplify add predictions to add Identify Entities function
? Please select from one of the categories below `Identify`
? What would you like to identify? `Identify Entities`
? Provide a friendly name for your resource `yourResourceName`
? Would you like use the default configuration? `Default configuration`
? Who should have access? `Auth and Guest users`
  1. amplify add predictions to add Identify Text function
? Please select from one of the categories below `Identify`
? What would you like to identify? `Identify Text`
? Provide a friendly name for your resource `yourResourceName`
? Would you also like to identify documents? `Yes`
? Who should have access? `Auth and Guest users`
  1. amplify add predictions to add interpret text function
? Please select from one of the categories below `Interpret`
? What would you like to interpret? `Interpret Text`
? Provide a friendly name for your resource `yourResourceName`
? What kind of interpretation would you like? `All`
? Who should have access? `Auth and Guest users`
  1. amplify add predictions to add convert speech to text function
? Please select from one of the categories below `Convert`
? What would you like to convert? `Transcribe text from audio`
? Provide a friendly name for your resource `yourResourceName`
? What is the source language? `US English`
? Who should have access? `Auth and Guest users`

Notice when provisioning resource for speech conversion, we are using Amazon Transcribe (real-time streaming) which is not supported on every region. You can simply change the region inside convert block to the supported region code Example: eu-west-2 doesn't support Amazon Transcribe (real-time streaming) so that you can change it to eu-west-1 where supports the service You can find the information in Region Table

  1. amplify push

  2. Copy amplifyconfiguration.json over to the Configuration folder

You should now be able to run all of the tests

Images used for integration tests:

  1. testImageText.jpg sketchbook-comp-4-text-and-image by Ana Curado e Silva is licensed under CC BY-NC-ND 4.0
  2. testImageCeleb.jpg celebrities and politicians by William Coupon is licensed under CC BY-NC-ND 4.0
  3. testimageTextAll.jpg amazon-textract-code-samples-files