Skip to content

Commit

Permalink
bugfix + indent
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 19, 2023
1 parent 5b01882 commit a51662e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions zntrack/project/zntrack_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,9 @@ def auto_remove(self, remove_empty_dirs=True):
if node_name not in graph_node_names:
if "+" in node_name:
# currently there is no way to remove the zntrack.deps Nodes correctly
parent_node = node_name.split("+")[0]
if parent_node not in graph_node_names:
nodes_to_remove.append(node_name)
# print(f"Removing {node_name} from dvc.yaml")
# so we check for the parent node, if that is not available, we remove
# the node
continue
else:
nodes_to_remove.append(node_name)

Expand All @@ -197,7 +196,7 @@ def auto_remove(self, remove_empty_dirs=True):
run_dvc_cmd(["remove", node_name, "--outs"])
_ = zntrack_config.pop(node_name, None)

config.files.zntrack.write_text(json.dumps(zntrack_config))
config.files.zntrack.write_text(json.dumps(zntrack_config, indent=4))

if remove_empty_dirs:
# remove all empty directories inside "nodes"
Expand Down

0 comments on commit a51662e

Please sign in to comment.