openalea/openalea — pull request #91 by gbaty (2014-10-24 13:24:20+00:00)
Title: Clean model: first pass

This branch aim at fixing two issue about models:
- Model aspects (run, step, namespace, ...) and file aspects (read, save, path, ...) are currently mixed in Model class
- Namespace, free variables are not properly managed.

Idea behin this branch is two split Model in two part:
- Model aspects remains in Model
- File aspects will move to an other class, for example Data

For backward compatibility, previous model is kept and called FileModel.
This class is temporary and will disappear soon. Name has been chosen to illustrate that this class manage both File and Model aspects.

New Model class support all previous model features : run, step, animate, ...
Variable used in step methods are defined in this order
- if inputs are defined explicitly, use it (ex: model.run(a=1, b=2))
- else, if model has default values, use its (ex: header "input =a=1, b=2" defined in source code)
- if nor default value, nor explicit value are defined or variable is a free variable (not defined in inputs):
- if a control with this name is defined, use it
- else use variable from shell
- if no variable are defined, raise NameError