15
15
def stac_updater ():
16
16
pass
17
17
18
- @stac_updater .command (name = 'new-service' )
18
+ @stac_updater .command (name = 'new-service' , short_help = "build a new service" )
19
19
def new_service ():
20
20
shutil .copyfile (sls_template_path , sls_config_path )
21
21
22
- @stac_updater .command (name = 'update-collection' )
23
- @click .option ('--name' , '-n' , type = str , required = True )
24
- @click .option ('--root' , '-r' , type = str , required = True )
25
- @click .option ('--long-poll/--short-poll' , default = False )
26
- @click .option ('--concurrency' , type = int , default = 1 )
22
+ @stac_updater .command (name = 'update-collection' , short_help = "update a static collection" )
23
+ @click .option ('--name' , '-n' , type = str , required = True , help = "Name of collection, must match catalog name referenced by STAC Items." )
24
+ @click .option ('--root' , '-r' , type = str , required = True , help = "URL of collection." )
25
+ @click .option ('--long-poll/--short-poll' , default = False , help = "Enable long polling." )
26
+ @click .option ('--concurrency' , type = int , default = 1 , help = "Sets lambda concurrency limit when polling the queue." )
27
27
def update_collection (name , root , long_poll , concurrency ):
28
28
# Create a SQS queue for the collection
29
29
# Subscribe SQS queue to SNS topic with filter policy on collection name
@@ -42,9 +42,9 @@ def update_collection(name, root, long_poll, concurrency):
42
42
with open (sls_config_path , 'w' ) as outf :
43
43
yaml .dump (sls_config , outf , indent = 1 )
44
44
45
- @stac_updater .command (name = 'modify-kickoff' )
46
- @click .option ('--type' , '-t' , type = str , default = 'lambda' )
47
- @click .option ('--bucket_name' , '-n' , type = str )
45
+ @stac_updater .command (name = 'modify-kickoff' , short_help = "modify event source of kickoff" )
46
+ @click .option ('--type' , '-t' , type = str , default = 'lambda' , help = "Type of event source used by kickoff." )
47
+ @click .option ('--bucket_name' , '-n' , type = str , help = "Required if type=='s3'; creates new bucket used by event source." )
48
48
def modify_kickoff (type , bucket_name ):
49
49
func_name = 'kickoff'
50
50
@@ -66,8 +66,8 @@ def modify_kickoff(type, bucket_name):
66
66
with open (sls_config_path , 'w' ) as outf :
67
67
yaml .dump (sls_config , outf , indent = 1 )
68
68
69
- @stac_updater .command (name = 'add-notifications' )
70
- @click .option ('--topic_name' , type = str , required = True )
69
+ @stac_updater .command (name = 'add-notifications' , short_help = "notifications on catalog update" )
70
+ @click .option ('--topic_name' , type = str , required = True , help = "Name of SNS topic." )
71
71
def add_notifications (topic_name ):
72
72
# Remove all non-alphanumeric characters
73
73
pattern = re .compile ('[\W_]+' )
@@ -86,7 +86,7 @@ def add_notifications(topic_name):
86
86
with open (sls_config_path , 'w' ) as outf :
87
87
yaml .dump (sls_config , outf , indent = 1 )
88
88
89
- @stac_updater .command (name = 'deploy' )
89
+ @stac_updater .command (name = 'deploy' , short_help = "deploy service to aws" )
90
90
def deploy ():
91
91
subprocess .call ("docker build . -t stac-updater:latest" , shell = True )
92
92
subprocess .call ("docker run --rm -v $PWD:/home/stac_updater -it stac-updater:latest package-service.sh" , shell = True )
0 commit comments