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 luis:application:create cmd and tests / refactor utils and clo… #351

Merged
merged 4 commits into from
Nov 13, 2019

Conversation

jspruance
Copy link

  • create 'luis:application:create' cmd and tests
  • refactor of utils to make input processing more generic
  • update clone cmd to support utils refactor

const {flags} = this.parse(LuisApplicationCreate)
const flagLabels = Object.keys(LuisApplicationCreate.flags)
const configDir = this.config.configDir
const configPrefix = 'luis__'
Copy link
Member

Choose a reason for hiding this comment

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

This should be moved to utils since it is the same for all commands

Copy link
Author

Choose a reason for hiding this comment

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

done

versionId: flags.versionId || (config ? config.luis__versionId : null),
targetVersionId: flags.targetVersionId || (config ? config.luis__targetVersionId : null)
}
const input: any = {}
Copy link
Member

Choose a reason for hiding this comment

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

IMO the previous implementation is clearer to understand what the programs is retrieving from the config, plus it is easier to control the flow

Copy link
Author

Choose a reason for hiding this comment

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

But the previous implementation was hardcoded to one cmd (clone) so it wasn't flexible for general use. That's why I changed it to set the flags dynamically so that it works across the board.

Copy link
Member

@munozemilio munozemilio left a comment

Choose a reason for hiding this comment

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

CIL

@munozemilio munozemilio merged commit 782f25c into master Nov 13, 2019
@munozemilio munozemilio deleted the 302-luis-application-create branch November 13, 2019 22:31
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.

2 participants