-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path__init__.py
60 lines (45 loc) · 1.29 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import click
from .commands.helpers import cfg
from .commands.sandbox import sandbox
from .commands.service import service
from .commands.skill import skill
@click.group()
def entry_point():
"""wa-cli allows you to
\b
* create individual developer sandboxes for Watson Assistant skills
* decompose skill JSON files into diff friendly XML and CSV files
* clone the skills from a service to another service
* run k-fold tests on a skill file
* download, deploy and delete skills
"""
pass
@entry_point.command()
@click.option('--main-branch', default='master', show_default=True)
@click.option('--no-prompt', default=False, is_flag=True)
def init(main_branch, no_prompt):
"""
Initialise the current folder for further work with wa-cli
"""
cfg.init(not no_prompt, main_branch)
if os.name != 'nt':
@entry_point.command()
def env():
"""
Instructions to enable command completion
"""
cfg.env_help()
@entry_point.command()
def travis():
"""
Add a .travis.yml file to run dialog flow tests
"""
cfg.travis()
entry_point.add_command(sandbox)
entry_point.add_command(service)
entry_point.add_command(skill)
if __name__ == "__main__":
entry_point()