-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Breaking Update
Add UUID output to every Node (#647)
* rename hash to UUID * UUID outs for every node * update cmd * do not allow NWD as outs * test error message * remove commented out code * working mess * clean up a bit * test correct dvc.yaml deps * poetry update * use uuid property
- Loading branch information
Showing
9 changed files
with
295 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import pathlib | ||
|
||
import yaml | ||
|
||
import zntrack | ||
|
||
|
||
class NodeWithOuts(zntrack.Node): | ||
def run(self): | ||
pass | ||
|
||
|
||
class DependentNode(zntrack.Node): | ||
deps = zntrack.zn.deps() | ||
|
||
def run(self): | ||
pass | ||
|
||
|
||
def test_DependentNode(proj_path): | ||
with zntrack.Project() as proj: | ||
a = NodeWithOuts() | ||
b = DependentNode(deps=a) | ||
|
||
proj.run(repro=False) | ||
|
||
dvc_yaml = yaml.safe_load((proj_path / "dvc.yaml").read_text()) | ||
assert ( | ||
dvc_yaml["stages"]["DependentNode"]["cmd"] | ||
== "zntrack run test_zn_deps.DependentNode --name DependentNode" | ||
) | ||
assert dvc_yaml["stages"]["DependentNode"]["deps"] == ["nodes/NodeWithOuts/uuid"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters