@@ -57,7 +57,13 @@ def launch_local(
5757 IOC project folder.
5858 """
5959 DevCommands ().launch_local (
60- ioc_instance , generic_ioc , execute , target , tag , args , ioc_name
60+ ioc_instance = ioc_instance ,
61+ generic_ioc = generic_ioc ,
62+ execute = execute ,
63+ target = target ,
64+ tag = tag ,
65+ args = args ,
66+ ioc_name = ioc_name ,
6167 )
6268
6369
@@ -67,9 +73,9 @@ def launch(
6773 ioc_instance : Path = typer .Argument (
6874 ...,
6975 help = "local IOC definition folder from domain repo" ,
70- dir_okay = True ,
7176 file_okay = False ,
7277 exists = True ,
78+ resolve_path = True ,
7379 ),
7480 execute : str = typer .Option (
7581 f"{ IOC_START } ; bash" ,
@@ -93,12 +99,22 @@ def launch(
9399 instances. You may find the devcontainer a more convenient way to
94100 do this.
95101 """
96- DevCommands ().launch (ioc_instance , execute , target , image , tag , args , ioc_name )
102+ DevCommands ().launch (
103+ ioc_instance = ioc_instance ,
104+ execute = execute ,
105+ target = target ,
106+ image = image ,
107+ tag = tag ,
108+ args = args ,
109+ ioc_name = ioc_name ,
110+ )
97111
98112
99113@dev .command ()
100114def debug_last (
101- generic_ioc : Path = typer .Argument (Path ("." ), help = "Container project folder" ),
115+ generic_ioc : Path = typer .Argument (
116+ Path ("." ), help = "Container project folder" , exists = True , file_okay = False
117+ ),
102118 mount_repos : bool = typer .Option (
103119 True , help = "Mount generic IOC repo folder into the container"
104120 ),
@@ -108,13 +124,15 @@ def debug_last(
108124 Useful for debugging failed builds - if the last build failed it will
109125 start the container after the most recent successful build step.
110126 """
111- DevCommands ().debug_last (generic_ioc , mount_repos )
127+ DevCommands ().debug_last (generic_ioc = generic_ioc , mount_repos = mount_repos )
112128
113129
114130@dev .command ()
115131def versions (
116132 ctx : typer .Context ,
117- generic_ioc : Path = typer .Argument (Path ("." ), help = "Generic IOC project folder" ),
133+ generic_ioc : Path = typer .Argument (
134+ Path ("." ), help = "Generic IOC project folder" , exists = True , file_okay = False
135+ ),
118136 arch : Architecture = typer .Option (
119137 Architecture .linux , help = "choose target architecture"
120138 ),
@@ -129,7 +147,7 @@ def versions(
129147 or the local project folder (defaults to .) e.g.
130148 ec dev versions ../ioc-template
131149 """
132- DevCommands ().versions (generic_ioc , arch , image )
150+ DevCommands ().versions (generic_ioc = generic_ioc , arch = arch , image = image )
133151
134152
135153@dev .command ()
@@ -142,24 +160,24 @@ def stop(
142160 """
143161 Stop a running local IOC container
144162 """
145- DevCommands ().stop (ioc_name )
163+ DevCommands ().stop (ioc_name = ioc_name )
146164
147165
148166@dev .command ()
149167def exec (
150168 ctx : typer .Context ,
151- ioc_name : str = typer .Option (
152- IOC_NAME , help = "container name override. Use to run multiple instances"
153- ),
154169 command : str = typer .Argument (
155170 "bash" , help = "command to execute inside the container must be 'single quoted'"
156171 ),
172+ ioc_name : str = typer .Option (
173+ IOC_NAME , help = "container name override. Use to run multiple instances"
174+ ),
157175 args : str = typer .Option ("" , help = "Additional args for exec, 'must be quoted'" ),
158176):
159177 """
160178 Execute a command inside a running local IOC container
161179 """
162- DevCommands ().exec (ioc_name , command , args )
180+ DevCommands ().exec (ioc_name = ioc_name , command = command , args = args )
163181
164182
165183@dev .command ()
@@ -176,13 +194,15 @@ def wait_pv(
176194 """
177195 Execute a command inside a running local IOC container
178196 """
179- DevCommands ().wait_pv (pv_name , ioc_name , attempts )
197+ DevCommands ().wait_pv (pv_name = pv_name , ioc_name = ioc_name , attempts = attempts )
180198
181199
182200@dev .command ()
183201def build (
184202 ctx : typer .Context ,
185- generic_ioc : Path = typer .Option (Path ("." ), help = "Generic IOC project folder" ),
203+ generic_ioc : Path = typer .Option (
204+ Path ("." ), help = "Generic IOC project folder" , exists = True , file_okay = False
205+ ),
186206 tag : str = typer .Option (IMAGE_TAG , help = "version tag for the image" ),
187207 arch : Architecture = typer .Option (
188208 Architecture .linux , help = "choose target architecture"
@@ -200,13 +220,13 @@ def build(
200220 Builds both developer and runtime targets.
201221 """
202222 DevCommands ().build (
203- generic_ioc ,
204- tag ,
205- arch ,
206- platform ,
207- cache ,
208- cache_to ,
209- cache_from ,
210- push ,
211- rebuild ,
223+ generic_ioc = generic_ioc ,
224+ tag = tag ,
225+ arch = arch ,
226+ platform = platform ,
227+ cache = cache ,
228+ cache_from = cache_from ,
229+ cache_to = cache_to ,
230+ push = push ,
231+ rebuild = rebuild ,
212232 )
0 commit comments