Skip to content

Commit 7df1a10

Browse files
committed
test edge rendering
1 parent 2522471 commit 7df1a10

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

skdag/dag/_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def to_agraph(self, detailed):
141141
)
142142
colrepr = f"column_selector({selrepr})"
143143
else:
144-
colrepr = f"{cols.__name__}()"
144+
colrepr = f"{selector.__name__}()"
145145
else:
146146
colrepr = repr(cols)
147147

skdag/dag/tests/test_dag.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,14 @@ def test_dag_draw():
292292
dag = (
293293
DAGBuilder()
294294
.add_step("pca", pca)
295-
.add_step("svc", svc, deps={"pca": slice(4)})
296-
.add_step("rf1", rf, deps={"pca": [0, 1, 2]})
295+
.add_step("svc1", svc, deps={"pca": slice(4)})
296+
.add_step("svc2", svc, deps={"pca": [0, 1, 2]})
297+
.add_step(
298+
"svc3", svc, deps={"pca": lambda X: [c for c in X if c.startswith("foo")]}
299+
)
300+
.add_step("rf1", rf, deps={"pca": [0, 1, 2, 3, 4, 5, 6, 7, 8]})
297301
.add_step("rf2", rf, deps={"pca": make_column_selector(pattern="^pca.*")})
298-
.add_step("log", log, deps=["svc", "rf1", "rf2"])
302+
.add_step("log", log, deps=["svc1", "svc2", "rf1", "rf2"])
299303
.make_dag()
300304
)
301305

0 commit comments

Comments
 (0)