Home | Download/Install | Documentation | Packages | Screenshots | News | Forum/Mailing-lists | Contact | GForge

Wralea & Package declaration

Problem

Use case : User should be able to copy dynamically a package to a new package in order to change it without changing the original one.

Pb : It is not possible to determine what are the files to copy. OpenAlea packages are declared in a *_wralea.py file. It is possible to declare several packages in the same wralea file. Also, it is possible to add several wralea file in the same directory. It is this very difficult to determine what are the dependencies of an openalea package.

Proposed solution

We propose to change the package declaration as follow :

  • A package = A directory with only one wralea
  • Wralea file is name __wralea__.py (it is unique)
  • The package declaration in the wralea is done as follow :
__doc__ = """ Catalog.Data """
__license__ = "Cecill-C"
__revision__ =" $Id: data_wralea.py 997 2007-12-13 14:38:21Z dufourko $ "
 
 
from openalea.core import *
 
 
__name__ = "Catalog.Data"
__version__ =  '0.0.1',
__license__ = "Cecill-C"
__authors__ = 'OpenAlea Consortium',
__institutes__ = 'INRIA/CIRAD',
__description__ = 'Base library.',
__url__ = 'http://openalea.gforge.inria.fr'
 
 
__all__ = ['string', 'text']
string = Factory( name="string", 
              description="String", 
              category="Type", 
              nodemodule="data",
              nodeclass="String",
              inputs=(dict(name="String", interface=IStr, value=''),),
              outputs=(dict(name="String", interface=IStr),),
              )
 
text = Factory( name="text", 
              description="Text", 
              category="Type", 
              nodemodule="data",
              nodeclass="Text",
 
              inputs=(dict(name="Text", interface=ITextStr, value=''),),
              outputs=(dict(name="Text", interface=ITextStr),),
              )
 
 
...

nota : if the name field is not filled, the name become the full python package name.

 
documentation/core/propositions/101_wralea_and_package_declaration.txt · Last modified: 2010/12/07 15:50 by user   Back to top
INRIA   INRA     CIRAD     AGROPOLIS IBC
INRIA GForge RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki