Skip to content

Commit 6d817be

Browse files
authored
Merge pull request #829 from camsys/patch-gitignore-workflow-outputs
Automatically ignore output directories from workflow runs
2 parents 2f9afa0 + a08edd4 commit 6d817be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

activitysim/workflows/steps/contrast/directory_prep.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from __future__ import annotations
2+
13
import os
24
from pathlib import Path
35

@@ -28,6 +30,9 @@ def directory_prep(
2830
):
2931
archive_dir = f"{workspace}/{example_name}/output-{tag}"
3032
os.makedirs(archive_dir, exist_ok=True)
33+
gitignore = Path(archive_dir) / ".gitignore"
34+
if not gitignore.exists():
35+
gitignore.write_text("**\n")
3136
if compile:
3237
_prep_dir(f"{archive_dir}/output-compile")
3338
if sharrow:

0 commit comments

Comments
 (0)