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

feat: adding amplify cli predictions category #1936

Merged
merged 8 commits into from
Jul 31, 2019
Merged

Conversation

kaustavghosh06
Copy link
Contributor

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:

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)
Copy link
Contributor

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__
Copy link
Contributor

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 |
Copy link
Contributor

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. |
Copy link
Contributor

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,
};
Copy link
Contributor

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.

Copy link
Contributor

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) => {
Copy link
Contributor

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`,
Copy link
Contributor

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',
Copy link
Contributor

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
Copy link
Contributor

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')
Copy link
Contributor

Choose a reason for hiding this comment

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

same callout as above

Copy link
Contributor

@sammartinez sammartinez left a 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!

@kaustavghosh06 kaustavghosh06 merged commit b7b7c2c into master Jul 31, 2019
akshbhu pushed a commit to akshbhu/amplify-cli that referenced this pull request Aug 20, 2019
@github-actions
Copy link

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 *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2021
@danielleadams danielleadams deleted the predictions-merge branch November 21, 2022 19:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants