-
Notifications
You must be signed in to change notification settings - Fork 816
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
feat: adding amplify cli predictions category #1936
Conversation
Readme.md
Outdated
@@ -68,6 +68,7 @@ The Amplify CLI supports the commands shown in the following table. | |||
- [hosting (Amazon S3 and Amazon CloudFront distribution)](packages/amplify-category-hosting/Readme.md) | |||
- [notifications (Amazon Pinpoint)](packages/amplify-category-notifications/Readme.md) | |||
- [interactions (Amazon Lex)](packages/amplify-category-interactions/Readme.md) | |||
- [predictions (Amazon Rekognition, Amazon Textract, Amazon Translate, Amazon Polly, Amazon Transcribe, Amazomn Comprehend, and Amazon SageMaker)](packages/amplify-category-predictions/Readme.md) |
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.
Typo on Amazomn Comprehend
@@ -0,0 +1,5 @@ | |||
node_modules | |||
__tests__ | |||
__mockes__ |
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.
Possible typo? on __mockes__
|
||
| Command | Description | | ||
| --- | --- | | ||
| amplify predictions add | Takes you through a CLI flow to add an predictions resource to your backend | |
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.
Walks you through...
may be a better flow
| Command | Description | | ||
| --- | --- | | ||
| amplify predictions add | Takes you through a CLI flow to add an predictions resource to your backend | | ||
| amplify predictions update | Takes you through steps in the CLI to update an predictions resource. | |
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.
I believe an
should be a
, same callout as above for walks
export default { | ||
getRegionMapping, | ||
getAvailableRegion, | ||
}; |
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.
@kaustavghosh06 we should look at refactoring this out later to a common mapping across categories. This will help maintenance.
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.
Agreed ☝️
name: subcommand, | ||
alias: ['configure'], | ||
run: async context => promptCategory() | ||
.then((result) => { |
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.
NON-BLOCKING: I feel if you are only using predictionsCategory, provider, fileName
you can do a destruct from the result
const resourceAnswer = await inquirer.prompt({ | ||
type: 'list', | ||
name: 'resource', | ||
messages: `Select an ${result.category} resource`, |
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.
Wouldnt the result.category
just be result
? Seems like on line 14 that you're setting result.category to result
'ap-northeast-2': 'us-east-1', | ||
'ap-southeast-1': 'us-east-1', | ||
'ap-southeast-2': 'us-east-1', | ||
'ap-south-1': 'us-east-1', |
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.
Can we possibly add a warning message letting them know we are defaulting back to us-east-1
nexpect | ||
.spawn(getCLIPath(), ['predictions', 'add'], { cwd, stripColors: true, verbose } ) | ||
.wait('Please select from of the below mentioned categories') | ||
// j = down arrow |
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.
Can we remove dead code if we are not using it?
.spawn(getCLIPath(), ['predictions', 'add'], { cwd, stripColors: true, verbose } ) | ||
.wait('Please select from of the below mentioned categories') | ||
// j = down arrow | ||
// .sendline('j') |
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.
same callout as above
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.
Thanks for doing the updates!
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.Issue #, if available:
Description of changes: