Skip to content

Commit 9eb7e54

Browse files
committed
git support generating function-yaml from root- directory
1 parent 6310852 commit 9eb7e54

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cli/item_to_function.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,11 @@ def item_to_function(item_path: str, output_path: Optional[str] = None, root_dir
3131
print(inner_file_dir)
3232
try:
3333
item_to_function_from_path(str(inner_file_dir), output_file_path)
34-
except Exception:
34+
except Exception :
3535
print("failed to generate yaml for {}".format(str(inner_dir)))
3636

3737

3838
def item_to_function_from_path(item_path: str, output_path: Optional[str] = None):
39-
4039
item_path = Path(item_path)
4140
base_path = ""
4241
if item_path.is_dir():
@@ -59,7 +58,6 @@ def item_to_function_from_path(item_path: str, output_path: Optional[str] = None
5958
code_output = code_output.parent / f"{code_output.stem}.py"
6059
code_file_name = get_filename(base_path, item_yaml)
6160

62-
#print("item path: {} , output_path: {} , filename: {} ,base_path : {}".format(item_path,output_path,filename,base_path))
6361
function_object = code_to_function(
6462
name=item_yaml["name"],
6563
filename=code_file_name,
@@ -95,5 +93,6 @@ def get_filename(base_path, item_yaml):
9593
filename = base_path + "/" + item_yaml.get("spec", {}).get("filename")
9694
return filename
9795

96+
9897
if __name__ == "__main__":
9998
item_to_function()

0 commit comments

Comments
 (0)