2929logging .getLogger ('caf' ).setLevel (int (os .environ .get ('CAF_DEBUG' , logging .INFO )))
3030
3131
32- @click .group (chain = True )
32+ @click .group ()
3333@click .pass_context
3434def cli (ctx : click .Context ) -> None :
3535 ctx .ensure_object (App )
@@ -38,6 +38,7 @@ def cli(ctx: click.Context) -> None:
3838@cli .command ()
3939@click .pass_obj
4040def init (app : App ) -> None :
41+ """Initialize a Git repository."""
4142 app .ensure_cafdir ()
4243
4344
@@ -87,6 +88,7 @@ def run(
8788 maxerror : int ,
8889 rulename : str ,
8990) -> None :
91+ """Run a given rule."""
9092 rule = import_fullname (rulename )
9193 task_filter = TaskFilter (pattern , no_path = not path )
9294 exception_buffer = ExceptionBuffer (maxerror )
@@ -104,6 +106,7 @@ def run(
104106@click .argument ('rulename' , metavar = 'RULE' , envvar = 'CAF_RULE' )
105107@click .pass_obj
106108def status (app : App , rulename : str , pattern : List [str ]) -> None :
109+ """Print status of tasks."""
107110 rule = import_fullname (rulename )
108111 sess = app .session (warn = False , readonly = True , full_restore = True )
109112 ncols = len (STATE_COLORS ) + 1
@@ -144,6 +147,7 @@ def status(app: App, rulename: str, pattern: List[str]) -> None:
144147@click .argument ('rulename' , metavar = 'RULE' , envvar = 'CAF_RULE' )
145148@click .pass_obj
146149def graph (app : App , rulename : str ) -> None :
150+ """Open a pdf with the task graph."""
147151 rule = import_fullname (rulename )
148152 sess = app .session (warn = False , readonly = True , full_restore = True )
149153 with sess :
@@ -169,6 +173,7 @@ def checkout(
169173 done : bool ,
170174 copy : bool ,
171175) -> None :
176+ """Checkout path-labeled tasks into a directory tree."""
172177 if blddir .exists () and force :
173178 shutil .rmtree (blddir )
174179 blddir .mkdir ()
0 commit comments