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

Rebuilding nests... #11

Open
metasoarous opened this issue Feb 25, 2012 · 1 comment
Open

Rebuilding nests... #11

metasoarous opened this issue Feb 25, 2012 · 1 comment

Comments

@metasoarous
Copy link
Member

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.

@cmccoy
Copy link
Member

cmccoy commented Feb 26, 2012

Having nestrun issue a warning when passed control files with different depths would be great.

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

No branches or pull requests

2 participants