Skip to content

Commit f1e1690

Browse files
committed
added some documentation
1 parent c77707f commit f1e1690

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/pavilion/utils.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,17 @@ def path_is_external(path: Path):
196196

197197

198198
def symlinktree(source_directory, destination_directory):
199+
"""Recursively create symlinks from test source directory to builds directory in working_dir"""
200+
199201
for root, dirs, files in os.walk(source_directory):
200202
for file in files:
201203
src_path = os.path.join(root, file)
202204
rel_path = os.path.relpath(src_path, source_directory)
203205
dst_path = os.path.join(destination_directory, rel_path)
204206

205-
# Create
207+
# Create parent dir if it doesn't already exist
206208
os.makedirs(os.path.dirname(dst_path), exist_ok=True)
209+
# Create the symlink
207210
os.symlink(src_path, dst_path)
208211

209212

0 commit comments

Comments
 (0)