Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use groups to create subdirectories in nwd #660

Closed
PythonFZ opened this issue Jul 20, 2023 · 0 comments · Fixed by #661
Closed

Use groups to create subdirectories in nwd #660

PythonFZ opened this issue Jul 20, 2023 · 0 comments · Fixed by #661

Comments

@PythonFZ
Copy link
Member

PythonFZ commented Jul 20, 2023

The following:

with zntrack.Project(automatic_node_names=True) as project:
  node_1 = WriteIO(inputs="Lorem Ipsum")
  with project.group() as group_1:
      node_2 = WriteIO(inputs="Dolor Sit")
  with project.group(name="CustomGroup") as group_2:
      node_3 = WriteIO(inputs="Adipiscing Elit")

should yield:

node_1.nwd = "nodes/WriteIO"
node_2.nwd = "nodes/Group_1/WriteIO" # or nodes/Group1/Group1_WriteIO_1
node_3.nwd = "nodes/CustomGroup/WriteIO" # or nodes/CustomGroup/CustomGroup_WriteIO_1

where

node_1.name = "WriteIO"
node_2.name = "Group1_WriteIO_1"
node_3.name = "CustomGroup_WriteIO_1"
@PythonFZ PythonFZ linked a pull request Jul 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant