Skip to content

Commit bf1ddd1

Browse files
committed
add .gustyignore functionality
1 parent 3b6f144 commit bf1ddd1

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

gusty/building.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def create_schematic(dag_dir, parsers=default_parsers):
8181
}
8282
for dir, subdirs, files in os.walk(dag_dir)
8383
if not os.path.basename(dir).startswith(("_", "."))
84+
and not os.path.exists(dir + "/.gustyignore")
8485
}
8586

8687

tests/dags/with_metadata/ignored/.gustyignore

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("I should be ignored")

tests/test_adjusted_behavior.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,7 @@ def test_context_rendering_omits_sql(dag):
191191

192192
def test_context_rendering_py(dag):
193193
assert dag.task_dict["py_task"].__dict__["python_callable"]() == "hey"
194+
195+
196+
def test_gusty_ignored_folder(dag):
197+
assert "ignored.ignored_ignored" not in dag.task_dict.keys()

0 commit comments

Comments
 (0)