Skip to content

Commit

Permalink
Merge pull request #829 from camsys/patch-gitignore-workflow-outputs
Browse files Browse the repository at this point in the history
Automatically ignore output directories from workflow runs
  • Loading branch information
jpn-- authored Mar 7, 2024
2 parents 2f9afa0 + a08edd4 commit 6d817be
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions activitysim/workflows/steps/contrast/directory_prep.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from __future__ import annotations

import os
from pathlib import Path

Expand Down Expand Up @@ -28,6 +30,9 @@ def directory_prep(
):
archive_dir = f"{workspace}/{example_name}/output-{tag}"
os.makedirs(archive_dir, exist_ok=True)
gitignore = Path(archive_dir) / ".gitignore"
if not gitignore.exists():
gitignore.write_text("**\n")
if compile:
_prep_dir(f"{archive_dir}/output-compile")
if sharrow:
Expand Down

0 comments on commit 6d817be

Please sign in to comment.