@@ -53,7 +53,6 @@ def search(self, i):
5353 if not i .get ('target_name' ):
5454 i ['target_name' ] = "script"
5555 res = self .parent .search (i )
56- #print(res)
5756 return res
5857
5958 find = search
@@ -235,6 +234,8 @@ def call_script_module_function(self, function_name, run_args):
235234 result = automation_instance .test (run_args ) # Pass args to the run method
236235 elif function_name == "experiment" :
237236 result = automation_instance .experiment (run_args ) # Pass args to the experiment method
237+ elif function_name == "doc" :
238+ result = automation_instance .doc (run_args ) # Pass args to the doc method
238239 else :
239240 return {'return' : 1 , 'error' : f'Function { function_name } is not supported' }
240241
@@ -284,6 +285,7 @@ def docker(self, run_args):
284285 """
285286 return self .call_script_module_function ("docker" , run_args )
286287
288+
287289 def run (self , run_args ):
288290 """
289291 ####################################################################################################################
@@ -306,11 +308,12 @@ def run(self, run_args):
306308 """
307309 return self .call_script_module_function ("run" , run_args )
308310
311+
309312 def test (self , run_args ):
310313 """
311314 ####################################################################################################################
312315 Target: Script
313- Action: Run
316+ Action: test
314317 ####################################################################################################################
315318
316319 The `test` action validates scripts that are configured with a `tests` section in `meta.yaml`.
@@ -322,10 +325,29 @@ def test(self, run_args):
322325 """
323326 return self .call_script_module_function ("test" , run_args )
324327
328+
329+ def doc (self , run_args ):
330+ """
331+ ####################################################################################################################
332+ Target: Script
333+ Action: doc
334+ ####################################################################################################################
335+
336+ The `doc` action creates automatic README for scripts from the contents in `meta.yaml`.
337+
338+ Example Command:
339+
340+ mlc doc script --tags=detect,os
341+
342+ """
343+ return self .call_script_module_function ("doc" , run_args )
344+
345+
325346 def help (self , run_args ):
326347 # Internal function to call the help function in script automation module.py
327348 return self .call_script_module_function ("help" , run_args )
328349
350+
329351 def list (self , args ):
330352 """
331353 ####################################################################################################################
0 commit comments