Coverage for gws-app/gws/plugin/gekos/cli.py: 0%

13 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-10-05 13:35 +0200

1"""Command line commands for GekoS.""" 

2 

3from typing import Optional, cast 

4 

5import gws 

6import gws.base.action 

7 

8from . import action 

9 

10 

11class CreateIndexParams(gws.CliParams): 

12 """Parameters for creating the GEKOS index.""" 

13 

14 projectUid: Optional[str] 

15 """Project uid.""" 

16 

17 

18@gws.ext.object.cli('gekos') 

19class Object(gws.Node): 

20 """GekoS command line interface.""" 

21 

22 @gws.ext.command.cli('gekosIndex') 

23 def do_index(self, p: CreateIndexParams): 

24 """Create the GekoS index.""" 

25 

26 root = gws.load_root() 

27 act = cast(action.Object, gws.base.action.get_action_for_cli(root, 'gekos', p.projectUid)) 

28 act.idx.create()