Skip to content

Rebuilding nests... #11

@metasoarous

Description

@metasoarous

When rebuilding nests after modifications, nestly doesn't worry too much about existing nests. For example...

from nestly import Nest
nest = Nest()

nest.add('param1', ['a', 'b'])
nest.add('param2', ['d', 'e'])
nest.build('nest')

Build nest and...

find nest #=>
nest
nest/a
nest/a/d
nest/a/d/control.json
nest/a/e
nest/a/e/control.json
nest/b
nest/b/d
nest/b/d/control.json
nest/b/e
nest/b/e/control.json

Now change to

from nestly import Nest
nest = Nest()

nest.add('param1', ['a', 'whoa'])
nest.add('param2', ['d', 'e'])
nest.build('nest')

and we get...

find nest #=>
nest
nest/a
nest/a/d
nest/a/d/control.json
nest/a/e
nest/a/e/control.json
nest/b
nest/b/d
nest/b/d/control.json
nest/b/e
nest/b/e/control.json
nest/whoa
nest/whoa/d
nest/whoa/d/control.json
nest/whoa/e
nest/whoa/e/control.json

This could catch people off guard, and it seems like nestly should at least be so kind as to give you some sort of warning, if not go so far as to ask you how you would like it to procede.

Possibly more/less cumbersome is what happens if you add a new nest parameter. Nestly doesn't delete the control.json files at the internal nodes, so those control files end up getting run, but don't have all of the parameters needed, leading to errors when running nestrun.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions